Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I find the discussion here somewhat amusing, because I am on another level of disbelief when looking at the state of things in the npm world.

Most people ask "why ship bun (whatever that is), why not just be an npm module".

I am baffled as to why we have forgotten the lost art of spitting out something from a build and then using that thing. As in, "make" producing a CSS file. Or a JavaScript file. Or multiple files. Why does npmness have to force itself into every nook and cranny of our software and consume it all?

In my webapp I use several small CSS and JavaScript libraries, and for building those I use docker containers. The npm horrors live in the docker containers, I try not to look in there, but whatever happens there, a bunch of css and js files come out. Reproducibly. Reliably. And things don't break if there is a headwind or a tailwind (ahem) today on the internet.



So instead of managing your versions in one package.json and installing your dependencies with one npm i command you manage several different docker container that produce builds you then consume?

What kind of horrors did you encounter that led to this abstraction?


I get this. I also do this (to some extent). Instead of installing whatever tooling I need for each project, I’ll store the tools in a Docker container. Then I don’t have to think about each project and how they interfere with each other. Even better, when something inevitably goes wrong, I can nuke the container from orbit and start over.


But in this case it is me who controls when anything gets updated. And I have all of my dependencies in the container. So I get reproducible builds. Also, dependencies of one package do not interfere with dependencies of another package.


The irony of my situation was that even using a Docker container would not help, because Docker does not emulate CPU instructions.


Aren't you referring to Docker multiarch?


I don't even know what it is, to my shame. I do know that when you run a container it will be calling into the CPU ins directly, unless it concerns something like Rosetta 2 - but even then I don't know whether, say, the AVX2 instructions are emulated.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: