Re: Converting a Perl 5 "pseudo-continuation" to Perl 6

2009-01-02 Thread Larry Wall
On Fri, Jan 02, 2009 at 06:06:31PM -0800, Geoffrey Broadwell wrote: : Meaning, the gather/take syntax doesn't make much sense, because we're : not "gathering" anything; the PID file handler has nothing to return. : We'd only be using it for the "side effect" of being able to pause the : callee's ex

Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread jason switzer
On Fri, Jan 2, 2009 at 8:12 PM, Geoffrey Broadwell wrote: > On Fri, 2009-01-02 at 12:27 -0800, jerry gay wrote: > > oh, yes, whoops! i responded to someone else in #pugs earlier, and > > forgot to address the item here. C replaces p5's > > C (that's the latest idea from damian, although it seems n

Re: Converting a Perl 5 "pseudo-continuation" to Perl 6

2009-01-02 Thread Mark J. Reed
On Fri, Jan 2, 2009 at 9:06 PM, Geoffrey Broadwell wrote: > It does bring up a question, though. What if pid_file_handler() needed > to be broken into three or more pieces, thus containing multiple yield > statements? Does only the first one return a continuation object, which > can be called re

Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread Geoffrey Broadwell
On Fri, 2009-01-02 at 12:27 -0800, jerry gay wrote: > oh, yes, whoops! i responded to someone else in #pugs earlier, and > forgot to address the item here. C replaces p5's > C (that's the latest idea from damian, although it seems not > to be published yet). Ah, I get it! What about perldoc's spe

Re: Converting a Perl 5 "pseudo-continuation" to Perl 6

2009-01-02 Thread Geoffrey Broadwell
On Fri, 2009-01-02 at 22:56 +0100, Aristotle Pagaltzis wrote: > > When I asked this question on #perl6, pmurias suggested using > > gather/take syntax, but that didn't feel right to me either -- > > it's contrived in a similar way to using a one-off closure. > > Contrived how? Meaning, the gather

Re: Converting a Perl 5 "pseudo-continuation" to Perl 6

