Perl 6 Scripting Games

2008-12-22 Thread Patrick R. Michaud
Are you interested in playing with Perl 6 and Rakudo Perl but can't figure out what to do? Here's an idea that came up during Jon Allen's talk "The Camel and the Snake" [1] at YAPC::EU in Copenhagen. For the past few years Microsoft has sponsored an annual Scripting Games [2] competition, where

Re: [perl #61206] :x($n) where $n ~~ Range doesn't work properly in Rakudo

2008-12-22 Thread Carl Mäsak
Patrick (>): > I would prefer to see this done by using a smart match on the :x() > argument instead of explicitly checking it for a Range and grabbing > min/max from there. Using a smart match would allow things like > :x(1|5|7) and :x({ .is_prime }) to work properly. We might as well add spect

[perl #61206] :x($n) where $n ~~ Range doesn't work properly in Rakudo

2008-12-22 Thread Patrick R. Michaud via RT
On Mon Dec 22 16:41:53 2008, zev wrote: > Oops. The last patch wasn't quite right. This one passes the tests > (which I found). I also added spectests that are marked TODO (but which > pass with this patch applied). I would prefer to see this done by using a smart match on the :x() argument ins

[svn:parrot-pdd] r34267 - trunk/docs/pdds

2008-12-22 Thread pmichaud
Author: pmichaud Date: Mon Dec 22 19:43:55 2008 New Revision: 34267 Modified: trunk/docs/pdds/pdd26_ast.pod Log: [pct]: Update pdd26_ast.pod with 'hll' attribute on PAST::Block . Modified: trunk/docs/pdds/pdd26_ast.pod

Re: Question regarding Ranges

2008-12-22 Thread Larry Wall
On Mon, Dec 22, 2008 at 02:32:00PM -0800, cory.spen...@gmail.com wrote: : : I've got a question regarding Ranges and in particular, infinite : Ranges. How should a range such as: : : (0..Inf) : : or : : (-Inf..0) : : be represented when it is converted to a string? I believe that Pugs :

Question regarding Ranges

2008-12-22 Thread cory . spencer
I've got a question regarding Ranges and in particular, infinite Ranges. How should a range such as: (0..Inf) or (-Inf..0) be represented when it is converted to a string? I believe that Pugs currently attempts to create a range of infinite length and provides no stringified value. I'm

Re: [perl #61598] [PATCH] Implementation of Array.elems

2008-12-22 Thread Vasily Chekalkin
Patrick R. Michaud via RT wrote: On Mon, Dec 22, 2008 at 04:15:20AM -0800, Vasily Chekalkin wrote: Trivial patch for Array.elems attached. As far as I can tell, Array.elems already works in trunk without the patch. Is there a specific test or set of tests this enables, or a case that isn't be

Re: [perl #61610] Something is inconsistent with the undef warnings of .reduce

2008-12-22 Thread Vasily Chekalkin
Mark J. Reed wrote: Arity 2 and a 1-elem list seems to be special-cased; otherwise, it consistently warns once per undefined value in the expansion: 1-elem List reduce patch attached. Test added in r24567 -- Bacek commit 9c1a3058064067dacab4c5f623a59ae768f19182 Author: Vasily Chekalkin Date:

Re: [perl #61610] Something is inconsistent with the undef warnings of .reduce

2008-12-22 Thread Mark J. Reed
Ok, so with that patch, the case of a 1-element list and a binary sub now behaves the same as any other combination of arity n with a list whose length is not k(n-1)+1. I guess that's progress. :) Thanks, Vasily. I'd still like to see the undef warnings reduced to one, rather than one for every

[svn:parrot-pdd] r34259 - in trunk: . docs/pdds languages/pipp languages/pipp/src/pct languages/pipp/t/php

2008-12-22 Thread bernhard
Author: bernhard Date: Mon Dec 22 14:06:01 2008 New Revision: 34259 Modified: trunk/docs/pdds/pdd21_namespaces.pod Changes in other areas also in this revision: Modified: trunk/NEWS trunk/languages/pipp/CREDITS trunk/languages/pipp/src/pct/actions.pm trunk/languages/pipp/src/pct/gr

[perl #61618] [PATCH] Report the number of elements in an infinite range correctly

2008-12-22 Thread via RT
# New Ticket Created by Cory Spencer # Please include the string: [perl #61618] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61618 > The attatched patch lets an infinite Range (ie. (1..Inf)) report its length as Inf. I

Re: [perl #61610] Something is inconsistent with the undef warnings of .reduce

2008-12-22 Thread Mark J. Reed
Arity 2 and a 1-elem list seems to be special-cased; otherwise, it consistently warns once per undefined value in the expansion: (1..4).reduce({$^a+$^b+$^c+$^d})# no warnings (1..5).reduce({$^a+$^b+$^c+$^d})# two warnings: (1+2+3+4)+5+undef+undef (1..6).reduce({$^a+$^b+$^c+$^d})# one w

[svn:parrot-pdd] r34246 - trunk/docs/pdds

2008-12-22 Thread Whiteknight
Author: Whiteknight Date: Mon Dec 22 07:27:08 2008 New Revision: 34246 Modified: trunk/docs/pdds/pdd19_pir.pod trunk/docs/pdds/pdd21_namespaces.pod Log: [PDD] add mention of "parrot" root namespace to PDD19 and 21. This is for TT#80, which I will close if there are no objections to this ed

[perl #61620] [PATCH] implement do-while within pipp

2008-12-22 Thread Daniel Keane
# New Ticket Created by "Daniel Keane" # Please include the string: [perl #61620] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61620 > A small patch to add do-while functionality to pipp. Files changed: * t/php/control_

[perl #61610] Something is inconsistent with the undef warnings of .reduce

2008-12-22 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #61610] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61610 > rakudo: say (1..10).reduce({$^a + $^b + $^c}) rakudo 34244: OUTPUT[Use of uninitialize

[perl #61576] "+Inf" and numeric comparisons in Rakudo

2008-12-22 Thread Patrick R. Michaud via RT
On Sun Dec 21 08:46:48 2008, masak wrote: > even so, we don't want the case of my $a = [].min; > if $a < 3 { say 'yes'; } > because right now "+Inf" is probably treated as < 3 > rakudo: say "+Inf" < 3; > rakudo 34203: OUTPUT[1␤] > * masak submits rakudobug Now working in r34248, thanks

[perl #61618] [PATCH] Report the number of elements in an infinite range correctly

2008-12-22 Thread Patrick R. Michaud via RT
On Mon Dec 22 09:46:43 2008, cspencer wrote: > > The attatched patch lets an infinite Range (ie. (1..Inf)) report its > length as Inf. > > It also adds temporary !FAIL cases when an infinite range is converted > into a list or string context. The patch needs some rework before it can be accept

[perl #61606] &sub.arity doesn't treat named parameters as optional

2008-12-22 Thread Patrick R. Michaud via RT
On Mon Dec 22 06:24:11 2008, moritz wrote: > Rakudo (r34146) correctly excludes optional arguments from its counting, > but not named ones, which are also optional: > > $ ./perl6 -e 'sub a($x, $y?) { }; sub b ($x, :$y) { }; say &a.arity; say > &b.arity' > 1 > 2 # should be 1 as well > $ Now fixed

Re: [perl #61596] Rakudo does the Wrong Thing when defining subs via eval string

2008-12-22 Thread Larry Wall
On Mon, Dec 22, 2008 at 01:29:06AM -0800, Carl Mäsak wrote: : # New Ticket Created by "Carl Mäsak" : # Please include the string: [perl #61596] : # in the subject line of all future correspondence about this issue. : # http://rt.perl.org/rt3/Ticket/Display.html?id=61596 > : : : rakudo: eval

Re: [perl #61598] [PATCH] Implementation of Array.elems

2008-12-22 Thread Patrick R. Michaud
On Mon, Dec 22, 2008 at 04:15:20AM -0800, Vasily Chekalkin wrote: > Trivial patch for Array.elems attached. As far as I can tell, Array.elems already works in trunk without the patch. Is there a specific test or set of tests this enables, or a case that isn't being handled? Pm

Re: [perl #61602] Fix Integral values of Inf/NaN

2008-12-22 Thread Patrick R. Michaud
On Mon, Dec 22, 2008 at 06:00:31AM -0800, Cory Spencer wrote: > When calling the .int method on Inf/Nan, the reported value is incorrect: >"Inf.int.say" produces "-2147483648" > and >"NaN.int.say" produces "-2147483648" This turns out to be the way that Parrot converts infinities to intege

[perl #61604] [TODO] allow 'does RoleName' inside a class

2008-12-22 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #61604] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61604 > currently (r34146) Rakudo allows 'class MyClass does RoleName { ... }', but not 'class My

[perl #61606] &sub.arity doesn't treat named parameters as optional

2008-12-22 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #61606] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61606 > Rakudo (r34146) correctly excludes optional arguments from its counting, but not named on

r24558 - docs/Perl6/Spec

2008-12-22 Thread pugs-commits
Author: moritz Date: 2008-12-22 17:23:57 +0100 (Mon, 22 Dec 2008) New Revision: 24558 Modified: docs/Perl6/Spec/S12-objects.pod Log: [S12] fixed small typo Modified: docs/Perl6/Spec/S12-objects.pod === --- docs/Perl6/Spec/S12-obj

[perl #61598] [PATCH] Implementation of Array.elems

2008-12-22 Thread via RT
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #61598] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61598 > Hello. Trivial patch for Array.elems attached. Quote from spectest: t/spec/S29-ar

[perl #61608] [BUG] Can't use the sub form of push(@*INC, @list)

2008-12-22 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #61608] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61608 > Rakudo r34146: $ ./perl6 -e '@*INC.push("b")' # lives, rakudo++ $ ./perl6 -e 'my @a

[perl #61602] Fix Integral values of Inf/NaN

2008-12-22 Thread via RT
# New Ticket Created by Cory Spencer # Please include the string: [perl #61602] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61602 > When calling the .int method on Inf/Nan, the reported value is incorrect: "Inf.int.

[perl #61596] Rakudo does the Wrong Thing when defining subs via eval string

2008-12-22 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #61596] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61596 > rakudo: eval "sub x { say q }"; say "before call"; x rakudo 34238: OUTPUT[O, NI HAO␤be

Parrot Bug Summary

2008-12-22 Thread Parrot Bug Summary
Parrot Bug Summary http://rt.perl.org/rt3/NoAuth/parrot/Overview.html Generated at Mon Dec 22 14:00:01 2008 GMT --- * Numbers * New Issues * Overview of Open Issues * Ticket Status By Version * Requestors with m

Build and Installation of modules should be implementation specific (Was: Re: 6PAN Spec question)

2008-12-22 Thread Daniel Ruoso
Em Seg, 2008-12-22 às 15:06 +1100, Timothy S. Nelson escreveu: > On Sat, 20 Dec 2008, Mark Overmeer wrote: > > For ???B. In the current set-up, you use CPAN.pm to download, and then > > install. The 'cpan' script is a wrapper around CPAN.pm. CPAN.pm starts > > the install tool. A more convient