Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of July 11 to August 08, 2017.

Sorry for the hiatus, I was away with no internet access.

  1. OCaml 4.05.0 released
  2. OCamlPro is hiring/recrute on/sur Tezos
  3. Release 2.8.3 of Caph, a functional/dataflow language for programming FPGAs
  4. Lwt 3.1.0 – Promises and concurrent programming
  5. new release of parany (1.0.2): a minimalistic OCaml library to parallelize any kind of computation
  6. Merlin 3.0.1 with OCaml 4.05 support
  7. Jbuilder design and hacking session on September 9th in Oxford, UK
  8. Static Analysis Tools team at Facebook hiring
  9. ocamlnet-4.1.3
  10. From the OCaml discourse
  11. Ocaml Github Pull Requests
  12. Other OCaml News

OCaml 4.05.0 released


Damien Doligez announced:
We have the pleasure of celebrating the birthdays of Simone Veil and Ernö Rubik
by announcing the release of OCaml version 4.05.0.

It is available as an OPAM switch, or as a source
download here:

Happy hacking,

-- Damien Doligez for the OCaml team.

OCaml 4.05.0 (13 Jul 2017):

(Changes that can break existing programs are marked with a "*")

### Language features:

### Code generation and optimizations:

- MPR#7201, GPR#954: Correct wrong optimisation of "0 / <expr>"
  and "0 mod <expr>" in the case when <expr> was a non-constant
  evaluating to zero
  (Mark Shinwell, review by Gabriel Scherer, Leo White and Xavier Leroy)

- MPR#7357, GPR#832: Improve compilation time for toplevel
  include(struct ... end : sig ... end)
  (Alain Frisch, report by Hongbo Zhang, review by Jacques Garrigue)

- MPR#7533, GPR#1173: Correctly perform side effects for certain
  cases of "/" and "mod"
  (Mark Shinwell, report by Jan Mitgaard)

- GPR#504: Instrumentation support for fuzzing with afl-fuzz.
  (Stephen Dolan, review by Alain Frisch, Pierre Chambart, Mark
  Shinwell, Gabriel Scherer and Damien Doligez)

- GPR#863, GPR#1068, GPR#1069: Optimise matches with constant
  results to lookup tables.
  (Stephen Dolan, review by Gabriel Scherer, Pierre Chambart,
  Mark Shinwell, and bug report by Gabriel Scherer)

- GPR#1150: Fix typo in arm64 assembler directives
  (KC Sivaramakrishnan)

### Runtime system:

- MPR#385, GPR#953: Add caml_startup_exn
  (Mark Shinwell)

- MPR#7423, GPR#946: expose new exception-raising functions
  `void caml_{failwith,invalid_argument}_value(value msg)`
  in addition to
  `void caml_{failwith,invalid_argument}(char const *msg)`.
  The previous functions would not free their message argument, so
  were inconvient for dynamically-allocated messages; the messages
  passed to the new functions are handled by the garbage collector.
  (Gabriel Scherer, review by Mark Shinwell, request by Immanuel Litzroth)

- MPR#7557, GPR#1213: More security for getenv
  (Damien Doligez, reports by Seth Arnold and Eric Milliken, review by
  Xavier Leroy, David Allsopp, Stephen Dolan, Hannes Mehnert)

- GPR#795: remove 256-character limitation on Sys.executable_name
  (Xavier Leroy)

- GPR#891: Use -fno-builtin-memcmp when building runtime with gcc.
  (Leo White)

### Type system:

- MPR#6608, GPR#901: unify record types when overriding all fields
  (Tadeu Zagallo and Gabriel Scherer, report by Jeremy Yallop,
  review by David Allsopp, Jacques Garrigue)

* MPR#7414, GPR#929: Soundness bug with non-generalized type variables and
  (Jacques Garrigue, report by Leo White)

### Compiler user-interface and warnings:

- MPR#7050, GPR#748 GPR#843 GPR#864: new `-args/-args0 <file>` parameters to
  provide extra command-line arguments in a file -- see documentation.
  User programs may implement similar options using the new `Expand`
  constructor of the `Arg` module.
  (Bernhard Schommer, review by Jérémie Dimino, Gabriel Scherer
   and Damien Doligez, discussion with Alain Frisch and Xavier Leroy,
   feature request from the Coq team)

- MPR#7137, GPR#960: "-open" command line flag now accepts
  a module path (not a module name)
  (Arseniy Alekseyev and Leo White)

- MPR#7172, GPR#970: add extra (ocamlc -config) options
  int_size, word_size, ext_exe
  (Gabriel Scherer, request by Daniel Bünzli)

- MPR#7315, GPR#736: refine some error locations
  (Gabriel Scherer and Alain Frisch, report by Matej Košík)

- MPR#7473, GPR#1025: perform proper globbing for command-line arguments on
  (Jonathan Protzenko)

