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
------------- [List variables] --------------- | |
my vars: $_ $! @parent_vars $*DISPATCHER @my_vars RETURN $¢ $x $/ | |
caller vars: $y $_ $! $*DISPATCHER RETURN $¢ $x $/ | |
------------- [Eval Variable] --------------- | |
Local $x=5 | |
EVAL $x=5 |
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
#!/usr/bin/env perl6 | |
# Run with: perl6 --setting=RESTRICTED webrepl.p6 | |
use HTTP::Server::Tiny; | |
use URI::Encode; | |
use HTML::Entity; | |
use UUID; | |
sub parse-params($data) { |
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
#!/usr/bin/env perl6 | |
use Grammar::Tracer; | |
# use Grammar::Debugger; | |
grammar Offsides { | |
token TOP { | |
<tree>* | |
} |
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
#!/usr/bin/env perl6 | |
# use Grammar::Tracer; | |
# use Grammar::Debugger; | |
grammar Offsides { | |
token TOP { | |
<tree>* | |
} |
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
#!/usr/bin/env perl6 | |
# use Grammar::Tracer; | |
grammar Offsides { | |
token TOP { | |
<tree>* | |
} | |
token tree { |
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
01:17 < TEttinger> m: say "" for ^10 | |
01:17 <+camelia> rakudo-moar 091ee7: | |
01:17 -!- Irssi: | |
01:17 -!- Irssi: | |
01:17 -!- Irssi: | |
01:17 -!- Irssi: | |
01:17 -!- Irssi: | |
01:17 -!- Irssi: | |
01:17 -!- Irssi: | |
01:17 -!- Irssi: |
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
$ ./universal-greetings.p6 | |
Hello from the Perl Universe!!! |
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 Inline::Ruby::Sweet; | |
> "require 'json'":rb | |
«true»:rb | |
> my $json = 'JSON.parse(File.read("/home/awwaiid/lag.json"))':rb ; 5 | |
5 | |
> $json.count | |
«36071»:rb | |
> $json[0] | |
«{"order_id"=>1173786, "marketplace_id"=>1, "order_placed"=>"2015-10-13T20:28:59-04:00", "order_created"=>"2015-10-13T20:28:59-04:00", "lag"=>0.382000207901001}»:rb | |
> $json[0]["marketpalce_id"] |
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
awwaiid@misao:~/projects/perl6/lang/Inline-Ruby$ cat hiya.csv | |
id, name | |
1, andy | |
2, bella | |
3, chad | |
4, dua | |
awwaiid@misao:~/projects/perl6/lang/Inline-Ruby$ PERL6LIB=lib perl6 | |
> use Inline::Ruby::Sweet | |
> ruby_require 'csv', ['CSV'] | |
Requiring ruby module csv |
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
# namespace | |
class A::B { | |
# "Smiley" type adverb Str:D | |
# Named param -- adverb with default True value | |
method say-hi(Array[Str:D] :$names) { | |
# precedence dropper | |
say $names.map: {"hi $_"}; | |
} | |
} |