Not necessarily in order of importance or ease of implementation!
This file contains hidden or 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 "hello"; | |
| subset NWZ of Int where * > -1; | |
| proto conversion(NWZ $x, $s = ""){*} | |
| multi conversion(0, $s = "0") { | |
| $s | |
| } | |
| multi conversion($x where * %% 2, $s) { | |
| conversion($x div 2, "0" ~ $s) | |
| } | |
| multi conversion($x, $s) { |
This file contains hidden or 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
| 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 |
This file contains hidden or 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:~/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 |
This file contains hidden or 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 $_"}; | |
| } | |
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 { |