This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zoffix@leliana:/tmp/tmp.YvNSdWF7by$ perl6 -e '"a b c" ~~ m:g/(\w+)/; say $/' | |
(「a」 | |
0 => 「a」 「b」 | |
0 => 「b」 「c」 | |
0 => 「c」) | |
zoffix@leliana:/tmp/tmp.YvNSdWF7by$ perl6 -e '"a b c" ~~ m:g/(\w+)/; $/».gist.join("\n-------\n").say' | |
「a」 | |
0 => 「a」 | |
------- | |
「b」 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zoffix@leliana:~/CPANPRC/rakudo/t/spec$ tg socket | |
│ ├── ./S32-io/IO-Socket-Async.t | |
│ ├── ./S32-io/IO-Socket-Async-UDP.t | |
│ ├── ./S32-io/IO-Socket-INET.bat | |
│ ├── ./S32-io/IO-Socket-INET.pl | |
│ ├── ./S32-io/IO-Socket-INET.sh | |
│ ├── ./S32-io/IO-Socket-INET.t | |
│ ├── ./S32-io/socket-accept-and-working-threads.t | |
│ ├── ./S32-io/socket-fail-invalid-values.t | |
│ ├── ./S32-io/socket-host-port-split.rakudo.moar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say ‚hi‘; # meow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Calling parse | |
Calling TOP | |
Calling statementlist | |
Calling statement | |
Calling statement:sym<fuc> | |
Calling fucbody | |
Calling ident | |
Calling ws | |
Calling ww | |
Calling ws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use NQPHLL; | |
grammar Perl7::Grammar is HLL::Grammar { | |
token TOP { | |
:my $*CUR_BLOCK := QAST::Block.new(QAST::Stmts.new()); | |
<statementlist> | |
[ $ || <.panic('Perl 7 syntax error')> ] | |
} | |
token ws { <!ww> \h* || \h+ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpan@perlbuild2~/CPANPRC/rakudo (nom)$ make t/spec/S02-types/num.t | |
rm -f -- perl6 | |
cp -- perl6-m perl6 | |
chmod -- 755 perl6 | |
/home/cpan/perl5/perlbrew/perls/perl-5.24.0/bin/perl t/harness5 --fudge --moar --keep-exit-code --verbosity=1 t/spec/S02-types/num.t | |
ok 1 - EVAL 1.Num.perl is Num | |
ok 2 - EVAL 1.Num.perl is 1 | |
ok 3 - EVAL 0.Num.perl is Num | |
ok 4 - EVAL 0.Num.perl is 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl6 -e 'my $Foo = EVALFILE "Foo.pm6"; $Foo.foo; sleep 10; $Foo = EVALFILE "Foo.pm6"; $Foo.foo' | |
hi | |
bye | |
$ cat Foo.pm6 | |
my class Foo { | |
method foo { say "bye" } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $sum = 0; | |
for (1..2015) -> $term { | |
$sum += $term; | |
my $sqr = sqrt $sum; | |
my $fsqr = floor sqrt $sum ; | |
my $factors; | |
$sum %% $_ and $factors +=2 for 1..$fsqr; | |
$factors-- if $fsqr == $sqr; | |
} | |
say now - INIT now; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $sum = 0; | |
for (1..2015) -> $term { | |
$sum += $term; | |
my $factors = 2 * do for (1..floor(sqrt($sum))) -> $x { | |
$sum % $x == 0 ?? $x !! Empty | |
} | |
$factors-- if floor(sqrt($sum)) == sqrt($sum); | |
} | |
say now - INIT now; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $sum = 0; | |
for (1..2015) -> $term { | |
$sum += $term; | |
my $factors = (1..floor(sqrt($sum))).elems * 2; | |
$factors-- if floor(sqrt($sum)) == sqrt($sum); | |
} | |
say now - INIT now; |