4 ms·
Is there any reason to use make over ninja and gn?
by datadeft 3y ago
Is there any reason to use make over ninja and gn?
- baq 3y agoYeah, if you have no effing idea what ninja or gn are
- spicybright 3y agoI'm a seasoned developer for the past 15-ish years and I haven't heard of ninja or gn before. I tried typing them in my command line (macos 12.4) and I would need to install them to use them. I was taught make in CS101 in college and the majority of other people's projects I've looked at use it. So the advantage is ubiquity and familiarity. Which can be useful if your code base is going to have a large number of people working on it.
- datadeft 3y agoNinja was super easy to pick up even after using make for some time (10+ years). GN is just a ninja generator that is optional. https://gn.googlesource.com/gn/+/main/docs/quick_start.md https://gn.googlesource.com/gn/+/main/docs/quick_start.md https://ninja-build.org/ https://ninja-build.org/
- nickelpro 3y ago> I'm a seasoned developer for the past 15-ish years and I haven't heard of ninja or gn before Then you also stopped learning about developments in your field 15 years ago. > I tried typing them in my command line (macos 12.4) and I would need to install them to use them. Ok? And? We don't pre-installed dev tools on consumer operating systems. You won't find valgrind or vcpkg either. > I was taught make in CS101 in college The tools we taught to beginners over a decade ago are perhaps not suitable in all cases, in fact they are suitable in very few cases. Not much Pascal usage either anymore. > the majority of other people's projects I've looked at use it. Then you live in a very tiny bubble.
- baq 3y agoYou seriously compare whatever this ninja thing is to valgrind with a straight face? There’s value in not overloading your cognitive capacity with the most recent fads, there’s enough serious tools and tech to learn.
- nickelpro 3y ago> You seriously compare whatever this ninja thing is to valgrind with a straight face? In so much as neither is pre-installed on a consumer operating system, yes, they are obviously equivalent. > There’s value in not overloading your cognitive capacity with the most recent fads Ninja has been the standard backend for CMake and other meta-generators for 11 years, it is hardly recent or a fad. Moreover, you don't need to know anything about it, since it's a task-running backend format. You need to "know" it as much as you know the ELF object format or LLVM IR, your tools use it not you personally.
- deleted 3y ago[deleted]
- spicybright 3y agoNo need for personal attacks here, I'm just answering based on my experience.
- nickelpro 3y agoYou're the one who made your personal experience the grounding for your defense of make, not me. There's no way to respond other than to point out you've had a very bizarre, isolated 15 years if the only thing you encounter regularly is make. In the one language ecosystem where make is still popular (plain C), it's a minority that only comes in second overall for build tools [1] [1]: https://www.jetbrains.com/lp/devecosystem-2022/c/#which-project-models-or-build-systems-do-you-regularly-use-if-any-two-years https://www.jetbrains.com/lp/devecosystem-2022/c/#which-proj...
- t43562 3y agoninja is faster at parsing large makefiles and I'm reasonably certain it's because it lacks certain expensive features of make. Do you need those features? You'd have to read about make to find out but it boils down to there being not much performance difference for small builds so make might have an edge there. When you get to android sized builds the reading of makefiles can take minutes and ninja wins there enough to make it worth sacrificing the features.
- tekknolagi 3y agoThis is why I wrote https://bernsteinbear.com/blog/ninja-is-enough/ https://bernsteinbear.com/blog/ninja-is-enough/ :)
- Too 3y agoNinjafiles are not designed to be edited by hand, it expects more sane, language-aware tooling to generate the dependency graph, for ninja to execute. https://ninja-build.org/manual.html#_design_goals https://ninja-build.org/manual.html#_design_goals Though you could also argue that writing makefiles by hand is equally foolish. Use a tool designed for the job and not some duct tape that “works” everywhere but barely keeps things together. The example in the OP is missing handling of headers #including other headers, just to give one obvious example.