Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] questions

6 views
Skip to first unread message

John Prince

unread,
Mar 24, 2009, 3:42:50 PM3/24/09
to caml...@yquem.inria.fr
I'm new to ocaml and coming (most recently) from ruby, so I was wondering if
there are equivalents to some of the things that I find handy in ruby:

1) Is there something comparable to RSpec (i.e., behavior driven
development)? A recommendation on which testing module to use?

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

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

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.

Where is the message archive located? Is it searchable?

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.

Thanks,
John

Jon Harrop

unread,
Mar 24, 2009, 4:38:25 PM3/24/09
to caml...@yquem.inria.fr

I'll answer the questions that I can...

On Tuesday 24 March 2009 19:42:40 John Prince wrote:
> I'm new to ocaml and coming (most recently) from ruby, so I was wondering
> if there are equivalents to some of the things that I find handy in ruby:

You may find the OCaml Beginners mailing list hosted by Yahoo to be more
productive for simple questions.

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

I highly recommend ocamlbrowser but it is not CLI.

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

I use XML-Light whenever it can handle it (it supports only a small part of
XML but is very easy to use) and PXP otherwise. You might also check out the
well-reputed Expat bindings but I have not tried them.

> Where is the message archive located?

For this list, here:

http://caml.inria.fr/pub/ml-archives/caml-list/index.en.html

> Is it searchable?

Google indexes it well.

> Can someone point me to the best resource(s) for newbies?

Start at the community OCaml tutorial wiki and search the links therein.

http://www.ocaml-tutorial.org/

There is some interesting propaganda here:

http://www.ffconsultancy.com/ocaml/benefits/

> I have been reading through what's out there, but its always nice to get a
> recommendation.

Two beginners books are my own "OCaml for Scientists" and Tim Rentsch's "The
Objective CAML Programming Language". Hopefully Jason Hickey's book will be
published this year.

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Richard Jones

unread,
Mar 24, 2009, 8:17:22 PM3/24/09
to John Prince, caml...@yquem.inria.fr
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.

http://ocaml-syck.sourceforge.net/
http://martin.jambon.free.fr/json-wheel.html
http://www.ocaml.info/home/ocaml_sources.html#sexplib310

> 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:

http://caml.inria.fr/resources/index.en.html

I maintain this site, along with dozens of external contributors:
http://www.ocaml-tutorial.org/
Scroll down for plenty of external links ...

Rich.

--
Richard Jones
Red Hat

Michael Ekstrand

unread,
Mar 24, 2009, 8:25:35 PM3/24/09
to caml...@inria.fr
John Prince <john....@colorado.edu> writes:
> 1) Is there something comparable to RSpec (i.e., behavior driven
> development)? A recommendation on which testing module to use?

I have found OUnit to be fairly natural. I haven't used it much, but it
was easy to pick up having had some exposure to JUnit, py.test, and a
Lisp test framework or two.

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

I've quite enjoyed Xmlm. It is an event-based pull parser, where you
set up an event stream and then ask it for each event in turn. By far
the easiest XML parsing paradigm I've used (short of tree querying
systems such as XPath or LINQ); pattern matching over events results in
simpler code than the inversion-of-control usage in a SAX or expat
parser.

- Michael

--
mouse, n: A device for pointing at the xterm in which you want to type.
Confused by the strange files? I cryptographically sign my messages.
For more information see <http://www.elehack.net/resources/gpg>.

Daniel Bünzli

unread,
Mar 24, 2009, 9:12:09 PM3/24/09
to OCaml List

Le 25 mars 09 à 01:17, Richard Jones a écrit :

>> 3) Is there consensus on the best/fastest xml parser?
>
> There are certainly several to choose from :-)

If you intend to parse real (in the sense not under your own editing
control) xml documents the choice shrinks down drastically.

For pure caml solutions I'll suggest you either pxp or xmlm but I'm
biaised.

In any case you'll find a list of alternatives here [1]

Best,

Daniel

[1] http://caml.inria.fr/cgi-bin/hump.fr.cgi?sort=0&browse=49

David Rajchenbach-Teller

unread,
Mar 25, 2009, 1:44:52 AM3/25/09
to John Prince, caml...@yquem.inria.fr
On Tue, 2009-03-24 at 13:42 -0600, John Prince wrote:
> 2) Is there something like 'ri' in ocaml? (commandline access to
> basic documentation)

There's nothing out-of-the-box.
In OCaml Batteries Included, you can use #man.
So
#man "print";;
will open your web browser with the documentation of "print".

Cheers,
David


--
David Teller-Rajchenbach
Security of Distributed Systems
http://www.univ-orleans.fr/lifo/Members/David.Teller
« Ce matin Un crétin A tué un chercheur. » (air connu)
Latest News of French Research: System being liquidated. Researchers angry.

