r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

RobertS
14-Aug-2009
[16692x2]
not to vex, I hope, but I just saw that PHP 5.3.0 added so-called 
"now docs" which are what I call literal strings or verbaibm strings 
in that no substitiutions occur so no escaping is done.  I believe 
this how at least comment {should behave in R3 if I use a { as in 
just print {this} { to get the effect you want }  which comment is 
not the same which has to explain that you do whis without the escapes 
- which is fine if thosei are the only and very  escapes in question 
...
The PHP restriction on HEREDOC and NOWDOC is that the closing identifier 
( a label, if you like) must appear after a nl and there must be 
ONLY a nl immediatly after its ; terminator  - a restriction  which 
seems not at all onerous in practice now that I am using them
Graham
14-Aug-2009
[16694x2]
In Firebird's sql language, we can specify the delimiter and then 
restore it  after dealing with a bunch of code/text.
Wouldn't that be more useful?
Anton
15-Aug-2009
[16696]
It would.
Pekr
15-Aug-2009
[16697x2]
Tried R2 vs R3 call (R2 used using /output refinement):


1) "icacls c:\windows" - R3 call returns output, but you have to 
press enter to get back to console prompt - why?

2) "dir c:\windows" - R2 works, R3 returns following error - why?

>> call "dir c:\windows"

** Access error: external process failed: "Systém nemůže nalézt uvedený 
soubor.^
M^/"
** Where: call
** Near: call "dir c:\windows"
The Czech error message translated: "System can't find specified 
file"
Anton
15-Aug-2009
[16699]
Works beautifully in linux R3 2.100.76.4.2 :
	call "ls -l user.r"
Pekr
15-Aug-2009
[16700]
do you need to press enter, after the output is returned?
Anton
15-Aug-2009
[16701x2]
No need for me to press enter.
Pekr, is your error true for all types of files?
Is capitalization a problem here? (try capital "C:".)
Are you on Vista, isn't the "windows" directory a protected system 
directory - perhaps that's causing an issue.
Pekr
15-Aug-2009
[16703x3]
Vista, 32 bit. No difference with capitalisation ... I will try with 
fresh console ...
dir C:\
 - no difference ...
it does not seem to know Dir - maybe a path lookup problem?
Anton
15-Aug-2009
[16706x2]
Try just "dir".
Try other commands: call "cmd" ...
Pekr
15-Aug-2009
[16708]
hehe, interesting - I run call "cmd.exe" and now I seem to get the 
mixture of windows shell and rebol one or so? :-) REBOL history is 
gone, when I try print "ahoy", it returns czech message, telling 
me PRN can't be initialised :-)
Anton
15-Aug-2009
[16709]
Cmd invaded your rebol shell.
Pekr
15-Aug-2009
[16710]
Calling just "dir" returns still the same message ...
Anton
15-Aug-2009
[16711]
Use "exit" to get out - (I hope).
Pekr
15-Aug-2009
[16712]
cmd  invaded
 - is that correct and/or desired behaviour?
Anton
15-Aug-2009
[16713]
Probably, I wouldn't worry about it.
Pekr
15-Aug-2009
[16714x3]
>> print "aaa"
Zařízení PRN nelze zinicializovat.

c:\!rebol\altme\worlds\r3-gui\files\rebdev>dir c:\
** Script error: dir has no value


>> exit
the strange thing, that once being in cmd console, dir c:\ did not 
worked and returned "dir has no value" message ...
hmm, maybe we have few bugs to haunt in this area ...
Anton
15-Aug-2009
[16717]
That's a rebol error message, obviously, not a cmd one.
Pekr
15-Aug-2009
[16718]
yes, but at that time, I was in CMD shell, no?
Anton
15-Aug-2009
[16719]
Press Windows key + R, then type "cmd" and enter.
Pekr
15-Aug-2009
[16720]
what do you want me to try? that dir works in normal shell? It does, 
I tried ...
Anton
15-Aug-2009
[16721x3]
I don't know if you were in a cmd shell or a rebol one (!)
(Start with a fresh rebol console.)
Try   call "start dir"
Pekr
15-Aug-2009
[16724x2]
Fresh R3 console, typing call "dir", getting still the same error
the same for "start dir"
Anton
15-Aug-2009
[16726]
Try   call "cmd dir"
Pekr
15-Aug-2009
[16727x5]
>> call "cmd dir"
== none

>> Microsoft Windows [Verze 6.0.6001]

Copyright (c) 2006 Microsoft Corporation. Všechna práva vyhrazena.

c:\!rebol\altme\worlds\r3-gui\files\rebdev>
boots me in the cmd shell imo ...
but in that shell, dir returns script error message about dir having 
no value ...
ah, consecutive call works, interesting ...
>> call "cmd dir"
== none

>> Microsoft Windows [Verze 6.0.6001]

Copyright (c) 2006 Microsoft Corporation. Všechna práva vyhrazena.

c:\!rebol\altme\worlds\r3-gui\files\rebdev>dir
** Script error: dir has no value


>> dir
 Svazek v jednotce C nemá žádnou jmenovku.
 Sériové číslo svazku je 0054-60D0.

 Výpis adresáře c:\!rebol\altme\worlds\r3-gui\files\rebdev

13.08.2009  12:12    <DIR>          .
13.08.2009  12:12    <DIR>          ..
02.07.2009  15:38    <DIR>          base
Anton
15-Aug-2009
[16732x2]
Hmm.. weird, looks like one line is taken by cmd, the next is taken 
by rebol.
(I mean the other order..)
Pekr
15-Aug-2009
[16734]
so:

1) call "cmd dir" boots me into cmd shell - notice single >
2) calling dir there boots me back to ... where? Notice >>
3) then mysteriously dir works from there ...
Anton
15-Aug-2009
[16735]
Ok, I would avoid calling cmd directly in rebol. I just wanted to 
know if anything could be successfully called.
Pekr
15-Aug-2009
[16736]
if that would be e.g. path problem, then for e.g. calling icacls 
would not work, but it works ... any other cmd commands to try?
Anton
15-Aug-2009
[16737x2]
I have forgotten how to get the path in windows console, is it
	echo %PATH
?
and to get and set the current directory. CD ?
Gabriele
15-Aug-2009
[16739]
Anton: my comment may be dismissive, but the point I'm making is 
that that is just my opinion, I'm not sure why I should be forced 
to "like" a heredoc syntax :) I understand that it is very handy 
on occasions, but the price is a ugly script, which I'd rather not 
pay if I can avoid it easily enough (for example, if I were generating 
a lot of PHP or JS, I would just build a dialect to do that, instead 
of using strings). Again, though it's funny for me to have to repeat 
it again and again, this is just IMHO, Robert should be free to do 
things his own way, and if REBOL can provide a syntax for heredocs 
without creating other problems I'm fine - I'll just avoid it (and 
I'll hope not many people start using it ;)
Pekr
15-Aug-2009
[16740x2]
Anton - just simple "path" does it ...
Some commands work, some don't call "path" does not work, call "help" 
works, etc.