- MPR#7479: make sure "ocamlc -pack" is only given .cmo and .cmi files,
  and that "ocamlopt -pack" is only given .cmx and .cmi files.
  (Xavier Leroy)

- GPR#796: allow compiler plugins to declare their own arguments.
  (Fabrice Le Fessant)

- GPR#829: better error when opening a module aliased to a functor
  (Alain Frisch)

- GPR#911: ocamlc/ocamlopt do not pass warnings-related options to C
  compiler when called to compile third-party C source files
  (Sébastien Hinderer, review by Adrien Nader and David Allsopp)

- GPR#915: fix -dsource ( bugs
  (Runhang Li, review by Alain Frisch)

* GPR#933: ocamlopt -p now reports an error on platforms that do not
  support profiling with gprof; dummy profiling libraries are no longer
  installed on such platforms.
  This can be tested with ocamlopt -config
  (Sébastien Hinderer)

- GPR#1009: "ocamlc -c -linkall" and "ocamlopt -c -linkall" can now be used
  to set the "always link" flag on individual compilation units.  This
  controls linking with finer granularity than "-a -linkall", which sets
  the "always link" flag on all units of the given library.
  (Xavier Leroy)

- GPR#1015: add option "-plugin PLUGIN" to ocamldep too. Use compilerlibs
  to build ocamldep.
  (Fabrice Le Fessant)

- GPR#1027: various improvements to -dtimings, mostly including time
  spent in subprocesses like preprocessors
  (Valentin Gatien-Baron, review by Gabriel Scherer)

- GPR#1098: the compiler now takes the boolean "OCAML_COLOR" environment
  variable into account if "-color" is not provided.  This allows users
  to override the default behaviour without modifying invocations of ocaml
  (Hannes Mehnert, Guillaume Bury,
   review by Daniel Bünzli, Gabriel Scherer, Damien Doligez)

### Standard library:

- MPR#6975, GPR#902: Truncate function added to stdlib Buffer module
  (Dhruv Makwana, review by Alain Frisch and Gabriel Scherer)

- MPR#7279, GPR#710: `Weak.get_copy` `Ephemeron.*_copy` doesn't copy
  custom blocks anymore
  (François Bobot, Alain Frisch, bug reported by Martin R. Neuhäußer,
  review by Thomas Braibant and Damien Doligez)

* MPR#7500, GPR#1081: Remove Uchar.dump
  (Daniel Bünzli)

- GPR#760: Add a functions List.compare_lengths and
  List.compare_length_with to avoid full list length computations
  (Fabrice Le Fessant, review by Leo White, Josh Berdine and Gabriel Scherer)

- GPR#778: Arg: added option Expand that allows to expand a string
  argument to a string array of new arguments
  (Bernhard Schommer, review by Gabriel Scherer and Jérémie Dimino)

- GPR#849: Expose a Spacetime.enabled value
  (Leo White)

- GPR#885: Option-returning variants of stdlib functions
  (Alain Frisch, review by David Allsopp and Bart Jacobs)

- GPR#869: Add find_first, find_first_opt, find_last, find_last_opt to
  maps and sets.  Find the first or last binding or element
  satisfying a monotonic predicate.
  (Gabriel de Perthuis, with contributions from Alain Frisch, review by
  Hezekiah M. Carty and Simon Cruanes, initial report by Gerd Stolpmann)

- GPR#875: Add missing functions to ArrayLabels, BytesLabels,
  ListLabels, MoreLabels, StringLabels so they are compatible with
  non-labeled counterparts. Also add missing @@ocaml.deprecated attributes
  in StringLabels and BytesLabels.
  (Roma Sokolov, review by Gabriel Scherer, Jacques Garrigue,
   Gabriel Radanne, Alain Frisch)

- GPR#999: Arg, do not repeat the usage message thrice when reporting an error
  (this was a regression in 4.03)
  (Florian Angeletti, review by Gabriel Scherer)

- GPR#1042: Fix escaping of command-line arguments in
  Unix.create_process{,_env} under Windows.  Arguments with tabs should now
  be received verbatim by the child process.
  (Nicolas Ojeda Bar, Andreas Hauptmann review by Xavier Leroy)

### Debugging and profiling:

- MPR#7258: ocamldebug's "install_printer" command had problems with
  module aliases
  (Xavier Leroy)

- GPR#378: Add [Printexc.raise_with_backtrace] to raise an exception using
  an explicit backtrace
  (François Bobot, review by Gabriel Scherer, Xavier Leroy, Damien Doligez,
   Frédéric Bour)

### Manual and documentation:

- MPR#6597, GPR#1030: add forward references to language extensions
  that extend non-terminal symbols in the language reference section.
  (Florian Angeletti, review by Gabriel Scherer)