John Prince

unread,
Mar 25, 2009, 1:16:56 PM3/25/09
to caml...@yquem.inria.fr
Thanks for all the helpful responses! They are greatly appreciated.

--John

xah lee

unread,
Mar 27, 2009, 6:14:30 PM3/27/09
to John Prince, caml...@yquem.inria.fr
2009/3/24 John Prince <john....@colorado.edu>

> I'm new to ocaml and coming (most recently) from ruby,

...


> 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.
>

I also started learning OCaml this year. Here's my personal experience and
recommendations on tutorial that are freely available:

Begin with 20 min reading at Wikipedia to get some context of the lang as
perceived by programers in general:
http://en.wikipedia.org/wiki/Ocaml

The following are quality material, that you can get hands on experience as
a intro, each worth about 8 hours of study:

• Ocaml for Scientists, by Jon Harrop, chapter 1 free:
http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html

• “Introduction to Caml” by Scott Smith of Johns Hopkins U. A lecture note.
http://www.cs.jhu.edu/~scott/pl/lectures/caml-intro.html

The above 2 are similar. Once you did the above, you might want a full
length tutorial, treating major aspects of the lang in some detail. Here's 2
i found available:

• Developing Applications With Objective Caml, By Emmanuel Chailloux -
Pascal Manoury - Bruno Pagano at:
http://caml.inria.fr/pub/docs/oreilly-book/html/index.html

• Introduction to Objective Caml, by Jason Hickey, 2008. (draft)
http://www.cs.caltech.edu/courses/cs134/cs134b/book.pdf

Currently, i'm still reading chapter 2 of the Emmanuel book.
Started to read Jason too. (i like concurrently reading multiple references)

I also started to write my own. Expect it to be in some usable form in a
year. It is written for practical programers, and those from so-called
“scripting” lang background (e.g. php, perl, python, javascript,
Mathematica, newlisp, tcl, ruby), and with the view point that prog langs
are primarily syntax (i.e. a computatable math notation.).

• OCaml Basics
http://xahlee.org/ocaml/ocaml_basics.html

---------------------------------------

the following are the most visible ocaml tutorials, but are low quality,
blog like, full of misleading characterizations, irrevelancies, misleading
comparisons. The type that you'd spend hours on and got more confused,
regardless whether you are a expert logician or expert industrial programer.
These tutorial's quality and nature are similar to the ones you'd find of
the freely bundled official tutorials from perl, java, or even haskell.
Typically written as a revised diary of learning experiences by student
programers, or by academicians who are llliterate in technical writing.

• intro to ocaml, from official site
http://caml.inria.fr/pub/docs/manual-ocaml/manual003.html

• “Objective CAML Tutorial”, most cited tutorial on the web
http://www.ocaml-tutorial.org/

There are 3 or so more ocaml tutorials i've looked on the web, from the
first page of google search with word “ocaml tutorial”. I don't think they
are not worth your time.

-------------------------

I'd be good if the ocaml managers perhaps thru some arrangement, to borrow
Jon Harrop's chapter 1, or other quality sources, in replacement of the
tutorial on the official site. Because, a quailty tutorial bundled with the
official release has great impact. The official tutorial makes the first
impression of the lang for most people.

Xah
http://xahlee.org/


Kuba Ober

unread,
Mar 31, 2009, 9:37:16 AM3/31/09
to caml...@yquem.inria.fr

There must be some reason why the manual and other materials on the
official site are of such poor quality. I've thought a bit about it,
and the only reason I see is that the authors do not have a feel for
what it takes to learn/understand/use that language. They obviously
know it all through, but that's still far removed from being able to
explain it to someone else. I don't know, of course, how it is that
one understands something "well" yet is not able to explain it to
somebody else. To me, that's very fragile knowledge. I always thought
that deep understanding implies an ability to extract what's
important, and to lead the other person from some "basics" (whatever
they may be) to the conclusion. Some experience in imperative
languages can be perhaps expected of the OCaml beginners. But the
manual, the official tutorial, and even ocaml-tutorial, fall short of
being really useful - for me. Personally, I found them next to
useless, but that perhaps has to do with my own shortcomings.

Books that lag behind the current release's features are not all that
great either -- you find a book that's a good match to your needs, and
then, after a while, find that you miss on a lot of good stuff that's
not mentioned in the book. I have two examples of such books: Jon's
book, and Marcelo DiPierro's web2py book. Both are very good books
because the authors have a feel for what it takes to understand what
they talk about. Yet both miss out on some newer features of OCaml and
web2py, respectively -- features that would be best explained by the
very same authors!

Cheers, Kuba

Martin Jambon

unread,
Mar 31, 2009, 10:47:28 AM3/31/09
to Kuba Ober, caml...@yquem.inria.fr
Kuba Ober wrote:
> There must be some reason why the manual and other materials on the
> official site are of such poor quality. I've thought a bit about it, and
> the only reason I see is that the authors do not have a feel for what it
> takes to learn/understand/use that language. They obviously know it all
> through, but that's still far removed from being able to explain it to
> someone else. I don't know, of course, how it is that one understands
> something "well" yet is not able to explain it to somebody else. To me,
> that's very fragile knowledge. I always thought that deep understanding
> implies an ability to extract what's important, and to lead the other
> person from some "basics" (whatever they may be) to the conclusion.

I can see one reason: like many other French OCaml programmers, I learned
OCaml at school (it was in 1998). French teachers don't rely heavily on a
book. There is however one book that covers the essentials, "Le Langage Caml"
by Weis and Leroy, which despite using the Caml Light dialect is the most
enlightening programming book I've ever got to read. For the rest, there is
the reference manual of OCaml and plenty of source code all around the web.

I think that's why there is not much more incentive to write a complete
"replace-the-teacher" text book on OCaml written by the core OCaml developers,
who are mostly a French team. Besides, it's a lot of work and doesn't make money.

Of course there are now a few great books and tutorials on OCaml in English,
none of them having an official status.


Martin

--
http://mjambon.com/

Xavier Leroy

unread,
Mar 31, 2009, 12:31:55 PM3/31/09
to Kuba Ober, caml...@yquem.inria.fr
> There must be some reason why the manual and other materials on the
> official site are of such poor quality. I've thought a bit about it, and
> the only reason I see is that the authors do not have a feel for what it
> takes to learn/understand/use that language. They obviously know it all
> through, but that's still far removed from being able to explain it to
> someone else. I don't know, of course, how it is that one understands
> something "well" yet is not able to explain it to somebody else. To me,
> that's very fragile knowledge.

Because we are autistic morons who lack your rock-solid knowledge, if
I properly catch your (rather insulting) drift?

At the very least, you're confusing "to be able" with "to intend to".
The "tutorial" part of the OCaml reference manual was a quick job
targeted at readers who already know functional programming and just
want a quick overview of what's standard and what's different in
OCaml. Maybe that shouldn't be titled "tutorial" at all.

Teaching functional programming in OCaml to beginners is a rather
different job, for which they are plenty of good books already. Most
of them happen to be in French for various reasons: O'Reilly's refusal
to publish the English translation of the Chailloux-Manoury-Pagano
book; the Hickey-Rentsch controversy, etc. But, yes, some talented
teachers invested huge amounts of time in writing good intro to Caml
programming books. Don't brush their efforts aside.

One last word to you, that Xah Lee troll, and anyone else on this
list: if you're not happy with the existing material, write something
better. Everyone will thank you and you'll get to better appreciate
the difficulty of the task.

- Xavier Leroy

Jon Harrop

unread,
Mar 31, 2009, 5:12:40 PM3/31/09
to caml...@yquem.inria.fr
On Tuesday 31 March 2009 14:37:05 Kuba Ober wrote:
> There must be some reason why the manual and other materials on the
> official site are of such poor quality.

FWIW, I think the OCaml manual is superb and under-appreciated.

> Jon's
> book, and Marcelo DiPierro's web2py book. Both are very good books
> because the authors have a feel for what it takes to understand what
> they talk about. Yet both miss out on some newer features of OCaml and
> web2py, respectively -- features that would be best explained by the
> very same authors!

My work is driven by profit, of course, and I believe it is substantially more
profitable to publish new books on related fringe topics where there is
little or no competition (e.g. F#, Scala, Clojure) rather than write a second
edition of an existing book like OCaml for Scientists.

I am currently writing another F# book but only because we do not publish one
yet. After that, I'll probably turn to another language but that may very
well be HLVM if I can develop it quickly enough...

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e

_______________________________________________

Mihamina Rakotomandimby (R12y)

unread,
Apr 1, 2009, 9:00:13 AM4/1/09
to caml...@yquem.inria.fr
FALCON Gilles RD-RESA-LAN wrote:
> I totally agree that it would be pleasant to have more documentation on
> Ocaml, especially if you don't have ocaml lesson.

Yes and No.
The problem can be felt in PHP, where you see "anyone" witing "anything".
So, yes, there should be more documents on Ocaml, but the problem is: Only
inexperienced users have time to write down some "learning notes".
The real Gurus are all overbooked...

It's also my wish to see some documentation, but on the other hand, I dont
want it to fall into PHP fashion. Great dilemma...

--
Chef de projet chez Vectoris
Phone: +261 33 11 207 36
System: xUbuntu 8.10 with almost all from package install
http://www.google.com/search?q=mihamina+rakotomandimby

Xavier Leroy

unread,
Apr 1, 2009, 9:13:13 AM4/1/09
to gilles...@orange-ftgroup.com, caml...@yquem.inria.fr
> I saw Xavier Leroy teach caml at the CNAM in france, and he know how
> to teach.

Just for the record: I never lectured at CNAM, but probably you're
thinking of Pierre Weis, who taught a great "programming in Caml"
course there for several year. That course was the main starting
point for our book "Le langage Caml".

Regards,

Till Varoquaux

unread,
Apr 1, 2009, 9:42:21 AM4/1/09
to Xavier Leroy, caml...@yquem.inria.fr
Well his praise still applies: I did take a course in which Xavier
Leroy taught and it was crystal clear. I was also very impressed by
Didier Remy who came only once.
It also helps that the core O'caml is based on ml which uses a very
clear and regular semantic.

Till

Thomas Gazagnaire

unread,
Apr 1, 2009, 9:49:56 AM4/1/09
to Martin Jambon, caml...@yquem.inria.fr
I have also learned ocaml with "Le Langage Caml" and I really enjoyed this
book (it was one of the first book on language programming that I rode).
It might a be a good idea to update the content of this book and to
translate it into ocaml/english :-)

