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

World: r3wp

[!REBOL3-OLD1]

Pekr
14-Aug-2009
[16672]
What? I read some topic called - Google native extensions ...
BrianH
14-Aug-2009
[16673x2]
As for the JIT, I could write the compiler in REBOL and generate 
the intermediate code of the JIT, then pass that intermediate code 
to the JIT with a command. The JIT would then generate a function, 
add it to its list, and return the list index as an integer. That 
integer can be  used to create a new command!, which RX_Call can 
dispatch to the internal JITed function.
Since extensions can't be statically linked with R3, I can wrap a 
LGPL JIT like libjit. It should work great. I'll be stuck with the 
RX data model, but that cold be plenty for the types of functions 
you wold write just for speed.
Pekr
14-Aug-2009
[16675]
So we've got Rebcode replacement? :-)
BrianH
14-Aug-2009
[16676]
What, did you think Carl was going to be the one to replace rebcode? 
:)
Henrik
14-Aug-2009
[16677]
Sunanda: I get invalid integer too under XP under VMWare.
Pekr
14-Aug-2009
[16678]
no, it is just the damned thing is possible finally :-)
BrianH
14-Aug-2009
[16679]
Henrik, yeah, XP seems to do the right thing, throwing an error - 
it's only Vista and 7 that fail and return the wrong number.
Henrik
14-Aug-2009
[16680x3]
a 64-bit issue?
OSX reports bad numbers too instead of invalid integer.
under a76, that is
BrianH
14-Aug-2009
[16683]
Not a 64bit issue, a Vista+ issue.
Henrik
14-Aug-2009
[16684]
I wonder about Linux now too, unfortunately I can't test.
Gabriele
14-Aug-2009
[16685x2]
Anton, did you miss the "I'd rather" part? Did I say "Robert should" 
or even "Robert must" anywhere? LOL. :) I even suggested syntax, 
#[{ ... }]# though I don't like the idea at all.
Brian, how likely it is that you will find the three characters }]# 
in JSON text?
Anton
14-Aug-2009
[16687x2]
Gabriele, I probably worded my last comment a bit strongly. (I don't 
want to enflame the situation..) Of course I highly value your judgement, 
opinions and suggestions. I should say, though, that I read your 
previous comment as somewhat dismissive of RobertS concerns / problem.
With your #[{ ... }]# suggestion, I think it looks pretty good, and 
could be extended with specification of an end delimiter. With so 
many computer languages of all different syntaxes, having a way to 
specify the delimiter allows it to flex to any situation. 
We could add a second string to the block, eg.
The end delimiter is END:
	#[{END} {... END}]#
or a simple newline char:
	#[{^/} {... ^/}]#
or a secure hash:
	#[{92838929838} {...92838929838}]#
Henrik
14-Aug-2009
[16689]
The R3 docs for extensions display an example for reversing a string. 
I wonder if it's the same code as used internally for the built-in 
REVERSE function?
RobertS
14-Aug-2009
[16690x4]
I see that the en wikipedia has an article on verbatim strings in 
PHP under "here document" which in PHP documents for print and echo 
is acalled the "here document" syntax (of course PHP calls print 
and echo constructs and not functions or procedures ... ) http://en.wikipedia.org/wiki/Here_document
My PHP page has no escaped characters becuase I can use the so-called 
"here document syntax".  That is critcal for my templating needs. 
 If your templating will only be done by rebol developers, it is 
of course a moot point: Rebol developers do not need heredocs/  But 
are all users of rebol going to be rebol developers?  That is the 
dialect issue.  And in the case of PHP (jsut an example) many PHP 
users are not PHP developers.  The wiki page has examples from python 
or ruby if the mention of PHP offends purists .. ;-)
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
[16721]
I don't know if you were in a cmd shell or a rebol one (!)