Skip to content

Instantly share code, notes, and snippets.

View mryan's full-sized avatar

Martin Ryan mryan

  • Melbourne, Australia
View GitHub Profile
@mryan
mryan / gist:e64e93362a275fa0b41cf6650c5d8e6c
Created May 23, 2018 11:43
Small program AST dump with "Block guide lines"
class Book {
has Str $.title ;
has Int $.pages ;
has Bool $.hard-back ;
method gist { "$.title ($.pages pages)" }
}
sub MAIN( Str $title , Int $pages , Bool :$hard-back ) {
my Book $b .= new: :$title :$pages :$hard-back ;
@mryan
mryan / gist:dc8c890de862876abc4f87f55d974070
Created May 6, 2018 10:21
first cut a contrived use of <foo ...> syntax
#!/usr/bin/env perl6
grammar G {
my $SOLpos = -1 ;
regex TOP { <line>+ }
method SOLscan($regex) {
# Print out the string we're matching against for kicks
say 'self.target: ' , self.target ;
my $cur = self."!cursor_start_cur"() ;
@mryan
mryan / gist:71709f7dfb5550c0b14a526b42bf1feb
Created September 26, 2017 21:46
Proposed changes to fudge
$ git diff fudge
diff --git a/fudge b/fudge
index 975fcef..5a2fd4f 100755
--- a/fudge
+++ b/fudge
@@ -209,6 +209,10 @@ sub fudgeblock {
my $args = $3;
my $cmd = $4;
my $applies = 0;
+