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

2015-09-03 Thread Matija Papec
02.09.2015, 16:42, "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

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-03 Thread Matija Papec
02.09.2015, 14:49, "Elizabeth Mattijsen" : >>   I think this is covered somewhere in RFC; perl6 repeatedly overwrites >> END{} block where last one references last %d definition (say %d.WHICH). >>   perl5 on the other hand stays with first END{} block (say \%d). > >  A much

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-02 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

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

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: > >

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,

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

Re: Coroutines

2015-09-01 Thread Matija Papec
regards 14.08.2015, 19:09, "Timo Paulssen" <t...@wakelift.de>: > On 08/14/2015 12:04 PM, Matija Papec wrote: >>  Hi, >> >>  I'm looking for single threaded coroutines in perl6. Will hyper/race make >> them possible? >>  Will 2015 production Rakud

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-01 Thread Matija Papec
to this routine, the routine would probably be required to be > called with no parameters.  And that would also mess with the call to .words > as $_ wouldn't be right ... but ... details, details  ;) > > There may be the kernel of a good idea there if someone smarter than me wants > to

Coroutines

2015-08-14 Thread Matija Papec
Hi, I'm looking for single threaded coroutines in perl6. Will hyper/race make them possible? Will 2015 production Rakudo include async IO? Right now I'm considering golang for scalable websocket service, but also wonder if perl6 would (and how) make such thing possible. ps. I would very

fast question

2004-07-06 Thread Matija Papec
Would there be a way to still use simple unquoted hash keys like in old days ($hash{MYKEY})? imho %hashMYKEY at first sight resembles alien ship from Independence day. :)