English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-25 (00:17)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] questions
On Tue, Mar 24, 2009 at 01:42:40PM -0600, John Prince wrote:
> 1) Is there something comparable to RSpec (i.e., behavior driven
> development)?  A recommendation on which testing module to use?

Possibly ounit?  To be honest test-driven development is more useful
with dynamic languages, because the compilers for those languages pick
up so few errors.  In OCaml the compiler is much more thorough, and by
the time your program "passes" the compiler, it's bug free!  (Well,
that's the theory anyhow :-)

> 2) Is there something like 'ri' in ocaml?  (commandline access to basic
> documentation)

I usually use this low-tech but very effective solution:

  cd $(ocamlc -where)
  less <module>.mli

One catch is that the first letter in <module> is lowercase, whereas
module names themselves start with an uppercase letter.
eg: unix.mli vs Unix

> 3) Is there consensus on the best/fastest xml parser?

There are certainly several to choose from :-)

> 4) What kind of YAML support is there?  I've seen an ad-hoc writeup to read
> in JSON in an ocaml program, but I'm much more familiar with YAML.

ocaml-syck (not used it).  For JSON use json-wheel and/or json-static.
I've recently become a fan of s-expressions because it's ridiculously
easy to write s-expressions from any other language and then import
those directly into OCaml data structures.  (See the sexplib library /
syntax extension).  I have been "liberating" a lot of data from Python
programs this way.


> Where is the message archive located?  Is it searchable?

Google ...

> Can someone point me to the best resource(s) for newbies?  I have been
> reading through what's out there, but its always nice to get a
> recommendation.

You should definitely join the ocaml_beginners mailing list.

INRIA have beginners' resources here:


I maintain this site, along with dozens of external contributors:
Scroll down for plenty of external links ...


Richard Jones
Red Hat