Hacker News new | ask | show | jobs
by melling 3875 days ago
What part of the tooling has improved recently? Is there a particular IDE that's now better to use, for example?
2 comments

The IDE situation is now excellent (thanks to merlin[1]) and OPAM, the OCaml Package Manager, is the best package manager I have ever used.

The remaining pain point, as far as tooling goes, is the debugging situation, but steady progress has been made and it should receive very large improvements in the next OCaml version or so.

[1]: https://github.com/the-lambda-church/merlin

Well, I'm not sure I would go as far as "excellent". There is no "OCAML IDE", there is vim/emacs + tools. You can hack an IDE-like workflow by way of inotify, but if you want the "works-out-the-box" experience, that's not going to happen. As you mention, debugging is lacking, and more generally Merlin can't do much in the way of refactoring.

If you're fine with, eg, hacking Python in VIM, you'll be pleasantly surprised by the OCAML situation. If you live in an integrated IDE, there will be some adaptation.

With respect to opam: is it usable under windows yet?
Not in a released version, but there's very active work in trunk to make it work natively:

  https://github.com/ocaml/opam/compare/master...dra27:windows-build
A recent demo I saw a few weeks ago had everything running under Cygwin and building native Windows executables...
Kind of. It's a bit awkward to get it running on Windows, but somehow (by accident) I managed to do a fully functioning installation on Cygwin. That said, many of the packages have still not been ported to Windows, so my recommendation is to set up a headless VM of some GNU/Linux distro and SSH into it.
Now you have a very smooth ocaml worklow:

- you create and manage the build of your project with Oasis which call ocamlbuild nicely

- Opam works great with ocamlfind to manage the dependencies and the toolchain you use

- OUnit has backgroud workers for parallel testing

- Merlin and ocamlc annotations do wonders in term of semantic completion

- utop is an excellent toplevel with colors, completion and integration with ocamlfind so that you can load dependencies inside

All these technologies have greatly improved in the past 2 years, which is a really short span compared to the age of Ocaml.