Re: Strict Rakudo version of this Perl5 one-liner

2015-09-02 Thread yary
On Wed, Sep 2, 2015 at 12:27 PM, yary wrote: > Do perl6's Bag type and feed operators, or other features, open up a cleaner > way? scan +spam|perl6 -e ".say for lines.map({.words(2)[1]}).Bag.sort" -y

[perl #125969] LTA error message mentions “cs = 0”

2015-09-02 Thread via RT
# New Ticket Created by Alex Jakimenko # Please include the string: [perl #125969] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125969 > AlexDaniel m: subset MyInt of Int where * < 0; my $x = MyInt(-10); camelia raku

[perl #111720] [BUG] Subtle action-at-a-distance bond broken after seemingly innocent reading operation on array created with Array.new in Rakudo

2015-09-02 Thread Christian Bartolomaeus via RT
Post-GLR the read operation with $x.key[0] isn't necessary to get the buggy behaviour: < bartolin> m: my $x; my @a = 1,2; $x = Array.new(@a) => 'x'; @a.pop(); say $x; # is that change with glr known/wanted <+camelia> rakudo-moar e6f360: OUTPUT«1 => x␤» < GLRelia> rakudo-moar a6bb0

[perl #124442] no warning when a subroutine named "byte" is created

2015-09-02 Thread Brian S. Julin via RT
This is actually a more generic problem affecting user-created classes as well: $ perl6 -e 'class b { }; { my &b; say b.WHAT, b().WHAT }' (b)(b(Any)) ...it is just that the native types have no idea what to do when invoked and are noisier. The above results could be equally surprizing for someo

[perl #124442] no warning when a subroutine named "byte" is created

2015-09-02 Thread bri
This is actually a more generic problem affecting user-created classes as well: $ perl6 -e 'class b { }; { my &b; say b.WHAT, b().WHAT }' (b)(b(Any)) ...it is just that the native types have no idea what to do when invoked and are noisier. The above results could be equally surprizing for someo

[perl #123511] Parametric role used a second time will use old default values (MoarVM only)

2015-09-02 Thread Christian Bartolomaeus via RT
This works now with rakudo.moar (on 'nom' and 'glr'): $ perl6-m -e 'role A [ :$a = 1, :$b = $a * 2] { method foo { say "$a $b" } }; role B does A[:a(1)] { }; role C does A[:a(2)] { }; B.new.foo; C.new.foo;' 1 2 2 4 I added a test to S14-roles/parameterized-mixin.t with commit https://github.com

[perl #123348] [BUG] .eager is necessary (for no good reason) when converting an Array to a Parcel in Rakudo

2015-09-02 Thread Christian Bartolomaeus via RT
Post-GLR we don't have type Parcel anymore. Therefore, I'm closing this ticket as 'rejected'.

[perl #122220] "@list is copy" leads to dependent default parameters not updating

2015-09-02 Thread Christian Bartolomaeus via RT
This works now as expected (on 'nom' and 'glr'): $ perl6-m -e 'sub a(@list is copy, $l = @list.elems) { say "Elems: " ~ @list.elems; say "l: $l"; }; a(); a()' Elems: 7 l: 7 Elems: 3 l: 3 I added a test to S06-traits/is-copy.t with commit https://github.com/perl6/roast/commit/4747cd49fc I'm clo

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-02 Thread yary
On Tue, Sep 1, 2015 at 3:10 AM, Matija Papec wrote: > Not pretty, also you'll have to take care of -a switch, S19 calls for -a and -F, surprised Rakudo doesn't have'em! Though from later examples, the ".words" method is a fine substitute. On Tue, Sep 1, 2015 at 11:03 AM, Jonathan Scott Duff w

Re: What are Perl 6's killer advantages over Perl 5?

2015-09-02 Thread Robert Strahl via perl6-users
I don't understand why some people feel so strongly that one-liners should be strict. That would undermine what a one-liner is — a quick way to get something done. I use perl5 one-liners very frequently for text processing, especially when stringing / piping together shell code. When I need to re-u

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-02 Thread Matija Papec
02.09.2015, 10:46, "The Sidhekin" : >>  So it seems that perl6 handles lexicals inside while (<>){} one-liners >> differently. > >    Ah, yes.  Interesting.  Run-time effect of C not happening repeatedly.  > How would that deparse? Good question, I wouldn't be surprised that -n switch has some

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-02 Thread Elizabeth Mattijsen
> On 02 Sep 2015, at 14:02, Matija Papec wrote: > 02.09.2015, 10:46, "The Sidhekin" : >>> So it seems that perl6 handles lexicals inside while (<>){} one-liners >>> differently. >> >>Ah, yes. Interesting. Run-time effect of C not happening >> repeatedly. How would that deparse? > > >

[perl #125964] [LTA] assigning to AOB List elem does not hint right

2015-09-02 Thread via RT
# New Ticket Created by Tobias Leich # Please include the string: [perl #125964] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125964 > m: my $a = (1, 2, 3); $a[42] = 21 camelia rakudo-moar 00be1e: OUTPUT«Index out of range.

[perl #125963] [BUG] Can(not) assign to List

2015-09-02 Thread via RT
# New Ticket Created by Tobias Leich # Please include the string: [perl #125963] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125963 > This feels rather inconsistent: m: my $a = (1, 2, 3); say $a; say $a.WHAT; $a[1] = 42 ra

[perl #76698] [BUG] problem using arrays of things, some of themt should be arrays

2015-09-02 Thread Christian Bartolomaeus via RT
For the records: Now (post GLR) this gives List() -- which looks correct: < bartolin> m: my $a = [ "this", "is", "so", "gross" ]; my $b = [ "that", "is", "so", "funny" ]; my $c = $b[2..3]; $a[3] = $c; say $a[3].WHAT # RT #76698 <+camelia> rakudo-moar 00be1e: OUTPUT«(Parc

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-02 Thread The Sidhekin
On Wed, Sep 2, 2015 at 7:49 AM, Matija Papec wrote: > > I've picked a wrong example, > > seq 3 | perl -nE 'my %d; $d{$_}++; END { say keys %d }' > > vs > > seq 3 | perl6 -ne 'my %d; %d{$_}++; END { say keys %d }' > > So it seems that perl6 handles lexicals inside while (<>){} one-liners > differ

Problem detecting identifiers in some grammar rules

2015-09-02 Thread mt1957
Problem is found in the following piece of code; 3 grammar Grammar { 4rule TOP { <.sentence>+ } 5rule sentence { ('c1'|'c2') '=' <+ dutch-chars - [aeiou]>+ } 6token dutch-chars { <[a..z]> } 7 } Grammar.parse('c1 = sdwbh') ~~ Match || say 'Matched dutch characters'; Error message i