... stupid server is not up enough for me to actually download it. I start trying yesterday, server goes down. this morning: I get about half, server goes down...
I just found a little hack that fakes coroutines if you can't fiddle with the stack (i.e. C++). It's based on switch() being able to jump anywhere within the...
I just found a little hack that fakes coroutines if you can't fiddle with the stack (i.e. C++). It's based on switch() being able to jump anywhere within the...
... This is an interesting technique though it appears to only work if all your coro yields are in the function containing the switch. Cheers, Steve Io, a...
I couldnt' find the link on the page you gave. I came across an article (possibly the same one): http://radio.weblogs.com/0102385/2003/03/30.html#a318 Chris....
Chris Double
chris.double@...
May 6, 2003 9:42 pm
505
... article ... That is the same topic, here is the actual link I wanted to post: http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html Mike...
... fiddle ... jump ... all ... I don't quite get what you're saying. As long as you put your 'yeild' inside of the switch, you're ok. You can have multiple ...
... In other words, this scheme fails if a function called by the function is the one that wants to yield. - you can't yield up multiple levels as you can with...
More flexible approaches than Duff's Device for coroutines, threads, or continuations... ... Trampolined Style (http://www.cs.indiana.edu/~dfried/) "A...
... threads, or ... I skimmed around the articles, but I'm not sure how to create a trampolined program in C. The examples were in LISP. How would you apply...
... This presentation has a step-by-step transformation... http://www.cs.indiana.edu/~dfried/dfried/mex.pdf Also if you do not have Essentials of Programming...
... I read the article, and although I'm not very fluent in Scheme I got the jist. I wish they actually showed the Java versions instead of just talking about...
What do folks here think about tail call optimization? Is it a feature worth supporting? Is recursive tail-call code more readable than code with loops?...
... Onyx[1] optimizes tail calls, as does Adobe PostScript, and to tell the truth, I've found it to be something of a nuisance. The problem with it is that it...
... The better Lisp and Scheme systems I've used include options to turn off tail call optimization just for this purpose. Once the code is debugged then turn...
... Agreed. ... You nailed it. This is for using C-like languages as the target, not the original source. It might be worth these kinds of transformations by...
... If you wish to support a functional style, even just recursion generally, then tail call optimization is the difference between correctness and otherwise...
... If you wish to support a functional style, even just recursion generally, then tail call optimization is the difference between correctness and otherwise...
Tail call optimization in a prototype-based language would be a little tricky, because a) you are potentially dispatching to another object and b) you could...
consider: myMethod: argument self oneOfMyParentSlots: argument. ^self myMethod: argument is this tail recursive? I think without dispatching the call you can't...
... If you wish to support a functional style, even just recursion generally, then tail call optimization is the difference between correctness and otherwise...
... Without a doubt the final send to self is in tail form. Consider if the code looked like this... ^1 + (self myMethod: argument) then the final send to self...
... Yes, but you can't optimize this to a goto at compile time, because you have possibly changed the inheritance path. ... I know all this. ... Whether it is...
... OK, consider this pseudo code: globalvar f := lambda (x) { f := g; return f(x); }; do you consider f tail recursive ? even if you do, you can't optimize it...
... I see what you're getting at. Yes, this is in tail form. Whatever function f refers to gets called and then when it "returns" it does not have to return to...
... I saw the same problem but found some work arounds. I added explicit tail calls to Io like: sum = method(a,b, b+=a; if (a==1, b, tailCall(a - 1, b))) by...
... I don't think tail calls are more readable than recursion, or even loops. At least until you learn the patterns of using an accumulator, etc. Then you can...