OCaml Onboarding: Introduction to the Dune build system
69 points - last Thursday at 5:52 PM
Sourceihumanable
today at 5:30 PM
I like OCaml, I spend most of my day to day though in Elixir and I think one of the things that's so nice about elixir is mix.
There's a handful of mix commands you learn when you get started and it's such a great experience. You can crack open erlang application structure and learn more if you want, but if you just want to `mix compile` `mix deps.get` `mix test` that's also fine.
When I first learned ocaml I watched this really wonderful series https://www.youtube.com/watch?v=MUcka_SvhLw&list=PLre5AT9JnK... (highly recommend if you are at all interested) and it's great for learning the language and tooling but it's all opam up until the end when some of it switches to dune.
I think wanting to provide more details about what's going on is nice too, but I think there's a place for "here's the commands you will actually need in your day to day"
This is a good introduction to Dune, but frankly, Dune kinda sucks. I mean, it is very powerful, and works very well, but it's too much of a hassle, especially for beginners. I don't want a language specific build system to require two different files to actually be usable, even on very simple projects⦠I still use it because it is the de facto standard, but I really preferred ocamlbuild [1], which was actually a tool that just worked without any configuration necessary for simple projects that uses standard tools. Where you would need to write a Makefile and call make, you could just write nothing and call ocamlbuild and it would just work. Dune lost that ability entirely.
[1] https://github.com/ocaml/ocamlbuild/blob/master/manual/manua...
calvinmorrison
today at 5:56 PM
what is wrong with make why does every language need to re invent packaging, building, etc. I think these people have no useful software to write so they rewrite the development stack.
Because Make sucks? Because it's really limited and not expressive? Because it's not really a build system (nor is it a package manager or a dependency resolver or...)