1
<!--#include virtual="doctype" -->
5
<TITLE>Frequently asked Questions about Caml</TITLE>
8
<BODY BGCOLOR="#FFFFFF">
10
<H1 ALIGN=CENTER><IMG SRC="JoeCaml.gif" ALT=""> Caml program examples</H1>
12
<P>This directory contains some examples of Objective Caml programs.
14
<P>The examples can either be compiled and executed as standalone
15
programs (just type <CODE>make</CODE> in the subdirectory), if speed
16
is important you can use the optimizing compiler by typing
17
<CODE>make opt</CODE>, or else run interactively the examples under
18
<CODE>ocaml</CODE>, by executing
24
in the appropriate directory. (The graphics programs must
25
be run under a specialized interactive system, <CODE>ocamlgraph</CODE>
26
that you can create using <CODE>ocamlmktop -custom -o ocamlgraph
29
<P>Examples marked (*) are taken from the book ``Le langage Caml'', by
30
Pierre Weis and Xavier Leroy (InterEditions, 1993 && 1999). Messages and
31
identifiers may be in French and may contain accented letters (ISO 8859-1
32
encoding). You'll need an 8-bit clean system to read them.<BR>
34
Examples marked (G) assume installed the portable graphics library
35
(as found in the <CODE>otherlib/graph</CODE> directory of the
36
Objective Caml distribution).
38
<H2 ALIGN=LEFT>One file programs</H2>
43
A set of simple, basic, and slightly advanced programs.
44
See the <A HREF="basics/eng.html">eng.html</A> file.
45
Contains also the three all-time favorites: Fibonacci,
46
Eratosthene's sieve, and the Unix <CODE>wc</CODE> utility.
49
The "color wheel" (color space in HSV coordinates).
50
Needs at least 256 colors to look good.
53
Explore a family of flashy curves. (Use spir on a color screen
54
and spir-bw on a black and white screen.)
57
Graphic animation of sorting algorithms.
60
Animated towers of Hanoi. Uses lists and strings.
63
A (English-speaking) clone of Eliza.
66
A (French-speaking) clone of Eliza.
67
If you can translate this
68
program in any other language than english, please contact
73
<H2 ALIGN=LEFT>Graphical User Interface</H2>
77
<LI><A HREF="camltk/eng.html">camltk</A>: (*) <BR>
78
A set of programs to learn using the Caml/Tk graphical user
79
interface (GUI). From simple �hello world� programs to an
80
advanced tetris game. Some examples are from the book ``Le
81
langage Caml'', by Pierre Weis and Xavier Leroy
82
(InterEditions, 1999). See the <A
83
HREF="camltk/eng.html">eng.html</A> file in the directory.
86
<H2 ALIGN=LEFT>Modular programs</H2>
88
<P>Those programs are in the corresponding directories. They are
89
complete independant applications that have a Makefile to handle
90
their recompilation. Those examples can be quite involved.
95
This is a simple desk calculator that illustrates the use of camllex
99
An assembler and simulator for a RISC processor.
102
Regular expressions and automata.
104
<LI>compress: (*)<BR>
105
File compression and decompression (Huffman).
107
<LI>demonstr: (*)<BR>
110
<LI>minicaml: (*)<BR>
111
An interpreter and typechecker for a subset of Caml.
114
This is the implementation of A Small Language, as described in
115
part 3 of ``Functional Programming using Caml Light'', by
118
<LI>minilogo: (*) (G)<BR>
119
An interpreter for a small language with turtle graphics.
122
An interpreter and compiler for a subset of Pascal.
123
The compiler generates code for the <CODE>picomach</CODE> program.
126
The Knuth-Bendix completion procedure for rewriting systems.
127
Taken from some course notes by Gerard Huet.
132
The <CODE>config</CODE> directory does not contain examples, but configuration
133
files used to generate the Makefiles.
135
<!--#include virtual="basdepage-eng.html" -->