- MPR#7497, GPR#1095: manual, enable numbering for table of contents
  (Florian Angeletti, request by Daniel Bünzli)

- MPR#7539, GPR#1181: manual, update dead links in ocamldoc chapter
  (Florian Angeletti)

- GPR#633: manpage and manual documentation for the `-opaque` option
  (Konstantin Romanov, Gabriel Scherer, review by Mark Shinwell)

- GPR#751, GPR#925: add a HACKING.adoc file to contain various
  tips and tricks for people hacking on the repository. See also for advice on sending contributions upstream.
  (Gabriel Scherer and Gabriel Radanne, review by David Allsopp,
  inspired by John Whitington)

- GPR#916: new tool lintapidiff, use it to update the manual with
  @since annotations for API changes introduced between 4.00-4.05.
  (Edwin Török, review by Gabriel Scherer, discussion with Alain Frisch,
   David Allsopp, Sébastien Hinderer, Damien Doligez and Xavier Leroy)

- GPR#939: activate the caml_example environment in the language
  extensions section of the manual. Convert some existing code
  examples to this format.
  (Florian Angeletti)

- GPR#1082: clarify that the use of quoted string for preprocessed
  foreign quotations still requires the use of an extension node
  [%foo ...] to mark non-standard interpretation.
  (Gabriel Scherer, request by Matthew Wahab in GPR#1066,
   review by Florian Angeletti)

### Other libraries:

- MPR#7158: Event.sync, Mutex.create, Condition.create cause too many GCs.
  The fix is to no longer consider mutexes and condition variables
  as rare kernel resources.
  (Xavier Leroy)

- MPR#7264: document the different behaviors of Unix.lockf under POSIX
  and under Win32.
  (Xavier Leroy, report by David Allsopp)

- MPR#7339, GPR#787: Support the '0 dimension' case for bigarrays
  (see Bigarray documentation)
  (Laurent Mazare,
   review by Gabriel Scherer, Alain Frisch and Hezekiah M. Carty)

* MPR#7342, GPR#797: fix on pipes with no data left on Windows
  it previously raised an EPIPE error, it now returns 0 like other OSes
  (Jonathan Protzenko, review by Andreas Hauptmann and Damien Doligez)

- GPR#650: in the Unix library, add `?cloexec:bool` optional arguments to
  functions that create file descriptors (`dup`, `dup2`, `pipe`, `socket`,
  `socketpair`, `accept`).  Implement these optional arguments in the
  most atomic manner provided by the operating system to set (or clear)
  the close-on-exec flag at the same time the file descriptor is created,
  reducing the risk of race conditions with `exec` or `create_process`
  calls running in other threads, and improving security.  Also: add a
  `O_KEEPEXEC` flag for `openfile` by symmetry with `O_CLOEXEC`.
  (Xavier Leroy, review by Mark Shinwell, David Allsopp and Alain Frisch,
   request by Romain Beauxis)

- GPR#996: correctly update caml_top_of_stack in systhreads
  (Fabrice Le Fessant)

### Toplevel:

- MPR#7060, GPR#1035: Print exceptions in installed custom printers
  (Tadeu Zagallo, review by David Allsopp)

### Tools:

- MPR#5163: ocamlobjinfo, dump globals defined by bytecode executables
  (Stéphane Glondu)

- MPR#7333: ocamldoc, use the first sentence of text file as
  a short description in overviews.
  (Florian Angeletti)

- GPR#848: ocamldoc, escape link targets in HTML output
  (Etienne Millon, review by Gabriel Scherer, Florian Angeletti and
  Daniel Bünzli)

