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

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

New opam features: local switches — OCamlPro, Apr 27, 2017

Among the areas we wanted to improve on for opam 2.0 was the handling of switches. In opam 1.2, they are simply accessed by a name (the OCaml version by default), and are always stored into ~/.opam/<name>. This is fine, but can get a bit cumbersome when many switches are in presence, as there is no way to sort them or associate them with a given project.

A reminder about switches

For those unfamiliar with it, switches, in opam, are independent prefixes with their own compiler and set of i…


Caveat Configurator: how to replace configs with code, and why you might not want to — Jane Street (Yaron Minsky), Apr 25, 2017

We have a new tech talk coming up on May 17th, from our very own Dominick LoBraico. This one is about how to represent configurations with programs. In some sense, this is an obvious idea. Lots of programmers have experienced the dysphoria that comes from watching your elegant little configuration format metamorphize into a badly constructed programming language with miserable tools. This happens because, as you try to make your configs clearer and more concise, you often end up walking down the…


Weekly News — OCaml Weekly News, Apr 25, 2017

  1. error messages in multiple languages ?
  2. support for OCaml on unusual platforms (ia64-hpux, etc.)
  3. OCaml jobs at genomics company in New York City
  4. Ocaml 4.04.1 released
  5. release of batteries-2.6.0
  6. New release of Menhir (20170418)
  7. Lwt 3.0.0 – monadic promises and concurrent I/O
  8. PPX is harmful to our community in the long term
  9. BuckleScript 1.7
  10. CUFP 2017 Call for Tutorials
  11. Ocaml Github Pull Requests
  12. Other OCaml News

Full Time: Front-end Developer at issuu in Copenhagen — GitHub Jobs, Apr 24, 2017

Fulltime, Copenhagen

issuu is the world's fastest-growing digital publishing platform. We are looking for a new member to join our fantastic team. With great people, unique ideas and stunning technology, we're changing the future of publishing today. Can you be the best at what you do? Join us!

About this job

As a Front-end Developer at issuu, you will be joining a team of highly skilled web enthusiasts building web applications in an agile environment. We currently develop for deskto…


Seventeenth OCaml compiler hacking evening at Pembroke — OCaml Labs compiler hacking, Apr 18, 2017

Our next OCaml Compiler Hacking event will be on Tuesday 16th May in The Old Library at Pembroke College, 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: The Old Library, Pembroke College​, ​Cambridge​ ​CB2 1RF

​The Old Library is the first building on the left straight after the Porters Lodge.

When: 6:30pm, Tuesday 16​th ​May

Who: anyone interested in impr…


News about Tyre | Drup's thingies — Gabriel Radanne, Apr 17, 2017

Here are some news about Tyre, along with release of version 0.3.

EzSudoku — OCamlPro, Apr 11, 2017

As you may have noticed, on the begining of April I have some urge to
write something technical about some deeply specific point of OCaml.
This time I’d like to tackle that through sudoku.

It appearch that Sudoku is of great importance considering the number
of posts explaining how to write a solver. Following that trend I will
explain how to write one in OCaml. But with a twist.

We will try to optimize it. I won’t show you anything as obvious as
how to micro-optimize your code or so…


Weekly News — OCaml Weekly News, Apr 11, 2017

  1. REST APIs
  2. error messages in multiple languages ?
  3. Compile and link program who use Toploop
  4. Ocaml Github Pull Requests
  5. Other OCaml News

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

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…


Version 0.0.2 of the Frama-Clang plugin plugin is available for download. — Frama-C, Apr 05, 2017

Weekly News — OCaml Weekly News, Apr 04, 2017

  1. first release of minivpt: a minimalist vantage-point tree implementation in OCaml
  2. CFP: ML Family Workshop 2017
  3. OCaml workshop 2017: call for presentations
  4. Ocaml Github Pull Requests
  5. Other OCaml News

