• 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.

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

Weekly News — OCaml Weekly News, Jun 30, 2015

  1. Sequoia: MySQL query builder via syntax tree manipulation
  2. Post-doctoral position available at ENSTA-ParisTech - Secure-OCaml project
  3. OCaml embedded
  4. ocaml-4.02.2 for iOS
  5. Next OUPS meetup, 9th of July 2015
  6. POSIX message queue implementation
  7. Other OCaml News

Reviewing the Bitcoin Pinata — Open Mirage (Hannes Mehnert), Jun 29, 2015

TL;DR: Nobody took our BTC. Random people from the Internet even donated into our BTC wallet. We showed the feasibility of a transparent self-service bounty. In the style of Dijkstra: security bounties can be a very effective way to show the presence of vulnerabilities, but they are hopelessly inadequate for showing their absence.

What are you talking about?

Earlier this year, we released a Bitcoin Piñata. The Piñata was a security bounty containing 10 BTC and it's been online since …


MirageOS v2.5 with full TLS support — Open Mirage (Amir Chaudhry), Jun 26, 2015

Today we're announcing the new release of MirageOS v2.5, which includes first-class support for SSL/TLS in the MirageOS configuration language. We introduced the pure OCaml implementation of transport layer security (TLS) last summer and have been working since then to improve the integration and create a robust framework. The recent releases allow developers to easily build and deploy secure unikernel services and we've also incorporated numerous bug-fixes and major stability improvemen…


Why OCaml-TLS? — Open Mirage (Amir Chaudhry), Jun 26, 2015

TLS implementations have a history of security flaws, which are often the result of implementation errors. These security flaws stem from the underlying challenges of interpreting ambiguous specifications, the complexities of large APIs and code bases, and the use of unsafe programming practices.

Re-engineering security-critical software allows the opportunity to use modern approaches to prevent these recurring issues. Creating the TLS stack in OCaml offers a range of benefits, including…


Cumulative moving average — Shayne Fletcher, Jun 25, 2015

We have $nA_{N} = s_{1} + \cdots + s_{n}$ and $(n + 1)A_{n + 1} = s_{1} + \cdots + s_{n + 1}$ so $s_{n + 1} = (n + 1)A_{n + 1} - nA_{n}$ from which we observe $A_{n + 1} = \frac{s_{n + 1} + nA_{n}}{n + 1} = A_{n} + \frac{s_{n + 1} + nA_{n}}{n + 1} - A_{n} = A_{n} + \frac{s_{n + 1} - A_{n}}{n + 1}$.


let cumulative_moving_average (l : float list) : float =
let f (s, i) x =
let k = i + 1 in
let s = (s +. (x -. s)/. (float_of_int k)) in
(s, k) in
fst @@ List.fold_left f (0., 0) l



Weekly News — OCaml Weekly News, Jun 23, 2015

  1. OCaml release 4.02.2
  2. Uucd 3.0.0 & Uucp 1.0.0 & Uunf 1.0.0 & Uuseg 0.9.0
  3. ocf 0.2.0 and taglog 0.1.0
  4. BER metaocaml
  5. Labels at the module level?
  6. Other OCaml News

Using Coq's evaluation mechanisms in anger — GaGallium (Xavier Leroy), Jun 23, 2015

Coq offers several internal evaluation mechanisms that have many uses, from glorious proofs by reflection to mundane testing of functions. Read on for an account of my quest to get large parts of the CompCert verified C compiler to execute from within Coq. It was a mighty battle between the forces of transparency and opacity, with the innocent-looking "decide equality" tactic as the surprise villain...

Recently, I spent significant time trying to execute parts of the CompCert ve…


OMake On Steroids (Part 3) — Gerd Stolpmann, Jun 23, 2015

Faster builds with omake, part 3: Caches
In this (last) part of the series we have a closer look at how OMake uses caches, and what could be improved in this field. Remember that we saw in total double speed for large OMake projects, and that we also could reduce the time for incremental builds. In particular for the latter, the effect of caching is important.
This text is part 3/3 of a series about the OMake improvements sponsored by LexiFi:

New in nbdkit 1.1.10: OCaml plugins — Richard Jones, Jun 19, 2015

You can now write OCaml plugins for nbdkit – the liberally licensed NBD server. You will, however, need OCaml ≥ 4.02.2+rc1 because of this fix.

OMake On Steroids (Part 2) — Gerd Stolpmann, Jun 19, 2015

Faster builds with omake, part 2: Linux
The Linux version of OMake suffered from specific problems, and it is worth looking at these in detail.
This text is part 2/3 of a series about the OMake improvements sponsored by LexiFi:
  • Part 1: Overview
  • Part 2: Linux (this page)
  • Part 3: Caches (will be released on Tuesday, 6/23)
The original publishing is on camlcity.org.

While analyzing the performance characteristics of OMake, I found that the features of the OS were u…


Release of Uucd 3.0.0, Uucp 1.0.0, Uunf 1.0.0 and Uuseg 0.9.0 — Daniel Bünzli, Jun 18, 2015

Release of Uucd, Uucp, Uunf and Uuseg to support Unicode 8.0.0.

OCaml 4.02.2 released — Caml INRIA, Jun 17, 2015

Weekly News — OCaml Weekly News, Jun 16, 2015

  1. Release candidate: 4.02.2+rc1
  2. Other OCaml News

OMake On Steroids (Part 1) — Gerd Stolpmann, Jun 16, 2015

Faster builds with omake, part 1: Overview
In the 2014 edition of the "which is the best build system for OCaml" debate the OMake utility was heavily criticized for being not scalable enough. Some quick tests showed that there was in deed a problem. At LexiFi, the size of the source tree obviously already exceeded the critical point, and LexiFi was interested in an improvement. LexiFi develops for both Linux and Windows, and OMake is their preferred build system because …

