Skip to content

Instantly share code, notes, and snippets.

View dinosaure's full-sized avatar

Calascibetta Romain dinosaure

View GitHub Profile
let () = Printexc.record_backtrace true
type t =
{ dims : int array
; memory : int * int } (* absolute position * absolute position *)
let ptr t = fst t.memory
let len t = snd t.memory - fst t.memory
let dims t = Array.length t.dims
CAMLprim value caml_ba_overlap(value va, value vb)
{
CAMLparam2 (va, vb);
CAMLlocal1 (res);
struct caml_ba_array * a = Caml_ba_array_val(va);
struct caml_ba_array * b = Caml_ba_array_val(vb);
void *src_a = a->data;
void *src_b = b->data;
diff --git a/src/lib_stdlib/dune b/src/lib_stdlib/dune
index 9544949..d60e9ac 100644
--- a/src/lib_stdlib/dune
+++ b/src/lib_stdlib/dune
@@ -8,7 +8,7 @@
re
zarith
lwt
- lwt.log)
+ lwt_log)
@dinosaure
dinosaure / log
Created September 17, 2018 08:25
{d = { last = false; hold = 0; bits = 0; o_off = 0; o_pos = 0; o_len = 0;
i_off = 0; i_pos = 0; i_len = 0; write = 0; state = Last;
window = #window; }; z = (Header #fun);}
{d = { last = false; hold = 0; bits = 0; o_off = 0; o_pos = 0; o_len = 0;
i_off = 0; i_pos = 0; i_len = 1725; write = 0; state = Last;
window = #window; }; z = (Header #fun);}
{d = { last = false; hold = 0; bits = 0; o_off = 0; o_pos = 0; o_len = 0;
i_off = 0; i_pos = 2; i_len = 1725; write = 0; state = Last;
window = #window; }; z = Inflate;}
{d = { last = false; hold = 74; bits = 7; o_off = 0; o_pos = 0; o_len = 0;
type 'a fmt = Format.formatter -> 'a -> unit
type 'a io = 'a
(* Git types. *)
type store = unit
type hash = string
type reference = string
type host = string
type path = string list
type ('f, 't, 'is) kind =
| Exn : ('a, 'a, exn) kind
| Opt : ('a, 'a option, opt) kind
| Res : ('a, ('a, [ `Msg of string ]) result, res) kind
and exn = E
and opt = O
and res = R
let exn = Exn
let opt = Opt
type vec =
{ off : int option
; len : int option }
type 'a state = 'a Lavoisier.state
type encoder = Lavoisier.encoder
type bigstring = Lavoisier.bigstring
type 'a t =
{ run : 'r. (encoder -> 'r state) -> encoder -> 'a -> 'r state }
module type SA =
sig
type v
type t = { value: v }
end
module type SB =
sig
type v
#!/usr/bin/env ocaml
#use "topfind";;
#thread;;
#require "unix";;
#require "git-unix";;
#require "mtime";;
#require "mtime.clock.os";;
#require "fmt.tty";;