Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of January 26 to February 02, 2016.

  1. Functional Programming at Jane Street
  2. truncated division, remainder and arithmetics
  3. first official release: DAFT Allows File Transfers
  4. January 2016 Ocsigen releases
  5. Ocaml Github Pull Requests
  6. Other OCaml News

Functional Programming at Jane Street


Yaron Minsky announced:
Jane Street is looking to hire functional programmers for our offices
in New York, London and Hong Kong.

Jane Street has the largest team of OCaml developers in any industrial
setting, and the world's largest OCaml codebase. We use OCaml for
running our entire business, working on everything from statistical
research to systems administration to automated trading systems.  If
you're interested in using OCaml to solve real-world problems, there's
no better place.

The atmosphere is informal and intellectual --- you'll get to work
with an extremely talented group of developers and traders (a pretty
geeky group in its own right), pushing the bounds of functional
programming and learning about the business of trading.  Compensation
is more than competitive.

We have a strong commitment to OCaml and to open-source software.
We've continued to develop and release our own open source software,
as well as support OCamlPro and OCaml Labs in building out
infrastructure for the language.

You don't need to know anything about finance, be a whiz at
mathematical puzzles, or be a deep type theorist to qualify.  We're
looking for great software engineers, but beyond that, there's no
narrow list of qualifications.

Here are some resources you can use to learn more about Jane Street
and what we do.

- Our technical blog:
- Our open source software:
- A talk we just posted on why we use OCaml:
- Our main website:

You can apply here:

truncated division, remainder and arithmetics


peio asked and Xavier Leroy replied:
> while doing some modular arithmetic I discovered that OCaml uses the
> 'truncated division' convention for the `/` (quotient) operator.
> Actually this convention may seem innocent but it greatly affects the
> `mod` (remainder) operator: the sign of the result is the same as
> dividend.
> After some research I realized that lots of people (D.Knuth!)
> criticized this convention in favor of floored division (sign of
> remainder same as divisor) or euclidean division (remainder always
> positive). I know such a key component of the language isn't likely to
> be changed but I would like to get some of the rationals behind this
> decision.

All contemporary microprocessors that implement division in hardware
implement what you call truncated division.  The other forms of
division and modulus (there are at least two others) can be
implemented on top of that.  See this excellent summary:

Daan Leijen, Division and Modulus for Computer Scientists , July 2003.

> At last another thing that (slightly) bugs me: why don't `ceil` and
> `floor` have the type `float -> int`? Because the inherent definitions
> of these functions talks about integers, not floats

Yes, but with the type you propose they would overflow easily for
large enough FP arguments.  In FP computations involving ceil and
floor, it is often possible to do the computation entirely in
floating-point, avoiding catastrophic overflow cases.

> Maybe even more subtle is that `truncate`
> has type `float -> int`. In my opinion the type `float -> float` would
> be more appropriate here because the truncation operation is about
> approximating a real number with a decimal (we already got
> `int_of_float` for rough converting).

"truncate" and "int_of_float" are (currently) the same function.

first official release: DAFT Allows File Transfers


Francois Berenger announced:
I am very pleased to announce the first official release of DAFT (v0.0.1).

DAFT means DAFT Allows File Transfers.

DAFT is meant at computational scientists who want to move
files during distributed computational experiments from the command-line.
In other words, one can see DAFT as a kind of distributed file-system
except that it has a command line interface (instead of a file
interface) and doesn't allow modification or deletion of a file
once it was added to the system.

DAFT features the following commands:
- put (publish a file)
- get (retrieve a previously published file)
- bcast (publish a file (if needed) then make it available to all nodes)
- scatter (a put load-balancing chunks over nodes)
- ls (list the global state of the system)
- exit (exit the client, you can come back later)
- quit (shut down the whole system)

DAFT should be available in opam soon, under the package name daft.

DAFT should be a fine data companion to tools like PAR
or GNU parallel
A tool related to DAFT is the excellent TakTuk

DAFT is meant to be used when you don't have access to a distributed
file-system on your nodes and you don't want to hammer the nearest NFS server
(if any).

There is a video presentation of DAFT from the latest OCaml
Users in Paris meeting (OUPS), the presentation starts
around 6mn40s into the video:

The slides of this presentation can be seen here:

DAFT is secure by default and a software for the post-Snowden era.
All its messages are signed then encrypted.

DAFT never require root rights to be compiled/installed/run.
All you need is a regular UNIX user account and ssh access to the nodes you
want to use during your computational experiment.

DAFT uses the excellent open source libraries and tools:
- obuild (to build)
- batteries (extended stdlib)
- cryptokit (compression, signatures, ciphers, modes, CSPRNG)
- dolog (a minimalist lazy logger)
- fileutils (many FS operations)
- ZMQ (send atomic messages over the network)

I consider this is a beta release: users might
encounter bugs in case of intensive usage of the tool.
I only had time to do medium-scale experiments with it (128 computers from
grid5000 and only broadcasting files).
I don't consider DAFT was used in production yet.

If you want to help with the project:

January 2016 Ocsigen releases


Vincent Balat announced:
We are excited to announce the releases of

Eliom 5.0
js_of_ocaml 2.7
TyXML 3.6
reactiveData 0.2

These releases are the result of many months of work by the Ocsigen team, and
bring a range of improvements.

Eliom 5.0 comes with a PPX-based language (for OCaml 4.02.x). This follows our
PPX extensions for js_of_ocaml and Lwt. The new syntax is more flexible than
our previous Camlp4-based one, and we recommend it for new projects.
Nevertheless, the Camlp4-based syntax remains available.

Shared reactive programming
Recent versions of Eliom provided client-side support for (functional)
reactive programming. Eliom 5.0 additionally supports “shared” (client-server)
reactive programming, where the reactive signals have meaning both on the
server and the client. This means that the initial version of the page is
produced (on the server) with the same code that takes care of the dynamic
updates (on the client).

Enhanced js_of_ocaml library
The js_of_ocaml library provides additional bindings for established
JavaScript APIs. This includes
* geolocation,
* mutation observers, and
* web workers.
A new JavaScript-specific table module is also available.

js_of_ocaml provides a new JSON plugin for ppx_deriving. This can be used for
serializing OCaml data structures to JSON in a type-safe way. The plugin
remains compatible with its Camlp4-based predecessor with respect to the
serialization format.

Under the hood
In addition to providing various fixes, we have improved the performance of
various Ocsigen components. Notably:
* A range of patches related to request data result in measurably smaller size
for the produced pages.
* The js_of_ocaml compiler becomes faster via improvements in bytecode
* reactiveData employs diffing to detect data structure changes, leading to
more localized incremental updates.

The Ocsigen team always welcomes your feedback and contributions. Stay in
touch via GitHub and our mailing list!

Full anouncement with clickable links:
Ocsigen :

Ocaml Github Pull Requests

Gabriel Scherer 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.

Better type error location in presence of constraints

Remove ocamlbuild

Other OCaml News

From the ocamlcore planet blog:
Thanks to Alp Mestan, we now include in the OCaml Weekly News the links to the
recent posts from the ocamlcore planet blog at

Psellos: OCaml on iOS Example Apps

OCamlCore Forge News: CCSS 1.6 released

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