About 10 years ago I wrote this 100-line compiler for fun:

 

https://groups.google.com/forum/#!msg/fa.caml/i6IgSFX8XkY/4khF8z1V7loJ

 

I thought it would be cool to bring it back from the dead but I quickly got stuck. I now have Opam, OCaml 4.03 and LLVM 4.0 installed on an Ubuntu box and (I assume) running.

 

The first problem I hit is how I am supposed to build such things these days. I tried to look it up on the developer tools page:

 

https://ocaml.org/learn/tutorials/dev_tools.html

 

But I immediately hit a bug on that page: The “under construction” gif isn’t properly animated. It should look like this, of course:

 

https://camo.githubusercontent.com/4a7cf94aedbd23c13cc2d75fdc3b2af5c816c208/687474703a2f2f7374617469632e646967672e636f6d2f7374617469632f696d616765732f6469676765722e676966

 

After the GIF I must say I found type is text data matches file from the section on Plumbimg really useful.

 

Someone should really add an obituary for the author of the “Compilation tools” section who sadly passed away before completing it. I leafed through the section headings there, noted that Oasis is inspired by Cabal and quickly crossed it off my list and decided to go with “ocamlbuild” instead.

 

If I do:

 

ocamlbuild miniml.byte

 

Then I get an error about my parser. I’m guessing this is because I used an inline parser courtesy of camlp4 (or camlp5, I forget which) which has been replaced with PPX which, I’m guessing, cannot do this. If so, what is the easiest way to get this code running and how should I be building it?

 

Cheers,

Jon.