Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Tony Garnock-Jones
On 08/14/2015 11:16 AM, Robby Findler wrote: > The color of a television, tuned to a dead channel. Bright, pure, sky blue? What an unusual grey. https://twitter.com/DJSundog/status/629659761902948352 -- You received this message because you are subscribed to the Google Groups "Racket Users" gr

Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Robby Findler
> (1) how grey is your cat? The color of a television, tuned to a dead channel. Robby -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@

Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Matthias Felleisen
On Aug 14, 2015, at 7:02 AM, Klaus Ostermann wrote: > Robby, I think what I want is simple to say: > > If I have a Racket program and manually CPS-transform and then > defunctionalize it, I would be able to compare and analyze continuations (and > normal procedures, for that matter). > > I w

Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Vincent St-Amour
On Fri, 14 Aug 2015 07:29:37 -0500, Robby Findler wrote: > > For that you would have to write a (straightforward) compiler that > transformed a fully expanded Racket program into another program (in > that same language), inserting with-continuation-mark expressions > around every subexpression. R

Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Robby Findler
For that you would have to write a (straightforward) compiler that transformed a fully expanded Racket program into another program (in that same language), inserting with-continuation-mark expressions around every subexpression. Run the transformed program. Then, at the point that you wish to comp

Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Klaus Ostermann
Robby, I think what I want is simple to say: If I have a Racket program and manually CPS-transform and then defunctionalize it, I would be able to compare and analyze continuations (and normal procedures, for that matter). I want to be able to do the same without CPS-transforming and defunction

Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Jay McCarthy
This is not a direct answer, but has a few different answer-like things. The Racket contract system has a similar problem to solve. Suppose contracted procedure is supposed to return a number? value. The state would look like this: ( continuation (obey-or-error number? ( function bod

Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Robby Findler
I suppose it depends on exactly what equivalence relation you have in mind on the continuations. My best guess for a fruitful path forward would be to do something like the "hack" that you suggest below, using continuation marks to record the information you need until later to compute the equivale

Re: [racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Éric Tanter
Hi Klaus, For what it’s worth, AspectScheme, which needs the call stack to express control flow related pointcuts, redefines the #%app macro to reify the parts of the call stack that you need using continuation marks. I doubt there is a way other than that one to reify the call stack, but if t

[racket-users] Comparing (delimited) continuations in Racket

2015-08-14 Thread Klaus Ostermann
Is there any way in Racket to use (delimited) continuations to find out whether I'm evaluating an expression in the same evaluation context as before? Let's assume for a second that Racket had an ordinary call stack, and I could access that call stack as a first-order value. Then I could compare