Skip to content

Instantly share code, notes, and snippets.

View gist:1218287
[Scimitar, New Setup 1]
Capacitor Power Relay II
Capacitor Power Relay II
LADAR Backup Array II
LADAR Backup Array II
10MN Afterburner II
Large Shield Extender II
Invulnerability Field II
Invulnerability Field II
@gfldex
gfldex / gist:1391681
Created Nov 24, 2011
overloading <( )> error without line number
View gist:1391681
use v6;
class Signal {
has @.slots is rw;
multi method connect(Code $f){
@.slots.push($f);
return self;
}
View cygwin_install.patch
diff --git a/tools/build/Makefile.in b/tools/build/Makefile.in
index 455d819..929446d 100644
--- a/tools/build/Makefile.in
+++ b/tools/build/Makefile.in
@@ -296,8 +296,8 @@ install: all
$(CHMOD) 755 $(DESTDIR)$(PARROT_BIN_DIR)/$(PERL6_EXE)
$(MKPATH) $(DESTDIR)$(DOCDIR)/rakudo
$(MKPATH) $(DESTDIR)$(DOCDIR)/rakudo/announce
- $(CP) $(DOCS) $(DESTDIR)$(DOCDIR)/rakudo
- $(CP) $(DOCS)/announce $(DESTDIR)$(DOCDIR)/rakudo/announce
View proposed_syntax.p6
http://www.haskell.org/ghc/docs/7.4-latest/html/libraries/haskell98-2.0.0.1/Time.html
http://en.wikipedia.org/wiki/Gregorian_calendar
http://en.wikipedia.org/wiki/Leap_year
http://en.wikipedia.org/wiki/Leap_second
http://en.wikipedia.org/wiki/Unix_time
# we have 3 different official international clocks right now:
say now.IAT; # International Atomic Time
say now.GPS; # == IAT - 19s;
View gist:2726387
enum E (Jan => 1, Feb => 2);
class A {
class B {
has $.i is rw;
}
}
our method ACCEPTS(E:D $self: A::B:D $topic){
say "I'm not called";
View gist:2830624
use v6;
subset HTMLColor of Str where { * ~~ / <:hexdigit> ** 6 / };
sub alternator (HTMLColor $a is copy, HTMLColor $b is copy){
return sub () {
return (($a, $b) = ($b, $a))[0];
}
}
View gist:2835895
use v6;
subset HTMLColor of Str where { * ~~ / '#'<:hexdigit> ** 6 / };
sub alternator (HTMLColor $a is copy, HTMLColor $b is copy){
return sub () {
return (($a, $b) = ($b, $a))[0];
}
}
View typed callback
multi a(&callback:(:$before, *@params)) {
say &callback(1,2,3), 'before';
}
multi a(&callback:(:$after, *@params)) {
say 'after', &callback(4,5,6);
}
my $cb1 = sub(:$after, *@params) {
return @params.join('-');
View recursive-grammar.p6
use v6;
my $s1 = 'AA foo; BB baz; AA bar;';
my $s2 = 'AA buzz;';
grammar G {
rule TOP { [ [ <ta> | <tb> ] <.ws> ]+ }
rule ta { 'AA' <name>';' { say $/<name>.Str; } }
rule tb { 'BB' <name>';' { G.parse($s2); say $/<name>.Str; } }
rule name { \w+ }
View gist:3808313
nice /usr/bin/perl Configure.pl --with-parrot=/home/dex/rakudo/install/bin/parrot --make-install && nice make all install
HEAD is now at a0b4c57... Catch undeclared variables properly.
Building NQP ...
/usr/bin/perl Configure.pl --with-parrot=/home/dex/rakudo/install/bin/parrot.exe --make-install
Verifying installation ...
Using /home/dex/rakudo/install/bin/parrot.exe (version RELEASE_4_4_0).
sh: line 0: cd: 3rdparty/dyncall: No such file or directory
Command failed (status 256): cd 3rdparty/dyncall && sh configure
Command failed (status 256): /usr/bin/perl Configure.pl --with-parrot=/home/dex/rakudo/install/bin/parrot.exe --make-install