Previous week Up Next week


Here is the latest Caml Weekly News, for the week of 10 to 17 May, 2005.

  1. Erlang like Ocaml?
  2. pftdbns 0.2.4
  3. More on SOAP
  4. indexy script 0.8

Erlang like Ocaml?


Michael Wohlwend asked and David Teller answered:
> Allthough I don't like the dynamic (typing) nature of Erlang, it's pretty easy 
> to develop distributed applications/servers/state-machines with it.
> Are there some libs (or syntax-extensions) for ocaml which make the 
> development of such applications similar easy with ocaml?

Try JoCaml or Acute.

pftdbns 0.2.4


Oliver Bandel announced:
I have to announce version 0.2.4 of pftdbns,
a tool which is useful in sorting/listing/moving files.

It's name "pftdbns" is a short hand for "put files to directories (sorted) by name structure".

It takes filenames, maps each char of the filename into a char, representing
the charclass of it (a..z and A..Z -> "l" (letter), 0...9 -> "i" (integer" and so on)).

This yields to an easy way of sorting files by names, based upon file-naming
with certain filenaming-conventions.

So, for example  "hello.txt" and "ballo.txt" are part of the same name structure,
as well as "1001.txt" and "8251.txt" but also "8251.jpg" are of the same name
structure. For example "foobar.tex" and "foobar.txt" are equally structured too.

The default behaviour is to move files into directories. The names of the directories
are choosen from the string, which represents the name structure by default.

Since version 0.2.2 the default-behaviour of moving files can be changed
to only list the lilenames/namestructrues (and not moving them).


  -dp directory name-prefix
  -fd fixed directory name
  -ld function selection: only list filenames and directory name;
                           do not move files
  -la function selection: only list (list all): "all" means filename,
                           namestructure and directory name;
                           do not move files

I hope you enjoy this program, and I think if you have to handle a lot
of files, this will be very helpful.

You can find the tool here: 

There also is a README in this directory, so that you can read more details.

A description can also be found here: 

pftdbns uses the GPL-license.

Best Regards,
     Oliver Bandel
P.S.: Also have changed internal datastructures from pair to record, but for you as
      user this might only be marginally interesting.

More on SOAP


Richard Jones announced:
I've written a very trivial SOAP client in pure OCaml.  I'm interested
in what people think about the approach I've used.

Instead of parsing WSDL, what I'm doing is allowing you to define the
interface as a familiar .mli file, as in the example below:

type campaign = {
  dailyBudget : int;
  id : int;
  name : string;

val hello : string -> string
val goodbye : string -> string
val concat : string -> string -> string
val show : campaign -> unit

The .mli file is then parsed using camlp4 macros and converted into
stub functions.  These can be called, and generate real SOAP calls to
the remote SOAP server.

I have a very early, experimental package for people to play with.
This tarball contains a Perl server (based on SOAP::Lite) and the
OCaml client.

It requires PXP, ocamlnet, equeue and PCRE.

Any type of feedback is very welcome.
Richard Jones then announced:
There's an updated proof-of-concept here.  This version can actually
send _and receive_ a limited range of data types from a Perl server.
Richard Jones announced again:
And the latest version, predictably called:

indexy script 0.8

Mike Hamburg announced:
Thanks for all the help with OCamlNet all that while ago!  With this help, I
have written an alpha of a web-indexing script using FastCGI and OCaml.  The
script supports file icons, thumbnailing with ImageMagick, piles, multiple icon
sizes, multiple sorts, and cookies for user preferences.

The script uses templates (in the templates folder) to skin the output; the
"icon", "list" and "piled-list" views are simple
examples of those templates.  You can download the source at

I haven't packaged it yet, so you'll have to edit to set
things like your web directory location.  The icons are Apple icons, so
redistributing them is probably illegal; I'll replace them with KDE icons
or something in the final version.

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