- GPR#986: ocamldoc, use relative paths in error message
  to solve ocamlbuild+doc usability issue (ocaml/ocamlbuild#79)
  (Gabriel Scherer, review by Florian Angeletti, discussion with Daniel Bünzli)

- GPR#1017: ocamldoc, add an option to detect code fragments that could be
  transformed into a cross-reference to a known element.
  (Florian Angeletti, review and suggestion by David Allsopp)

- clarify ocamldoc text parsing error messages
  (Gabriel Scherer)

### Compiler distribution build system:

- MPR#7377: remove -std=gnu99 for newer gcc versions
  (Damien Doligez, report by ygrek)

- MPR#7452, GPR#1228: tweak GCC options to try to avoid the
  Skylake/Kaby lake bug
  (Damien Doligez, review by David Allsopp, Xavier Leroy and Mark Shinwell)

- GPR#693: fail on unexpected errors or warnings within caml_example
  (Florian Angeletti)

- GPR#803: new ocamllex-based tool to extract bytecode compiler
  opcode information from C headers.
  (Nicolas Ojeda Bar)

- GPR#827: install missing mli and cmti files, new make target
  install-compiler-sources for installation of compiler-libs ml files
  (Hendrik Tews)

- GPR#887: allow -with-frame-pointers if clang is used as compiler on Linux
  (Bernhard Schommer)

- GPR#898: fix locale-dependence of primitive list order,
  detected through
  (Hannes Mehnert, review by Gabriel Scherer and Ximin Luo)

- GPR#907: Remove unused variable from the build system
  (Sébastien Hinderer, review by whitequark, Gabriel Scherer, Adrien Nader)

- GPR#911: Clarify the use of C compiler related variables in the build system.
  (Sébastien Hinderer, review by Adrien Nader, Alain Frisch, David Allsopp)

- GPR#919: use clang as preprocessor assembler if clang is used as compiler
  (Bernhard Schommer)

- GPR#927: improve the detection of hashbang support in the configure script
  (Armaël Guéneau)

- GPR#932: install ocaml{c,lex}->ocaml{c,lex}.byte symlink correctly
  when the opt target is built but opt.opt target is not.
  (whitequark, review by Gabriel Scherer)

- GPR#935: allow build in Android's termux
  (ygrek, review by Gabriel Scherer)

- GPR#984: Fix compilation of compiler distribution when Spacetime
  (Mark Shinwell)

- GPR#991: On Windows, fix installation when native compiler is not
  (Sébastien Hinderer, review by David Allsopp)

- GPR#1033: merge Unix and Windows build systems in the root directory
  (Sébastien Hinderer, review by Damien Doligez and Adrien Nader)

- GPR#1047: Make .depend files generated for C sources more portable
  (Sébastien Hinderer, review by Xavier Leroy and David Allsopp)

- GPR#1076: Simplify ocamlyacc's build system
  (Sébastien Hinderer, review by David Allsopp)

### Compiler distribution build system: Makefile factorization

The compiler distribution build system (the set of Makefiles used to
build the compiler distribution) traditionally had separate Makefiles
for Unix and Windows, which lead to some amount of duplication and
subtle differences and technical debt in general -- for people working
on the compiler distribution, but also cross-compilation or porting to
new systems. During the 4.05 development period, Sébastien Hinderer
worked on harmonizing the build rules and merging the two build

* Some changes were made to the config/Makefile file which
  is exported as $(ocamlc -where)/Makefile.config, and on
  which some advanced users might rely. The changes are
  as follows:
  - a BYTERUN variable was added that points to the installed ocamlrun
  - the PARTIALLD variable was removed (PACKLD is more complete)
  - the always-empty DLLCCCOMPOPTS was removed
  - the SHARED variable was removed; its value is "shared" or "noshared",
    which duplicates the existing and more convenient
    SUPPORTS_SHARED_LIBRARIES variable whose value is "true" or "false".

  Note that Makefile.config may change further in the future and relying
  on it is a bit fragile. We plan to make `ocamlc -config` easier to use
  for scripting purposes, and have a stable interface there. If you rely
  on Makefile.config, you may want to get in touch with Sébastien Hinderer
  or participate to MPR#7116 (Allow easy retrieval of Makefile.config's values)
  or MPR#7172 (More information in ocamlc -config).

The complete list of changes is listed below.

- GPR#705: update Makefile.nt so that ocamlnat compiles
  for non-Cygwin Windows ports.
  (Sébastien Hinderer, review by Alain Frisch)

- GPR#729: Make sure ocamlnat is built with a $(EXE) extension, merge
  rules between Unix and Windows Makefiles
  (Sébastien Hinderer, review by Alain Frisch)

- GPR#762: Merge build systems in the yacc/ directory.
  (Sébastien Hinderer, review by David Allsopp, Alain Frisch)

- GPR#764: Merge build systems in the debugger/ directory.
  (Sébastien Hinderer, review by Alain Frisch)

- GPR#785: Merge build systems in otherlibs/systhreads/
  (Sébastien Hinderer, review by Alain Frisch, David Allsopp,
   testing and regression fix by Jérémie Dimino)

- GPR#788: Merge build systems in subdirectories of otherlibs/.
  (Sébastien Hinderer, review by Alain Frisch)

- GPR#808, GPR#906: Merge Unix and Windows build systems
  in the ocamldoc/ directory
  (Sébastien Hinderer, review by Alain Frisch)

- GPR#812: Merge build systems in the tools/ subdirectory
  (Sébastien Hinderer, review by Alain Frisch)

- GPR#866: Merge build systems in the stdlib/ directory
  (Sébastien Hinderer, review by David Allsopp and Adrien Nader)

- GPR#941: Merge Unix and Windows build systems in the asmrun/ directory
  (Sébastien Hinderer, review by Mark Shinwell, Adrien Nader,
   Xavier Leroy, David Allsopp, Damien Doligez)

- GPR#981: Merge build systems in the byterun/ directory
  (Sébastien Hinderer, review by Adrien Nader)

- GPR#1033, GPR#1048: Merge build systems in the root directory
  (Sébastien Hinderer, review by Adrien Nader and Damien Doligez,
   testing and regression fix by Andreas Hauptmann)

### Internal/compiler-libs changes:

- GPR#673: distinguish initialization of block fields from mutation in lambda.
  (Frédéric Bour, review by Xavier Leroy, Stephen Dolan and Mark Shinwell)

- GPR#744, GPR#781: fix duplicate self-reference in imported cmi_crcs
  list in .cmti files + avoid rebuilding cmi_info record when creating
  .cmti files
  (Alain Frisch, report by Daniel Bünzli, review by Jérémie Dimino)

- GPR#881: change `Outcometree.out_variant` to be more general.
  `Ovar_name of out_ident * out_type list` becomes `Ovar_type of out_type`.
  (Valentin Gatien-Baron, review by Leo White)

- GPR#908: refactor PIC-handling in the s390x backend
  (Gabriel Scherer, review by Xavier Leroy and Mark Shinwell)

### Bug fixes

- MPR#5115: protect all byterun/fail.c functions against
  uninitialized caml_global_data (only changes the bytecode behavior)
  (Gabriel Scherer, review by Xavier Leroy)

- MPR#6136, GPR#967: Fix Closure so that overapplication evaluation order
  matches the bytecode compiler and Flambda.
  (Mark Shinwell, report by Jeremy Yallop, review by Frédéric Bour)

- MPR#6550, GPR#1094: Allow creation of empty .cmxa files on macOS
  (Mark Shinwell)

- MPR#6594, GPR#955: Remove "Istore_symbol" specific operation on x86-64.
  This is more robust and in particular avoids assembly failures on Win64.
  (Mark Shinwell, review by Xavier Leroy, testing by David Allsopp and
   Olivier Andrieu)

- MPR#6903: Unix.execvpe doesn't change environment on Cygwin
  (Xavier Leroy, report by Adrien Nader)

- MPR#6987: Strange error message probably caused by
  universal variable escape (with polymorphic variants)
  (Jacques Garrigue, report by Mikhail Mandrykin and Leo White)

- MPR#7216, GPR#949: don't require double parens in Functor((val x))
  (Jacques Garrigue, review by Valentin Gatien-Baron)

- MPR#7331: ocamldoc, avoid infinite loop in presence of self alias,
  i.e. module rec M:sig end = M
  (Florian Angeletti, review Gabriel Scherer)

- MPR#7346, GPR#966: Fix evaluation order problem whereby expressions could
  be incorrectly re-ordered when compiling with Flambda.  This also fixes one
  example of evaluation order in the native code compiler not matching the
  bytecode compiler (even when not using Flambda)
  (Mark Shinwell, Leo White, code review by Pierre Chambart)

- MPR#7348: Private row variables can escape their scope
  (Jacques Garrigue, report by Leo White)

- MPR#7407: Two not-quite-standard C idioms rejected by SUNWSPro compilers
  (Xavier Leroy)

- MPR#7421: Soundness bug with GADTs and lazy
  (Jacques Garrigue, report by Leo White)

- MPR#7424: Typechecker diverges on unboxed type declaration
  (Jacques Garrigue, report by Stephen Dolan)

- MPR#7426, GPR#965: Fix fatal error during object compilation (also
  introduces new [Pfield_computed] and [Psetfield_computed] primitives)
  (Mark Shinwell, report by Ulrich Singer)

