World: r3wp
[!REBOL3-OLD1]
older newer | first last |
BrianH 15-Jan-2009 [9654] | I love the idea, just not changing TO :) |
[unknown: 5] 15-Jan-2009 [9655] | He has some pretty good experience. |
BrianH 15-Jan-2009 [9656x2] | That is clear :) |
That is the whole point to the releases. We are getting ready for more developers :) | |
[unknown: 5] 15-Jan-2009 [9658] | Cool |
BrianH 15-Jan-2009 [9659] | Temporary UI weirdness aside, it is really cool to have a chat client for REBOL right there *in* REBOL :) |
[unknown: 5] 15-Jan-2009 [9660] | I find out when it gets released. |
Steeve 15-Jan-2009 [9661x2] | ok Brian push the 'as development as far as you can, it will improve many mezzanines |
*pull is better | |
Graham 15-Jan-2009 [9663x2] | Brian, what's R3's memory footprint cf R2 ? |
for similar applications? | |
Maxim 15-Jan-2009 [9665x2] | to-string does the same oas to-block. even I have come to depend on the copying aspects of it, and I can assume that many others do to. |
one question I have... does the object type also copy every series included like in R2 ? that, IMHO one of the biggest regressions in rebol's history. reversing the copy is impossible to do perfectly (scanning the new object, and attempting to link back the old series). plus it slows down rebol in a few ways. | |
BrianH 15-Jan-2009 [9667x2] | I'll check. It should just do a bind/copy, not a copy/deep. |
MAKE object should just copy blocks, parens and functions - those are what can be bound. It shouldn't copy anything else. | |
Graham 15-Jan-2009 [9669x2] | Maxim, there is 'as-string ... |
well, for R2 | |
Steeve 15-Jan-2009 [9671] | ...not working with anything else than binaries though... |
BrianH 15-Jan-2009 [9672] | That is why I suggested AS and AS-* functions, Graham. The AS-* functions in R2 won't work in R3, but something non-aliasing would.. |
Steeve 15-Jan-2009 [9673x2] | Perhaps it's moment for Brian to add a page in the wiki... |
to do the same work he did on parse evolution | |
BrianH 15-Jan-2009 [9675] | After some discussion in the appropriate area first. The wiki is for results of discussions, not the discussions themselves. |
Steeve 15-Jan-2009 [9676x2] | do that then... |
(it's not an order just a request) | |
[unknown: 5] 20-Jan-2009 [9678] | Any change to get a CONTINUE function in R3? |
Henrik 20-Jan-2009 [9679] | >> continue ** Throw error: No loop to continue This what you want? |
[unknown: 5] 20-Jan-2009 [9680] | yeah is that in R3? |
Henrik 20-Jan-2009 [9681] | yes, I have it in latest alpha here: >> ? continue USAGE: CONTINUE DESCRIPTION: Throws control back to top of loop. CONTINUE is a native value. |
[unknown: 5] 20-Jan-2009 [9682] | Excellent! We needed that. |
Henrik 20-Jan-2009 [9683] | goodie :-) |
[unknown: 5] 20-Jan-2009 [9684x3] | You know what it does right? |
It allows you to skip the rest of a while loop for example when the conditions are met. | |
This means far less evaluation is needed in your loops. | |
Sunanda 20-Jan-2009 [9687] | If you need to, you can fake it in r2 with loop 1 [...break ...] R3 --- for n 1 5 1 [print n continue print "not printed"] R2 --- for n 1 5 1 [loop 1 [print n break print "not printed"]] |
[unknown: 5] 20-Jan-2009 [9688x3] | A continue should skip the rest of a loop cycle and advance the loop to the next cycle based on the condition of the loop. This means it is far more efficient than our current methods. |
Break doesn't initiate the next cycle of the loop. | |
Yes Sundanda, your second method would do the trick but then your also introducing evaluation. So you gotta be careful you not introducing more evaulation than your saving. | |
Sunanda 20-Jan-2009 [9691] | You may be disappointed in continue then.....At least in the current alpha some evaluation takes place. R3 --- for n 1 5 1 [print n continue xxx: 999] R2 --- for n 1 5 1 [loop 1 [print n break xxx: 999]] Both R2 and R3 end up with xxx as an unset word in system/words |
Henrik 20-Jan-2009 [9692] | Sunanda try profiling the R3 version with and without the xxx word and see if there is a speed difference. If not, then the word appears due to binding on first use of the block. |
[unknown: 5] 20-Jan-2009 [9693x2] | Not really evaulation as much as type checking possibly. Even the following will add to the system/words: >> loop 1 [break blah: 1] >> find first system/words 'blah == [blah] |
I think system/words is similiar to a string table as found in other languages with respect to literals. | |
BrianH 20-Jan-2009 [9695x2] | CONTINUE has the same overhead as BREAK, EXIT and RETURN, so be sure to factor that in in your performance calculations. |
It can be really convenient though :) | |
[unknown: 5] 20-Jan-2009 [9697] | What overhead? |
BrianH 20-Jan-2009 [9698x3] | It's similar to a THROW, setjump/longjump overhead mostly. |
That is why returning a value as the last expression of a function is faster than using the RETURN function. | |
REBOL isn't compiled so it's not the same thing as in a native language. | |
Chris 20-Jan-2009 [9701x2] | Brian, is it possible to expand on that (setjump/longjump), or is there a Carl post that summarises? This is good to know - specifically as it relates to R2 and R3 implementation... |
For example, [return true] vs [true] or ["a" exit | other rule] | |
BrianH 20-Jan-2009 [9703] | It's the same in R2. PARSE is diifferent though, but exit or return in the parens has the same overhead. |
older newer | first last |