Previous week Up Next week


Here is the latest Caml Weekly News, for the week of June 03 to 10, 2008.

  1. OCaml NAE release cf-0.10, nx-0.0 and iom-0.4
  2. Ocamlbuild: could help embedding Ocaml code into shared object?
  3. ocamlopt generates binaries with executable stacks

OCaml NAE release cf-0.10, nx-0.0 and iom-0.4


James Woodyatt announced:
My "OCaml Network Application Environment" project is not abandoned. I'm just
not as fast as we would like at producing maintenance releases when the
compiler system changes break my code. Sorry about that. Anyway, I have made
some minor updates and pushed out a new set of release files. Here are the

There's lots more unreleased in CVS, in case anyone wants to go peeking at it.
I've just released the relatively stable stuff.

===== OCaml NAE Core Foundation (cf) library =====

This distribution is the Objective Caml Network Application Environment (NAE)
Core Foundation library, which is a collection of miscellaneous extensions to
the Objective Caml standard library.

Highlighted features include:

- Functional streams and stream processors (extended).
- Functional bootstrapped skew-binomial heap.
- Functional red-black binary tree (associative array).
- Functional sets based on red-black binary tree.
- Functional real-time catenable deque.
- Functional LL(x) parsing using state-exception monad.
- Functional lazy deterministic finite automaton (DFA).
- Functional lexical analyzer (using lazy DFA and monadic parser).
- Functional substring list manipulation (message buffer chains).
- Gregorian calendar date manipulation.
- Standard time manipulation.
- System time in Temps Atomique International (TAI).
- Unicode transcoding.
- Universal resource identifier (URI) manipulation.

===== OCaml NAE Network Extensions (nx) library =====

This distribution is the Objective Caml Network Application Environment (NAE)
"Network Extensions" library, which is a set of low-level interfaces designed
for advanced network programming.

Highlights include...

- Extended socket interface (supports more options, and UDP w/multicast).
- I/O event multiplexing (with

===== OCaml NAE Reactive I/O Monad (iom) library =====

This distribution is the Objective Caml Network Application Environment (NAE)
Reactive I/O Monad library, which implements I/O monad functions designed to
facilitate writing of concurrent, reactive, single-threaded network
application services in a functional style.

Note: see the ISSUES file for a list of open problems in this release.

===== Required Components =====

This library requires the following external components:

- Objective Caml (v3.10.0 or newer)
- Findlib (tested with v1.1.2p1)

Ocamlbuild: could help embedding Ocaml code into shared object?


Matthieu Dubuget asked and Romain Bardou answered:
> I often deliver my work as shared objects (DLL, in fact, because I'm
> stuck with Windows at work).
> I would like to have ocamlbuild take care of this, but I don't know
> exactly how to do it?
> The idea would be to split the work in two separate rules.
> The first rule generates a shared object from the Objective Caml code:
> rule "mloo & cmx* -> native.oo.o"
>     ~dep:"%.mloo"
>     ~prod:"%.native.oo.o"
>     action_for_nativecode
> rule "mloo & cmo* -> byte.oo.o"
>     ~dep:"%.mloo"
>     ~prod:"%.byte.oo.o"
>     action_for_bytecode
> The actions should return commands with A "-output-obj". But I do not
> know how to write them. It would need a mechanism similar to the one
> used for mlpack. For example, one .mloo file listing the ocaml files to
> link into the output object. Dynamic dependencies are to be generated
> from the content of the .mloo file.
> Unfortunately, I have no idea how to write that?
> The second rule would generate a shared object from the .o files.
> Maybe the current clib is enough? I have to add a flag to link
> the runtime engine by adding -lasmrun -lm -ldl (-lm and -ldl being
> deduced from the output of ocaml* -config).
> Am I looking in the right direction?

I know nothing about DLLs and OCaml but if I understand correctly, you need
the following.

1) How to parse a file similar to a .mllib file in a plug-in. There is an
example in the Ocamlfind plug-in on the wiki:

You want to look at the find_packages function.

2) How to generate dynamic dependencies. This is done by calling the second
argument of the function you give to the rule function. This is also explained
in the wiki:

I hope it helps.

ocamlopt generates binaries with executable stacks


Richard Jones announced:
I posted a patch which should fix the issue that ocamlopt generates
binaries with executable stacks:

Previously discussed on the list here:

However this patch affects every assembly target, far more than I
could possibly test.  Could people using OCaml on non-Linux platforms
have a look at the patch, or even test it for me?

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}$'?'<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