Re: .map/.reduce with larger arity

2009-03-08 Thread Larry Wall
On Sun, Mar 08, 2009 at 09:36:17PM +0100, Moritz Lenz wrote: : Currently the spec says: : : C returns a lazily evaluated list which is comprised of : the return value of the expression, evaluated once for every : one of the C<@values> that are passed in. : : But both pugs and rakudo respect th

Re: [perl #63704] [PATCH] Replace PIR pairs method with Perl 6 version

2009-03-08 Thread Patrick R. Michaud
On Sun, Mar 08, 2009 at 08:15:32PM +0100, Moritz Lenz wrote: > I hope I fixed both of your concerns with this commit: > commit 051ad5115268e5415bebb1988cbf0b1be626156b Yes, they look much better now. Thanks! Pm

.map/.reduce with larger arity

2009-03-08 Thread Moritz Lenz
Currently the spec says: C returns a lazily evaluated list which is comprised of the return value of the expression, evaluated once for every one of the C<@values> that are passed in. But both pugs and rakudo respect the arity of the code ref passed to it, so that (1..6).map({$^a + $^b + $^c})

Re: [perl #63704] [PATCH] Replace PIR pairs method with Perl 6 version

2009-03-08 Thread Moritz Lenz
Patrick R. Michaud via RT wrote: > +our List multi method pairs(@values: *...@indices) { > +gather { > +for (@values.keys Z @values) -> $key, $val is rw { > +take ($key => $val) > +unless (@indices && ($key !~~ any(@indices))); > +

Re: [perl #63712] [PATCH] Reimplement List.min in Perl6 instead of PIR

2009-03-08 Thread Moritz Lenz
Patrick R. Michaud wrote: > On Sat, Mar 07, 2009 at 09:50:02PM -0800, Vasily Chekalkin wrote: >> +our List multi min(*...@values) { >> +my $by = @values[0] ~~ Code ?? shift @values !! sub { $^a cmp $^b }; >> +@values.min($by); >> +} > > This doesn't match the spec -- the $by parameter is r

r25751 - docs/Perl6/Spec/S32-setting-library

2009-03-08 Thread pugs-commits
Author: moritz Date: 2009-03-08 20:00:07 +0100 (Sun, 08 Mar 2009) New Revision: 25751 Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] forgot to bump version number; fixed date from the future Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod =

r25750 - docs/Perl6/Spec/S32-setting-library

2009-03-08 Thread pugs-commits
Author: moritz Date: 2009-03-08 19:52:09 +0100 (Sun, 08 Mar 2009) New Revision: 25750 Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] remove nonsensical return value from min/max Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod ==

[perl #63724] Change to List.perl

2009-03-08 Thread Patrick R. Michaud (via RT)
# New Ticket Created by Patrick R. Michaud # Please include the string: [perl #63724] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63724 > For someone looking for something to do -- the recent change to evaluating List ob

Re: [perl #63712] [PATCH] Reimplement List.min in Perl6 instead of PIR

2009-03-08 Thread Patrick R. Michaud
On Sat, Mar 07, 2009 at 09:50:02PM -0800, Vasily Chekalkin wrote: > +our List multi min(*...@values) { > +my $by = @values[0] ~~ Code ?? shift @values !! sub { $^a cmp $^b }; > +@values.min($by); > +} This doesn't match the spec -- the $by parameter is required. At any rate, the first argu

[perl #63704] [PATCH] Replace PIR pairs method with Perl 6 version

2009-03-08 Thread Patrick R. Michaud via RT
+our List multi method pairs(@values: *...@indices) { +gather { +for (@values.keys Z @values) -> $key, $val is rw { +take ($key => $val) +unless (@indices && ($key !~~ any(@indices))); +} +} +} Especially in class

Re: [perl #63700] [BUG] Rakudo unable to take reference for infix operators.

2009-03-08 Thread Patrick R. Michaud
On Sat, Mar 07, 2009 at 06:28:29PM -0800, Vasily Chekalkin wrote: > > std: my $c = &infix:; say &$c(5, 42); > std 25744: OUTPUT«ok 00:03 48m␤» > rakudo: my $c = &infix:; say &$c(5, 42); > rakudo ed4cd1: OUTPUT«Statement not terminated properly at line > 1, near ":; sa"␤␤current instr.: 'parro

Recursive Runtime Role Reapplication Really Rebounds

2009-03-08 Thread Ovid
(OK, the subject sucked, but I tried :) From S14: You can, however, say $fido does Sentry; $fido does Tricks; $fido does TailChasing; $fido does Scratch; Unlike the compile-time role composition, each of these layers on a new mixin with a new level of inheritance

[perl #63714] [PATCH] Implement handling of Ordergin $by in Range.min and Range.max.

2009-03-08 Thread via RT
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #63714] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63714 > Result of autounfuge :) $ perl tools/autounfudge.pl --unskip --debug t/spec/S29-li

[perl #63706] For loops and junctions misbehave in Rakudo

2009-03-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #63706] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63706 > rakudo: for any(1,2) -> $x {} rakudo ed4cd1: OUTPUT«No exception handler and no messag

[perl #63710] bare <> and should be disallowed in Rakudo

2009-03-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #63710] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63710 > rakudo: <> rakudo ed4cd1: RESULT«[]» rakudo: rakudo ed4cd1: RESULT«"STDIN"» those

[perl #63716] [PATCH] Implement handling of Ordergin $by in Range.min and Range.max.

2009-03-08 Thread via RT
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #63716] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63716 > --- src/classes/Range.pir | 12 1 files changed, 12 insertions(+), 0

[perl #63712] [PATCH] Reimplement List.min in Perl6 instead of PIR

2009-03-08 Thread via RT
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #63712] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63712 > --- src/builtins/any-list.pir | 47 -

[perl #63708] Null PMC access when calling unknown sub

2009-03-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #63708] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63708 > rakudo: &f rakudo ed4cd1: RESULT«Null PMC access in find_method() [...] * masak submit

[perl #63704] [PATCH] Replace PIR pairs method with Perl 6 version

2009-03-08 Thread via RT
# New Ticket Created by Cory Spencer # Please include the string: [perl #63704] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63704 > This patch adds a Perl 6 version of the pairs method to the setting. 0001-Replace-PI

[perl #63702] [PATCH] Replace PIR map with a P6 version

2009-03-08 Thread via RT
# New Ticket Created by Cory Spencer # Please include the string: [perl #63702] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63702 > This patch adds a Perl 6 version of map to the setting. 0001-Squashed-commit-of-the-

[perl #63700] [BUG] Rakudo unable to take reference for infix operators.

2009-03-08 Thread via RT
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #63700] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63700 > Hello. std: my $c = &infix:; say &$c(5, 42); std 25744: OUTPUT«ok 00:03 48m␤» r

[perl #63698] [PATCH] Reimplement List.reduce in Perl6.

2009-03-08 Thread via RT
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #63698] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63698 > --- src/builtins/any-list.pir | 61 -

Predefined rules - clean up

2009-03-08 Thread Richard Hainsworth
Various Appocalypses, Exegeses, and Synopses use rules in example codes. These were gathered together by PM and implemented in PGE. Larry asked for them to be listed in S05 & for a short description to be added. Timothy Nelson added them and I have just described them. This yielded some extra

r25745 - docs/Perl6/Spec

2009-03-08 Thread pugs-commits
Author: finanalyst Date: 2009-03-08 09:43:16 +0100 (Sun, 08 Mar 2009) New Revision: 25745 Modified: docs/Perl6/Spec/S05-regex.pod Log: Added descriptions to standard rules, regrouped rules, added new rule to enable definition of . Eliminated deprecated . Changed deprecated to and deprecated