Remix.run Logo
The success and failure of Ninja (2020)(neugierig.org)
217 points by quincepie 16 hours ago | 11 comments
willvarfar 16 hours ago | parent | next [-]

> we talk about programming like it is about writing code, but the code ends up being less important than the architecture, and the architecture ends up being less important than social issues.

A thousand times this! This puts into words something that's been lurking in the back of my mind for a very long time.

dang 16 hours ago | parent | prev | next [-]

Discussed at the time:

The Success and Failure of Ninja - https://news.ycombinator.com/item?id=23157783 - May 2020 (38 comments)

(Reposts are fine after a year or so! links to past threads are just to satisfy extra-curious readers)

high_priest 12 hours ago | parent | prev | next [-]

> I also believe that programmers feel latency and it affects their mood even if they don't notice it. (Google has recently done some research in this area that kinda confirmed my belief, here's hoping they'll publish it publicly!)

Anyone knows if it happened? Has the google research on latency been published?

edflsafoiewq 8 hours ago | parent | prev | next [-]

Most interesting point to me

> You must often compromise between correctness and convenience or performance and you should be intentional when you choose a point along that continuum. I find some programmers are inflexible when considering this dynamic, where it's somehow obvious that one of those concerns dominates, but in my experience the interplay is pretty subtle; for example, a tool that trades off correctness for convenience might overall produce a more correct ecosystem than a more correct but less convenient alternative, if programmers end up avoiding the latter.

mgaunard 15 hours ago | parent | prev | next [-]

I switched to samurai for the few things I have that still used ninja; it's an improvement in every possible way.

But regardless, I think those kinds of build systems are just wrong. What I want from a build system is to hash the content of all the transitive inputs and look up if it exists or not in a registry.

pjmlp 14 hours ago | parent | prev | next [-]

Given that ninja is required for C++20 modules when using CMake, it is going to stay around for quite a bit.

grobibi 15 hours ago | parent | prev | next [-]

I thought this was going to be about people buying less air fryers.

forrestthewoods 2 hours ago | parent | prev | next [-]

Ninja is pretty popular with gamedevs.

I was amused by this line:

> But Windows is still a huge platform in terms of developers, and those developers are starved for tools.

As a primarily Windows dev I feel that it is poor Linux devs who are starved for tools! Living life without a good debugger (Visual Studio) or profiler (Superluminal) is so tragic. ;(

It does feel like in recent years the gap between the two platforms is increasingly minimal. I definitely like all the Rust utilities that generally work crossplatform for example.

zX41ZdbW 13 hours ago | parent | prev | next [-]

> Relatedly, please forgive me for the embarrassing name.

The name is great!

PS. It's possible to make it even faster if we implement this: https://github.com/ninja-build/ninja/issues/2157 But you explained in the article that the tool intentionally lacks state, even tiny hints from previous runs.

einpoklum 15 hours ago | parent | prev | next [-]

### Statistics ###

ninja has ~26 kloc, ~3,100 commits, and only a quarter of them by the original author (although by loc changed their weight is higher). Interesting!

https://github.com/ninja-build/ninja/graphs/contributors

### Bunch of other comments ###

> users of ninja ... all Meson projects, which appears to increasingly be the build system used in the free software world;

So, AFAICT, that hasn't turned out to be the case.

> the code ends up being less important than the architecture, and the architecture ends up being less important than social issues.

Well... sometimes. Other times, the fact that there's good code that does something goes a very long way, and people live with the architectural faults. And as for the social issues - they rarely stand in opposition to the code itself.

> Some pieces of Ninja took struggle to get to and then are obvious in retrospect. I think this is true of much of math

Yup. And the some of the rest of math becomes obvious when some re-derives it using alternative and more convenient/powerful techniques.

> I think the reason so few succeed at this is that it's just too tempting to mix the layers.

As an author of a library that also focuses on being a "layer" of sorts (https://github.com/eyalroz/cuda-api-wrappers/), I struggle with this temptation a lot! Especially when, like the author says, the boundaries of the layers are not as clear as one might imagine.

> I strongly believe that iteration time has a huge impact on programmer satisfaction

I'm pretty certain that the vast majority developers perform 10x more incremental builds than full builds. So, not just satisfaction - it's just most of what we do. It's also those builds which we wait-out rather than possible go look for some distraction:

https://xkcd.com/303/

OTOH, the article doesn't mention interaction with build artifact caching schemes, which lessen the difference between building from scratch and building incrementally.

> Peter Collingbourne found Ninja and did the work to plug it into the much more popular CMake ... If anyone is responsible for making Ninja succeed out there in the real world, Peter is due the credit.

It is so gratifying when a person you didn't know makes your software project that much more impactful! Makes you really feel optimistic again about humanity and socialism and stuff.

santoshalper 16 hours ago | parent | prev [-]

Man, I was so afraid this was going to be about Fortnite. Turns out it was a fantastic read. I feel really sad but unsurprised about his description of what it's like to be an Open Source maintainer.