Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of November 14 to 21, 2017.

  1. Welcome new maintainers of opam repository, and introducing Obi
  2. Proj4 0.9.2 release - 4.06.0 compatible
  3. Tierless Web programming in ML
  4. Stdcompat, a compatibility module for OCaml standard library
  5. ppx_deriving_protocol 0.8
  6. amqp-client 1.1.4
  7. PhD position in Design and implementation of programming languages for embedded vision systems (with Caml inside)
  8. Ecaml: OCaml Emacs plugins tutorial
  9. Ocaml Github Pull Requests
  10. Other OCaml News

Welcome new maintainers of opam repository, and introducing Obi


Anil Madhavapeddy announced:
Following this
it became apparent that we need more maintainers of the opam [package
repository]( The call for maintainers
was very successful, and I am pleased to have expanded the team to include the
following members: @perry, @djs55, @rgrinberg, @yomimono, @jpdeplaix, @hannes,
@mseri and @hcarty.

They join the existing hard working maintainers, who are Damien Doligez,
@whitequark, David Sheets, @samoht, @amir, @gasche, @lefessan, @yallop and
Gregoire Henry.

So many contributors need a little more coordination, and luckily the OCaml
4.06.0 has set our opam world on fire, just in time for the newcomers to assist
:) There has been a steady increase in the number of build failures, but the
OCaml 4.06.0 release flipped the "safe-string" default into being active,
resulting in 1000s of packages failing to build in the new release.

In order to keep up, I've built a prototype tool called "obi" (OCaml Build
Infrastructure) which does tens of thousands of package builds on a build
cluster hosted at OCaml Labs (for x86_64) and (for arm64) and IBM
(for ppc64le). The log outputs are available at:

Some things I want to draw your attention to:

