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

World: r3wp

[rebcode] Rebcode discussion

Maxim
20-Feb-2007
[1617x2]
I guess its because of all of tha context navigation which rebocode 
is freed of.
darn, why does that damn "o" always get added when I write rebcode 
quickly..
BrianH
20-Feb-2007
[1619x5]
I think that function calls recurse into the interpreter.
BRAB is for branch tables like that generated by switch statements 
in C. Words in the target block are changed by the assembler into 
integer offsets to their associated label statements. Any other use 
is only appropriate for compiler-generated rebcode.
As for an equivalent to NONE?, SETT might work.
Looking back on this group, it seems that the APPLY bug may have 
been fixed. Also, BRAB is good for use on the results of CMP or SIGN.
As for reversing the bits in a byte, have you considered a binary 
lookup table?
Maxim
20-Feb-2007
[1624]
steeve... told you brian was the reference here  :-)
BrianH
20-Feb-2007
[1625]
It's been a while - for some I had to go back and look at my own 
posts :)
Maxim
20-Feb-2007
[1626x2]
is rebcode still incapable to lookup objects?
(still as in... did the last version still have that limitation)
BrianH
20-Feb-2007
[1628x2]
That was part of the planned upcoming features, and then they stopped 
updating it. I recall creating a comprehensive proposal...
You can still APPLY IN and then GETW or SETW.
Maxim
20-Feb-2007
[1630]
rebcode really has to be part of 2.7... if we could just have object 
lookup, that would allow me try to make a few tests with liquid and 
mayb optimise so its about 10-30 times faster at managing the dataflow 
 :-)
BrianH
20-Feb-2007
[1631]
Have you tried it with APPLY IN and such? How is the speed compared 
to REBOL?
Maxim
20-Feb-2007
[1632x4]
I have not yet done any rebcode tests with liquid, as so far, its 
always interactive enough, so as to not require it... but I am going 
nuts with the engine  ;-)  liquidator is a testament to its stability 
and another user here is helping me push the enveloppe to  :-)


but obviously, It will come to a point where pure processing will 
be needed and in such a case, speed will always be a factor.
going nuts as in "I'm having a lot of fun with it"  :-D  the apis 
is pretty complete for most gui and procedural
(needs)
I didn't know about APPLY IN ... I might just do a quick try in a 
little while...  does 'APPLY support refinements?
BrianH
20-Feb-2007
[1636]
Yes, as positional true/false arguments. IN doesn't have any refinements.
Maxim
20-Feb-2007
[1637]
ok ... yes... I remember that part about the ordering of apply...
BrianH
20-Feb-2007
[1638x2]
If you change the order that the refinements are declared in the 
function, you will need to change all calls by APPLY to match.
I think true/false will work - it might need true/none.
Maxim
20-Feb-2007
[1640]
its probably true/none
BrianH
20-Feb-2007
[1641]
It's probably both.
Maxim
20-Feb-2007
[1642]
hum... in any case, thanks for remining me about APPLY IN  :-)  you've 
revived my interest in rebcode (even if I might now rely on some 
features of 2.7)
Steeve
20-Feb-2007
[1643]
here am i ^^^
BrianH
20-Feb-2007
[1644x2]
It is really the best way to work with objects in efficient code, 
so much so that I requested an IN opcode.
Hi Steeve!
Maxim
20-Feb-2007
[1646]
glad you did  :-)
BrianH
20-Feb-2007
[1647]
IN doesn't work with structs though, so I requested a set of struct 
opcodes to work with them (SET.S, GET.S, ...).
Maxim
20-Feb-2007
[1648x3]
that would probably be even faster.
since its a simple shift
I meant offset
BrianH
20-Feb-2007
[1651x4]
For structs, yes. For objects, IN and GETW/SETW would be faster since 
you can cache the looked-up word.
It's not that bad a technique in REBOL code either.
Path evaluation has a lot of overhead.
Any questions, Steeve?
Steeve
20-Feb-2007
[1655]
BrianH, what is the most rapid, to use a do [my-func var] or an apply 
?
BrianH
20-Feb-2007
[1656]
Apply.
Steeve
20-Feb-2007
[1657]
hum, and if i have severall apply to do (in sequence) ?
BrianH
20-Feb-2007
[1658]
APPLY in a LOOP block or something. Even then, it is much more efficient 
to translate to rebcode and inline when you can - APPLY overhead 
is significant, and DO overhead much more so.
Steeve
20-Feb-2007
[1659x8]
ok
have another question on system/internal/assembly*
can i disactivate the label parsing/replacecing to gain speed when 
i build rebcode functions
?
i d'ont use labels
but i build many many rebcode functions in real time, i need speed
i use a parser to convert Z80 opcodes into rebol opcodes
i attempt to do a Z80 emulator