(no title)
whacked_new | 4 months ago
0009flr197p89fz2vg032g556014z7v1-libass-0.17.3.drv
000ghm78048kh2prsfzkf93xm3803m0r-default.md
001f6fysrshkq7gaki4lv8qkl38vjr6a-python-runtime-deps-check-hook.sh.drv
001gp43bjqzx60cg345n2slzg7131za8-nix-nss-open-files.patch
001im7qm8achbyh0ywil6hif6rqf284z-bootstrap-stage0-binutils-wrapper-boot.drv
001pc0cpvpqix4hy9z296qnp0yj00f4n-zbmath-review-template.r59693.tar.xz.drv
Spack, another deterministic builder / package manager, IIRC uses the reversed order so the hash is at the tail. Pros/cons under different search / inspection conditions.
eviks|4 months ago
But what's the pro? The tail alignment is worse than the head alignment since you read head to tail, not the other way aground
whacked_new|4 months ago
sometimes I'm grepping in /nix/store and you have (as shown earlier) a list of derivation paths like this
$ ls /nix/store | grep nodejs-2 | head | sed 's/^/ /'
and thus as designed, your eyes ignore the block of hashes and you see the "nodejs-..." stuffYou might ask why are you grepping? Because it's fast and familiar and I don't know the native tooling as easily (possibly a UX problem).
Then in spack (see https://spack.readthedocs.io/en/latest/package_fundamentals....) they have
$ spack find --paths
and$ spack find --format "{name}-{version}-{hash}"
you get the package name immediately from the left, which is nice, and you can pipe that straight to `sort`, but where the hash starts is more jagged on the right so there's a bit more noise when you're looking at the numbers. In the end the information is identical and it's a UX difference.Tradeoffs wise I think they both made the right choice. Because for nix, the packages are almost always in /nix/store, so the path length including the hash is almost always the same.
For spack you can place your packages anywhere so the base directories can be highly variable, and so it's sensible to have the package names immediately after the package directory.
Or, I'm just trying to rationalize the choices each designer made post-hoc. But after using both I appreciate the design considerations that went in. In the end, humans are inefficient. When I make name / version / hash identifiers in my own applications I end up using one or the either design.
setheron|4 months ago