3 ms·
I just looked up the page on Nix, and, yuck. First of all, requiring the directory you install shit to to include a full cryptographic hash in its name? Do you
by peterwwillis 13y ago
I just looked up the page on Nix, and, yuck.
First of all, requiring the directory you install shit to to include a full cryptographic hash in its name? Do you even comprehend how completely useless the file path is now to a human? Sure you can have a directory of symlinks to make it readable again, but as we should know by now, plenty of applications bork on trees of symlinks (and you can't hardlink a directory). Plus your garbage collector depends on hardlinks (or a whole lot of tree indexing). This could have been managed in so many ways to make it a lot more user friendly.
"Complete dependencies"? You mean MANDATORY dependencies? This is so fucking annoying. Now I can't install an entire OS because one package with a specific SHA is gone. So even though I could rebuild it from scratch and it could be functionally identical, with 1 bit different the SHA is hosed and now everything is useless. Not to mention even if I had it, I have to ship every single dependency to anyone any time I want to give them that package/app/etc. Fantastic. And 'scanning binaries for hashes of directories'? This has got to be the laziest, dumbest solution to a complex problem i've seen supported by GNU since...... Wait, nevermind. They've probably supported dumber things.
MULTI-USERS?!? YOU MEAN A NORMAL USER CAN INSTALL A PACKAGE? GET OUT. NO PACKAGE MANAGER CAN DO THAT EXCEPT.... All of them?
Atomic rollbacks/upgrades sounds nice, until you realize a program might be running other programs, which might trigger your runtime dependency checking, which might screw everything up.
"Garbage collector" ? Oh. If it has hardlinks, you don't delete it. Gotcha.
As far as "functional" operations go, it's been pretty well proven in production environments that you don't actually have to completely recreate a binary exactly; just approximately. Functional operations management gives techies a hard-on, but means diddly in terms of real-world problem solving. We have managed away the implicated problems years ago.
WHY ARE WE STILL INSTALLING FROM SOURCE?! Did Gentoo teach you all nothing!?!
Service deployment? You mean service configuration management and deployment? Sigh, here we go again. Let's combine three different things into one and pretend it's a viable solution for general operational challenges.
Everything else seems handy.
- weland 13y agoWhy are you even using a computer?
- peterwwillis 13y ago.....Why are you?
- sparkie 13y agoThe directory name is not meant to be useful to a human - it's a means of storing some data that a human generally never needs to look at. It could be a GUID or anything. It's not like relational data stores use human readable primary key fields is it? If we were using a relational database and we had a table for packages with "primary key","name","version", it's not sufficient to query name and version to get a package, because it's not guaranteed to be unique. For example, you might have the same version, but built using a different configuration, or having a bug fix. You might have revision 127 and 128 in there, but they're the same "version" of the software (I'm not aware of many packages which put source control revision numbers into their release version numbers.) The only way the developer can tell others precisely what he means is to specify an identity, and the rest of the information can be queried. The hash serves another useful purpose anyway - the ability to verify a package. At the moment Nix hashes the build instructions of a package, so it's not necessary to create an exact binary, although that would be desirable when we can do so reliably. We could eliminate the need to trust package maintainers we don't know this way, because cryptographic hashes are unlikely to lie. Nobody inspects every binary package released publicly to confirm the packager hasn't inserted some malware, but it would be desirable to have the package checked if the computer can automate it. Oh, and you don't need to install from source with Nix. You can download binary derivations, but until we have exact reproducible builds, you do so at your own risk. Configuration management and package management are not disjoint ideas, and nor do other systems treat them that way. In puppet for example, you can hook into another package manager to install new packages with a fuzzy match, then configure them. Nix configuration is just the same concept for the Nix package manager - where you can actually specify the identity of some configuration you depend on, and in turn give your configuration an identity that others can depend on. Of course Nix is not a silver bullet, you trade away some of the convenience of other systems in exchange for having reliable distribution of software exactly as the developer/maintainer meant for it to be, and without having to cross your fingers and hope it builds OK.
- peterwwillis 13y agoThe file path (which includes directory names) is indeed meant to be useful to a human, for very good reasons. All [modern] packages have unique names without the need for a completely unique identifier embedded in the file name. The file name is guaranteed to be unique by the distribution maintainer of said package. Usually for 3rd-party packages a postfix of a revision number and the distribution from whence it came is what makes it unique for that distributor. This ends up not only giving you insight as from whence the package came in the name, but which revision it is (if listing them sequentially, for example). But it isn't package names that need to be unique, it's file paths delivered by the packages, and that certainly is a useful thing that's good to solve with a package manager. But you still need to be able to discern with your eyes what is what! You can't easily do that by comparing a gigantic SHA hash between two file paths, but you could do that if the difference between each other was very minor, but indicated what each path actually was related to (in terms of version, arch, revision, order of installation, or any other number of criteria). I get it - you're trying to support a completely universal, will-never-conflict file path. But we don't need that!!! It's simple to maintain a small, mostly-collision-free postfix to a package name that is both human readable and fairly unique. Another way to point out the ridiculousness of the hash-in-file-path system is in your first paragraph: > It's not like relational data stores use human readable primary key fields is it? File paths are not relational data stores. File paths are a human interface. A program can store and retrieve data in any way it chooses, and in much more efficient forms than filesystem paths that use "special character" separators, are subject to various environment changes, language specifics, platform differences, and name length limitations. We use file paths because they're the easiest way for humans to organize data files on the disk. Hell, their inherent crappiness is part of why many applications have to be built to "scale" how they manage files to get around the inherent problems of human-readable file paths. Sticking a grotesque amount of non-human-readable metadata in there is like trying to shove a calculator into a pencil. > The hash serves another useful purpose anyway - the ability to verify a package. What the hell is this doing in the file name, though? Packages already include hashes of themselves and their files. You can verify any of them with the record they create in the package management database, or in the original package. I don't get what your point is about people "lying" about the binary package or inserting malware. We've had public key-signed packages for decades. This is a non-issue. Config management is completely different from package management. I know there are systems out there that try to build in hooks so you can use one from the other, and i'm not saying it's completely useless. But in general it's crap to try to do the functions of one tool in another tool. They need to exist independently for obvious management reasons. The more you tie them together, the more of a maintenance headache you are left with. Lastly, i'll just say that my favorite Linux distribution (in terms of stability, reliability, etc) is Slackware. It basically defies all of the reasons Nix seems to exist for, yet it works beautifully in spite of it. It turns out that you don't have to wrestle and fight with your packages to make a system work well.