Re: what's new continued

2002-07-08 Thread Iain Truskett
* Damian Conway ([EMAIL PROTECTED]) [08 Jul 2002 10:27]: [...] given my Doberman $sis is female = .dog[0] but pregnant - $mother { for my Doberman @puppies = new Doberman x $mother.littersize I'd have thought you'd need: for my Doberman @puppies = (new Doberman) x

Vim Syntax

2002-07-08 Thread Luke Palmer
For anyone interested, http://fibonaci.babylonia.flatirons.org/perl6.vim contains a fairly complete (yet buggy, I'm sure) vim highlighting file for Perl 6. I sure hope I didn't already post this :(... if so, sorry. And definitely tell me where there's bugs or when I'm missing

The Past, Present and Future of Continuations (was: Perl 6 Summary)

2002-07-08 Thread Andy Wardley
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 propose

Re: Reflection...

2002-07-08 Thread Sean O'Rourke
On 8 Jul 2002 [EMAIL PROTECTED] wrote: caller with no args is the same as Ccaller(1) (for certain values of 'the same as'), caller(0) already returns the current execution context. You're right. I stand corrected. If you can set a block's continuation at runtime, I think you should be

Continuations for fun and profit

2002-07-08 Thread Dan Sugalski
Okay, for those of you following along at home, here's a quick rundown of what a continuation is, and how it works. (This is made phenomenally easier by the fact that perl has continations--try explaining this to someone used to allocating local variables on the system stack and get ready for

Re: The Past, Present and Future of Continuations (was: Perl 6Summary)

2002-07-08 Thread Dan Sugalski
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 to decide if I was talking

Re: Reflection...

2002-07-08 Thread Dan Sugalski
At 9:48 AM +0100 7/8/02, [EMAIL PROTECTED] wrote: That sets you up for very scary action at a distance. Essentially you're proposing Ccome_from BLOCK Well, sure. How else are we going to handle the INTERCAL front-end? ;-P -- Dan

Re: Continuations for fun and profit

2002-07-08 Thread David M. Lloyd
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_continuation() returns a continuation for the current point

Re: Continuations for fun and profit

2002-07-08 Thread Nicholas Clark
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); } take_continuation() returns a continuation for

Re: Continuations for fun and profit

2002-07-08 Thread Peter Scott
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 variables

Re: Continuations for fun and profit

2002-07-08 Thread Dan Sugalski
At 3:01 PM -0700 7/8/02, Peter Scott wrote: 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

Re: Continuations for fun and profit

2002-07-08 Thread Dan Sugalski
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(); if ($foo) { $foo--; invoke($cont);

Re: Continuations for fun and profit

2002-07-08 Thread Ted Ashton
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