Re: Strict Rakudo version of this Perl5 one-liner

2015-09-01 Thread Matija Papec
01.09.2015, 19:46, "The Sidhekin" : >>  perl6 -ne 'my %d; %d{ .words[1] }++; END { %d.sort.perl.say }' >> >>  as this could not work in perl5 >> >>  perl -nE 'my $d =1; END { say $d//"default!" }' # gives default > >    It's not the scoping.  It's scoped correctly, it's just that you need to > gi

[perl #125953] Setting non-strings into %*ENV breaks Proc::Async

2015-09-01 Thread via RT
# New Ticket Created by hanenkamp # Please include the string: [perl #125953] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125953 > Here's a small broken program: perl6 -e '%*ENV = 1; shell("echo")' The error is: This typ

Announce: Rakudo Perl 6 compiler, August 2015 scheduled release

2015-09-01 Thread Will Coleda
On behalf of the Rakudo development team, I'd like to announce that we have skipped the regularly scheduled release planned for August 2015. The team has been working hard on finishing the GLR (Great List Refactor) which is one of the last disruptive changes planned before we are able to release a

[perl #117417] [BUG] Bogus colon in sub or method definition causes QAST::Op invoke() error

2015-09-01 Thread Christian Bartolomaeus via RT
Current failure mode (branch 'glr', perl6 version 2015.07.1-682-g57b7ebc built on MoarVM version 2015.07-108-g7e9f29e): $ perl6-m -e 'sub foo ($bar :D) { 1; }' ===SORRY!=== Cannot invoke this object (REPR: P6opaque, cs = 0) $ perl6-m --ll-exception -e 'sub foo ($bar :D) { 1; }' Cannot invoke thi

[perl #122440] perl6-p fails using @array.gist on array defined as a named parameter to a method

2015-09-01 Thread Christian Bartolomaeus via RT
The underlying bug in Rakudo I spoke about is now fixed (in the 'glr' branch). There is a test in roast -- cmp. Ticket 124079 (https://rt.perl.org/Ticket/Display.html?id=124079). The shortened code from the bug report dies as expected: $ perl6 -e 'my Str @uri = ([], []); say "alive"' Type check

[perl #124079] no exception for type mismatch while assigning to typed array when assignment is followed by unrelated code

2015-09-01 Thread Christian Bartolomaeus via RT
On glr the evaluation dies with X::TypeCheck::Assignment: $ perl6-m -e 'my Str @a = (1, 2); 1' WARNINGS: Useless use of constant integer 1 in sink context (line 1) Type check failed in assignment to '@a'; expected 'Str' but got 'Int' in block at -e:1 The test in S09-typed-arrays/arrays.t was u

Post GLR, Pre RC, September todos

2015-09-01 Thread Will Coleda
I assume there's a lot of travel still going on post SPW and pre YAPC, not a lot of traffic on IRC. We missed the August release, which I think is fine, we were very busy; I've put together a non-release announcement I'll send out later today. https://github.com/rakudo/rakudo/blob/nom/docs/announ

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-01 Thread The Sidhekin
On Tue, Sep 1, 2015 at 5:41 PM, Matija Papec wrote: > Scoping of lexical looks interesting > > perl6 -ne 'my %d; %d{ .words[1] }++; END { %d.sort.perl.say }' > > as this could not work in perl5 > > perl -nE 'my $d =1; END { say $d//"default!" }' # gives default > It's not the scoping. It's sc

Re: Rakudo September Deprecations

2015-09-01 Thread Will Coleda
I think this is a good idea; I've incorporated into a non-release announcement for August here: https://github.com/rakudo/rakudo/blob/nom/docs/announce/2015.08.md Which I'd like to mail out at the end of the day today if no one has any objections. On Tue, Sep 1, 2015 at 9:36 AM, Rob Hoelz wro

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-01 Thread Matija Papec
Scoping of lexical looks interesting perl6 -ne 'my %d; %d{ .words[1] }++; END { %d.sort.perl.say }' as this could not work in perl5 perl -nE 'my $d =1; END { say $d//"default!" }' # gives default Btw, is there some option like perl -MO=Deparse -e .. in perl6? 01.09.2015, 17:03, "Jonathan S

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-01 Thread Jonathan Scott Duff
If you're not married to the "key : value" format, you could use this: scan +spam | perl6 -ne 'my %d; %d{.words[1]}++; END { .say for sort %d }' Here's another variation, but keeping your original format: scan +spam | perl6 -ne 'my %d; %d{.words[1]}++; END { say "$_.key() : $_.value()"

[perl #125951] [BUG] Can't require ::('Foo') <&foo> in non GLOBAL namespace

2015-09-01 Thread via RT
# New Ticket Created by Lloyd Fournier # Please include the string: [perl #125951] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125951 > Or at least that's a rough approximation of the problem. # main.pl package Bar {

Rakudo September Deprecations

2015-09-01 Thread Rob Hoelz
Hi everyone! Well, September is finally here, and with it most (if not all?) of the removal of the deprecations that have happened in the last year. There are about 100 of these in the Rakudo source, and to ease the burden on the release manager this month, I was thinking we should perhaps remove

Re: Coroutines

2015-09-01 Thread Matija Papec
Timo tnx for the reply, as I was looking for something like mojolicious non-blocking server I've taken a look at https://github.com/tony-o/perl6-http-server-async/ and now I understand what async being "crashy" means. I guess I'll have to wait until production version comes out. regards 14

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

2015-09-01 Thread Matija Papec
This is actually bad decision. If I'm concerned with *my* one-liner I'll use -Mstrict and all would be great. On the other hand, most of the time one-liners use one or two variables. Now, how difficult is for human to track these two? ps. -M-strict (no strict) is not valid command line option, s

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-01 Thread Matija Papec
Not pretty, also you'll have to take care of -a switch, perl6 -ne 'our %d; %d{ .trim.split(/\s+/)[1] }++; END {say "$_: %d{$_}" for sort keys %d}' 31.08.2015, 17:25, "yary" : > Once in a while, our sysadmin tweaks something on an upstream mail server, > and asks us a few days later if our spa

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-01 Thread Matija Papec
31.08.2015, 17:25, "yary" : > Once in a while, our sysadmin tweaks something on an upstream mail server, > and asks us a few days later if our spam rate has changed. I invariably whip > up a perl5 one liner like this to get a daily spam count from my "mh" mail > folder: > > scan +spam|perl -na