Skip to content

Instantly share code, notes, and snippets.

View diakopter's full-sized avatar
💭
🤠

Matthew Wilson diakopter

💭
🤠
View GitHub Profile
@diakopter
diakopter / Printf.idr
Created July 23, 2019 23:44 — forked from chrisdone/Printf.idr
Type-safe dependently-typed printf in Idris
module Printf
%default total
-- Formatting AST.
data Format
= FInt Format
| FString Format
| FOther Char Format
| FEnd
@diakopter
diakopter / irc-test.p6
Last active November 23, 2015 18:17 — forked from zoffixznet/irc-test.p6
use v6;
my $chan = '#perl6';
await IO::Socket::Async.connect('irc.freenode.net',6667).then( -> $p {
my $sock = $p.result;
$sock.print("NICK P6\nUSER P6 Perl6 work :Perl6 Perl6\nJOIN $chan\n");
my $timer = Promise.in(3).then({ now });
react {
whenever $timer -> $now {
say "Now is $now\n";
$sock.print: ":P6!P6\@work PRIVMSG $chan : diakopter Now is $now\n";