Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
OCaml sync tool for Rex organizer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-10-16 (06:24)
From: Francisco Reyes <fran@r...>
Subject: Seeking pratical tutorial or examples.
I have looked at the caml site, the hump and all I links I could
find from the main site.
So far the manuals/tutorials I have seen did not "quick start"
my development intentions.

I am looking for a pratical tutorial or some simple beginner
examples. After days of reading the manuals I am yet to be able
to write even a simple program. Even when I skip sections on the
manuals they still don't offer anything beyond Syntax.

Isn't there a code snippet/samples page?

What I have tried so far are the intro on the Ocaml Manual,  the
"Functional Programming using Caml light" and "One hundred lines
of Caml".

Comments on the 3 sources I mentioned above:
** Ocaml Manual: The intro is not bad, except that for those of
us coming from languages without a built in interactive system
we may not be as interested to start with that. Why? because
although great for learning it is of not much use unless we just
want to try simple things. It also falls short of giving enough
info to get one started.

I think the following order may be more benefitial to someone
coming from languages such as C/pascal.
-Start by having something which shows a compiled program and a
few basic statements (i.e. ask for name and then print hello

-Cover data types and show the functions to read them and
display them. No fancy explanation about "channels" just give
examples using print functions and whatever is used to read info
into a variable.

-Loops and branching: "for" and "if"

-Cover functions

-Basic file I/O

-String handling

-More advanced data structures/types: arrays, user defined data
types, lists.

-The interactive system

And of course on all those steps start showing the user the way
things are written in Ocaml and how things are called in it.

** Functional Programming using Caml Light
I am up to chapter 5 and I am yet to dream of how to actually
write a complete program. Even after I jumped chapters ahead to
chapter 9, Basic I/O, there are one line descriptions or trivial
use of the fucntions, but I didn't even see a simple brief
program to show all elements together. The document almost seems
like reference material, except that it is too
descriptive/narrative to be that.

** One Hundred lines of Ocaml: This is enough to give a "taste"
of the language, but far from been enough to start hacking.

Have a missed a kinder/gentler tutorial somewhere?
Somewhere on the caml site I saw a mention about a series of
examples that come with the compiler. The FreeBSD port I got
didn't have them and I was unable to find them on the web site

Moderator of the Corporate BSD list