Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of April 08 to 15, 2014.

  1. index2share 0.5.72
  2. Ocsigen Js_of_ocaml 2.0
  3. Other OCaml News

index2share 0.5.72


Nicolas Boulay announced:
I'd like to announce the release of index2share 0.5.72 which is
available on github.

home page :
Annonce in french :

This is a command line tools to manage copy ans share of bunch of large
files, even in different external disks. The main idea is to manipulate
small index file, instead of the big ones.

I hope this could be usefull to somebody.

Ocsigen Js_of_ocaml 2.0


Jérôme Vouillon announced:
We are happy to announce release 2.0 of Js_of_ocaml, the compiler from
OCaml bytecode to JavaScript.

A lot of efforts has been put in reducing the size of the generated
JavaScript code. Much shorter variable names are used; unnecessary
whitespaces and semicolons are omitted; multiple occurrences of a same
constant are shared... The runtime is minified as well. You can expect
a space reduction of 15% to 20%.

Recursive modules are now supported. Tail calls between mutually
recursive functions are optimized (using trampolines). In particular,
lexers produced by ocamllex are now properly optimized.

The runtime now simulates a small filesystem (in memory), which makes
it possible to use the OCaml I/O functions. The standard outputs are
by default redirected to the JavaScript console, which is convenient
for debugging.

A larger part of the OCaml libraries are supported: bigarrays, the
time-related functions of the Unix library.

A number of incompatible changes have been made. In particular:
- JavaScript numbers are simply given type 'float' rather than type
  'float Js.t';
- the compiler generates "strict mode" JavaScript; therefore,
  'Js.Unsafe.variable "this"' does not refer to the JavaScript
  global object ("window" in browsers) anymore; you can use
  '' instead;
- runtime primitives are now wrapped together with the generated code
  in a huge function so as not to pollute the global scope.


Project home page
Get source code    git clone
Jacques-Pascal Deplaix then added:
Note also that this release includes an ocamlbuild plugin which can be
used with ocaml >= 4.01.

You can now build your javascript program with the following "steps":
 $ ls
 $ cat
Ocamlbuild_plugin.dispatch Ocamlbuild_js_of_ocaml.dispatcher;;
 $ ocamlbuild -plugin-tags js_of_ocaml.ocamlbuild yourprogram.js

Then yourprogram.js can be found in the _build directory

The full Changelog is available here:
Jacques-Pascal Deplaix later corrected:
Oups, the working command line for ocamlbuild is rather this one:
 $ ocamlbuild -use-ocamlfind -plugin-tags "package(eliom.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

Representing pattern-matching with GADTs:

Ocsigen Js_of_ocaml 2.0:

Inlined records in constructors:

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