(no title)
allan-a | 2 years ago
> /gonix/apps/gui/productivity/images/krita/5.1/
> /gonix/apps/console/shell/bash/5.2/
> /gonix/apps/programming/compilers/fpc/3.1/
> /gonix/libraries/c/glibc/2.39
> /gonix/apps/console/editors/vim/9.1
This is a nice illustrative example that works well when the only difference between software packages is semantic versions. The reality is that there can be many variants of packages and using something like a hash of package inputs is very practical. Take for example a library called GDAL, which has an insane amount of configure flags. It is quite common for scientific software to be tuned and package maintainers cannot supply a one-size-fits-all solution.
lproven|2 years ago
For instance, we could still embed the hash in the directory name, in much the same way that many Linux programs use build numbers.
/gonix/apps/console/editors/vim/9.1~246dea34451dbdda21
The core things that I'm getting at here are:
1. Put the human-readable part first because humans see that first.
2. Retain hierarchical layouts. For humans this makes things more manageable and accessible, while for programs, as long as it's computationally-parseable the impact is negligible.
3. Lean in to the hierarchy. If it's necessary to duplicate slightly different versions of dependencies for different programs, then put them inside that program's hierarchy. That's one of its reasons for existing.
4. Embed the hash anywhere a simple regex can find it, no problem; tab-completion can sort that out.
All I am trying to suggest is that a Nix/Guix/successor/replacement type tool could focus more on ordinary joes who find it hard to remember the difference between `/bin` and `/usr/bin` as it is, and make stuff human-readable first and machine-readable second.
trws|2 years ago
The only one that doesn’t quite work out is 3. Dependencies are vendored like that when it’s a patched version that can only ever be used with one package, but in general it helps more to have the regular structure to let them be shared. Otherwise we would have to move them when a new dependent appears and some other kinda funky things. I have played with having each package get a “view” of links to all its deps in its prefix, but it’s a high cost in inodes for an only moderate increase in observability. Pretty easy to generate your own (there’s literally a command for it) so not sure if it’s worth it.
tgamblin|2 years ago
[1] https://spack.readthedocs.io/en/latest/config_yaml.html#conf...
[2] https://github.com/spack/sbang