On this day in 1996, Xavier Leroy announced Objective Caml 1.00 (the language wasn’t officially called OCaml until 4.00.0 in July 2012). I wouldn’t start using OCaml for another 7 years; I think I may have dropped Research Machines Basic by then and was mucking around with a mix of Visual Basic, Turbo Pascal and Delphi, but I hadn’t yet got an email address either.

For whatever reason, the 1.00 tag deletes the boot images, but they can be taken from the commit before. I could get the runtime to build quite easily on Ubuntu, but alas while it appeared to be able to run boot/ocamllex, boot/ocamlc was just segfaulting. I debated firing up my old dual-Pentium III which apparently had Slackware 10 on it, but I thought I’d give the Windows port a go first!

According to the docs, the Windows compiler used to be bootstrapped with a different set of binary images, but this didn’t actually seem to be necessary, apart from changing 2 backslashes to forward slashes in f70db6e. The sources for the GUI weren’t open, so it’s necessary to disable the graph library in 3262c4 and make some very minor tweaks to the install target in c9ad1c and that was it!

You’ll need an x86 Visual Studio build environment with Cygwin in PATH.

git clone https://github.com/dra27/ocaml.git -b 25-years-of-ocaml ocaml-at-25
cd ocaml-at-25/config
copy s-nt.h s.h
copy m-nt.h m.h
cd ..
nmake -f Makefile.nt world
nmake -f Makefile.nt opt
nmake -f Makefile.nt install
set PATH=C:\ocaml\bin;%PATH%

There are a lot of warnings to ignore, but you should now have a working Objective Caml 1.00!

C:\Birthday>ocaml.exe
Objective Caml version 1.00

#print_endline "Happy 25th Birthday, OCaml!";;
Happy 25th Birthday, OCaml!
- : unit = ()
##quit;;

and the native compiler should work too:

let rec hip_hip n =
  if n > 0 then
    let () = print_endline "hip hip! hooray!" in
    hip_hip (pred n)

let () = hip_hip 25
C:\Birthday>ocamlopt -o hooray.exe hooray.ml

C:\Birthday>hooray
hip hip! hooray!
...

Here’s to the next 25 years!