[plt-scheme] javascript s-exp transform

From: kanishka (nish2575 at yahoo.com)
Date: Wed May 30 16:34:31 EDT 2007


Given these previous discussions ...

>> my ideal continuation style web app would define two co-routines, a
>> scheme
>> routine, and a javascript routine, and pass the continuation back
>> forth, with no continuations actually stored on the server. it would
>> also allow for the javascript routine to branch to different
>> continuations (or pick another partner for its coroutine dance),
>> similar to what send/suspend/dispatch allows you to do. 

>> kanishka

On 5/24/07, Shriram Krishnamurthi <sk at ...> wrote:
> I'm afraid there is no "simple method" other than what is described
> that paper.  If, however, you want to try a different approach that
> perhaps feels a bit less complicated, you could consider our other
> approach to doing this, which does not use CPS at all:

BTW, This is implemented in the `prototype-web-server' in the SVN
graveyard. Also, it will be re-integrated into the mainline server in
SVN in the coming weeks.



Would you be willing to implement an experimental version of either cps
or continuation-mark version of automated program transformation on top
of the javascript s-exp syntax (from planet)? Possibly add it as helper
library to the plt server. 

example input:

(define jscode
     (define (precpsfunc action)
       (if (form-updated? action)
           (define result (validate action))
           (if (warning? result)
               (update-message-area! result))
               (resp (K-POINT (post-to-server action)))

if using the cps version, output could be a javscript table of


____________________________________________________________________________________Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.

Posted on the users mailing list.