- MPR#7427, GPR#959: Don't delete let bodies in Cmmgen
  (Mark Shinwell, report by Valentin Gatien-Baron)

- MPR#7432: Linking modules compiled with -labels and -nolabels is not safe
  (Jacques Garrigue, report by Jeremy Yallop)

- MPR#7437: typing assert failure with nonrec priv
  (Jacques Garrigue, report by Anil Madhavapeddy)

- MPR#7438: warning +34 exposes #row with private types
  (Alain Frisch, report by Anil Madhavapeddy)

- MPR#7443, GPR#990: spurious unused open warning with local open in patterns
  (Florian Angeletti, report by Gabriel Scherer)

- MPR#7504: fix warning 8 with unconstrained records
  (Florian Angeletti, report by John Whitington)

- MPR#7456, GPR#1092: fix slow compilation on source files containing a lot
  of similar debugging information location entries
  (Mark Shinwell)

- GPR#795: remove 256-character limitation on Sys.executable_name
  (Xavier Leroy)

- GPR#805, GPR#815, GPR#833: check for integer overflow in String.concat
  (Jeremy Yallop,
   review by Damien Doligez, Alain Frisch, Daniel Bünzli, Fabrice Le Fessant)

- GPR#881: short-paths did not apply to some polymorphic variants
  (Valentin Gatien-Baron, review by Leo White)

- GPR#886: Fix Ctype.moregeneral's handling of row_name
  (Leo White, review by Jacques Garrigue)

