6 ms·
Hi, JS developer here who uses Nix and who liberally makes use of single-responsibility modules. No, Nix does not need "hours" to build a modern JS project. So
by joepie91_ 6y ago
Hi, JS developer here who uses Nix and who liberally makes use of single-responsibility modules.
No, Nix does not need "hours" to build a modern JS project. Something else is going on here. Nix is slow, but not that slow.
(With the limited information provided here, my first guess would be "someone turned off the binary cache because they don't trust prebuilt binaries, and now it recompiles the world from scratch because there are no prebuilt binaries anymore".)
- somatic 6y ago“who liberally makes use of single-responsibility modules” If your aim is precision of language, you should call this “400MB of unaudited and unauditable mystery code from the [total clowns]( https://github.com/babel/babel/pull/3646 https://github.com/babel/babel/pull/3646 )* who run the npm ecosystem.” Imagine [this]( https://medium.com/s/silicon-satire/i-peeked-into-my-node-modules-directory-and-you-wont-believe-what-happened-next-b89f63d21558 https://medium.com/s/silicon-satire/i-peeked-into-my-node-mo... )* but instead riddled with advertisers and intelligence agencies. Burn it down and start over. * Insert Markdown, etc.
- yawaramin 6y agoPart of the removed code: test("guy", function() { assert.equal(typeof babel.guy, "string"); }); Facepalming so hard right now
- somatic 6y agoThat’s a quality test. Don’t you feel more comfortable? Your browsing experience is in good hands.
- geofft 6y agoThank you for heavily derailing the productive, technically meaningful conversation I was having. Next time I won't say anything since apparently productive and technically meaningful conversations aren't what this site is for.
- joepie91_ 6y agoIn case you hadn't noticed, this was a joke commit. The code in question was never actually a real part of Babel.
- yawaramin 6y agoI assure you, I understand what an easter egg is. I was facepalming at the test, which was doing the equivalent of: expect(true).toBe(true)
- joepie91_ 6y agoPlease take your badly-informed language bashing elsewhere. I actually audit dependencies for a living, and the dependency model that JS uses is far, far preferable for auditability over the "monolithic tightly-coupled framework and a mountain of custom badly-maintained copy-pasted business logic" approach that is widely used elsewhere.
- somatic 6y agoThe mean, median, and modal web “application” depends on several thousand packages comprising dozens of layers of dependencies deep. The mystery code that is downloaded and executed when a developer runs `npm install` is orders of magnitude larger than functional operating systems. There is absolutely no quality assurance: these packages are published by literally-no-one-knows with no oversight whatsoever. `npm` suffers unknown and unknowable build breakage on a regular basis: for no perceptible reason, builds fail; the common advice is to nuke `node_modules` and reinstall. The packages are updating constantly: breakage is probable after a small handful of months. The ecosystem itself was probably developed in response to domain-based adtech blockers. There is absolutely nothing confidence-inspiring about these people, their intentions, or their competence.
- joepie91_ 6y agoSeriously, piss off. You clearly don't understand the tools you're loudly complaining about, and it's interfering with what was otherwise a productive discussion about Nix and build times.
- dang 6y agoPlease don't break the site guidelines yourself, regardless of how wrong or annoying other comments are or you feel they are. It only makes the thread even worse. I've responded to the other user elsewhere, but actually your replies were worse than what you were replying to, even if you're right on the fundamentals. "Please take your badly-informed $thing elsewhere" and "Seriously, piss off" are well out of bounds here. If you feel like another user is derailing the discussion, flag the comments (https://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html). If you feel like more is needed, email hn@ycombinator.com so we can take a look. We frequently moderate off-topic subthreads.
- yawaramin 6y agoI suspect that someone being the auditors who are suspicious of opaque binary caches and insist on building everything from scratch.
- joepie91_ 6y agoI don't know. If that were the case, I'd imagine they would know why their build was taking hours and that it wasn't a Nix problem.
- yawaramin 6y agoThat was my reading, based on the fact that they glossed over Nix itself and attributed most of the issues to code complexity.
- joepie91_ 6y agoIt explicitly says this, though: > while much of that build time is attributable to Nix's way of building dependencies And that part just doesn't make sense to me. I can't see any way in which specifically Nix's way of building dependencies would contribute to this. The compiling of the universe, sure, but then why mention Nix?
- yawaramin 6y agoIt does say that, but it's off in its own clause, then shifts focus away from it towards what seems like the focus of the auditors.