I hereby claim:
- I am tokenrove on github.
- I am tokenrove (https://keybase.io/tokenrove) on keybase.
- I have a public key whose fingerprint is CC8C C599 9DEB 3428 5859 A966 E66D 2011 DA6D 1862
To claim this, I am signing this object:
(defpackage #:zhang-shasha | |
(:use :cl)) | |
(in-package :zhang-shasha) | |
(defun postorder-numbering-of-sexp (sexp) | |
(let ((nodes (make-array 0 :adjustable t :fill-pointer t)) | |
(keyroots (make-hash-table))) | |
(labels | |
((dfs (node) | |
(let ((leaf |
proc ok {string body} { | |
if {![[proc {} {} $body]]} { send_user "not " } | |
puts "ok - $string" | |
} | |
proc plan {n} { | |
puts "1..$n" | |
} |
/* | |
* Opens a Unix domain socket and cats any fds passed over it. | |
*/ | |
#include <err.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <sysexits.h> | |
#include <unistd.h> |
/// Murmur3 x86-64 128-bit hash; pretty much a direct port of Austin Appleby's murmur3 x86-64 128-bit hash. | |
/// A simpler conversion than some others. | |
/// NB: the endianness/ordering here can be very confusing; caveat scriptor | |
pub fn hash(bytes: &[u8]) -> u128 | |
{ | |
let (mut h1, mut h2) = (0_u64, 0_u64); | |
let (c1, c2) = (0x87c37b91114253d5_u64, 0x4cf5ad432745937f_u64); | |
let n = bytes.len(); | |
let lower_round = |h, k: u64| h ^ k.wrapping_mul(c1).rotate_left(31).wrapping_mul(c2); | |
let upper_round = |h, k: u64| h ^ k.wrapping_mul(c2).rotate_left(33).wrapping_mul(c1); |
I hereby claim:
To claim this, I am signing this object:
datatype result a = Success of a*string | Failure | |
type t a = string -> result a | |
fun mreturn [a] (x:a) : t a = fn s => Success (x, s) | |
fun mbind [a] [b] (p: t a) (f: a -> t b) : t b = | |
fn s => case p s of | |
Failure => Failure | |
| Success (x, s') => f x s' | |
val monad_parse : monad t = mkMonad {Bind=@@mbind, Return=@@mreturn} |
I hereby claim:
To claim this, I am signing this object: