Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of January 16 to 23, 2018.

  1. Using Lwt_log library for sending messages to a Syslog server
  2. Sequence 1.0
  3. OCaml 4.06.1+rc1
  4. containers 2.0+alpha1
  5. Ocaml Github Pull Requests
  6. Other OCaml News

Using Lwt_log library for sending messages to a Syslog server


Deep in this thread, Hannes Mehnert said:
since you mention my logs-syslog package here, let me answer you . ;)

- Lwt_logs now moved to a separate repository (see and NB: I never used Lwt_logs and can't
answer your initial question about syslog support.
- logs-syslog "depends on lot of external libraries": my perception is
different, it requires `ocamlfind`, `ocamlbuild`, and `topkg` for building, plus
`logs`, `ptime`, and `syslog-message` (which itself depends additionally on
`astring`) at runtime.
The [logs library]( is
very convenient to use IMHO, and has builtin support for both terminal, but also
browser console (when cross-compiling to JS). I wrote logs-syslog to solve the
exact problem - exfiltrating log messages via syslog - once logs was adopted
more widely (at least by the MirageOS community, see
Others (at Docker) wrote reporters for both [Apply system
log]( and [Windows event
The syslog-message library does not yet support structured syslog ([RFC
5424](, apart from that the logs-syslog
library supports three transports, UDP, TCP, TLS (including client
authentication) - and 3 backends: Unix (OCaml stdlib), Lwt, MirageOS. Please let
me know if you have a specific use case not covered by logs-syslog. Further
reading about the MirageOS syslog integration is available at

Sequence 1.0


Simon Cruanes announced:
I have the pleasure to announce that
[sequence]( has reached its version 1.0.
Sequence is a lightweight, high-performance library of iterators that is
compatible with existing `iter` functions. Sequence 1.0 is a breaking release
that comes with some simplification of the API and a bump of the minimum
supported OCaml version to 4.02 that comes from jbuilder.

[Short tutorial to see what Sequence is
Online doc at
Repo at
Hezekiah Carty then asked:
This is great, thank you!

Is there a writeup somewhere on how to pick between sequence and
[gen]( Both seem similar in intent. Is one
generally a better choice than the other?
Simon Cruanes replied:
I just wrote a basic explanation here:
. I'll try to expand it if it's not clear enough.

OCaml 4.06.1+rc1


Damien Doligez announced:
The release of OCaml version 4.06.1 is imminent.  We have
created a release candidate for your testing pleasure.  Please
try it and let me know whether it works for you.

We want to know about any show-stopping bugs, especially in the
compilation and installation phases.

This release candidate is available as an opam switch:
  opam switch 4.06.1+rc1

Happy hacking,

-- Damien Doligez for the OCaml team.


### Bug fixes

- MPR#7661, GPR#1459: fix faulty compilation of patterns
  using extensible variants constructors
  (Luc Maranget, review by Thomas Refis and Gabriel Scherer, report
  by Abdelraouf Ouadjaout and Thibault Suzanne)

- MPR#7702, GPR#1553: refresh raise counts when inlining a function
  (Vincent Laviron, Xavier Clerc, report by Cheng Sun)

- MPR#7704, GPR#1559: Soundness issue with private rows and pattern-matching
  (Jacques Garrigue, report by Jeremy Yallop, review by Thomas Refis)

- MPR#7705, GPR#1558: add missing bounds check in Bigarray.Genarray.nth_dim.
  (Nicolás Ojeda Bär, report by Jeremy Yallop, review by Gabriel Scherer)

- GPR#1470: Don't commute negation with float comparison
  (Leo White, review by Xavier Leroy)

- GPR#1538: Make pattern matching compilation more robust to ill-typed columns
  (Gabriel Scherer and Thomas Refis, review by Luc Maranget)

containers 2.0+alpha1


Simon Cruanes announced:
I have  the pleasure  to announce that containers 2.0+alpha1 is being released.

[containers]( is a modular,
ightweight, and performant extension of the standard library. Version 2.0
introduces a monomorphic mode (thanks to @jpdeplaix) that is designed to prevent
errors caused by the polymorphic "magic" operators such as `(=)`. This breaking
release is also the occasion to switch to dune, and to fix some inconsistencies
in the API (mostly printers).

If you use containers, please give a try to 2.0+alpha1 and report any issue on
the bucktracker!


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.

- stdlib: add Pervasives.int_size
- MPR#7710: ocamldep -sort: treat cyclic dependencies as an error

Other OCaml News

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

Full Time: Compiler Engineer at Jane Street in New York & London

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong

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