Thomas

2009/3/31 Martin Jambon <martin...@ens-lyon.org>

xah...@gmail.com

unread,
Apr 1, 2009, 11:17:42 AM4/1/09
to Xavier Leroy, Kuba Ober, caml...@yquem.inria.fr
Hi Xavier Leroy,

On Mar 31, 2009 9:31am, Xavier Leroy <Xavier...@inria.fr> wrote:
> One last word to you, that Xah Lee troll, and anyone else on this
> list: if you're not happy with the existing material, write something
> better. Everyone will thank you and you'll get to better appreciate
> the difficulty of the task.

although there are several good tutorials, but i think it is important that
the bundled official tutorial should be one that is good. By “good” here, i
mean, it gives a simple overview of the syntax, and a simple overview, such
as how to do arithmetic, basic types, if then else, true false issues, a
couple example of most used data types such as list and n-tuple and
records, how to define a function, how to call a library.

Jon's, and Scott's tutorial are both in this format and i think is very
suitable:

• Ocaml for Scientists, by Jon Harrop, chapter 1 free:
http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html

• “Introduction to Caml” by Scott Smith of Johns Hopkins U. A lecture note.
http://www.cs.jhu.edu/~scott/pl/lectures/caml-intro.html

I only started learning OCaml, but my current notes at:
http://xahlee.org/ocaml/ocaml_basics.html

is also in this format. I don't know if Jon'd be willing to lend his
chapter 1 to be the official bundled tutorial. (would you Jon?) My guess is
that Scott would easily offer his too. (No implication that anyone should
offer this, of course.)

If any official ocaml people wishes, feel free to start with mine as the
bundled tutorial. I'm sure with minor editing by you experts, it would be
very suitable.

I'm often wrong. (^_^); But i think a simple, example based, very brief,
tutorial, using concrete code examples, such as the above ones, with a
slight emphasize on syntax (so first timers gets a sense of what exactly to
type), would be a great first introduction. It'd helpful to imperative
programers as well as functional programers experienced with other
functional langs. If this is bundled and sanctioned with the official
manual, it'd open up ocaml to many people who otherwise may not have had
time to search for the right tutorial. (i hope)

Xah
http://xahlee.org/


Kuba Ober

unread,
Apr 1, 2009, 12:34:52 PM4/1/09
to gilles...@orange-ftgroup.com, caml...@yquem.inria.fr
> Hi,
>
> When M. Ober say the official material is of poor quality. i am
> French and really surprise.

> I saw Xavier Leroy teach caml at the CNAM in france, and he know how
> to teach.
> The official document is not an ocaml curse, that's right. (The
> inria is not pay for that )

I have given recently one example of how the information about a
simple topic -- lists -- is
rather arbitrarily split up and distributed across different portions
of the manual. It seems
that same could be said of almost any other randomly chosen basic
topic (arrays, types, pattern
matching, etc). I don't think that's how you write good manuals, but
that's merely my opinion, and
the only way I can explain it better is to give examples of what I
consider good manuals, which I did
in the post I mentioned.

> I totally agree that it would be pleasant to have more documentation
> on Ocaml, especially if you don't have ocaml lesson.

Having or not having OCaml lessons is pretty much irrelevant here.
Your assumption here is, perhaps,
that you remember everything you are taught. When you're an occasional
user, like I am, I constantly
forget, and that amplifies any shortcomings in the manual, as I have
to deal with them repeatedly.
Of course I then write down some notes, and look there first, but this
does not affect the manual.
There are many similar ways things can be done in ML-like languages.
Understanding of the
underlying methodology is one thing, but OCaml is a concrete
implementation and if I forget a way
some particular thing is done, it doesn't help much that I have
general knowledge of that thing. I still
must look it up :)

