It’s my pleasure to announce new releases for down and omod which provide a nice ocaml toplevel user experience upgrade. Simply add to your .ocamlinit:
These are mainly maintenance releases but if you ever thought that down was a bit slow when pasting code, it now (well for almost two years…) implements bracketed pastes. Thanks to @emillon for the reference.
For example as far as I know there’s nothing like omod (load libraries by mentioning the module you want to use rather the rembering the library name where it resides) in utop. But IIRC you can use omod with utop, at least there some detection here.
The completion in down is likely too primitive for a heavy toplevel user (it relies on ocp-index and doesn’t understand opens) but it makes the bare ocaml toplevel usable (in a slightly better way than rlwrap would), especially if you care about a clean environment – utop setups a bunch of system things which makes it difficult to interactively test some system code. The exact impact of down on ocaml’s environment is described here, basically a signal handler for SIGWINCH and set raw mode on stdin when it prompts you.
So I would rather say that it makes ocaml usable rather than being an alternative to utop.
This would be a nop on unices and do the magic on Windows ? I guess that would benefit quite a few tools out there starting with the compiler’s own colorful error messages and/or opam.
I think a first step is to have the compiler use the VT mode to emit colors under the native console cmd.exe as well (maybe replacing the special Cygwin logic along the way). Once that is working, we could then think about ways to expose this to users (it is always a bit complicated to argue for non-POSIX features in the standard library).