4 ms·
Unix System Programming in OCaml
- iskander 15y agoThe 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.
- stonemetal 15y agoIt would appear that they do. http://ocaml.janestreet.com/?q=node/80 http://ocaml.janestreet.com/?q=node/80
- sausagefeet 15y agoThey do. Yaron has stated a few times that Ocaml is their go-to language in almost all cases unless it really cannot be used.
- danieldk 15y agoIt 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=virt-top.git;a=summary http://git.annexia.org/?p=guestfs-browser.git;a=summary http://git.annexia.org/?p=guestfs-browser.git;a=summary
- rwmj 15y agoI'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/ http://libguestfs.org/
- wazoox 15y agoSide note: the original french version is here : http://cristal.inria.fr/~remy/poly/system/camlunix/index.html http://cristal.inria.fr/~remy/poly/system/camlunix/index.htm...
- Xurinos 15y agoFor 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 http://only.mawhrin.net/~alexey/sysprogsml.pdf
- swannodette 15y agoI've been learning SML via this book, http://www.amazon.com/Elements-ML-Programming-ML97-2nd/dp/0137903871 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.
- gaius 15y agoAlso see: http://www.amazon.co.uk/ML-Working-Programmer-Larry-Paulson/dp/052156543X/ref=sr_1_1?ie=UTF8&qid=1305928550&sr=8-1 http://www.amazon.co.uk/ML-Working-Programmer-Larry-Paulson/...
- jemfinch 15y agoI 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.
- swannodette 15y agoI 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.