2009-01-02 Thread Aristotle Pagaltzis
* Geoffrey Broadwell [2009-01-01 21:40]: > In the below Perl 5 code, I refactored to pull the two halves of the PID > file handling out of init_server(), but to do so, I had to return a sub > from pid_file_handler() that acted as a "continuation". The syntax is a > bit ugly, though. Is there a c

Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread jerry gay
On Fri, Jan 2, 2009 at 11:24, Geoffrey Broadwell wrote: > Thank you for the quick turnaround! > > On Fri, 2009-01-02 at 10:55 -0800, jerry gay wrote: >> On Fri, Jan 2, 2009 at 09:27, Geoffrey Broadwell wrote: >> > It's also not >> > obvious what a boolean named $doc does -- which probably means e

Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread Geoffrey Broadwell
Thank you for the quick turnaround! On Fri, 2009-01-02 at 10:55 -0800, jerry gay wrote: > On Fri, Jan 2, 2009 at 09:27, Geoffrey Broadwell wrote: > > It's also not > > obvious what a boolean named $doc does -- which probably means either > > that it's not supposed to be a boolean, or it needs a s

Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread jerry gay
On Fri, Jan 2, 2009 at 09:27, Geoffrey Broadwell wrote: > On Fri, 2009-01-02 at 17:08 +0100, pugs-comm...@feather.perl6.nl wrote: >> +=head2 Synopsis >> + >> + multi sub perl6( >> +Bool :a($autosplit), >> +Bool :c($check-syntax), >> +Bool :$doc, >> +:e($execute), >> +:$execute

r24739 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle Date: 2009-01-02 19:31:51 +0100 (Fri, 02 Jan 2009) New Revision: 24739 Modified: docs/Perl6/Spec/S19-commandline.pod Log: [spec] C<-e6> isn't a separate item, it's a idiom meaning -e '6;'; format perl6 signature, (geoff broadwell)++ Modified: docs/Perl6/Spec/S19-commandline.p

Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread Geoffrey Broadwell
On Fri, 2009-01-02 at 17:08 +0100, pugs-comm...@feather.perl6.nl wrote: > +=head2 Synopsis > + > + multi sub perl6( > +Bool :a($autosplit), > +Bool :c($check-syntax), > +Bool :$doc, > +:e($execute), > +:$execute-lax, #TODO fix illegal -e6 syntax. -6? not legal. -x? hrmm > +

r24738 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle Date: 2009-01-02 17:17:06 +0100 (Fri, 02 Jan 2009) New Revision: 24738 Modified: docs/Perl6/Spec/S19-commandline.pod Log: [spec] add note about dangers of mixing -e and -e6 Modified: docs/Perl6/Spec/S19-commandline.pod ==

r24737 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle Date: 2009-01-02 17:08:51 +0100 (Fri, 02 Jan 2009) New Revision: 24737 Modified: docs/Perl6/Spec/S19-commandline.pod Log: [spec] add signature for perl6, and make --output-format entirely implementation-specific Modified: docs/Perl6/Spec/S19-commandline.pod ==

Re: Converting a Perl 5 "pseudo-continuation" to Perl 6

2009-01-02 Thread Geoffrey Broadwell
On Fri, 2009-01-02 at 14:19 +0200, Leon Timmermans wrote: > When going OO, I'd say an augment()/inner() approach would be > cleanest. See > http://search.cpan.org/~drolsky/Moose/lib/Moose/Cookbook/Basics/Recipe6.pod > for an example. I don't know how to express that in Perl 6 though. There's no d

r24735 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle Date: 2009-01-02 16:42:53 +0100 (Fri, 02 Jan 2009) New Revision: 24735 Modified: docs/Perl6/Spec/S19-commandline.pod Log: [S19] explain how script passed on command-line or via STDIN works Modified: docs/Perl6/Spec/S19-commandline.pod ==

r24734 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle Date: 2009-01-02 15:15:35 +0100 (Fri, 02 Jan 2009) New Revision: 24734 Modified: docs/Perl6/Spec/S06-routines.pod docs/Perl6/Spec/S19-commandline.pod Log: [spec] options must appear before script name; update version/date metadata Modified: docs/Perl6/Spec/S06-routines.pod

Re: r24711 - docs/Perl6/Spec

2009-01-02 Thread jerry gay
On Thu, Jan 1, 2009 at 03:30, Darren Duncan wrote: > pugs-comm...@feather.perl6.nl wrote: >> >> --name :name >> --name=value:name >> --name="spacy value":name«'spacy value'» >> --name='spacy value':name«'spacy value'» >> --na

r24732 - docs/Perl6/Spec

2009-01-02 Thread pugs-commits
Author: particle Date: 2009-01-02 14:36:54 +0100 (Fri, 02 Jan 2009) New Revision: 24732 Modified: docs/Perl6/Spec/S06-routines.pod docs/Perl6/Spec/S19-commandline.pod Log: [spec] get rid of ugly and confusing C<+option> syntax (bad unix memes)-- Modified: docs/Perl6/Spec/S06-routines.pod ==

Re: Converting a Perl 5 "pseudo-continuation" to Perl 6

2009-01-02 Thread Leon Timmermans
When going OO, I'd say an augment()/inner() approach would be cleanest. See http://search.cpan.org/~drolsky/Moose/lib/Moose/Cookbook/Basics/Recipe6.pod for an example. I don't know how to express that in Perl 6 though. Regards, Leon On Fri, Jan 2, 2009 at 2:08 AM, Steve Lukas wrote: > Hello, >

Re: Coroutines in Perl 6 (Was: Re: Converting a Perl 5 "pseudo-continuation" to Perl 6)

2009-01-02 Thread Daniel Ruoso
Em Sex, 2009-01-02 às 08:34 -0300, Daniel Ruoso escreveu: > token routine_def: {...} Actually, I was just looking at STD, and the correct token would be token routine_declarator:coro { } I was also looking at the spec files, and I realized that DRAFT S17 mentions coroutines, but its defini

Coroutines in Perl 6 (Was: Re: Converting a Perl 5 "pseudo-continuation" to Perl 6)

2009-01-02 Thread Daniel Ruoso
Em Qui, 2009-01-01 às 12:34 -0800, Geoffrey Broadwell escreveu: > In the below Perl 5 code, I refactored to pull the two halves of the PID > file handling out of init_server(), but to do so, I had to return a sub > from pid_file_handler() that acted as a "continuation". The syntax is a > bit ugly,