Previous week Up Next week


Here is the latest Caml Weekly News, for the week of 13 to 20 July, 2004.

  1. ocaml-advocacy group
  2. Objective Caml release 3.08
  3. CeCILL and Caml
  4. OCaml-Mingw-Maxi
  5. Camomile 0.5.3
  6. Jones' GC book up to date wrt Caml ?
  7. lablGL, LablGTK1, LablGTK2 combined release
  8. OCamlIDL?

ocaml-advocacy group

Richard Jones announced:

This group is for "anything goes" discussion, advocacy and arguments
about the Objective CAML (OCaml) programming language.

Relevant subjects for discussion are the continued growth of OCaml,
the marketing and business of OCaml, licenses, features, problems,

[In other words, stuff which is off-topic on caml-list]

Objective Caml release 3.08

Xavier Leroy announced:
Objective Caml version 3.08 -- the "Bastille day" release -- is now
available from

A detailed list of changes since 3.07 is appended below.  Some of
these changes, marked with a "*" below, can break existing programs
that relied on undefined or non-portable behaviour.  Please keep them
in mind while recompiling your programs.


- Xavier Leroy, for the Objective Caml team.

Objective Caml 3.08:

Language features:
- Support for immediate objects, i.e. objects defined without going
  through a class.  (Syntax is "object <fields and methods> end".)

- When typing record construction and record patterns, can omit
  the module qualification on all labels except one.  I.e.
  { M.l1 = ...; l2 = ... } is interpreted as { M.l1 = ...; M.l2 = ... }

Both compilers:
- More compact compilation of classes.
- Much more efficient handling of class definitions inside functors
  or local modules.
- Simpler representation for method tables. Objects can now be marshaled
  between identical programs with the flag Marshal.Closures.
- Improved error messages for objects and variants.
- Improved printing of inferred module signatures (toplevel and ocamlc -i).
  Recursion between type, class, class type and module definitions is now
  correctly printed.
- The -pack option now accepts compiled interfaces (.cmi files) in addition
  to compiled implementations (.cmo or .cmx).
* A compile-time error is signaled if an integer literal exceeds the
  range of representable integers.
- Fixed code generation error for "module rec" definitions.
- The combination of options -c -o sets the name of the generated
  .cmi / .cmo / .cmx files.

Bytecode compiler:
- Option -output-obj is now compatible with Dynlink and
  with embedded toplevels.

Native-code compiler:
- Division and modulus by zero correctly raise exception Division_by_zero
  (instead of causing a hardware trap).
- Improved compilation time for the register allocation phase.
- The float constant -0.0 was incorrectly treated as +0.0 on some processors.
- AMD64: fixed bugs in asm glue code for GC invocation and exception raising
  from C.
- IA64: fixed incorrect code generated for "expr mod 1".
- PowerPC: minor performance tweaks for the G4 and G5 processors.

Standard library:
* Revised handling of NaN floats in polymorphic comparisons.
  The polymorphic boolean-valued comparisons (=, <, >, etc) now treat
  NaN as uncomparable, as specified by the IEEE standard.
  The 3-valued comparison (compare) treats NaN as equal to itself
  and smaller than all other floats.  As a consequence, x == y
  no longer implies x = y but still implies compare x y = 0.
* String-to-integer conversions now fail if the result overflows
  the range of integers representable in the result type.
* All array and string access functions now raise
  Invalid_argument("index out of bounds") when a bounds check fails.
  In earlier releases, different exceptions were raised
  in bytecode and native-code.
- Module Buffer: new functions Buffer.sub, Buffer.nth
- Module Int32: new functions Int32.bits_of_float, Int32.float_of_bits.
- Module Map: new functions is_empty, compare, equal.
- Module Set: new function split.
* Module Gc: in-order finalisation, new function finalise_release.

Other libraries:
- The Num library: complete reimplementation of the C/asm lowest
  layer to work around potential licensing problems.
  Improved speed on the PowerPC and AMD64 architectures.
- The Graphics library: improved event handling under MS Windows.
- The Str library: fixed bug in "split" functions with nullable regexps.
- The Unix library:
   . Added Unix.single_write.
   . Added support for IPv6.
   . Bug fixes in Unix.closedir.
   . Allow thread switching on Unix.lockf.

Runtime System:
* Name space depollution: all global C identifiers are now prefixed
  with "caml" to avoid name clashes with other libraries.  This
  includes the "external" primitives of the standard runtime.

- Windows ports: many improvements in the OCamlWin toplevel application
  (history, save inputs to file, etc).  Contributed by Christopher A. Watford.
- Native-code compilation supported for HPPA/Linux. Contributed by Guy Martin.
- Removed support for MacOS9.  Mac OS 9 is obsolete and the port was not
  updated since 3.05.
- Removed ocamlopt support for HPPA/Nextstep and Power/AIX.

- #line directives in the input file are now accepted.
- Added character set concatenation operator "cset1 # cset2".

- #line directives in the input file are now accepted.

* Support for new-style locations (line numbers, not just character numbers).
- See camlp4/CHANGES and camlp4/ICHANGES for more info.
Skaller asked and Xavier Leroy answered:
> Dumb question .. sorry .. I use CVS and switched as advised
> to the 3.08 tag. Should I continue to use CVS this way
> (the tag is sticky, right?) My intent is to use the latest
> and greatest (and posssibly bugged) CVS version.

In this case, you can switch back to the "trunk" (the development branch)
by running "cvs update -A".  Presently, the trunk is identical to the
3.08 release, but development should resume soon.

Users who would rather use CVS to track bug fixes but not (possibly
buggy) new developments should stay on the "release_308" branch for a

CeCILL and Caml

Benjamin Geer asked and Xavier Leroy answered:
> I was delighted to see INRIA participating in the development of new
> free-software licences adapted to French law.[1]  Does INRIA have any
> plans yet to use any of these licences for Caml?

The first (and currently only) such license is a GPL-style
"contaminating" license, so it's not what we want for Caml.
The press release mentions other licenses in the work with different
flavours, so we'll see when they are ready.

Moreover, we need these licenses to be recognized as open-source by
Debian and other authorities before even considering to use them.
Some of the initial reactions to the press release suggest that this
might not be obvious.


Christoph Bauer announced:
The problems are fixed. A new package (Lablgtk-20040304)
is added (including the native code version and the gtk-dlls).

Camomile 0.5.3

Yamagata Yoriyuki announced:
Camomile 0.5.3 is released.  Changes are

* Able to compile under OCaml 3.08
* CaseMap module
  - casefolding : Remove case difference from the text.
  - compare_caseless : string comparison ignoring the cases of characters.
* UTF16, UCS4 - improved performance



Jones' GC book up to date wrt Caml ?

Diego Olivier Fernandez Pons asked and Xavier Leroy answered:
> After the thread on "slow arithmetics" of Caml, I have bought Richard
> Jones' book on Garbage collection. It was first printed in 1996 and
> reprinted in 1997, 1999, 2000, 2003 and 2004. It seems to have been
> slightly revised a few times.
> It mentions on chapter 8 "Doliguez-Leroy-Gonthier's replicating
> collector" (1993, 1994) for Concurrent Caml Light. I was wondering if
> it was up to date and if not where could I find more information on
> caml's garbage collector to complete my readings.

There is some material on Damien Doligez's page:

The GC used in OCaml is an incremental (non-concurrent) variant of the
DLG concurrent collector.  The differences are described in Damien's
PhD thesis, section 7.4 (available from the Web page above).

lablGL, LablGTK1, LablGTK2 combined release

Jacques Garrigue announced:
I am glad to announce the release of

     lablGL version 1.01
     LablGTK version 1.2.7
     LablGTK version 2.4.0

All these libraries are available in both source and win32 binary
versions from

(Binary versions support bytecode only, and work with both MSVC and
mingw versions of Objective Caml 3.08)

lablGL 1.01:
  * merged Jon Harrop's tesselator support
  * a few bug fixes

LablGTK 1.2.7:
  This is just a maintenance release. LablGTK1 seems stable enough now.
  Includes support for openGL and glade (GUI designer).

LablGTK 2.4.0:
  This is the second release of LablGTK2.
  * subsumes LablGTK1 (but not quite compatible)
  * support for exotic charsets
  * improved text and tree widgets
  * gtk-2.4 widgets added: file chooser, etc...
  * many new libraries are supported: gnome canvas, librsvg, gnomepanel
  * lots of other changes and improvements

* lablGL: Jacques Garrigue, Isaac Trotts, Christophe Raffali, Erick Trizelaar
* LablGTK: Jacques Garrigue, Jun Furuse, Benjamin Monate, Olivier Andrieu

(If you got these files before reading this mail, then it may be a
good idea to refetch them, as some were updated.)


Corey O'Connor asked and Xavier Leroy answered:
> This is probably a stupid question, but were is OCamlIDL and it's
> documentation?

> It sounds like OCamlIDL will generate the ml/mli code and
> C stub interfaces for C headers so I don't have to, or do I just have the
> wrong idea?

That's almost the idea: it does generate the stub code and ml/mli
interfaces, but from an "IDL description" of the C code to be
interfaced.  The IDL description looks like a C header file with
additional annotations.  Depending on the C code in question, the
annotations can either be straightforward or quite hard to figure out...

Using folding to read the cwn in vim 6+

Here is a quick trick to help you read this CWN if you are viewing it using vim (version 6 or greater).

:set foldmethod=expr
:set foldexpr=getline(v:lnum)=~'^=\\{78}$'?'&lt;1':1

If you know of a better way, please let me know.

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