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 | |
class Decorator is Callable { | |
has &.funk; | |
has @.history; | |
has $.cached-result; | |
multi method new(&funk, @history = []) { | |
self.bless(:&funk, :@history); | |
} |
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 class Reader { | |
my $.pos is rw = 0; | |
my $.buf; | |
method read(Buf $buf) { | |
... | |
} | |
method read-type(Any:U: $type) { | |
my $width = nativesizeof($type); |
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
use v6; | |
sub bigpackids(int @ids) { | |
my $ret = 0; | |
my $c = 0; | |
while $c++ < +@ids { | |
$ret = $ret +| (1 +< (@ids[$c] - 1)); | |
} | |
return $ret; |
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 v6; | |
sub MAIN($dir) { | |
my $handler-supplier = Supplier.new; | |
my $handler-supply = $handler-supplier.Supply; | |
my %seen; | |
my $dispatch-promise = start { | |
say "Watching out on '$dir'"; |
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
subset Sha1 of Str where *.chars == 40 and m:i/<[A..Z 0..9]>/; | |
class Sha1H does Associative { | |
has $!sha1; | |
has %!h{Sha1(Str)}; | |
method AT-KEY($_) { %!h{ .lc } }; | |
method ASSIGN-KEY($_, $v) { %!h{ .lc } = $v } | |
} | |
class Sha1Str is Str { |
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
unit class Grid; | |
#use Terminal::Print::Commands; | |
# | |
#constant T = Terminal::Print::Commands; | |
has @.grid; | |
has $!character-supply; | |
has $!control-supply; |
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
module Chance { | |
my @faces = '⚀', '⚁', '⚂', '⚃', '⚄', '⚅'; | |
sub term:<¿>() is export(:golf) { @faces.roll } | |
sub chance() is export { ¿ } | |
} | |
import Chance; | |
say chance; |
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 ruby | |
require 'rubygems' | |
require 'i3-ipc' | |
i3 = I3::IPC.new | |
def process(data) | |
data.each do |ws| | |
if ws["focused"] |
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
%!PS-Adobe-3.0 EPSF-3.0 | |
%%BoundingBox: 0 0 300 300 | |
/period 2 def | |
/thick 1 def | |
2 2 scale | |
10 10 translate | |
thick setlinewidth |
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
http://www.tumblr.com/tumblelog/seyalex | |
http://maxweidlich.tumblr.com/ | |
http://quic0.tumblr.com | |
http://dennii3.tumblr.com/ | |
http://www.tumblr.com/tumblelog/willem12 | |
http://mbustraan.tumblr.com/ | |
http://e-langhout.tumblr.com | |
http://www.tumblr.com/tumblelog/fajknerd | |
http://matthiasfelix.tumblr.com/ | |
http://loocerasemag.tumblr.com |