- GPR#934: check for integer overflow in Bytes.extend
  (Jeremy Yallop, review by Gabriel Scherer)

- GPR#956: Keep possibly-effectful expressions when optimizing multiplication
  by zero.
  (Jeremy Yallop, review by Nicolás Ojeda Bär, Xavier Leroy and Mark Shinwell)

- GPR#977: Catch Out_of_range in ocamldebug's "list" command
  (Yunxing Dai)

- GPR#983: Avoid removing effectful expressions in Closure, and
  eliminate more non-effectful ones
  (Alain Frisch, review by Mark Shinwell and Gabriel Scherer)

- GPR#987: alloc_sockaddr: don't assume a null terminator. It is not inserted
  on macOS by system calls that fill in a struct sockaddr (e.g. getsockname).
  (Anton Bachin)

- GPR#998: Do not delete unused closures in
  (Leo White, review by Mark Shinwell and Pierre Chambart)

- GPR#1019: Fix fatal error in Flambda mode "[functions] does not map set of
  closures ID"
  (Pierre Chambart, code review by Mark Shinwell and Leo White)

- GPR#1075: Ensure that zero-sized float arrays have zero tags.
  (Mark Shinwell, Leo White, review by Xavier Leroy)

* GPR#1088: Gc.minor_words now returns accurate numbers.
  (Stephen Dolan, review by Pierre Chambart and Xavier Leroy)
Gabriel Scherer then added:
I have an annotated version of the 4.05 changelog with, in particular,
some of the compatibility-breaking changes explained in more details

This is a wiki, please feel free to improve the document.

OCamlPro is hiring/recrute on/sur Tezos


Fabrice Le Fessant announced:
    Tezos is a blockchain project, entirely developed in OCaml, that comes
with breaking-edge features, such as a self-amending system for upgrades,
proof-of-stake instead of proof-of-work, intensive use of static types and
formal methods, both for the implementation and for the development of
smart contracts. It can be seen as the most promising challenger for
Bitcoin and Ethereum. A prototype of Tezos has been developed for some time
at OCamlPro for Dynamic Ledger Solutions, and, following a successful ICO
in June, we are now strengthening the team to release soon the first
version, and maintain it in the future, in collaboration with the new born
Tezos Fundation and academic partners.

  We are thus looking for motivated, highly-skilled OCaml programmers for
the project. Tezos is a challenging project, with a mix of state-of-the-art
algorithms in formal methods, distributed systems and cryptography.
Backgrounds in one or more of these fields would be highly appreciated. We
are both hiring for short term contracts (1 or 2 years, postdocs), for the
first versions of the project, and long term contracts, for maintenance and
evolution of the project, with competitive salaries. OCamlPro is currently
located in Paris, France. All the developments will be released in
open-source by the Tezos Fundation.

  If you are interested in joining the team and contributing to the
project, contact us as early as possible at with some
motivation hints and a CV.

Release 2.8.3 of Caph, a functional/dataflow language for programming FPGAs


Jocelyn Sérot announced:
It is my pleasure to announce the latest release (2.8.3) of CAPH, a
domain-specific language relying on the dataflow model of computation for
describing and implementing stream-processing applications. CAPH can simulate
dataflow programs, generate cycle-accurate SystemC and synthetizable VHDL code
for implementation on reconfigurable hardware such as FPGAs.

CAPH has a strong functional inspiration : dataflow networks are described using
a purely functional, higher-order formalism and the definition of actor behavior
relies on a pattern matching similar to that used for defining functions in
functional languages. CAPH is also equipped with a rich type system with
sized-integers, booleans, floats, fully polymorphic algebraic data types and
dependent types.

And, of course, CAPH is entirely written in OCaml ;)

Documentation, examples and release (both source code and pre-compiled binary
version for Windows and MacOS) can be found here :

Lwt 3.1.0 – Promises and concurrent programming


Anton Bachin announced:
We are pleased to announce release 3.1.0 of Lwt, the library for
promises and concurrent programming.

Perhaps the greatest single change is the port to Jbuilder by Andrew
Ray. See the full changelog here:

The Lwt core has also been thoroughly refactored and documented.
Although this is intended to make working *on* Lwt easier, it has also
been said that the new comments are very helpful to users working *with*

Some of that material will be moved out into the manual, as the manual
is (re)written.

A major goal of this release cycle was to untangle Lwt, making it easier
for everyone to work on. We are clarifying and documenting all the code.

Lwt has adopted a very open development model. Contributors of all
experience levels are welcome, including OCaml beginners. Maintainers are
happy to provide mentoring, and to learn from fresh perspectives.

As part of this, Lwt has received new contributing documentation:

and we maintain a list of easy starter issues, each thoroughly described
and hyperlinked:

Lwt newcomers have started with these, then moved on to more challenging
issues, or gone on to work on their own projects. We are happy to
support them and see the OCaml community grow!