> The reader are a little like you M. Ober, they like good quality and
> when a book is not as good as they like, they have the same reaction
> as you.
> I am disappointed because it is not the better encouragement.
> Different views and usages of the language seems to me better than
> too few.

Encouragement to whom? I'm trying to discuss facts, if that's so
bothersome then I can't really help it.
My motive is not to offend anyone nor to diminish the excellent work
otherwise done by the OCaml team.
I'm trying to understand why the manual is so bad -- that's all. I
know the realities of life, and that
sometimes things cannot be done perfectly even if one so wishes -- I
went down that road many times.
That's just how it is, I know. What I didn't expect is the religious
fervor of the replies -- it's an interesting
thing to observe and learn about!

Cheers, Kuba

Kuba Ober

unread,
Apr 1, 2009, 12:45:23 PM4/1/09
to caml...@yquem.inria.fr
On Apr 1, 2009, at 8:59 AM, Mihamina Rakotomandimby (R12y) wrote:

> FALCON Gilles RD-RESA-LAN wrote:
>> I totally agree that it would be pleasant to have more
>> documentation on Ocaml, especially if you don't have ocaml lesson.
>
> Yes and No.
> The problem can be felt in PHP, where you see "anyone" witing
> "anything".
> So, yes, there should be more documents on Ocaml, but the problem
> is: Only
> inexperienced users have time to write down some "learning notes".
> The real Gurus are all overbooked...
>
> It's also my wish to see some documentation, but on the other hand,
> I dont
> want it to fall into PHP fashion. Great dilemma...

I generally agree, although the guru term is perhaps overused. I
figure people do
what they find enjoyable -- if someone who's very good at OCaml simply
doesn't
enjoy explaining it in the form of a manual or whatnot, there's no
helping that, and
it's surely understandable!

Cheers, Kuba

David MENTRE

unread,
Apr 1, 2009, 3:13:51 PM4/1/09
to Martin Jambon, caml...@yquem.inria.fr
Hello,

On Tue, Mar 31, 2009 at 16:44, Martin Jambon <martin...@ens-lyon.org> wrote:
> There is however one book that covers the essentials, "Le Langage Caml"
> by Weis and Leroy, which despite using the Caml Light dialect is the most
> enlightening programming book I've ever got to read.

I heartily agree. It's ability to show you how to make a grep or a
simple compiler in a few pages of OCaml and explanations is really an
enlightenment. Probably one of the best computer book I ever read.

Unfortunately, this book is out of print and hard to find.

Yours,
d.

Jon Harrop

unread,
Apr 1, 2009, 3:21:20 PM4/1/09
to caml...@yquem.inria.fr
On Wednesday 01 April 2009 20:13:41 David MENTRE wrote:
> Unfortunately, this book is out of print and hard to find.

Incidentally, if anyone out there is still sitting on such a (good) book I'd
be interested in publishing it for them. The result won't be as cheap as an
O'Reilly because our overheads are higher but at least it would actually get
published. Alternatively, I can tell anyone exactly what they'd need to get
started self-publishing and they could do it themselves.

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e

_______________________________________________

Matthieu Wipliez

unread,
Apr 1, 2009, 4:23:18 PM4/1/09
to caml...@yquem.inria.fr

