Skip to content

Instantly share code, notes, and snippets.

@bluddy
bluddy / mysite.eliom
Created December 15, 2016 15:42
trying example eliom site
[%%shared
open Eliom_lib
open Eliom_content
open Html.D
]
module Mysite_app =
Eliom_registration.App (
struct
let application_name = "mysite"
@bluddy
bluddy / filter.ml
Last active November 1, 2016 12:39
Comparison of performance of filter on list/array
let filter_a f a =
if a = [| |] then [| |] else
let init = Array.unsafe_get a 0 in
let rec loop n i =
if i < Array.length a then
let x = Array.unsafe_get a i in
if f x then begin
let res = loop (n + 1) (i + 1) in
Array.unsafe_set res n x;
res
@bluddy
bluddy / err.txt
Created October 14, 2016 17:40
Error message when compiling parsing.mli with ocaml-multicore on OSX
==99166== Memcheck, a memory error detector
==99166== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==99166== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==99166== Command: ../byterun/ocamlrund ../boot/ocamlc -strict-sequence -w +33..39 -g -warn-error A -bin-annot -nostdlib -safe-string -c parsing.mli
==99166==
[-1] Opening bytecode executable ../byterun/ocamlrund
[-1] Not a bytecode executable
[-1] Opening bytecode executable ../boot/ocamlc
[-1] Initial stack limit: 8192k bytes
==99166== Warning: set address range perms: large range [0x2393dc000, 0x6393dc000) (noaccess)