Re: New Perl 6 Advent Calendar: call for ideas

2010-11-09 Thread Paweł Pabian
One of the subjects can be I/O, which was completly redesigned in P6. - where did diamond operator go, how can I do "while (<>) {}" in P6? - how to auto-iterate over STDIN, "perl -n'' switch in action - basic file operations: opening, closing, reading, writing, fseek, flushing, utf8 mode - listing

[perl #78850] [BUG] @empty-array.end returns -1 in Rakudo

2010-11-09 Thread Carl Mäsak via RT
masak (>): > rakudo: say (my @a).end > rakudo 142d22: OUTPUT«-1␤» > S32 says: "Returns the final subscript of the first dimension; > for a one-dimensional array this simply the index of the final > element." > * masak submits rakudobug > huh. I didn't even see the missing "is" in that second >

Re: New Perl 6 Advent Calendar: call for ideas

2010-11-09 Thread Mason Kramer
A natural language data/time parser could show off grammars. On Nov 9, 2010, at 06:03 AM, Paweł Pabian wrote: > One of the subjects can be I/O, which was completly redesigned in P6. > - where did diamond operator go, how can I do "while (<>) {}" in P6? > - how to auto-iterate over STDIN, "perl -

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-09 Thread TSa (Thomas Sandlaß)
On Tuesday, 9. November 2010 01:45:52 Mason Kramer wrote: > I have to disagree here. Arrays and Hashes may be about storage (I don't > think they are, though, since you can change the (storage) implemenation of > an Array or Hash via its metaclass and it can still remain an Array or > Hash). What

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-09 Thread Moritz Lenz
On 11/09/2010 09:26 PM, TSa (Thomas Sandlaß) wrote: > But doesn't > >my $x = (1,2,3); >my $y = map {$^x * $^x}, $x; > > result in $y containing the list (1,4,9)? Not at all. The $ sigil implies a scalar, so what you get is roughly my $y = (1, 2, 3).item * (1, 2, 3).item; so $y ends