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:coro {...} Actually, I was just looking at STD, and the correct token would be token routine_declarator:coro { sym routine_def } I was also looking at the spec files, and I realized that DRAFT S17 mentions

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,

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

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: r24711 - docs/Perl6/Spec

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

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

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

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

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

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:

Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread jerry gay
On Fri, Jan 2, 2009 at 09:27, Geoffrey Broadwell ge...@broadwell.org 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), +

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 ge...@broadwell.org 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

Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread jerry gay
On Fri, Jan 2, 2009 at 11:24, Geoffrey Broadwell ge...@broadwell.org 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 ge...@broadwell.org wrote: It's also not obvious what a boolean named $doc

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

2009-01-02 Thread Aristotle Pagaltzis
* Geoffrey Broadwell ge...@broadwell.org [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.

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/take

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. Cperl6 --doc replaces p5's Cperldoc (that's the latest idea from damian, although it seems not to be published yet). Ah, I get it! What

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 ge...@broadwell.org 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

Re: r24737 - docs/Perl6/Spec

2009-01-02 Thread jason switzer
On Fri, Jan 2, 2009 at 8:12 PM, Geoffrey Broadwell ge...@broadwell.orgwrote: 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. Cperl6 --doc replaces p5's Cperldoc (that's the latest idea