On Mon, 8 Jul 2002 16:54:16 -0400, Dan Sugalski wrote:
> while ($foo) {
> $foo--;
> }
>
> Pretty simple. (For illustrative purposes) To do that with
> continuations, it'd look like:
>
> $cont = take_continuation();
> if ($foo) {
>
On Mon, 8 Jul 2002, [EMAIL PROTECTED] wrote:
> Yep. But serializing continuations is either tough, or not
> completely doable, since programs tend to have handles on things
> outside their direct control like filehandles, sockets, database
> connections, and suchlike things
Thus it was written in the epistle of Peter Scott,
>
> So if you could serialize a continuation, you could freeze your program
> state to disk and restore it later? Cool, makes for easy checkpoint/restarts.
I think that that would be true only if *all* data was maintained in those
scratchpads
At 10:24 PM +0100 7/8/02, Nicholas Clark wrote:
>On Mon, Jul 08, 2002 at 04:54:16PM -0400, Dan Sugalski wrote:
>> Pretty simple. (For illustrative purposes) To do that with
>> continuations, it'd look like:
>>
>> $cont = take_continuation();
aking it, in effect, as if we'd never really
>>left the spot we took the continuation at. And, like normal
>>closures, we can do this from wherever we like in the program.
>
>So if you could serialize a continuation, you could freeze your
>program state to disk and rest
At 04:54 PM 7/8/02 -0400, Dan Sugalski wrote:
>A continuation is a sort of super-closure. Like a closure it captures
>its lexical variables, so every time you use it, you're referring to
>the same set of variables, which live on until the continuation's
>destroyed. This works because the variab
On Mon, Jul 08, 2002 at 04:54:16PM -0400, Dan Sugalski wrote:
> Pretty simple. (For illustrative purposes) To do that with
> continuations, it'd look like:
>
>$cont = take_continuation();
>if ($foo) {
> $foo--;
> invoke($cont);
>}
>
On Mon, 8 Jul 2002, Dan Sugalski wrote:
> Pretty simple. (For illustrative purposes) To do that with
> continuations, it'd look like:
>
> $cont = take_continuation();
> if ($foo) {
> $foo--;
> invoke($cont);
> }
>
> take_continuati
At 2:43 PM +0100 7/8/02, Andy Wardley wrote:
>A short time ago, in a nearby thread, Larry Wall wrote:
>> Perhaps we should just explain continuations in terms of time travel.
>
>Funny. I wrote a message to this effect the other night, but decided
>not to send it (too tired
e invoke a continuation, we put in place both the variables and
call scratchpads, making it, in effect, as if we'd never really left
the spot we took the continuation at. And, like normal closures, we
can do this from wherever we like in the program.
The nice thing about continuati
A short time ago, in a nearby thread, Larry Wall wrote:
> Perhaps we should just explain continuations in terms of time travel.
Funny. I wrote a message to this effect the other night, but decided
not to send it (too tired to decide if I was talking sense or nonsense).
I was about to prop
101 - 111 of 111 matches
Mail list logo