Re: Revisiting lexicals, part 1

2008-09-27 Thread François Perrad
2008/9/24 Patrick R. Michaud <[EMAIL PROTECTED]>: > On Wed, Sep 24, 2008 at 12:09:37PM +0200, François Perrad wrote: >> Currently, the bigger issue in Lua on Parrot is lexical or upvalue in >> Lua jargon (the reason for Lua on Parrot is not really Lua). >> The following Lua code doesn't give the ex

Re: Revisiting lexicals, part 1

2008-09-26 Thread Stéphane Payrard
On Wed, Sep 24, 2008 at 11:31 PM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Wed, Sep 24, 2008 at 10:05:25PM +0200, Stéphane Payrard wrote: >> One of parrot current limitation is that eval is always a closure. >> When using rakudo interactively, one want to introduce new >> lexical variable

Re: Revisiting lexicals, part 1

2008-09-25 Thread Geoffrey Broadwell
Tom Christiansen: > > Don't we have to solve all this to get the Perl 6 debugger > > working anyway? > > Although I'm unsure why that might be, I also recognize the possibility > that there may well exist hypothetical documents, unread by me, which > mandate some scenario or behavior wherein the

Re: Revisiting lexicals, part 1

2008-09-24 Thread Patrick R. Michaud
On Wed, Sep 24, 2008 at 10:44:23PM -0600, Tom Christiansen wrote: > In-Reply-To: Message from Geoffrey Broadwell <[EMAIL PROTECTED]> > > Don't we have to solve all this to get the Perl 6 debugger > > working anyway? > > Although I'm unsure why that might be, I also recognize the possibility > th

Re: Revisiting lexicals, part 1

2008-09-24 Thread Tom Christiansen
In-Reply-To: Message from Geoffrey Broadwell <[EMAIL PROTECTED]> of "Wed, 24 Sep 2008 16:47:44 PDT." <[EMAIL PROTECTED]> > On Wed, 2008-09-24 at 18:09 -0500, Patrick R. Michaud wrote: >> On Thu, Sep 25, 2008 at 12:10:35AM +0200, Reini Urban wrote: >>> 2008/9/24 Patrick R. Michaud <[EMAIL PR

Re: Revisiting lexicals, part 1

2008-09-24 Thread Patrick R. Michaud
On Wed, Sep 24, 2008 at 10:11:07PM -0400, Bob Rogers wrote: > Just a few: > >1. In the translation of your Perl 6 example in "Runtime part 3: > Closures and cloning", I notice that you do "get_global 'bar'" twice: > > .sub 'foo' > ## bind inner sub 'bar' to current lexical envir

Re: Revisiting lexicals, part 1

2008-09-24 Thread Geoffrey Broadwell
On Wed, 2008-09-24 at 18:09 -0500, Patrick R. Michaud wrote: > On Thu, Sep 25, 2008 at 12:10:35AM +0200, Reini Urban wrote: > > 2008/9/24 Patrick R. Michaud <[EMAIL PROTECTED]>: > > > So, in order to get the behavior you're describing from the interactive > > > prompt, we'll probably need more than

Re: Revisiting lexicals, part 1

2008-09-24 Thread Patrick R. Michaud
On Thu, Sep 25, 2008 at 12:10:35AM +0200, Reini Urban wrote: > 2008/9/24 Patrick R. Michaud <[EMAIL PROTECTED]>: > > So, in order to get the behavior you're describing from the interactive > > prompt, we'll probably need more than just Perl 6's 'eval'. In > > particular, the interactive prompt mod

Re: Revisiting lexicals, part 1

2008-09-24 Thread Reini Urban
2008/9/24 Patrick R. Michaud <[EMAIL PROTECTED]>: > So, in order to get the behavior you're describing from the interactive > prompt, we'll probably need more than just Perl 6's 'eval'. In > particular, the interactive prompt mode will need to be able to > maintain it's own dynamic lexical pad (i.

Re: Revisiting lexicals, part 1

2008-09-24 Thread Patrick R. Michaud
On Wed, Sep 24, 2008 at 10:05:25PM +0200, Stéphane Payrard wrote: > One of parrot current limitation is that eval is always a closure. > When using rakudo interactively, one want to introduce new > lexical variable that are not lost when accessing them from the > next prompt. > Pugs gets that rig

Re: Revisiting lexicals, part 1

2008-09-24 Thread Patrick R. Michaud
On Tue, Sep 23, 2008 at 03:45:37AM -0500, Patrick R. Michaud wrote: > I've put together a draft with my ideas and design for > (re-)implementing lexicals in Parrot -- now available at > http://www.pmichaud.com/perl6/lexical.txt . Earlier today chromatic asked about recursion in the new design, so

Re: Revisiting lexicals, part 1

2008-09-24 Thread Stéphane Payrard
One of parrot current limitation is that eval is always a closure. When using rakudo interactively, one want to introduce new lexical variable that are not lost when accessing them from the next prompt. Pugs gets that right. My take on the subject 8 years ago! I don't know how that interacts with

Re: Revisiting lexicals, part 1

2008-09-24 Thread Patrick R. Michaud
On Wed, Sep 24, 2008 at 12:09:37PM +0200, François Perrad wrote: > Currently, the bigger issue in Lua on Parrot is lexical or upvalue in > Lua jargon (the reason for Lua on Parrot is not really Lua). > The following Lua code doesn't give the expected result (from > languages/lua/t/closure.t) :

Re: Revisiting lexicals, part 1

2008-09-24 Thread François Perrad
Patrick R. Michaud a écrit : I've put together a draft with my ideas and design for (re-)implementing lexicals in Parrot -- now available at http://www.pmichaud.com/perl6/lexical.txt . It's a first draft and might be a bit confusing in places, but overall I think it's a far cleaner design than