LValues, types, mutability

2009-06-08 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-vts-systems.de |Perl 6| wrote: I like your idea to call the class that handles container access LValue. I have proposed the name AssignmentProxy elsewhere. Thanks. I'll quote that so it gets more exposure and hopefully will build a consensus or other feedback. :) Bu

Re: say followed by lines - inconsistencies

2009-06-08 Thread Larry Wall
On Tue, Jun 09, 2009 at 12:37:10AM +0400, Richard Hainsworth wrote: > I write a hash to a file delimited by tabs, eg > > my $fn=open('data.csv',:w); > my %x= Z 1,2,2.1,3; > $fn.say('record-name'~map("\t$^a\t$^b"),%x); > $fn.close; > > The output sometimes contains either the keys or the values padd

Re: Assigning duplicate values to several hash keys using junctions?

2009-06-08 Thread Larry Wall
On Mon, Jun 08, 2009 at 12:02:43PM +0100, Ville Koskinen wrote: : An alternative is always : : @hash{qw(foo bar)} = ('some value') x 2; : : which is probably : : %hash = ('some value') x 2; : : in Perl 6, but you always need to take care to write the correct integer : in the list replication.

[perl #66388] [BUG] Cannot put Pod after a role declaration statement in Rakudo

2009-06-08 Thread Patrick R. Michaud via RT
On Mon Jun 08 06:51:53 2009, masak wrote: > Rakudo doesn't support '=begin SUMMARY' Pod syntax!? [...] > rakudo: role A;␤=begin SUMMARY␤This be a summary.␤=end > SUMMARY␤say "OH HAI" > rakudo 5f70a6: OUTPUT«Unable to parse role definition at line > 2, near ";\n=begin S" [...] > ah. there we go.

r27037 - docs/Perl6/Spec

2009-06-08 Thread pugs-commits
Author: jnthn Date: 2009-06-08 22:56:30 +0200 (Mon, 08 Jun 2009) New Revision: 27037 Modified: docs/Perl6/Spec/S12-objects.pod Log: [spec] Rename :hierarchical option to :tree in the spec for some meta-class method, as suggested on p6l. Modified: docs/Perl6/Spec/S12-objects.pod ==

Re: Assigning duplicate values to several hash keys using junctions?

2009-06-08 Thread Jon Lang
2009/6/8 Ville Koskinen : > Hello all, > > I was curious if this is possible in Perl 6: > > %hash{ 'foo' & 'bar' } = 'some value'; > # %hash{'foo'} eq 'some value' and %hash{'bar'} eq 'some value' By autothreading, this would be equivalent to: (%hash{'foo'} & %hash{'bar'}) = 'some value'; wh

say followed by lines - inconsistencies

2009-06-08 Thread Richard Hainsworth
I came upon the following, which seems to be in line with spec, but I think is inconsistent. I write a hash to a file delimited by tabs, eg my $fn=open('data.csv',:w); my %x= Z 1,2,2.1,3; $fn.say('record-name'~map("\t$^a\t$^b"),%x); $fn.close; The output sometimes contains either the keys or t

[perl #66404] [BUG] Arraystatevariable assignment on declaration

2009-06-08 Thread via RT
# New Ticket Created by Johan Viklund # Please include the string: [perl #66404] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=66404 > In Rakudo this works: (my @s)[0] //= 0; But this does not: (state @s)[0] //= 0; Err

Assigning duplicate values to several hash keys using junctions?

2009-06-08 Thread Ville Koskinen
Hello all, I was curious if this is possible in Perl 6: %hash{ 'foo' & 'bar' } = 'some value'; # %hash{'foo'} eq 'some value' and %hash{'bar'} eq 'some value' or perhaps %hash{ 'foo' | 'bar' } = 'some value'; In other words, is it possible to assign the same value to multiple hash keys simulta

[perl #66364] Strange results with chars/bytes/graphs methods

2009-06-08 Thread Patrick R. Michaud via RT
On Sun Jun 07 00:57:34 2009, patmar19 wrote: > When I try pugs or perl6 I get strange results whith Str methods : > > pugs -e 'say "1234é".chars' => 5 > perl6 -e 'say "1234é".chars' => 6 > > pugs -e 'say "1234é".bytes' => 6 > perl6 -e 'say "1234é".bytes' => 8 > > pugs -e 'say "1234é".graphs' =>

[perl #66394] [BUG] STD.pm allows anything before a statement role declaration, Rakudo doesn't

2009-06-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #66394] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=66394 > from S12: "The first form [the 'role A;' one] is allowed only as the first declaration

[perl #66398] missing spec tests for filetest methods

2009-06-08 Thread via RT
# New Ticket Created by Hugo van der Sanden # Please include the string: [perl #66398] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=66398 > t/spec/S16-filehandles/filetest.t covers only a selection of the filetest methods

Re: RPN calculator in Perl 6

2009-06-08 Thread Daniel Ruoso
Em Sáb, 2009-06-06 às 19:51 +0200, Daniel Carrera escreveu: > Daniel Ruoso wrote: > > Yes... that's what wasn't implemented... But now it is ;) > > http://sial.org/pbot/37085 > Close, but... > % perl6 rpn.pl "5 4 + 3 / 5 3 - *" > -6 > That should be a positive 6. Fixed now! http://sial.org/pbot/37

Re: RPN calculator in Perl 6

2009-06-08 Thread Daniel Ruoso
Em Sáb, 2009-06-06 às 18:22 +0200, Daniel Carrera escreveu: > Daniel Ruoso wrote: > > er... that's because I didn't tried to implement it... but it > certainly > > is possible to, just by declaring the :(@a, Num $a) variant... > Well, * is implemented, so I guess you are talking about complex > ex

Re: RPN calculator in Perl 6

2009-06-08 Thread Daniel Ruoso
Em Sáb, 2009-06-06 às 14:06 +0200, Daniel Carrera escreveu: > I just wrote a blog post showing how to make a reverse polish notation > calculator in Perl 6. In the process I show some of Perl 6's grammar > features. TIMTOWTDI ;) http://sial.org/pbot/37075 daniel

[perl #66352] reduce with user-defined sub fail

2009-06-08 Thread via RT
# New Ticket Created by Daniel Ruoso # Please include the string: [perl #66352] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=66352 > rakudo: multi a (Str $a, Str $b) { [+$a, +$b] }; multi a (Array $a, $b where '+') { [+]

Re: RPN calculator in Perl 6

2009-06-08 Thread Geoffrey Broadwell
On Sat, 2009-06-06 at 13:18 -0300, Daniel Ruoso wrote: > http://sial.org/pbot/37077 > A slightly improved syntax, as per jnthn++ suggestion... My list mail has been very delayed, so this may be out of sequence, but in case no one mentioned it yet: http://sial.org/pbot/37102 (That's ruoso++'

[perl #66388] [BUG] Cannot put Pod after a role declaration statement in Rakudo

2009-06-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #66388] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=66388 > Rakudo doesn't support '=begin SUMMARY' Pod syntax!? ruoso: and having the as a separa

[perl #66366] [BUG] Running .Str on an Int doesn't stringify the integer in Rakudo

2009-06-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #66366] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=66366 > rakudo: 1.Str.say rakudo 290012: OUTPUT«Int()<0xb61f5450>␤» * masak submits rakudobug

[perl #66364] Strange results with chars/bytes/graphs methods

2009-06-08 Thread via RT
# New Ticket Created by Patrick MARION # Please include the string: [perl #66364] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=66364 > When I try pugs or perl6 I get strange results whith Str methods : pugs -e 'say "1234

Re: RPN calculator in Perl 6

2009-06-08 Thread Daniel Ruoso
Em Dom, 2009-06-07 às 00:07 +0200, Daniel Carrera escreveu: > Daniel Ruoso wrote: > >> Are you planning to write a post explaining how your program works? > > Maybe, but if you want to beat me to it, feel free ;) > >> I figure that the explanation is as useful as the example. I sure > >> spent a lo

Re: RPN calculator in Perl 6

2009-06-08 Thread Daniel Ruoso
Em Sáb, 2009-06-06 às 19:45 -0400, Minimiscience escreveu: > my $ls = @a.shift; > my $rs = @a.shift; > To: > my $rs = @a.pop; > my $ls = @a.pop; Thanks... this was already solved in the latest version I sent http://sial.org/pbot/37089 daniel

Re: RPN calculator in Perl 6

2009-06-08 Thread Daniel Ruoso
http://sial.org/pbot/37077 A slightly improved syntax, as per jnthn++ suggestion... Em Sáb, 2009-06-06 às 18:08 +0200, Daniel Carrera escreveu: > Daniel Carrera wrote > > Ok, try again: > > % perl6 rpn.pl "2 2+" > > 2 2 > You can probably fix that with a different split() line. I tried using > i

[perl #66350] [BUG] Internal Parrot error when smartmatching a string against a regex with 'when'

2009-06-08 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #66350] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=66350 > rakudo: grammar A { regex b { foo } }; given "foo" { when A::b { say "OH HAI" } } raku

r27035 - docs/Perl6/Spec

2009-06-08 Thread pugs-commits
Author: lwall Date: 2009-06-08 17:38:07 +0200 (Mon, 08 Jun 2009) New Revision: 27035 Modified: docs/Perl6/Spec/S03-operators.pod Log: [S03] slight clarifications to previous adverbial changes Modified: docs/Perl6/Spec/S03-operators.pod =

r27034 - docs/Perl6/Spec

2009-06-08 Thread pugs-commits
Author: lwall Date: 2009-06-08 17:27:48 +0200 (Mon, 08 Jun 2009) New Revision: 27034 Modified: docs/Perl6/Spec/S03-operators.pod Log: [S03] reduce prececedence of adverbs from inside comma to inside item_assignment Modified: docs/Perl6/Spec/S03-operators.pod ==

r27033 - docs/Perl6/Spec

2009-06-08 Thread pugs-commits
Author: pmichaud Date: 2009-06-08 17:20:31 +0200 (Mon, 08 Jun 2009) New Revision: 27033 Modified: docs/Perl6/Spec/S11-modules.pod Log: Remove line about "module Foo;" needing to be first in file. Modified: docs/Perl6/Spec/S11-modules.pod ===

Parrot Bug Summary

2009-06-08 Thread Parrot Bug Summary
Parrot Bug Summary http://rt.perl.org/rt3/NoAuth/parrot/Overview.html Generated at Mon Jun 8 12:34:03 2009 GMT --- * Numbers * New Issues * Overview of Open Issues * Ticket Status By Version * Requestors with mo