Re: [Chicken-users] Continuations

2016-07-16 Thread John Cowan
Josh Barrett scripsit: > This seems to imply that the state of variables in the scope the > continuation was captured are restored with the continuation, but the state > of variables in scopes higher up the stack are not. But that doesn't sound > right. If the continuation is copying the entire

Re: [Chicken-users] Continuations

2016-07-16 Thread Josh Barrett
Thanks John. That does still leave me with one question: >Variables that are above >the point where the continuation was captured cannot be restored if they have been changed. This seems to imply that the state of variables in the scope the continuation was captured are restored with the

Re: [Chicken-users] Continuations

2016-07-16 Thread John Cowan
Josh Barrett scripsit: > A continuation is a capture of your location in a program, and its pending > operations to return a result. In other languages, this is often > represented by the stack. > > When a continuation is captured, the current state of the stack is captured > and can be restored

[Chicken-users] Continuations

2016-07-16 Thread Josh Barrett
Okay. Let's see if I've got this straight. A continuation is a capture of your location in a program, and its pending operations to return a result. In other languages, this is often represented by the stack. When a continuation is captured, the current state of the stack is captured and can be

Re: [Chicken-users] Continuations, control flow, and F-operator

2015-12-14 Thread Josh Barrett
Thanks John, that helped a lot. On Sun, Dec 13, 2015, 23:56 John Cowan wrote: > Josh Barrett scripsit: > > > I mean, I know call/cc is fast in chicken, but is it that fast, or is > > F-operator using some chicken specific implementation that I don't know > > about? > >

[Chicken-users] Continuations, control flow, and F-operator

2015-12-13 Thread Josh Barrett
... So, how does F-operator even exist? It's an egg that implements delimited continuations, that much I know, but HOW? IIRC, it's only possible to implement delimited continuations in pure scheme if all control flow is implemented in continuations. So is that what chicken does? I mean, I know

Re: [Chicken-users] Continuations, control flow, and F-operator

2015-12-13 Thread John Cowan
Josh Barrett scripsit: > I mean, I know call/cc is fast in chicken, but is it that fast, or is > F-operator using some chicken specific implementation that I don't know > about? No, it isn't. Calling an escape procedure from call/cc is as fast in Chicken as calling a "normal" procedure (which