- There are logs [per compiler version]( that
are rebuilt roughly daily across a suite of compiler releases. In particular, we
build using 4.06.0 and the common variants (default-unsafe-string and flambda)
to check for regressions there.
- There is a [triage]( page which runs an
analysis over the results to classify failures. The are two areas right now
which need attention: fixing regressions due to the 4.06.0 safe-string, and
failures with flambda.
- The [safe-string triage]( has thousands of
packages failing, which either require constraints being added (for older
revisions), and ideally a release of the package that does use `safe-string`.
This is where we could use help from the whole community to bring our repository
back up to speed.

As to where this is all going, it will be worked on at OCaml Labs over the next
12 months to improve the tooling considerably as OCaml continues to grow in

- Obi is still an experimental deployment, so all the URLs above are subject to
change, so please don't hard-link to it from anywhere important.
- All the metadata is available online as sexp files, and so Obi will also have
a CLI tool that implements the workflow. I just wanted to get the HTML build
logs up as soon as possible to allow our new maintainers to help fix problems.
- The non-x86 and non-Debian logs are available, but not yet rendered. If
someone has a burning need to inspect them, let me know and I'll push it up the
priority queue.
- Eventually, the manual opam-repository fixes can be automated via the CLI, but
that feature obviously isn't there yet. It will likely land only when we
complete the release of opam 2.0 and can take advantage of some of the
automation features.
- Only Linux-based operating systems are being built right now, but we are
expanding the cluster to include at least Windows, FreeBSD, OpenBSD and maybe
OSX if we can figure out how to automate it. If anyone is particularly
interested in helping with automation (e.g. something similar to containers) on
the *BSDs in particular, that would be helpful.

For now though, let's congratulate our new opam maintainers, and hopefully get
to fixing some of these safe-string issues :slight_smile:

Anil, your friendly opam-repository overseer

Proj4 0.9.2 release - 4.06.0 compatible


Hezekiah Carty announced:
I'm happy to announce the proj4 0.9.2
[release]( The only change
relative to the prior opam release is compatibility with OCaml 4.06.0's
`safe-string` default.

proj4 provides OCaml bindings to the [proj.4]( library, used
to perform transformations between geographic coordinate systems.

Tierless Web programming in ML


Gabriel Radanne announced:
I'm happy to announce that I successfully defended my PhD Thesis, titled
"Tierless Web programming in ML"!

My thesis describes the formalization and the implementation of Eliom, an
extension of OCaml for tierless Web programming, as part of the [ocsigen
project]( You can find all the details
[here](, along with [the
thesis]( and [the
slides]( I have copied
the abstract below.


Eliom is a dialect of OCaml for Web programming in which server and client
pieces of code can be mixed in the same file using syntactic annotations. This
allows to build a whole application as a single distributed program, in which it
is possible to define in a composable way reusable widgets with both server and
client behaviors.

Eliom is type-safe, as it ensures that communications are well-behaved through
novel language constructs that match the specificity of Web programming. Eliom
is also efficient, it provides static slicing which separates client and server
parts at compile time and avoids back-and-forth communications between the
client and the server. Finally, Eliom supports modularity and encapsulation
thanks to an extension of the OCaml module system featuring tierless annotations
that specify whether some definitions should be on the server, on the client, or

This thesis presents the design, the formalization and the implementation of the
Eliom language.

Stdcompat, a compatibility module for OCaml standard library


Thierry Martinez announced:
I am pleased to announce Stdcompat: a compatibility module for OCaml
standard library. 

Stdcompat.* redefines (most of the) symbols available in the standard
library of OCaml 4.06.0, such as List.find_opt, floatarray, Uchar.t,
etc., and compiles on all versions of OCaml since 3.12.0.

If the version of OCaml is recent enough, these types and values are
just aliases to the corresponding symbols of the standard library,
Otherwise, they are redefined. For instance, Stdcompat.floatarray is
an alias for floatarray with OCaml 4.06.0 and for float array with
OCaml 4.05.0 and older.

Sub-modules signatures include the signatures of the standard library
modules, in order to allow Stdcompat to be opened globally if
preferred.  For instance, Stdcompat.List reexports all the symbols of
List. See the .mlip file or the preprocessed .mli and the generated
documentation for the complete list of available symbols.

The provided redefinitions do not make anything magic with the
internal data structures: some of them are not as efficient as the one
of the standard library (for instance, Hashtbl.filter_map_inplace),
and can be even insecure (for instance, seeds are ignored for hash
tables prior OCaml 4.00). This is a design choice that can possibly
change in the future. Of course, these lesser redefinitions are used
only if the OCaml version is not recent enough.

The module is intended to follow future changes of the standard
library, and the API can change, for instance if some symbols become
deprecated.  However, I will try to keep the ability to be compiled on
old versions of OCaml (at least 3.12.0).

GitHub repository:
Available in OPAM: opam install stdcompat

ppx_deriving_protocol 0.8


Anders Fugmann announced:
I'm happy to announce ppx_deriving_protocol v. 0.8

Ppx_deriving_protocol is a ppx to serialize and de-serialize ocaml data types.
The ppx is generic in the sense that it allows users to plug in concrete
protocol serializers and de-serializers without needing to modify the ppx or
learning ocaml Ast.

The library include drivers for (de)serializing to/from json (Yojson.Safe.json)
and xml_light (Xml.xml), but users of the library may choose to create their

The library currently handles most primitive types (int, string, bool, etc),
lists, options, record and tuples types. The goal is to support most types,
including sum-types.

More information can be found at

amqp-client 1.1.4


Anders Fugmann announced:
I'm happy to announce a new release of amqp-client version 1.1.4.

Amqp-client is a client library for implemented purly in OCaml for communicating
with an Amqp server. The library supports both async and lwt for concurrency.

The library is tested against RabbitMQ, but should work with any server
supporting AMQP 0.9 protocol.

This version now supports OCaml 4.06 (Safe strings), and includes many bugfixes.

The complete changelog can be found at:

For more information, see

PhD position in Design and implementation of programming languages for embedded vision systems (with Caml inside)


Jocelyn Sérot announced:
PhD vacancy in Design and implementation of programming languages for embedded
vision systems.

For the Innovative Training Network (ITN) project ACHIEVE - AdvanCed
Hardware/Software components for Integrated/Embedded Vision systEms
(H2020-MSCA-ITN-2017), we are looking for one motivated early stage researcher
in at least one of the two following scientific domains:

- Design and implementation of programming languages (compilation, formal
semantics, models of computation ...)
- Synthesis of digital systems (hardware description languages, FPGA

The researcher fellow will be hosted at the Institut Pascal
( in the DREAM research group of Université
Clermont-Auvergne (UCA), for a period of 36 months with the aim of obtaining a
PhD. The DREAM group is working on hardware and software development of advanced
computer vision architectures. It was formed in 2008 and until now we have been
lucky to work with five visiting professors/researchers and more than 15
graduate students. The group is performing research in the following areas:
- Design of smart cameras 
- Image processing architectures 
- Software methods and tools for embedded systems 

The PhD training includes a second internship in the company NVIDIA
(, the famous producer of GPU. Nvidia is located in Paris.
The new researchers will therefore work as a team with existing researchers.
They will also cooperate with the other researchers in the ACHIEVE network and
participate in the ACHIEVE's training program.

You will receive a PhD scholarship according to the general conditions at
Université Blaise Pascal. Tax- fee scholarship includes full social security
coverage (net monthly amount starting at ± 2.300 EUR/month + 250 EUR/month
mobility allowance + (if applicable) family allowance of 500 EUR). The initial
contract will be for a period of 1 year and will start in the first quarter of
2018; this contract should be extended for a total of 3 years, subject to good
performance. You will work at the IP research group. Information about IP can be
found on the web:

The PhD subject focuses on the development of the CAPH High Level Synthesis
System (, which has been developed and used
within the group for almost one decade for implementing embedded vision
applications of reconfigurable architectures such as FPGAs. Starting from a
high-level formulation as a data-flow graph, CAPH generates RT-level,
synthesis-ready VHDL code. In the current version, the generated RTL
descriptions are typically fine grain, each actor being implemented as a
FSM+datapath micro-architecture. For some applications, especially in the
embedded vision field, it would be interesting to implement as sequential,
imperative code running on soft or hard-core processors (either on the FPGA
itself or on a on-chip micro-processor). This would allow the definition the
actor behavior using classical, sequential programming languages such as C or
C++, reuse of existing sequential code and use of the CAPH system in coarse
grain reconfiguration (CGR) frameworks. The proposed work therefore aims at
extending the CAPH language - which is entirely written in OCaml - with adequate
concepts and constructs on the one hand - building on platform-agnostic
capabilities of the underlying dataflow model of computation -, and
implementing, in the most portable and efficient way as possible, these
extensions in the compilation and synthesis flow on the other hand. Validation
will be carried out on carefully selected, realistic, embedded vision

Profile of the candidate
You have a Master of Science degree (at the start of the PhD) and a strong
background in Computer Science. Candidates with an MsC in another discipline but
with good skills in programming languages, signal/image processing may also be

You have a strong interest in image processing, embedded systems for computer
vision, a good knowledge of mathematics, signal or image processing, and very
good programming skills. As stated in the preamble, you must have a working
experience in digital system design (VHDL) and/or programming language
implementation (C, C++ and OCaml).

You function well in a team. You have good or excellent English and scientific
writing skills. You combine a strong interest in scientific research with a
desire to see your work applied in industry. Due to EC funding rules, only
candidates with less than 4 years of research experience can be considered.
Candidates may not have carried out their main activity (work-studies ...) in
France for more than 12 months in the past 3 years. Université Clermont Auvergne
implements gender-neutral recruitment and selection procedures. Female
candidates are especially encouraged to apply.

How to apply

Please submit your application by email to both Prof. Francois BERRY at and Jocelyn SEROT at

In your email, please include the following:

- A brief motivation of your application: what do you consider the best facts in
your CV, which demonstrate your academic excellence in BsC and/or Msc.
education? What are your reasons to pursue a PhD? Why would you like to work at
Université Clermont-Auvergne? ...
- A detailed CV, describing your earlier experience and studies;
- A list of publications (if available);
- A transcript of your educational record (list of courses per year, number of
obtained credits, obtained marks) if available. This need not be official
document at this stage ;
- A (rough) indication or estimate of your rank among other students (e.g., top
10% among 35 students in my master);
- If available: 1-3 English language documents describing your earlier research
(e.g., scientific papers, master thesis, report on project work, etc.). These
documents need not be on the topic of the positions.

Ecaml: OCaml Emacs plugins tutorial


bcc announced:
The final [part
is now online.

I also completely redid the website design. If things are broken, please tell me.

Ocaml Github Pull Requests

Gabriel Scherer and the editor compiled this list:
Here is a sneak peek at some potential future features of the Ocaml
compiler, discussed by their implementers in these Github Pull Requests.

- Match- and try-blocks with mandatory "end"
- hightlight differences in type error messages

Other OCaml News

From the ocamlcore planet blog:
Here are links from many OCaml blogs aggregated at OCaml Planet,

PhD Thesis: Tierless Web programming in ML | Drup's thingies

Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.

Alan Schmitt