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
# 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
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
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
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
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
Post-GLR we don't have type Parcel anymore. Therefore, I'm closing this ticket
as 'rejected'.
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
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
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
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
> 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?
>
>
>
# 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.
# 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
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
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 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
17 matches
Mail list logo