Ann: Pumping | Drup's thingies — Gabriel Radanne, Apr 01, 2017

I’m happy to announce the release of Pumping, a library to leverage the OCaml type system to recognize regular languages.

Dealing with source code locations (in lexical and syntax analysis) — Shayne Fletcher, Mar 30, 2017


Writing compilers and interpreters requires rigorous management of source code locations harvested during syntax analysis and associated error handling mechanisms that involve reporting those locations along with details of errors they associate to.

This article does a "deep dive" into the the Location module of the OCaml compiler. The original source can be found in the ocaml/parsing directory of an OCaml distribution (copyright Xavier…


Weekly News — OCaml Weekly News, Mar 28, 2017

  1. OCaml on the benchmarks game
  2. Exceptions and Gc.
  3. Open 18-month Research Engineer Position on Frama-C/E-ACSL
  4. Transforming side-effects to a monad
  5. Loading .ml in memory to interact with them.
  6. React.js programming in OCaml?
  7. first release of minivpt: a minimalist vantage-point tree implementation in OCaml
  8. BuckleScript 1.6
  9. Ocaml Github Pull Requests
  10. Other OCaml News

Two PhD positions in Ljubljana starting October 2017 — Andrej Bauer, Mar 28, 2017

We are looking for two PhD students at the Faculty of Mathematics and Physics, University of Ljubljana. The programme starts in October 2017 and lasts three years. The positions will be fully funded (subject to approval by the funding agency). The candidates should have a Master’s degree in mathematics or computer science. No knowledge of Slovene is required.

The first PhD student will be advised by dr. Andrej Bauer. The topic of research is foundations of type theory. The candidate should…


Polynomials over rings — Shayne Fletcher, Mar 21, 2017

Polynomials over rings

This post provides a workout in generic programming using modules & functors.

The program presented here models univariate polynomials over rings based on an exercise in "The Module Language" chapter, of Didier Rémy's book, Using, Understanding and Unraveling the OCaml Lanaguage.

Arithmetics and rings

We begin with a type for modules implementing arithmetic.

module type ARITH = sig
type t

Weekly News — OCaml Weekly News, Mar 21, 2017

  1. New release of visitors
  2. Named pipe on Windows.
  3. Preview: B-tree library
  4. Jane Street development opam repository
  5. Exceptions and Gc.
  6. Ocaml Github Pull Requests
  7. Other OCaml News

Trivial meta-programming with cinaps — Jane Street (Jeremie Dimino), Mar 20, 2017

From now and then, I found myself having to write some mechanical and repetitive code. The usual solution for this is to write a code generator; for instance in the form of a ppx rewriter in the case of OCaml code. This however comes with a cost: code generators are harder to review than plain code and it is a new syntax to learn for other developers. So when the repetitive pattern is local to a specific library or not widely used, it is often not worth the effort. Especially if the code in ques…


New OPAM Features: “opam build” — OCamlPro, Mar 16, 2017

The new opam 2.0 release, currently in beta, introduces several new features. This post gets into some detail on the new opam build command, its purpose, its use, and some implementation aspects.

opam build is run from the source tree of a project, and does not rely on a pre-existing opam installation. As such, it adds a new option besides the existing workflows based on managing shared OCaml installations in the form of switches.

What does it do ?

Typically, this is used in a fresh git clone of…


One more talk, two more videos — Jane Street (Yaron Minsky), Mar 15, 2017

I'm happy to announce our next public tech talk, called Seven Implementations of Incremental, on Wednesday, April 5th, presented by yours truly. You can register here.

The talk covers the history of Incremental, a library for building efficient online algorithms. The need to update computations incrementally is pretty common, and we've found Incremental to be useful in creating such computations in a number of different domains, from constructing efficient financial calculations to writing resp…


Weekly News — OCaml Weekly News, Mar 14, 2017

  1. libbin_prot, php-bin_prot, ppx_bin_prot_interop
  2. Jbuilder 1.0+beta1
  3. ocamlbuild 0.11.0
  4. New release of visitors
  5. Ocaml Github Pull Requests
  6. Other OCaml News

From visitors to iterators — GaGallium (François Pottier), Mar 14, 2017

I have been asked whether an automatically-generated visitor, as produced by the visitors syntax extension for OCaml, can be used to construct an iterator.

It turns out that this can be done in a simple and efficient manner. (Up to a constant factor, the time complexity of this solution is optimal.) As the problem is interesting and its solution is somewhat nonobvious, I am describing them here.

To play with this code in an OCaml toplevel, first install visitors via the command opam instal…


Universal type — Shayne Fletcher, Mar 10, 2017

Universal type

A universal type is a type into which all other types can be embedded. A module implementing such a type here will satisfy the following signature.

module type UNIVERSAL = sig
type t
val embed : unit → (α → t) * (t → α option)
The type t is the universal type and each call to embed returns a pair of functions : an injection function for embedding a value into the universal type and, a projection fu…Read more...

Polymorphic variants : Subtyping and variance — Shayne Fletcher, Mar 07, 2017

Polymorphic variants : subtyping and variance

Polymorphic variants : Subtyping and variance

Here are some expressions in the top-level involving polymorphic variant types.

# let x = [ `On; `Off ];;
val x : [> `Off | `On ] list = [ `On; `Off ]
The notation [> `Off | `On ] represents a type that at least contains the constructors `Off and `On. Of course, there are an unlimited number of such types so [> `Off | `On ] is a set i…Read more...

Weekly News — OCaml Weekly News, Mar 07, 2017

  1. BuckleScript 1.5 - First class support for Reason syntax
  2. Menhir incremental api with ocamlbuild
  3. Cmdliner 1.0.0
  4. researcher permanent position at ONERA, Toulouse
  5. Ocaml Github Pull Requests
  6. Other OCaml News

Building and Publishing an OCaml Package: Q1 2017 — KC Sivaramakrishnan, Mar 05, 2017

One of the key indicators of maturity of a language ecosystem is the ease of building, managing and publishing software packages in that language. OCaml platform has made steady progress in the last few years to this end. While OPAM simplified package (and compiler) management, the developing and publishing packages remained a constant pain point. This situation has remarkably improved recently with the Topkg and Carcass. This post provides a short overview of my workflow for building and publis…


Functional Game Server (Gameplay) Engineer at Playstudios (Full-time) — Functional Jobs (FunctionalJobs.com), Mar 03, 2017

Game Server Engineer (Gameplay) PLAYSTUDIOS is seeking a Game Server Engineer to join the server development team in Austin. This role focuses on creating and improving server-side game logic.

Millions of people play our games daily. The Austin team builds the reliable, large-scale production systems that deliver that gameplay and the tools to manage them. Usability and stability underpin every decision we make and we’re looking for someone who can help us build solutions to empower our u…


What a Jane Street dev interview is like — Jane Street (Sebastian Funk), Feb 28, 2017

Are you thinking about applying to Jane Street for a developer role? Or already have a phone interview scheduled but unsure what to expect? Read on as we walk through an example phone interview with you.

We want to give you some insight into what a typical Jane Street phone interview looks like and give you a chance to prepare. We're going to take a look at a question we call "Memo" which we used to ask regularly (but of course don't ask anymore so no need to memorize anything on this page!). As…


Weekly News — OCaml Weekly News, Feb 28, 2017

  1. List of structurally typed objects
  2. mirage 3.0.0
  3. Ocaml Github Pull Requests
  4. Other OCaml News

10 — Daniel Bünzli, Feb 27, 2017

Ten years ago I published a first bit of free software. Over the years, this has now expanded to 28 OCaml packages, without counting random informally published elucubrations. Thanks to OCaml Labs' support, there will be more.

View older blog posts.