Isn't the book written in French? (I mean "Le langage Caml"...).
It could be nice to translate it in English, at least to have a larger base of readers, and adapt the examples from Caml Light to Objective Caml (I don't know how much the syntaxes differ though)

just my two cents,

Cheers
Matthieu

----- Message d'origine ----
> De : Jon Harrop <j...@ffconsultancy.com>
> À : caml...@yquem.inria.fr
> Envoyé le : Mercredi, 1 Avril 2009, 21h27mn 25s
> Objet : Re: [Caml-list] questions

David MENTRE

unread,
Apr 2, 2009, 3:20:46 AM4/2/09
to Matthieu Wipliez, caml...@yquem.inria.fr
Hello,

On Wed, Apr 1, 2009 at 22:23, Matthieu Wipliez <mwip...@yahoo.fr> wrote:
> Isn't the book written in French? (I mean "Le langage Caml"...).

Yes.

> It could be nice to translate it in English, at least to have a larger base of readers, and adapt the examples from Caml Light to Objective Caml (I don't know how much the syntaxes differ though)

The syntax is very close for the subset of Caml used in the book.

However, judging from the lack of availability of this book even in
French, there might an issue in the agreement between the authors
(Leroy & Weis) and the publisher. I'm suspecting the authors are
unable to re-publish the book elsewhere.

Yours,
david

Xavier Leroy

unread,
Apr 2, 2009, 4:07:02 AM4/2/09
to David MENTRE, caml...@yquem.inria.fr
>> It could be nice to translate it in English, at least to have a
>> larger base of readers, and adapt the examples from Caml Light to
>> Objective Caml (I don't know how much the syntaxes differ though)
>
> The syntax is very close for the subset of Caml used in the book.

Right. Parts of the standard library changed, though.

> However, judging from the lack of availability of this book even in
> French, there might an issue in the agreement between the authors
> (Leroy & Weis) and the publisher. I'm suspecting the authors are
> unable to re-publish the book elsewhere.

The publisher (Dunod) holds all rights except for an English
translation (Pierre Weis and I reserved those rights). There is a
procedure to ask the publisher to relinquish its rights if it decides
not to print the book again, but that procedure can take up to 1 year (!).

All in all, I'm not sure it's worth the effort to resurrect this old
text, but if a group of motivated volunteers arise, let's discuss it
privately.

- Xavier Leroy

Alp Mestan

unread,
Apr 2, 2009, 4:23:19 AM4/2/09
to Xavier Leroy, caml...@yquem.inria.fr
On Thu, Apr 2, 2009 at 10:06 AM, Xavier Leroy <Xavier...@inria.fr> wrote:

> It could be nice to translate it in English, at least to have a
>>> larger base of readers, and adapt the examples from Caml Light to
>>> Objective Caml (I don't know how much the syntaxes differ though)
>>>
>>
>> The syntax is very close for the subset of Caml used in the book.
>>
>
> Right. Parts of the standard library changed, though.
>
> However, judging from the lack of availability of this book even in
>> French, there might an issue in the agreement between the authors
>> (Leroy & Weis) and the publisher. I'm suspecting the authors are
>> unable to re-publish the book elsewhere.
>>
>
> The publisher (Dunod) holds all rights except for an English
> translation (Pierre Weis and I reserved those rights). There is a
> procedure to ask the publisher to relinquish its rights if it decides
> not to print the book again, but that procedure can take up to 1 year (!).
>
> All in all, I'm not sure it's worth the effort to resurrect this old
> text, but if a group of motivated volunteers arise, let's discuss it
> privately.
>
> - Xavier Leroy
>

I think it would be a better effort to start a new work, even if harder.
OCaml's has known some evolutions, there are many key projects (Extlib,
Core, Batteries, ...) so it would be nice to throw most of today's OCaml in
an entirely new book. Moreover, there wouldn't be any problem with the
publisher of LLC.

But for such a project there would be the need for a great team of very
motivated people.

Ed Keith

unread,
Apr 2, 2009, 8:41:10 AM4/2/09
to Xavier Leroy, caml...@yquem.inria.fr, Alp Mestan

--- On Thu, 4/2/09, Alp Mestan <a...@mestan.fr> wrote:

> I think it would be a better effort to start a new work, even if harder.
> OCaml's has known some evolutions, there are many key projects (Extlib, > Core, Batteries, ...) so it would be nice to throw most of today's OCaml > in an entirely new book. Moreover, there wouldn't be any problem with
> the publisher of LLC.
>
>
> But for such a project there would be the need for a great team of very > motivated people.

First let me say that while I have been a professional programmer for over twenty years, have used many languages, and have have been playing with ocaml for several years, I am no expert on ocaml (the only language I claim to be expert in is C++). Nor do I have much experience writing, and, like many Americans, I am monolingual.

Having said that, I currently have some free time time and would be willing to offer my assistance to this project. It would give me the opportunity to hone my writing and ocaml skills, and I believe as an experienced professional programmer (I have worked in government, military, finance, medicine, aviation, and research) and ocaml newbie I could bring a useful perspective to the project.

I hope I can be of service,

-EdK

Ed Keith
e_...@yahoo.com

Blog: edkeith.blogspot.com

Jon Harrop

unread,
Apr 2, 2009, 9:31:23 AM4/2/09
to caml...@yquem.inria.fr
On Thursday 02 April 2009 13:41:01 Ed Keith wrote:
> Having said that, I currently have some free time time and would be willing
> to offer my assistance to this project. It would give me the opportunity to
> hone my writing and ocaml skills, and I believe as an experienced
> professional programmer (I have worked in government, military, finance,
> medicine, aviation, and research) and ocaml newbie I could bring a useful
> perspective to the project.
>
> I hope I can be of service,

I think the existing books cover the core parts of the language well so there
is no need for further work in that area but I would like to see books
covering the following topics:

Batteries (!).

Libraries, e.g. LablGTK.

Post 3.10 camlp4.

Other tools, e.g. menhir, dpygen, bitstrings, micmatch.

There are also some areas where I think today's OCaml software could be
improved:

Automatic FFI stub JIT compilation using LLVM.

OpenGL 3 bindings.

GUI libraries.

IDEs (probably depends upon GUI libraries).

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e

_______________________________________________

Alp Mestan

unread,
Apr 2, 2009, 9:40:46 AM4/2/09
to Jon Harrop, caml...@yquem.inria.fr
Indeed, as I said above, a book on "today's OCaml" should cover a wide
variety of topics (syntax extensions with camlp4/5, general purpose
libraries, specific libraries like ocamlnet, GTK+ and OpenGL binding, etc).
To write such a book, there would be the need for many authors with time and
knowledge to produce a good learning and practice material for OCaml !

I think many of us would enjoy writing some paragraphs for such a project...
But would there be enough people to achieve the writing of an entire (and
good) book ?

On Thu, Apr 2, 2009 at 3:37 PM, Jon Harrop <j...@ffconsultancy.com> wrote:

> On Thursday 02 April 2009 13:41:01 Ed Keith wrote:
> > Having said that, I currently have some free time time and would be
> willing
> > to offer my assistance to this project. It would give me the opportunity
> to
> > hone my writing and ocaml skills, and I believe as an experienced
> > professional programmer (I have worked in government, military, finance,
> > medicine, aviation, and research) and ocaml newbie I could bring a useful
> > perspective to the project.
> >
> > I hope I can be of service,
>
> I think the existing books cover the core parts of the language well so
> there
> is no need for further work in that area but I would like to see books
> covering the following topics:
>

> . Batteries (!).
>
> . Libraries, e.g. LablGTK.
>
> . Post 3.10 camlp4.
>
> . Other tools, e.g. menhir, dpygen, bitstrings, micmatch.


>
> There are also some areas where I think today's OCaml software could be
> improved:
>

> . Automatic FFI stub JIT compilation using LLVM.
>
> . OpenGL 3 bindings.
>
> . GUI libraries.
>
> . IDEs (probably depends upon GUI libraries).


>
> --
> Dr Jon Harrop, Flying Frog Consultancy Ltd.
> http://www.ffconsultancy.com/?e
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

--
Alp Mestan
In charge of the C++ section on Developpez.com.

Damien Guichard

unread,
Apr 2, 2009, 1:20:06 PM4/2/09
to caml...@yquem.inria.fr

It's far more than just about human ressources.

What you describe is some sort of "OCaml Bible".
First you have to decide what book you want.
If you do an OCaml Bible then probably some beginners will lack an introductory text.
If you do an introductory text then probably more experienced people will lack a reference book.

As i remember it Le Langage Caml was largely about compilation techniques.
That's yet another choice:
* do you want to introduce OCaml where it shines best, as an rewriting tool ?
* or do you want to be more general and application-agnostic ?

Certainly at some point you have to speak about semantic, so :
* do you want to be practical and omit the boring theory ?
* or do you want to speak about lambda-calculus, type inference and value restriction ?

Do you want a full exposure of the module language ?
Or just the bits that allow usage of the standard modules ?
Do you want to present advanced usage of polymorphic variants ?
Or do you want to just point the right articles and let the reader perfect its knowledge ?

Certainly you also want to discuss different programming styles.
Moreover it's much better, especially for library designers, if you introduce some functional niceties
(maps, folds, continuations, lazyness, monads...).

That's many conflicting questions.

The reason why you overlook them is because you greatly overestimate the importance of libraries.
Even from the library point of view, it's better if the langage comes first, it encourages a much more elaborated design.

-- damien

Damien Guichard
2009-04-02

En réponse au message
de : Alp Mestan
du : 2009-04-02 15:40:45
À : Jon Harrop; caml...@yquem.inria.fr
CC :
Sujet : Re: [Caml-list] Re: LLC book [was: Questions]

Indeed, as I said above, a book on "today's OCaml" should cover a wide variety of topics (syntax extensions with camlp4/5, general purpose libraries, specific libraries like ocamlnet, GTK+ and OpenGL binding, etc). To write such a book, there would be the need for many authors with time and knowledge to produce a good learning and practice material for OCaml !

I think many of us would enjoy writing some paragraphs for such a project... But would there be enough people to achieve the writing of an entire (and good) book ?

--

Richard Jones

unread,
Apr 2, 2009, 2:01:39 PM4/2/09
to Jon Harrop, caml...@yquem.inria.fr
On Thu, Apr 02, 2009 at 02:37:28PM +0100, Jon Harrop wrote:
> . Post 3.10 camlp4.

This one is really crying out for a book or some sort of good
reference ...

Rich.

--
Richard Jones
Red Hat

Richard Jones

unread,
Apr 2, 2009, 2:08:37 PM4/2/09
to caml...@inria.fr
On Thu, Apr 02, 2009 at 03:40:33PM +0200, Alp Mestan wrote:
> I think many of us would enjoy writing some paragraphs for such a project...
> But would there be enough people to achieve the writing of an entire (and
> good) book ?

Once you get into the realm of having lots of authors writing an
"OCaml Bible" there's going to be so little money in it that either
none of them get paid, or the book will cost a huge amount of money
(or both). Scientific works through traditional publishers are a bit
like that, if my father's experience editing a journal is anything to
go by.

So you might want to think about an alternate method of authorship,
such as a version-controlled, shared document, that allows
contributions and comes under a Free license of some sort.

If people still want an actual book, at the end of the day they can
take the electronic document to lulu.com and get it printed.

BTW, a lot of the content on ocaml-tutorial.org is public domain, if
that proves useful (check with the individual authors though).

Rich.

--
Richard Jones
Red Hat

_______________________________________________

Joel Reymont

unread,
Apr 2, 2009, 2:21:25 PM4/2/09
to Richard Jones, caml...@inria.fr

On Apr 2, 2009, at 7:08 PM, Richard Jones wrote:

> So you might want to think about an alternate method of authorship,
> such as a version-controlled, shared document, that allows
> contributions and comes under a Free license of some sort.

Like the Django Book!

http://www.djangobook.com/

---
Mac hacker with a performance bent
http://linkedin.com/in/joelreymont

Richard Jones

unread,
Apr 2, 2009, 2:39:46 PM4/2/09
to caml...@inria.fr

It doesn't take a huge amount to set this up (encouraging people to
write the words is quite another matter).

Source control: http://git.ocamlcore.org/ - check

Decide on a format: http://en.wikipedia.org/wiki/DocBook - check

License: http://creativecommons.org/ CC-BY-SA - check

Mailing list for editorial review of submissions:
http://ocamlcore.org/ - check

Outline and subject areas:
- Introduction to the language
- Language core
- Libraries
- Camlp4
- ...

Decide who will be in charge of each area ...

Rich.

--
Richard Jones
Red Hat

_______________________________________________

Alp Mestan

unread,
Apr 2, 2009, 2:51:30 PM4/2/09
to Richard Jones, caml...@yquem.inria.fr
On Thu, Apr 2, 2009 at 8:39 PM, Richard Jones <ri...@annexia.org> wrote:

>
> It doesn't take a huge amount to set this up (encouraging people to
> write the words is quite another matter).
>
> Source control: http://git.ocamlcore.org/ - check
>
> Decide on a format: http://en.wikipedia.org/wiki/DocBook - check
>
> License: http://creativecommons.org/ CC-BY-SA - check
>
> Mailing list for editorial review of submissions:
> http://ocamlcore.org/ - check
>
> Outline and subject areas:
> - Introduction to the language
> - Language core
> - Libraries
> - Camlp4
> - ...
>
> Decide who will be in charge of each area ...
>

And even more important, who would like to participate to this project ? ;-)

