Home

Awesome

IOCaml logo

Build Status

IOCaml Server

IOCaml is an OCaml kernel for the IPython notebook. This provides a REPL within a web browser with a nice user interface including markdown based comments/documentation, mathjax formula and the possibility of generating all manner of HTML based output media from your code.

See also

This repository hosts the iocaml-server package.

This project replaces all the Python code with an OCaml webserver based on cohttp.

Usage

$ iocaml [options] [path or file]

If started with a path then the dashboard interface will be started which lists notebooks in the given directory.

If a .ipynb file is given then the notebook will be loaded.

By default iocaml-kernel is run. To run a JavaScript kernel use:

$ iocaml -js <kernel> [...]

where <kernel> may currently be either:

It is very useful with the JavaScript kernels to also serve some part of the filesystem. For example:

$ iocaml -js min -serve /home/andyman/.opam 

This would allow files from the .opam directory to be read from the toplevel.

Multiple -serve options can be specified and they are tested in order until a file is found.

The js_of_ocaml psuedo file system has been setup so you can use the standard file I/O facilities to access served files (read only at the moment, write support is a future possibliity).