News for hackers. Stuff that matters.
Re:Ask HN: Why does every package+module system become a Rub... by puffoflogic on Monday January 30, 2023 @11:10AM (#34581650)
Nix is not capable of becoming a first class dependency manager because it does not manage dependencies. It does not attempt any version or feature resolution. Besides, saying Nix could become a package manager is like saying that C could become a package manager.
Re:Ask HN: Why does every package+module system become a Rub... by tazjin on Monday January 30, 2023 @11:50AM (#34582481)
If you had written this as a question rather than a definite (and somewhat aggressive) statement I might've explained it to you.
Re:Ask HN: Why does every package+module system become a Rub... by pxc on Monday January 30, 2023 @02:51PM (#34585430)
Pretend I asked the nice version of this, for the benefit of other readers?

I do think a Nix-like tool to be used for writing/replacing package managers for new programming languages would benefit from some dependency resolving functionality, instead of just saying 'shove it in a monorepo or pin via VCS refs instead of semver'. Is that not necessary?

Re:Ask HN: Why does every package+module system become a Rub... by otabdeveloper4 on Monday January 30, 2023 @03:07PM (#34585628)
Nix is capable of that, but you need a database mapping versions to VCS refs.

Nixpkgs doesn't go down that road because it would be unwieldy at their scale, but more specialized nix-based tools do.

Re:Ask HN: Why does every package+module system become a Rub... by pxc on Monday January 30, 2023 @03:14PM (#34585715)
(I actually think Nixpkgs could and should go down this road, with a couple of caveats, for immense benefit. But I'm curious about what tazjin thinks here.)
Re:Ask HN: Why does every package+module system become a Rub... by haradion on Monday January 30, 2023 @07:26PM (#34588954)
At least for (unlocked) flake sources, you could probably use a branch naming convention instead of a separate database, although that requires your repo to be set up a specific way.
Re:Ask HN: Why does every package+module system become a Rub... by otabdeveloper4 on Monday January 30, 2023 @03:04PM (#34585605)
Nix is an umbrella for a stack of various solutions.

Nixpkgs doesn't do version or feature resolution, but other tools (that are not nixpkgs) can and do.

Re:Ask HN: Why does every package+module system become a Rub... by puffoflogic on Monday January 30, 2023 @03:09PM (#34585666)
Under this abuse of terminology, a pocket calculator is capable of becoming a package/dependency manager. Or any other technology which conceivably could be put to work toward the package management problem, but has not yet been adapted to that need. I concede that these statements are "true", but they fail the relevancy test of communication.
Re:Ask HN: Why does every package+module system become a Rub... by otabdeveloper4 on Monday January 30, 2023 @03:16PM (#34585751)
Like I said in another comment, the problem is curating the giant database that maps version numbers to commit refs. Once you pass this roadblock, the tools Nix gives you make dependency resolution a quite a bit simpler problem to solve.

The next step is then realizing you actually don't need the useless legacy version numbering scheme at all, and that you wasted that effort for nothing.

Re:Ask HN: Why does every package+module system become a Rub... by tripdout on Tuesday January 31, 2023 @12:05AM (#34591405)
Something like this maybe? https://lazamar.co.uk/nix-versions/

I'm not sure what you mean, through, by not needing the actual program versions.

Re:Ask HN: Why does every package+module system become a Rub... by otabdeveloper4 on Tuesday January 31, 2023 @03:57AM (#34592885)
What we actually want is a content-addressable global namespace of source code. (Maybe it could be marketed as "blockchain for software" or something, lol.)

Version numbers are an attempt at content-addressing from the time when software came on floppy disks and CD-ROMs. It sorta made sense given the constraints of that technology.

Nowadays trusting git tags over git revision hashes makes no real sense. (Except that git tags are kinda shorter to type, but who cares.)