--
Alp Mestan

Daniel de Kok

unread,
Apr 3, 2009, 2:18:10 AM4/3/09
to caml...@inria.fr
On Thu, Apr 2, 2009 at 8:39 PM, Richard Jones <ri...@annexia.org> wrote:
> Decide on a format: http://en.wikipedia.org/wiki/DocBook - check

I have written one open source book, and participated in another, and
DocBook was always a barrier of entrance for most potential
contributors. These days I'd rather go for something like the asciidoc
format, which can also be converted to DocBook. Having DocBook as an
intermediate format is very handy, because it is so easy to customize
XHTML and XSL-FO output with XSLT.

Take care,
Daniel

Daniel de Kok

unread,
Apr 3, 2009, 6:22:09 AM4/3/09
to caml...@yquem.inria.fr
On Thu, Apr 2, 2009 at 8:39 PM, Richard Jones <ri...@annexia.org> wrote:
> Decide on a format: http://en.wikipedia.org/wiki/DocBook - check

I have written one open source book, and participated in another, and


DocBook was always a barrier of entrance for most potential
contributors. These days I'd rather go for something like the asciidoc
format, which can also be converted to DocBook. Having DocBook as an
intermediate format is very handy, because it is so easy to customize
XHTML and XSL-FO output with XSLT.

Take care,
Daniel

_______________________________________________

Kuba Ober

unread,
Apr 4, 2009, 1:17:23 PM4/4/09
to caml...@yquem.inria.fr
> Isn't the book written in French? (I mean "Le langage Caml"...).
> It could be nice to translate it in English, at least to have a
> larger base of readers, and adapt the examples from Caml Light to
> Objective Caml (I don't know how much the syntaxes differ though)

It's perhaps a good way to lean French -- reading about something that
interests you. One can easily get amazed as to how many french words
or stems found their way into English :)

Cheers, Kuba

0 new messages