Wanted: Insights on implementing continuations. (Related to web frameworks)

Dar Scott dsc at swcp.com
Wed Jul 12 14:37:45 EDT 2006

On Jul 12, 2006, at 1:13 AM, Andre Garzia wrote:

> Most help I need now is on theory and good ideas. This email is  
> touching the topics of continuations and why we need them for  
> webframeworks. Continuations are not a familiar concept for xTalk  
> coders, actually I think that most people familiar with that will  
> be from coding in functional languages such as Scheme.

I've tinkered with some lambda-like constructs, but they are slow.

That and other ideas would be based on 'do', 'value()' and 'merge 
()'.  Those require recompiling at each application.  If that is OK,  
then those might work out for you.

If speed is a concern, then help push for certain kinds of  
"memoizing" in Revolution.  The "memoizing" for 'do' would attach the  
compiled code for a 'do' to the value applied to the 'do' that lives  
as long as the value does in ram or at least some time.  The next  
'do' can use that.

I suspect that speed is not a concern.

These are not strict continuations, but might meet your needs.

The other thing I do that might be related is to start an independent  
state machine using messages and message-based I/O.  That defers some  
work and can even move itself to another machine or another Rev  
instance if need be.  That can include a simple interpreter.  That  
is, you can make little scripts and pass them off to command-line revs.


More information about the Use-livecode mailing list