4 ms·
I try and read/comment on all of the OCaml articles that surface here. I've been learning the language for a few months now and I'm having a blast! I'm hoping w
by rubiquity 11y ago
I try and read/comment on all of the OCaml articles that surface here. I've been learning the language for a few months now and I'm having a blast! I'm hoping we can carve out a niche in the infrastructure space for OCaml. It's a really approachable language for the ML family! I hope it grows.
Here's a couple of books I'm enjoying so far:
Think OCaml/How To Thinke Like A (Functional) Programmer - http://greenteapress.com/thinkocaml/thinkocaml.pdf http://greenteapress.com/thinkocaml/thinkocaml.pdf (same author as all the other awesome Think X books!)
Unix Systems Programming in OCaml - http://ocaml.github.io/ocamlunix/ http://ocaml.github.io/ocamlunix/
People also say really great things about Real World OCaml but I haven't had a chance to go through it yet.
- freefrag 11y agoI also recommend the notes for L28[1] - Advanced Functional Programming at Cambridge. They might be a little hard to follow, but they are extremely insightful and teach concepts that may be difficult to learn elsewhere [1] https://www.cl.cam.ac.uk/teaching/1415/L28/materials.html https://www.cl.cam.ac.uk/teaching/1415/L28/materials.html
- agumonkey 11y agoIndeed, very complete set of slides. Thanks a lot.
- haxeny1 11y agoI first started using ocaml (f# actually and then re-wrote it in ocaml) for writing a simple interpreter to generate java code from mysql schema tables to deal with hibernate boiler plates etc. The code was much succinct than a comparable parser written in say antlr. That was my first introduction to typesafety helping me move forward. Specially, when coming back to the code, the compiler will scream at you for either not handling all the patterns that matched or adding new ones that didnt exist yet and needed to be changed. I went away from OCAML towards Haskell because a coworker convinced me to switch: also haskell seems to have a better support for multicore architectures. Of course, my applications are more web/networking apps, crud, websites etc. So i could have gone either way. The one difference i find when programming with Haskell as opposed to ocaml is that in ocaml, my instinct would be to write a little interpreter(or a quasi quoter). In Haskell, I still think that template haskell is a necessary evil, therefore, do it only when I really know what I am doing. I found this link to be quite helpful: http://pleac.sourceforge.net/pleac_ocaml/ http://pleac.sourceforge.net/pleac_ocaml/
- agumonkey 11y agoReading the pleac pages, it's amazing how javascript is getting close and closer to ml. It's all going back to its roots since js was quite {scheme} so it's not that surprising but still a joy to see. Module.foo (fun (x,y) -> ...) ...
- rubiquity 11y agoJavaScript and ML couldn't be further apart.
- agumonkey 11y agoThere still far away from each other but js is getting closer. Emphasis on functions, proper scoping, patterns for bindings, IIRC TCO is in ES6, even if it's a small step is already a huge one. It's still not a typed calculus, but types will be mainstream soon. my 2 cts bet.