• en

OCaml Planet

The OCaml Planet aggregates various blogs from the OCaml community. If you would like to be added, read the Planet syndication HOWTO.

937 blog posts are available. You can read the 30 more recent ones below or view older ones.

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong — GitHub Jobs, May 26, 2016

Software Developer

Jane Street is a proprietary quantitative trading firm, focusing primarily on trading equities and equity derivatives. We use innovative technology, a scientific approach, and a deep understanding of markets to stay successful in our highly competitive field. We operate around the clock and around the globe, employing over 400 people in offices in New York, London and Hong Kong.

The markets in which we trade change rapidly, but our intellectual approach changes faster still…


Weekly News — OCaml Weekly News, May 24, 2016

  1. RPC for OCaml?
  2. Simple library to manipulate automata?
  3. rresult 0.4.0 // fmt 0.8.0 // logs 0.6.0
  4. Fpath 0.7.0
  5. More frequent pushes to Jane Street github repositories + janestreet/opam-repository
  6. opam-cross-windows
  7. Next OUPS meetup, 7th of June 2016
  8. Bos 0.1.0
  9. Topkg 0.7.0
  10. TyXML 4.0
  11. Ocaml Github Pull Requests
  12. Other OCaml News

ppx_core: context-free rewriters for better semantics and faster compilation — Jane Street (Jeremie Dimino), May 23, 2016

At Jane Street, we have always been heavy users of pre-processors, first with camlp4 and now ppx. Pre-processing makes the infrastructure a bit more complex, but it save us a lot of time by taking care of a lot of tedious boilerplate code and in some case makes the code a bit prettier.

All in all, our standard set has 19 rewriters:

  • ppx_assert
  • ppx_bench
  • ppx_bin_prot
  • ppx_compare
  • ppx_custom_printf
  • ppx_enumerate
  • ppx_expect
  • ppx_fail
  • ppx_fields_conv
  • ppx_here
  • ppx_inline_test
  • ppx_js_style*
  • ppx_let
  • ppx_…

