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::ErrorReporting; | |
use Grammar::Tracer; | |
grammar Ingredient::Grammar does Grammar::ErrorReporting { | |
token TOP { <ingredient> } | |
token ingredient { | |
<number>? |
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
#!/bin/bash | |
perl6 -e 'for 2..2000000 { put $_*$_*$_+1; }' | factor | \ | |
perl6 -e ' | |
my $s = 1; | |
for lines().kv -> $i, $l { | |
my $ln = $i + 1; | |
$s += $l.words[*-1]-1; | |
say $ln, "\t", $s if $ln %% 1_000; | |
} | |
say $s;' |
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 Test; | |
##use Grammar::Debugger; | |
### Package : package-name-ver-arch-build-tag.ext | |
grammar Pkg { | |
token TOP { <ws> <name> ['-' <ver>]? ['-' <arch>]? ['-' <build>]? ['-' <tag>]? ['.' <ext>]? } |
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
➤ wget http://www.cpan.org/authors/id/D/DO/DOUGW/Spreadsheet-ParseExcel-0.65.tar.gz | |
--2017-03-14 13:21:05-- http://www.cpan.org/authors/id/D/DO/DOUGW/Spreadsheet-ParseExcel-0.65.tar.gz | |
Resolving www.cpan.org (www.cpan.org)... 151.101.192.249, 151.101.64.249, 151.101.128.249, ... | |
Connecting to www.cpan.org (www.cpan.org)|151.101.192.249|:80... connected. | |
HTTP request sent, awaiting response... 500 Internal Server Error | |
2017-03-14 13:21:05 ERROR 500: Internal Server Error. |
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
$ cat lib/MyApp.pm | |
package MyApp; | |
use Dancer2; | |
use LWP::UserAgent; | |
use Data::Dumper::Concise; | |
our $VERSION = '0.1'; | |
get '/code' => sub { | |
return "BLAH " . time . "\n"; |
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
diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp | |
index ace9b9b..b0ecaaa 100644 | |
--- a/src/Perl6/Actions.nqp | |
+++ b/src/Perl6/Actions.nqp | |
@@ -7832,6 +7832,8 @@ class Perl6::Actions is HLL::Actions does STDActions { | |
QAST::IVal.new( :value($samemark) ), | |
); | |
+ my $Sname := QAST::Node.unique("__Sname"); | |
+ |
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 | |
say join " ", .lines given q:to/📝/, qq:to/📝/ | |
Hey, | |
📝 | |
dawg { | |
[~] q:to/📝/, qq:to/📝/ | |
I heard you | |
📝 | |
liked heredocs { |
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 $user_rs = resultset('User')->search_rs([ | |
{ login_id => $login_id }, | |
{ \[ 'LOWER(email) = ?' => lc($login_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
package MyApp::Schema::Result::BaseTable; | |
use base qw/DBIx::Class::Core/; | |
# ... column definitions here ... |
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
v6; | |
grammar BUU { | |
token TOP { <abc>+ }; | |
token abc { 'a' <bc>* }; | |
token bc { [ 'b' <c>* ]+ } | |
token c { 'c' }; | |
}; | |
# default result |
NewerOlder