Re: [racket] Implementing delimited continuations using a CPS transform

2011-11-24 Thread J. Ian Johnson
24 Nov 2011 17:05:30 -0500 (EST) Subject: Re: [racket] Implementing delimited continuations using a CPS transform Thanks for the feedback. The literature references are extremely helpful, and I will read through them carefully. As an aside, may I ask what notation is being used in these papers? I

Re: [racket] Implementing delimited continuations using a CPS transform

2011-11-24 Thread nicolas.o...@gmail.com
It is often used to represent a function that applies on a term, or an expression. [ t ] means the function [] applied to t. In those papers, it often represent a CPS transform. Like [ x ] = \ k . k x would mean "the cps transform of 'x' is '\ k . k x' , or cps(x) = \ k . k x. Using [ _ ] is

Re: [racket] Implementing delimited continuations using a CPS transform

2011-11-24 Thread Patrick Li
Thanks for the feedback. The literature references are extremely helpful, and I will read through them carefully. As an aside, may I ask what notation is being used in these papers? I thought it might be lambda calculus, however I cannot determine what it means to surround an expression using call

Re: [racket] Implementing delimited continuations using a CPS transform

2011-11-24 Thread Matthias Felleisen
On Nov 24, 2011, at 9:52 AM, nicolas.o...@gmail.com wrote: >> But you could also break the tail-call discipline of CPS and translate >> [shift e] as \k. (k [e](\x.x)) >> Or you can use our 'abstract' continuations to manipulate a stack of >> continuations directly. > > What are your 'abstract

Re: [racket] Implementing delimited continuations using a CPS transform

2011-11-24 Thread nicolas.o...@gmail.com
> But you could also break the tail-call discipline of CPS and translate [shift > e] as \k. (k [e](\x.x)) > Or you can use our 'abstract' continuations to manipulate a stack of > continuations directly. What are your 'abstract' continuations? Sounds very interesting.

Re: [racket] Implementing delimited continuations using a CPS transform

2011-11-24 Thread Matthias Felleisen
On Nov 24, 2011, at 2:31 AM, Patrick Li wrote: > Hello everyone, > > Does anyone know of a guide on how delimited continuations (reset/shift) can > be implemented using a CPS transform? There is a paper for doing this in > Scala, but I don't have a CS background and cannot understand the nota

Re: [racket] Implementing delimited continuations using a CPS transform

2011-11-24 Thread nicolas.o...@gmail.com
I think your solution is perfectly sensible. shift/reset needs two CPS transformations. Then you have two continuations : one local (up to the next reset), one global (from the next reset to the toplevel). The global one is usually called the meta-continuation, and often denoted m. I think this i

[racket] Implementing delimited continuations using a CPS transform

2011-11-23 Thread Patrick Li
Hello everyone, Does anyone know of a guide on how delimited continuations (reset/shift) can be implemented using a CPS transform? There is a paper for doing this in Scala, but I don't have a CS background and cannot understand the notation. I thought it might be similar to implementing full cont