note: There seems to have been a WordPress bug. For some reason, the extended release notes on OCaml Batteries Included were replaced by something quite unrelated. My apologies for this.

Dear programmers, I am happy to inform you that the second alpha release of OCaml Batteries Included has landed. You may now download it from the Forge. A GODI package is also available and a Debian package should follow soon (you should be able to find the old one here) and you can read the documentation on-line.

So, what’s new in this release?

Documentation

All the quirks, bugs and erroneous links which plagued the documentation of Alpha 1 should now be gone.

Documentation has been extended, with more explanations regarding the use of Input/Output, more explanations on common functions of Pervasives, etc.

The top-level now has a on-line help feature. You should try it, it’s nice.

New examples, including an 8-liner gzip.

Toolchain

The top-level now works.

We now have a custom version of ocaml, ocamlc, ocamlopt and ocamlcp. To invoke them, use ocamlfind. For instance, for the new top-level, invoke ocamlfind batteries/ocaml . This should make your life simpler if you don’t use OCamlBuild.

Fundamentals

Improved Input/Output. In particular, inputs and outputs may now be garbage-collected, automatically closed by higher-order functions, closed manually, closed by their dependencies, or closed automatically when program stops. Speed of key I/O operations was also largely improved.

We now have a set of standard combinators for function composition. You won’t need anymore to redefine your |>, <|, etc.

Numerous improvements to Unicode, including improved type-safety, Unicode characters on par with Latin-1 characters, etc.

We are now very close to being completely rid of legacy channel_in and channel_out , in favor of the more abstract, more composable, safer and more feature-rich IO. In particular, the Unix module and the Standard module are now completely rid of these pesky channels.

Utilities

We now have transparent on-the-fly gzip compression/decompression — more formats are coming.

A nice little parser combinator library has been added. It works with either Latin-1, Unicode or custom tokens.

An OCaml program may now open a web browser to display a URI. In the future, this will be extended to opening arbitrary files with system-specific tools.

Appearance of a foreach loop (which is actually nothing more than Enum.iter , but we don’t have to tell that to beginners).

Boilerplate

Most data structures now support serialization to/deserialization from S-Expressions.

Most data structures now support printing to arbitrary outputs.

What now?

Well, now, we’d appreciate if you could download and install this library. We’d appreciate if you could test your programs against it. And we’d appreciate if you could file bug reports and request for features.

What’s next ?

We’re already at work on the next version.

Here’s an overview of what you can expect in the relatively near future:

Re-designed, simpler, module hierarchy (by the way, if you have suggestions, please drop us a line).

More syntax extensions, including the long-awaited finally.

Exception-less error management in addition to exceptions.

More on-the-fly (de)compression formats.

Further documentation.

Bindings for Camlp4.

Unicode transcoding I/O.

Further examples.

In-memory (de)compression.

File and directory management.

Shell programming.

Pattern-matching on lazy lists.

List (and other data structures) comprehension.

Compatibility with OCaml 3.11.