Spam problem, lot of mails cannot be sent — OCamlCore Forge News (gildor-admin@users.forge.ocamlcore.org (Sylvain Le Gall)), Jun 11, 2015

I recently got an alert that the forge server was sending a lot of spam. After inspection it turns out that there is a positive feedback loop in between sending mail requests to moderate spam on mailing list and ending up being considered as a spammer (i.e. you ask to moderate a message "Sell Ur Gold For Mo$$ney" every day and after a few day the forge is considered as a spammer). I need to improve the mailing list configuraiton to avoid: - receiving spam - sending moderation requests…Read more...

Weekly News — OCaml Weekly News, Jun 09, 2015

  1. Ocf 0.1.0 Loading and storing configuration options in JSON syntax
  2. OCaml release roadmap
  3. Can't build a target with C stubs using ocamlbuild
  4. RISC-V backend for the native-code OCaml compiler
  5. Other OCaml News

Third alpha version — OCaml-Java (Xavier Clerc), Jun 09, 2015

The third alpha version is finally available, fixing several bugs, and enhancing the Java library.

Signing the OPAM repository — OCaml Platform (Louis Gesbert and Hannes Mehnert), Jun 05, 2015

This is an initial proposal on signing the OPAM repository. Comments and discussion are expected on the platform mailing-list.

The purpose of this proposal is to enable a secure distribution of OCaml packages. The package repository does not have to be trusted if package developers sign their releases.

Like Python's pip, Ruby's gems or more recently Haskell's hackage, we are going to implement a flavour of The Upgrade Framework (TUF). This is good because:

  • it has been designed by peop…

Release E-ACSL 0.5 is available. — Frama-C, Jun 05, 2015

Aesthetic Integration joins the Caml Consortium — Caml INRIA, Jun 03, 2015

Weekly News — OCaml Weekly News, Jun 02, 2015

  1. State of OCaml on Windows
  2. Two years R&D engineer position available in Computer Science & Arts, Bordeaux, France
  3. Next OUPS meetup, 4th of June 2015
  4. getting the name of a function from its body
  5. Other OCaml News

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

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…


Run length encoding data compression method — Shayne Fletcher, May 30, 2015

Functional programming and lists go together like Fred and Ginger. This little exercise is one of Werner Hett's "Ninety-Nine Prolog Problems". The idea is to implement the run length encoding data compression method.

Here's how we start. First we write a function that packs consecutive duplicates of a list into sublists e.g.

# B.pack ['a'; 'a'; 'a'; 'b'; 'c'; 'c'; 'd'] ;;
- : char list list = [['a'; 'a'; 'a']; ['b']; ['c'; 'c']; ['d'];]
Then, consecutive duplicates of elements are encoded as terms…

Pearls of Algebraic Effects and Handlers — KC Sivaramakrishnan, May 27, 2015

In the previous post, I presented a simple cooperative multithreaded scheduler written using algebraic effects and their handlers. Algebraic effects are of course useful for expressing other forms of effectful computations. In this post, I will present a series of simple examples to illustrate the utility of algebraic effects and handlers in OCaml. Some of the examples presented here were borrowed from the excellent paper on Eff programming language1. All of the examples presented below are avai…


Weekly News — OCaml Weekly News, May 26, 2015

  1. GADTs and JSON
  2. Job: Ocaml Engineer in Paris
  3. Other OCaml News

ICFP programming contest 2014: a retrospective (part 2/2) — GaGallium (Damien Doligez), May 25, 2015

This is the second post on the Gagallium participation to the ICFP programming context last year -- 2014. See the first post for the introduction and a link to the source code; this post details the design of the ghost code.

The ghost we submitted is the last of a series of increasingly sophisticated designs, each of which is an incremental enhancement of the previous one. Given the short amount of time available, we did not do a rewrite from scratch, no matter how much we wanted to. This m…


Church Numerals — Shayne Fletcher, May 24, 2015

This is just a little fun. Jason Hickey in "Introduction to Objective Caml" poses some little end of chapter problems to define arithmetic operations for a type of unary (base-1) natural numbers. The type is

type num = Z | S of num
where Z represents the number zero and if i is a unary number, then S i is i + 1.

This formulation of Church numerals using a recursive type and pattern matching means in truth, the problems can be solved in less than 5 minutes or so. Of course, the real Church numer…


On the book « More OCaml » — Daniel Bünzli, May 23, 2015

I eventually read through John Whitington's latest book « More OCaml. » It's again a very good one, I made a small review here.

ICFP programming contest 2014: a retrospective (part 1/2) — GaGallium (Gabriel Scherer, Thomas Braibant), May 22, 2015

The dates for the 2015 ICFP programming contest have been announced on the contest webpage. This is a good occasion to dig out a summary of our 2014 participation, that had been written over the span of several months (mostly right after the contest), and that we had unexplainably failed to publish before.

In 2013, some Gallium members (Thibaut Balabonski, Thomas Braibant, Jacques-Henri Jourdan and Gabriel Scherer) participated to the ICFP programming contest, and it was a lot of fun. We parti…


First month of Haskell — Perpetually Curious (Tim McGilchrist), May 21, 2015

I’ve been excpetionally fortunate in the past month to accomplish a long held goal of mine. As of the 13th of April I’ve been employed full time as a functional programmer. In particular I’ve taken the deepest of dives into Haskell. I thought it might be interesting, at least for me, to write up my thoughts after completing a month of Haskell.

First the depth of the dive has been overwhelming and the learning curve more equivalent to a vertical rock climb. But the entire time,…


View older blog posts.