4 ms·
Well, it's always fun to learn a new language, especially one with the 20 year provenance of OCaml! The modularity features that OCaml provides are really key
by avsm 12y ago
Well, it's always fun to learn a new language, especially one with the 20 year provenance of OCaml! The modularity features that OCaml provides are really key to the core of Mirage. I'd suggest starting with:
* OCaml from the very beginning: http://ocaml-book.com/ http://ocaml-book.com/
* Real World OCaml (shameless plug: author). Freely available online: https://realworldocaml.org https://realworldocaml.org
* The OCaml.org website itself: http://ocaml.org/learn/ http://ocaml.org/learn/ (99 problems is really fun).
Mirage does of course offer an FFI to interface with C libraries, although the majority of the hacking efforts are geared towards filling in gaps in the pure OCaml library ecosystem. See the FFI blog post for more on this (you can even bind to C libraries interactively using the `utop` REPL with ctypes): http://openmirage.org/blog/modular-foreign-function-bindings http://openmirage.org/blog/modular-foreign-function-bindings
Mirage is as much about the security and efficiency of using static typing through the OS stack, as it is about exploring the concept of unikernels. There are other efforts more into compatibility with existing applications (like OSv) that you might want to look into for running an existing stack. But I encourage you to experiment with thinking and trying the Mirage style of unikernel assembly, and report back with where it works and the areas where it could improve!
Others have written more eloquently than me about why you should bother learning OCaml:
* Esper: http://tech.esper.com/2014/07/15/why-we-use-ocaml/ http://tech.esper.com/2014/07/15/why-we-use-ocaml/
* Thomas Leonard's Python to OCaml retrospective: http://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-retrospective/ http://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-ret... (Thomas also leads the Mirage ARM port work)
* Yaron Minsky's OCaml for the Masses: http://queue.acm.org/detail.cfm?id=2038036 http://queue.acm.org/detail.cfm?id=2038036
- scardine 12y agoAbout the "Python to OCaml", the result is only 10% faster? Nothing wrong with that but some of the most frequent arguments against Python are related to execution speed, I would expect a bigger difference here.