Thirteenth OCaml compiler hacking evening at Pembroke College — OCaml Labs compiler hacking ( (OCaml Labs), May 21, 2016

It's Spring, and time for the thirteenth Cambridge OCaml compiler-hacking evening! We'll be back in Pembroke College again, in the centre of Cambridge.


If you're planning to come along, it'd be helpful if you could indicate interest via Doodle and sign up to the mailing list to receive updates.

Where: N7, Pembroke College, Cambridge CB2 1RF. Head through the entrance on Trumpington Street, and turn left straight after the Porters Lodge.

When: 7pm, Tuesday 31st May.

Who: any…


TyXML 4.0.0 — Ocsigen blog (The Ocsigen Team), May 20, 2016

It is with great pleasure that we are announcing the release of TyXML 4.0.0. The major features of this new release are a new PPX syntax extension that allows to use the standard HTML syntax and an improved user experience for both old and new TyXML users.

What is TyXML ?

TyXML is a library for building statically correct HTML5 and SVG documents. It provides a set of combinators which use the OCaml type system to ensure the validity of the generated document. TyXML’s combinators can be used …


Weekly News — OCaml Weekly News, May 17, 2016

  1. Simple library to manipulate automata?
  2. IDE like PyCharm - Results
  3. Ocaml and Windows' notion of Unicode file names
  4. Batteries 2.5.0, compatible with OCaml 4.03
  5. BuckleScript (A js backend for ocaml)
  6. Next OUPS meetup, 7th of June 2016
  7. Ocaml Github Pull Requests
  8. Other OCaml News

Tail call optimisation in (g)awk — Marc Simpson, May 13, 2016

Tail call optimisation in (g)awk

# May 13, 2016

or “Wait, what? Tail call optimisation in awk?”


This post covers tail call optimisation (TCO) behaviour in three common awk implementations1: gawk, mawk and nawk (AKA the one true awk).

None of the three implement full TCO, while gawk alone provides self-TCO. The bulk of this post will therefore be devoted to gawk’s implementation and related pitfalls.

Initial observations

Let’s begin with a sim…


Batteries 2.5.0 released, compatible with OCaml 4.03 — OCamlCore Forge News ( (Gabriel Scherer), May 13, 2016

See the detailed release announcement at https://sympa.inria.fr/sympa/arc/caml-list/2016-05/msg00082.html

Configuration DSL step-by-step — Hannes Mehnert (hannes), May 10, 2016


Sorry for being late again with this article, I had other ones planned, but am not yet satisfied with content and code, w…


Weekly News — OCaml Weekly News, May 10, 2016

  1. OCamlbuild 0.9.2
  2. IDE like PyCharm
  3. Other OCaml News

Catch the bug, walking through the stack — Hannes Mehnert (hannes), May 03, 2016



Roughly 2 weeks ago, Engil informed me that a TLS alert pops up in his br…


Weekly News — OCaml Weekly News, May 03, 2016

  1. LablTk 8.06.1 and LablGTK 2.18.4
  2. OCaml release 4.03.0
  3. OASIS 0.4.6
  4. Obj.out_of_heap_tag, out of minor heap or memory corruption?
  5. ppx_import 1.1
  6. ppx_deriving_protobuf 2.4
  7. opam-cross-ios

Maki: on-disk memoization for (deterministic) fun and profit — Cedeela (simon), May 02, 2016

Greating, earthlings! Today I will present an exciting new OCaml library called maki. This post will be longer as usual, because it is actually two posts in one:

  • first, I'll present the goals of Maki, sketch its design, and present the most salient parts of its API;
  • then I will demonstrate how to use it to quickly build a (very naive) OCaml build system, featuring parallel build and cached computations thanks to Maki.

Overview of Maki

In a nutshell: maki is a OCaml library for on-disk memo…


Weekly News — OCaml Weekly News, Apr 26, 2016

  1. Question about Optimization
  2. OCaml release 4.03.0
  3. Other OCaml News

OCaml 4.03.0 released — Caml INRIA, Apr 25, 2016

Fitting the things together — Hannes Mehnert (hannes), Apr 24, 2016



Our task is to build a small unikernel which provides a project website. On our way we will wade through various layers using code examples. The website itself contains a few paragraphs of text, some link lists, and our published…


Oh! Pascal! — Shayne Fletcher, Apr 21, 2016

I can't help but want to share my joy at coming across this pearl of a program from the "Pascal User Manual and Report" - Jensen and Wirth (circa 1974). In my edition, it's program 4.7 (graph1.pas).

This is it, rephrased in OCaml.

(* Graph of f x = exp (-x) * sin (2 * pi * x)

Program 4.7, Pascal User Manual and Report, Jensen & Wirth

let round (x : float) : int =
let f, i =
let t = modf x in
(fst t, int_of_float@@ snd t) in
if f = 0.0 then i
else if i >= 0 then
if f >= 0.5 then i…

Weekly News — OCaml Weekly News, Apr 19, 2016

  1. Initial Release of OCI, a framework for continuous integrations and benchmarks
  2. Core Suite 113.33
  3. Ocaml Github Pull Requests
  4. Other OCaml News

Why OCaml — Hannes Mehnert (hannes), Apr 17, 2016




Facebook joins the Caml Consortium — Caml INRIA, Apr 15, 2016

Unboxed floats in OCaml — LexiFi, Apr 14, 2016

This post describes how unboxing for float values works in OCaml, focusing on recent evolutions. Most of the content here applies to boxed integer types as well (int32, int64 and nativeint).

read more

OCaml server-side developer at Ahrefs Research (Full-time) — Functional Jobs (FunctionalJobs.com), Apr 14, 2016

Who we are

Ahrefs Research is a San Francisco branch of Ahrefs Pte Ltd (Singapore), which runs an internet-scale bot that crawls whole Web 24/7, storing huge volumes of information to be indexed and structured in timely fashion. On top of that Ahrefs is building analytical services for end-users.

Ahrefs Research develops a custom petabyte-scale distributed storage to accommodate all that data coming in at high speed, focusing on performance, robustness and ease of use. Performance-critical low…


Announcing the upcoming Frama-C Day 2016. — Frama-C, Apr 14, 2016

Senior Software Engineer (Haskell) at Front Row Education (Full-time) — Functional Jobs (FunctionalJobs.com), Apr 13, 2016


Senior Functional Web Engineer to join fast-growing education startup transforming the way 3+ million K-8 students learn Math and English.

What you will be doing

Architect, design and develop new applications, tools and distributed systems for the Front Row ecosystem in Haskell, Flow, PostgreSQL, Ansible and many others. You will get to work on your deliverable end-to-end, from the UX to the deployment logic.

Once you're an integral part of the team you will act as Dev Lead and…


Dictionaries as functions — Shayne Fletcher, Apr 13, 2016

This is an "oldie but a goodie". It's super easy.

A dictionary is a data structure that represents a map from keys to values. The question is, can this data structure and its characteristic operations be encoded using only functions?

The answer of course is yes and indeed, here's one such an encoding in OCaml.

(*The type of a dictionary with keys of type [α] and values of type
type (α, β) dict = α -> β option

(*The empty dictionary maps every key to [None]*)

Weekly News — OCaml Weekly News, Apr 12, 2016

  1. ppx_deriving_morphism 0.2

Coq 8.5pl1 is out — Coq, Apr 10, 2016

Version 8.5pl1 of Coq is available. It fixes several bugs of version 8.5, including one critical bug. It also brings various performance improvements. More information can be found in the CHANGES file. Feedback and bug reports are extremely welcome.

Operating systems — Hannes Mehnert (hannes), Apr 09, 2016


Sorry to be late with this entry, but I had to fix some issues:

  • this website is based on Canopy, the content is stored as markdown in a git repository
  • it was running in a FreeBSD jail, but when I compiled too much the underlying zfs file system wasn't happy (and is now hanging in kernel space in a read)
  • no remote power switch (borrowed to a friend 3 weeks ago), nobody was willing to go to the data centre and reboot
  • I wanted to move it anyways to a host where I can deploy Xen guest VM…

Weekly News — OCaml Weekly News, Apr 05, 2016

  1. Tensorflow bindings for OCaml
  2. the latest obuild (v0.1.8) supports ppx
  3. 4.03.0+beta2
  4. qtest 2.2, merged with qcheck
  5. Other OCaml News

C++ : Streams — Shayne Fletcher, Apr 03, 2016

In this blog post, types and functions were presented in OCaml for modeling streams. This post takes the action to C++.

First, the type definition for a stream.

struct Nil {};
template <class T> class Cons;

template <class T>
using stream = sum_type <
, recursive_wrapper<Cons<T>>
The definition is in terms of the sum_type<> type from the "pretty good sum" library talked about here.

The definition of Cons<>, will be in terms of "thunks" (suspensions…


View older blog posts.