Skip to content

Instantly share code, notes, and snippets.

View rixed's full-sized avatar

Cedric Cellier rixed

  • @securactive
  • Karlsruhe
View GitHub Profile
(set-option :print-success false)
(set-option :produce-models true)
(declare-fun d00 () Int)
(declare-fun d01 () Int)
(declare-fun d02 () Int)
(declare-fun d03 () Int)
(declare-fun d04 () Int)
(declare-fun d05 () Int)
(declare-fun d10 () Int)
CXXFLAGS += -std=gnu++17 -g -W -Wall
LDLIBS += -lorc -lhdfspp_static -llz4 -lprotobuf -lzstd -lsnappy -lz -lsasl2 -lcrypto
all: bug
actual: bug.orc
orc-contents bug.orc > $@
check: actual expected
@diff $^
@rixed
rixed / Makefile
Last active August 29, 2015 14:21
Musing about the famous blog post, with just as many laziness to make the functions easier to grasp.
all: if.opt
.SUFFIXES: .cmo .cmi .cmx .opt .ml .top
.ml.cmo:
ocamlfind ocamlc -package batteries -g -annot -c $< -o $@
.ml.cmx:
ocamlfind ocamlopt -package batteries -g -annot -c $< -o $@
@rixed
rixed / nreplace_inplace
Created May 23, 2013 19:36
Alternative for nreplace
let nreplace ~str ~sub ~by =
let strlen = length str in
let sublen = length sub in
let bylen = length by in
let dlen = bylen - sublen in
let rec loop_subst l i =
match Exceptionless.rfind_from str (i-1) sub with
| None -> l
| Some i' -> loop_subst (l + dlen) i' in
le