5 ms·
I’ve been working on an OCaml by example page. It’s not really ready for prime time but you can at least learn the basics with it and hell, even contribute if y
by baby 5y ago
I’ve been working on an OCaml by example page. It’s not really ready for prime time but you can at least learn the basics with it and hell, even contribute if you want :)
https://o1-labs.github.io/ocamlbyexample/ https://o1-labs.github.io/ocamlbyexample/
- Zababa 5y agoLooking good! Is there a reason for why you use Core at some points?
- baby 5y agoIt seems like a lot of people use Core instead of the stdlib, so much that I felt like it was best practice to do that. I explain that in the first sections.
- johnisgood 5y agoIt would be nice if it had examples without Core, too, using only OCaml's standard library. I would like to stick to the standard library first, and if it is not enough, then maybe OCaml Batteries or Core. Perhaps give a reference to "libraries" on the first page (or all?) where you use Core so people know how to use Core (opam, dune).
- baby 5y agoYeah that makes sense, I think it might be a good idea to teach with the stdlib.
- yawaramin 5y agoI've written a condensed intro without Jane Street libraries: https://dev.to/yawaramin/practical-ocaml-314j https://dev.to/yawaramin/practical-ocaml-314j
- johnisgood 5y agoThank you! Personally I know a lot about OCaml and I have a few projects written in it, but it will still be useful as a refreshener (been away for a while), plus I am pretty sure it will be helpful to many!
- Zababa 5y agoI didn't find any explanation other than it's well-accepted. That's true, however if it doesn't bring any new capabilities I think using just the standard library would make the tutorial more helpful and universal.
- baby 5y agoYeah I’ve been thinking about that a lot and I might just get rid of Core, at least where it’s not needed
- deleted 5y ago[deleted]
- philzook 5y agoI love it! Great job!
- cjohnson318 5y agoI love that you started with opam, and not hello-world. More language guides should spend more time introducing tooling.
- rawoke083600 5y agoYea exactly this ! A great help here is a "start-project-template" like with svelte (for example), they have RIGHT on the home-page a big-ass block that shows you how to "get and start" the svelte-new-project-template. Coming to OCAML the "tooling" can be confusing and ambiguous. For example you can use ocamlc, dune,ocamlbuilder,esy opam etc. And of course the "few options" for a std lib Core, Batteries etc. I like the "syntax" from the Batteries more to be honest.