Lwt has also received a pretty thorough test suite for almost all of the
core library, global improvements to code legibility, documentation
fixes, API improvements, etc. – done, in large part, by new

Everything is subject to discussion and change. Feel free to open your
own issues, ask questions about overall direction, do design work, or
participate in any other way!

And we are always looking for new maintainers. If you feel your mental
health is excessively good, and that you need more stress and terror to
balance out your life, come work with us :) Note: we try to ensure that
fellow maintainers are not the source of stress :)

Join us in Gitter:

Lwt 3.1.0 announces two breaking changes to occur in Lwt 4.0.0:

- The package lwt.simple-top will be removed. We don't believe anyone at
  all is using this.
- Lwt_chan will be removed.

There will be an Lwt 3.2.0 release in the coming months, which will
announce additional breaking changes for 4.0.0, mostly to packaging.

Lwt 3.1.0 changes the layout of the Lwt installation directory in your
OPAM switch. This does not affect the vast majority of users that depend
on Lwt using ocamlfind or Jbuilder. We don't support any other way of
depending on Lwt, so we don't consider this a breaking change. However,
if you run a project that directly depends on specific files in the
installation directory, and you are seriously affected by 3.1.0, please
let us know in this issue:

Happy concurrent programming!

new release of parany (1.0.2): a minimalistic OCaml library to parallelize any kind of computation


Francois BERENGER announced:
There is a new version of parany available in opam: 1.0.2.

I use parany intensively these days and have not seen it crash, so it
might be ready for production use.
My results are equal in the case of a parallel or a sequential run.

Note to potential users: parany doen't try to preserve the order
of the elements it processes in parallel (to maximize performance).
The elements to process must be independent (same thing if you were using

The code is here:

Here are some parallelization performance results on a real use case:
#nprocs med_processing_frequency_5runs(Hz) theoric_max(Hz) efficacy(%)
1 20.1996 20.1996 1.00
2 39.7312 40.3992 0.98
3 52.5495 60.5988 0.87
4 75.1963 80.7984 0.93
5 87.5909 100.9980 0.87
6 107.1065 121.1976 0.88
7 118.8431 141.3972 0.84
8 137.8433 161.5967 0.85
9 148.3669 181.7963 0.82
10 164.9220 201.9959 0.82
11 176.0519 222.1955 0.79
12 192.4726 242.3951 0.79
13 198.2970 262.5947 0.76
14 213.8255 282.7943 0.76
15 224.0193 302.9939 0.74
16 232.4273 323.1935 0.72

In this case, with up to four cores, the parallelization performance
is excellent. Efficacy = 1.0 cannot be reached once nprocs > 1
due to Amdahl's law.

The granularity of the computation in my experiment was ~= 0.05s of
CPU time per element in my input file.
So, I guess you might get similar or even better parallelization performance if
your processing time per element is higher than this.

You can send me a quick email if parany is useful to you.

Happy number crunching,

Merlin 3.0.1 with OCaml 4.05 support


Frédéric Bour announced:
Merlin is an editor-independent tool to ease the developement of programs in
OCaml. It aims at providing features available in modern IDEs such as: "as you
type" error reporting, auto completion, source browsing ("jump to definition"),
extraction of type, ...

Merlin is available on opam and can be installed with `opam install merlin`. It
can also be built from sources, available at .

# What's new

As always you can find a full changelog at , but the highlights are:

- Support for OCaml 4.05.

- A new protocol for editors. It is implemented by the Vim and Emacs modes that
are distributed with Merlin. The old protocol is still supported for existing

# Editor support

*Emacs*, *Vim* and *NeoVim* are directly supported.

*Sublime Text* plugin is contributed by [1].

*Visual Studio Code* extension is contributed by [2].

Multiple contributions are offering *Atom* support.
See [3] for more information.

Thanks to the many contributors (Jochen Bartl, tddsg, Ximin Luo, Jason Staten,
Leo White, Leandro Ostera, Jacob Bass, Xavier Guérin, Yotam Barnoy, Jacques
Pascal Deplaix, David Allsopp, ...). We also thank OCaml Labs and JaneStreet for
their continued support.


Jbuilder design and hacking session on September 9th in Oxford, UK


Gabriel Scherer announced:
Jérémie Dimino, Mark Shinwell and myself are organizing a "jbuilder
design and hacking session" during the day of September 9th
in Oxford, UK -- the day after the OCaml Workshop on September 8th.

Jbuilder is a promising new build system that has already been adopted
by some OCaml projects and attracted external contributors. Now may be
a good time to discuss short- and medium-term design plans for the
tool to guide potential contributors and avoid growing pains in the
future -- helping it serve the needs of as wide a part of the OCaml
ecosystem as reasonable.

In the morning we plan to have high-level discussions on the current
design and what evolutions are important. Ideas coming from other
OCaml tools, or developments benefitting jbuilder and some other
tools, may also be discussed. The afternoon would be more of a hacking
session, along with low-level discussions on the jbuilder codebase
structure and indications for specific new features.

An unfortunate aspect of design discussions is that larger attendance
does not always improve their quality. While the event is open to all,
we would like to ask you to be considerate in deciding to attend in
the morning -- in particular, existing experience with an OCaml build
tool or a ecosystem-wide tool that interacts with build systems
(such as merlin, oasis, odig, topkg...) is preferred. We will do our
best to take notes of the discussion and publish a summary or minutes,
so that any idea or result is open to everyone.
Feel free to come for the hacking in the afternoon.

Further location information will be anounced later on the following webpage:

Static Analysis Tools team at Facebook hiring


Josh Berdine announced:
The Static Analysis Tools team at Facebook is hiring.

We are looking for someone to join the team primarily to work on Infer's
analysis of C++ code. This is an OCaml development role where expertise in the
application domain of C++ compilation/analysis is of primary importance.

To apply, visit .

For more information on Infer, see and .


Software Engineer, Static Analysis

(London, United Kingdom)

Facebook's mission is to give people the power to build community and bring the
world closer together. Through our family of apps and services, we're building a
different kind of company that connects billions of people around the world,
gives them ways to share what matters most to them, and helps bring people
closer together. Whether we're creating new products or helping a small business
expand its reach, people at Facebook are builders at heart. Our global teams are
constantly iterating, solving problems, and working together to empower people
around the world to build community and connect in meaningful ways. Together, we
can help people build stronger communities — we're just getting started.

Facebook’s Static Analysis team is seeking an experienced software engineer with
expertise in C++ and typed functional programming to help build and improve our
analysis tools. You will help design and extend Infer for C++, which is used to
find bugs across all Facebook engineering. Our tools are written in OCaml, part
of the Infer open source static analysis suite, and we use Clang for the Front
End. As a successful candidate, you improve our OCaml/Clang toolchain so we
catch more bugs in C++. Candidates should have C++ language, compiler or
relevant development experience. This is an OCaml role, so demonstrated
experience in typed FP (e.g. OCaml, Haskell) is preferred. We are looking for
someone who loves working at scale, where performance, reliability and
modularity intersect.


	• Proactively develop software to support analyses on C++
	• Lead improvements to underlying OCaml code base
	• Work with engineers to identify improvements to our tools

Minimum Qualifications

	• B.S. or M.S. in Computer Science or related field, or equivalent experience
	• Experience with C++ language specification, semantics or compilation
	• Strong communication skills

Preferred Qualifications

	• M.S. or further study in an language design, functional programming or
    static analysis
	• Experience designing APIs for language tools
	• Experience with typed functional programming (e.g. OCaml, Haskell)
	• Knowledge of C++, Clang or other compiler Front Ends
	• Static analysis knowledge or other formal methods in verification and correctness
	• Knowledge of OCaml or equivalent typed language



Gerd Stolpmann announced:
I just released ocamlnet-4.1.3 which includes fixes so that you can
build it with ocaml-4.05.

Special thanks to Oliver Bandel for reminding me of that.

See the project page for download, documentation, a detailed changelog,
and the mailing list:

The repository has been moved to

From the OCaml discourse

The editor compiled this list:
Here are some links to messages at that may
be of interest to the readers.

- Darren talks about "Osbx 1.0.0 - Implementation of SeqBox in OCaml"
- Runhang Li talks about "graphql 0.1.0"
- Alin Popa talks about "tube 4.1 - Typesafe abstraction on top of Lwt_io
- KC Sivaramakrishnan talks about "A deep dive into Multicore OCaml garbage
- Anil Madhavapeddy talks about "ANN: Major releases of Cohttp, Conduit, Dns,
- Vincent Jacques talks about "JsOfOCairo: share Cairo-based drawing code
  between command-line and web browser"
- Thomas Leonard talks about "Mirage Cap'n Proto RPC library"

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.

- get rid of compare_val in String.concat
- Format: Add functions for printing conditionally on line breaks
- Avoid "internal" deprecation warnings
- Introduce UnixLabels.map_file
- M.(::) syntax and printing exotic lists in the toplevel
- Support 'let open' in class and class type expressions
- switch to safe-string by default
- Private extensible variants
- Remove 50ms delay at exit for programs using systhreads
- String_val: return 'const char *' when -safe-string is globally enabled

Other OCaml News

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

frama-clang 0.0.3, compatible with Frama-C 15 is out. Download ithere.

A New Implementation of Git

Coq 8.6.1 is out

Major Releases of Cohttp, Conduit, DNS and TCP/IP Libraries

OCaml EFL 1.19.0 released and migration to GitHub

OCaml 4.05.0 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