Live data from Hacker News

OCaml Onboarding: Introduction to the Dune build system

ocamlpro.com

11–20 of 38 posts

Re: OCaml Onboarding: Introduction to the Dune build system

#11

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.

Why is an opinionated build system for a language not useful software?

Re: OCaml Onboarding: Introduction to the Dune build system

#12
post #9
post #6

Earlier quoted context omitted.

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...)

> Because it's really limited and not expressive? It's neither of those unless you limit yourself to a lowest-common-denominator feature set. GNU Make, for example, is a Turing-complete, dynamic programming language and a CLI task runner. You can build a build system in GNU Make ( https://github.com/omercsp/simple-build-system ) just like you can do so in any other language. Make suffers from unfamiliar and somewhat…

The OCaml ecosystem tried the Make route, it was complex, turns out no one likes maintaining makefiles by hand, and they like opaque make rules even less. Like it or not, dune exists for a very good reason.

Re: OCaml Onboarding: Introduction to the Dune build system

#15

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.

When I started learning make it wouldn't work and I wouldn't understand why so I dug into it and now I understand how it works and I can make it work but seasonned programmers still tell me my makefiles are wrong and then proceed to use even more arcade parts that render their makefiles incomprehensible. At some point I just gave up makefiles for anything non-trivial and went over to xmake where life is mostly simple and I never do it wrong.

Re: OCaml Onboarding: Introduction to the Dune build system

#16
post #9
post #6

Earlier quoted context omitted.

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...)

> Because it's really limited and not expressive? It's neither of those unless you limit yourself to a lowest-common-denominator feature set. GNU Make, for example, is a Turing-complete, dynamic programming language and a CLI task runner. You can build a build system in GNU Make ( https://github.com/omercsp/simple-build-system ) just like you can do so in any other language. Make suffers from unfamiliar and somewhat…

> Make suffers from unfamiliar and somewhat unorthodox syntax, and inconsistent language design

You just answered the question "why does every language need to re invent packaging, building, etc." Because people don't want to build build systems in Make

Re: OCaml Onboarding: Introduction to the Dune build system

#17
post #14

is uv to python what dune is to OCaml?

No I think uv is to python what opam is to ocaml, it's mostly a package/dependency manager.

Superficially, both uv and dune are also project runners. But dune is mainly a build tool, most important things dune does such as pre-processing, linking, compiling etc., are not needed in python in the first place (at least talking about pure python). You can use uv to create tarball/wheel but it's more akin to simple bundling than building in the dune sense. Dune can also run tests, but in uv you would need to delegate to something like pytest etc.

Re: OCaml Onboarding: Introduction to the Dune build system

#18
post #17
post #14

is uv to python what dune is to OCaml?

No I think uv is to python what opam is to ocaml, it's mostly a package/dependency manager. Superficially, both uv and dune are also project runners. But dune is mainly a build tool, most important things dune does such as pre-processing, linking, compiling etc., are not needed in python in the first place (at least talking about pure python). You can use uv to create tarball/wheel but it's more akin to simple bundli…

[deleted]

Re: OCaml Onboarding: Introduction to the Dune build system

#19
post #9

Earlier quoted context omitted.

> Because it's really limited and not expressive? It's neither of those unless you limit yourself to a lowest-common-denominator feature set. GNU Make, for example, is a Turing-complete, dynamic programming language and a CLI task runner. You can build a build system in GNU Make ( https://github.com/omercsp/simple-build-system ) just like you can do so in any other language. Make suffers from unfamiliar and somewhat…

The OCaml ecosystem tried the Make route, it was complex, turns out no one likes maintaining makefiles by hand, and they like opaque make rules even less. Like it or not, dune exists for a very good reason.

Make works fine with OCaml. There's a handful of rules you copy and paste around which is not ideal, but that's much easier to deal with than dune.
Post reply on HN