Skip to content

Instantly share code, notes, and snippets.

View awwaiid's full-sized avatar

Brock Wilcox awwaiid

View GitHub Profile
ok 1 - Simple 1 works
ok 2 - Real simple 2 works
not ok 3 - We have prepended values!
# Failed test 'We have prepended values!'
# at roman-mark.pl line 35.
# got: 'IIII'
# expected: 'IV'
ok 4 - We have Vs
ok 5 - seventeen and stuff
not ok 6 - nineteen and stuff
awwaiid@misao:~/dcpm$ perl randori-2010301-roman.pl
shift on reference is experimental at randori-2010301-roman.pl line 25.
shift on reference is experimental at randori-2010301-roman.pl line 68.
ok 1 - Simple 1 works
ok 2 - Real simple 2 works
ok 3 - We have prepended values!
ok 4 - We have Vs
ok 5 - seventeen and stuff
ok 6 - nineteen and stuff
ok 7 - twenty and stuff
# 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 $_"};
}
}
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
> 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"]
$ ./universal-greetings.p6
Hello from the Perl Universe!!!
@awwaiid
awwaiid / -
Created December 20, 2015 06:22
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:
#!/usr/bin/env perl6
# use Grammar::Tracer;
grammar Offsides {
token TOP {
<tree>*
}
token tree {
#!/usr/bin/env perl6
# use Grammar::Tracer;
# use Grammar::Debugger;
grammar Offsides {
token TOP {
<tree>*
}
#!/usr/bin/env perl6
use Grammar::Tracer;
# use Grammar::Debugger;
grammar Offsides {
token TOP {
<tree>*
}