Hacker News new | comments | ask | show | jobs | submit login
Unix System Programming in OCaml (ocamlcore.org)
83 points by swannodette on May 20, 2011 | hide | past | web | favorite | 11 comments



It may be interesting to note that Red Hat's Richard Jones wrote some nice system utilities in OCaml, such as virt-top and guestfs-browser:

http://git.annexia.org/?p=virt-top.git;a=summary

http://git.annexia.org/?p=guestfs-browser.git;a=summary


I'll upvote that one :-)

Also we wrote a whole lot of the "behind the scenes" code for libguestfs in OCaml as well. You won't "see it" necessarily because what it does is to generate hundreds of thousands of lines of boilerplate C code.

http://libguestfs.org/


For those like me who internally struggle on which is the preferable language to study in depth (OCaml or SML), here is a practical source for SML:

http://only.mawhrin.net/~alexey/sysprogsml.pdf


I've been learning SML via this book, http://www.amazon.com/Elements-ML-Programming-ML97-2nd/dp/01...

Quite good and filled with the kind of exercises that help the language really sink in. Also the OS X installation process for SML/NJ has recently become quite simple.

One big difference between OCaml and SML is that ocamlopt makes it dead simple to create executables for a wide variety of platforms, and that is not so easy w/ SML/NJ.



I find SML a much "prettier" language than OCaml, but OCaml is much more widely used and maintained; SML seems to be largely a dead language now.


I still think SML is worthy of study - it's a great introduction to functional programming with an advanced type system w/o the additional complexity that laziness and monads bring to Haskell.


The few times I've made small utilities in OCaml have proven satisfying (quick to code up, correct once I made it past the type checker). I wonder if the Jane Street folks ever use OCaml in the places people usually stick python or shell scripts.


It would appear that they do. http://ocaml.janestreet.com/?q=node/80


They do. Yaron has stated a few times that Ocaml is their go-to language in almost all cases unless it really cannot be used.


Side note: the original french version is here : http://cristal.inria.fr/~remy/poly/system/camlunix/index.htm...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: