Contrast this with Elixir and Rust where the beginner howtos are front and center. Both mix and cargo are amazing tools that are also very easy to use. Dune is rather cryptic and non-obvious.
I'd definitely be much more excited about OCaml if dune and opam had good cheatsheets and proper brief manuals that don't assume anything about the proficiency of the reader.
A lot of educational OCaml material is either old or imprecise.
Again, start with dune. I want a brain-dead intro to it but still it should cover everything it can do, and how.
You could give https://ocaml.org/learn/tutorials/ a try as well, specifically this: https://ocaml.org/learn/tutorials/setting_up_with_oasis.html
For profiling: https://ocaml.org/learn/tutorials/performance_and_profiling....
For debugging: https://ocaml.org/learn/tutorials/debug.html and https://caml.inria.fr/pub/docs/manual-ocaml/debugger.html
For unit testing: https://www.cs.cornell.edu/courses/cs3110/2019fa/textbook/da... and https://www.cs.cornell.edu/courses/cs3110/2019fa/textbook/te...
You may find https://github.com/gildor478/ounit#examples useful for both OUnit (unit testing) and OASIS (build system).
I got through some of them and I felt the quality of the OCaml teaching material itself is very high. No remarks there. Any syntax cognitive shock is eventually overcome and things flow pretty well.
Wasn't `oasis` the legacy way of building projects? Thought everyone used `dune` now?
In short, I am looking for the way that most OCaml programmers manage their project nowadays. I know this is happening through `dune` but the tool's documentation and educational material is very lacking. I don't object against the build file being LISP; when I thought about it for a minute it actually makes a lot of sense.
But I need a quality material on everything you can do with `dune`. Can you recommend such?
Yeah, I believe new projects tend to use dune, and some older projects have switched from OASIS to dune. I personally still use OASIS mainly due to laziness. :D
> But I need a quality material on everything you can do with `dune`. Can you recommend such?
I have not used dune myself, but a quick glance at these sites suggests that they may be quite useful:
- https://dune.readthedocs.io/en/stable/
- https://github.com/ocaml/dune/blob/master/doc/quick-start.rs...
- https://github.com/ocaml/dune/tree/master/example
- https://ocamlverse.github.io/content/quickstart_ocaml_projec...
- https://medium.com/@bobbypriambodo/starting-an-ocaml-app-pro...
For opam:
- https://opam.ocaml.org/doc/FAQ.html
- https://opam.ocaml.org/doc/Packaging.html
- https://opam.ocaml.org/doc/Manual.html
- https://github.com/ocaml/opam/tree/master/tests/packages
I hope this helps.
As I mentioned in a sibling comment, last time I seriously attempted getting more into OCaml has been at least half a year ago. I either didn't find some of those materials or they have been improved in the meantime.
Whatever the case, I can see clearly now that I was wrong about the poor quality of the dune and opam teaching material.
I apologise for that. And I'll be making a comeback to OCaml. I mean, it still has roadblocks but they are easier to overcome when tooling is handled (minus the lack of the multicore support but fingers crossed that that's coming soon).
When starting out with OCaml, as I was more accustomed to makefiles, the process of setting up dune projects was a major hurdle. I later found the init commands while looking through the man pages, and was surprised it wasn't more clearly mentioned in the project documentation.
Is it OK for me to hit you up on OCaml's Discourse forum if I need help or want to give extra feedback when I am able to, in the future?