My final answer for spam-folder-counting, p5 vs p6:
scan +spam|perl -naE '$d{$F[1]}++; END{say "$_: $d{$_}" for sort keys %d}'
scan +spam|perl6 -e "for lines.map({.words(2)[1]}).Bag.sort {.fmt('%s:%d').say}"
On the surface, very different ways of going about it. Under the hood,
p6's Bag
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #125980]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125980 >
This works fine:
$ perl6 -e 'sub MAIN("foo") { say "called" }' foo
called
And this
# New Ticket Created by Rob Hoelz
# Please include the string: [perl #125977]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125977 >
If I do something like this:
for ^1000 {
Thread.start({}).join;
}
MoarVM
On Wed, Sep 2, 2015 at 3:51 AM, Robert Strahl via perl6-users <
perl6-us...@perl.org> wrote:
> 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
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
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
# New Ticket Created by Rob Hoelz
# Please include the string: [perl #125976]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125976 >
For example:
class Foo { method bar { } }
Foo.new.bar:;
===SORRY!=== Error
This golfs down to:
(* // "foo").WHAT.say
All the boolean ops see not to. Just to see what would happen
I applied the following patch locally:
--- a/src/Perl6/Actions.nqp
+++ b/src/Perl6/Actions.nqp
@@ -7744,6 +7744,10 @@ Compilation unit '$file' contained the following
violations: