Skip to content

Instantly share code, notes, and snippets.

@0xaaef86128cdda946;
using Schema = import "schema.capnp";
interface Holmes {
# Capnproto Type Description
using Node = Schema.Node;
# Dynamically typed holmes value (a pointer to anything non interface)
using Val = AnyPointer;
extern crate capnpc;
use std::path::Path;
fn main() {
::capnpc::compile(Path::new("src"),
&[Path::new("src/holmes.capnp"),
Path::new("src/schema.capnp")]).unwrap();
}
@maurer
maurer / -
Created October 6, 2015 00:34
[maurer@fragarach:~/Development/PersonalServices/irc]$ gcloud compute zones list
> NAME REGION STATUS NEXT_MAINTENANCE TURNDOWN_DATE
> asia-east1-c asia-east1 UP
> asia-east1-a asia-east1 UP
> asia-east1-b asia-east1 UP
> europe-west1-d europe-west1 UP
> europe-west1-b europe-west1 UP
> europe-west1-c europe-west1 UP
> us-central1-b us-central1 UP
> us-central1-c us-central1 UP
@maurer
maurer / ocamlgraph_bug.ml
Last active August 29, 2015 14:17
OCamlGraph Inconsistency
open Core_kernel.Std
(* Make a persistent graph where:
A -> B
B -> C
C -> B *)
module G = Graph.Persistent.Digraph.ConcreteBidirectional(String)
let g = List.fold [("A", "B"); ("B", "C"); ("C", "B")] ~f:(fun g (x, y) ->
G.add_edge g x y) ~init:G.empty;;
@maurer
maurer / gist:023dcbd47b1c0fa7f81f
Created October 24, 2014 01:22
distill.hamlet
<div id="jotSelector" class="col-xs-2">
<div id="jotButtons" class="btn-group-vertical center-block">
$forall (jotId, desc) <- jotButtons
<button type="button" class="btn btn-default" onclick=displayJot(#{show jotId})>
#{desc}
<div id="jotViewer" class="col-xs-5">
<div id="jotAction" class="col-xs-5">
@maurer
maurer / cfg.mli
Created October 16, 2014 18:23
Sample MLI
open Core_kernel.Std
open Bap_types.Std
module type S = sig
type t
type node
val pred : t -> node -> node list
val succ : t -> node -> node list
val code : t -> node -> Bil.stmt list
val asm : t -> node -> string list

Keybase proof

I hereby claim:

  • I am maurer on github.
  • I am maurer (https://keybase.io/maurer) on keybase.
  • I have a public key whose fingerprint is 4FC8 8C78 6C61 B05B EEE8 3E32 AF15 E48C B1E3 A490

To claim this, I am signing this object:

@maurer
maurer / test.olf
Created April 10, 2012 18:50
Example of problematic parse in ollibot
{-
This works.
-}
{-
This doesn't: let x = y in z
-}
@maurer
maurer / test.olf
Created April 10, 2012 18:50
Example of problematic parse in ollibot
{-
This works.
-}
{-
This doesn't: let x = y in z
-}
@maurer
maurer / Modules.lhs
Created April 5, 2012 18:03
Embedding first class modules in Haskell
>{-# LANGUAGE TypeFamilies, ScopedTypeVariables #-}
>module Modules where
Since all modules under this translation must ascribe to some signature,
we by providing a signature for a module which provides equality over
some type.
>class EQ mod where
> type EQV mod :: *
> eq :: mod -> EQV mod -> EQV mod -> Bool