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

World: r3wp

[Core] Discuss core issues

Steeve
31-Mar-2009
[13423]
If the contents var is not unset and then the load-mp3 function is 
not anymre called.

Then, the garbage collector can't free the serie because it stays 
handled by the local var contents.
Graham
31-Mar-2009
[13424x2]
Hmm.  So, one should deference local vars if they pointing to large 
data sets?
dereference
Steeve
31-Mar-2009
[13426]
yes, In R2 we should
Anton
31-Mar-2009
[13427]
Steeve, yes, that's right.
Graham
31-Mar-2009
[13428]
didn't know that ...
Anton
31-Mar-2009
[13429]
Yes, in R2, functions don't bother to unset their local words on 
function exit. This was done for speed reasons. Most functions don't 
need to unset their locals.
Graham
31-Mar-2009
[13430]
I wonder if that would help with the problem I had before when I 
was doing OCR on image data .. and kept getting crashes
Anton
31-Mar-2009
[13431]
Where you running out of memory?
Graham
31-Mar-2009
[13432]
no
Anton
31-Mar-2009
[13433]
*Were you..
Graham
31-Mar-2009
[13434]
If I turned off recycle, the problem disappeared, but then memory 
eventually would run out
Anton
31-Mar-2009
[13435]
That was more likely some external library call problem.
Graham
31-Mar-2009
[13436x3]
not using external libraries
I was posting the data to a web server
web service
Anton
31-Mar-2009
[13439]
That was a memory leak, not really caused by the "local vars not 
unset on R2 function exit" behaviour. (But perhaps contributed, by 
misunderstanding, to the leak bug.)
[unknown: 5]
31-Mar-2009
[13440]
Yes, Graham we need to clear those locals by setting them to none.
BrianH
31-Mar-2009
[13441]
I use ASLO in R2-Forward for that reason - that was the original 
reason ALSO was suggested. You don't need ALSO for that in R3 since 
the locals unset themselves in the new function context model, but 
it is useful for closing ports and changing directories back.
[unknown: 5]
31-Mar-2009
[13442]
Brian, are the parameters in R3 also unset in R3?
BrianH
31-Mar-2009
[13443x3]
R3 has stack frames, so the entire frame - including the locals - 
is tossed after the function returns.
Closures are different though - a whole new context is created with 
each call, words and values both.
Closures are for doing "memory leaks" on purpose :)
[unknown: 5]
31-Mar-2009
[13446]
Will we get any control over the stack?  So that we can potentially 
perform recursive operations without overflow?
BrianH
31-Mar-2009
[13447x2]
Unlikely, since most tail recursion optimizations require an optimizer, 
or at least a compiler. Manual access to the stack is a security 
hole (unless the language is Cat). Accept that REBOL has real loops 
and that imperative programming is more efficient in an interpreted 
language :)
REBOL was designed to be interpreted efficiently. Don't compare it 
to languages that were designed to be compiled (like Haskell) or 
languages that aren't designed for efficiency (like Scheme).
[unknown: 5]
31-Mar-2009
[13449]
Yeah I understand that.
BrianH
31-Mar-2009
[13450x2]
REBOL 1 had tail-recursion optimizarion. REBOL 2 got rid of it on 
purpose, and got 30 times faster as a result :)
There were some other tricks that contributed, like getting rid of 
continuations and ELSE.
[unknown: 5]
31-Mar-2009
[13452]
Carl sharing this much with you or how do you know this about REBOL?
BrianH
31-Mar-2009
[13453]
I was one of the beta testers of REBOL 2 - I've been around that 
long :)
[unknown: 5]
31-Mar-2009
[13454x2]
I can't remember what version I started with REBOL in.  I just know 
the year was 98.
But I walked a way a bit at times as the lack of development waned.
BrianH
31-Mar-2009
[13456]
Earlier than me - I started in 99, with REBOL 1.0.3.
[unknown: 5]
31-Mar-2009
[13457]
I remember back then we had Holger, Jeff, and Sterling.
BrianH
31-Mar-2009
[13458]
I miss those guys. The beta list for R2 started a month after I arrived.
[unknown: 5]
31-Mar-2009
[13459]
Yeah I found out about REBOL through a listserv I was on at the time 
with a bunch of Cisco Engineers.
BrianH
31-Mar-2009
[13460x2]
I think I saw it mentioned on Usenet. We had Joel Neely too - he 
wrote the R1 interpreter, which was so slow (because it was like 
Scheme) that Carl had to rewrite it from scratch: REBOL 2. That is 
why Neely flames REBOL on the Scheme lists.
(I may have the name wrong though - I'm really bad at names.)
[unknown: 5]
31-Mar-2009
[13462]
Wow, I remember that name but didn't know about the flames.
BrianH
31-Mar-2009
[13463x2]
If I got the name wrong, sorry Joel :(
It looks like I *did* get the name wrong. Can't remember the right 
name either, but the flames went on as far as last year :(
Anton
31-Mar-2009
[13465]
Joe Marshal ?
BrianH
31-Mar-2009
[13466x2]
Yeah, that might be it.
Yup, first hit on Google.
Graham
31-Mar-2009
[13468x2]
Joel Neely works for Fedex
and he too has moved on
BrianH
31-Mar-2009
[13470]
Again, sorry Joel. He was fun too - lots of long, essay-like posts.
Sunanda
1-Apr-2009
[13471x2]
I think you are thinking of Joe Marshall who worked on an early REBOL, 
and has been critical of his continuations being removed from later 
versions.
http://ll1.ai.mit.edu/marshall.html
(Sorry -- did not see Anton's post  until after I send mine .... 
the old resync bug yet again :)