4 ms·
>If you look at the /usr/bin directory of a Linux system there aren't any namespaces. There's 1,000+ binaries thrown into 1 folder, each with a distinct name an
by coldtea 7y ago
>If you look at the /usr/bin directory of a Linux system there aren't any namespaces. There's 1,000+ binaries thrown into 1 folder, each with a distinct name and things work nicely.
That's the last example of a nice design I would bring, and the worst possibly argument in favor of no modules/namespacing.
A flat /usr/bin/... with 1000+ binaries in UNIX is a bad solution we ended up with because back in the day where UNIX was created there were just a few dozens of binaries, so it was "good enough".
- coding123 7y agoThis was the hardest thing to get used to in linux coming from Windows. In Windows an installed program lives in Program Files and has a shortcut that starts it from it's home folder. That's very different from a namespace collision possible global install that can be run from any folder. I still don't fully agree with it but it makes some things easier. The Windows way also made multiple version installs possible.
- dragonwriter 7y ago> In Windows an installed program lives in Program Files and has a shortcut that starts it from it's home folder. And command line tools have that folder added to the PATH, and Windows has a real and ongoing problem with PATH getting too long for the OS to handle when you have enough of them. Windows is GUI optimized with shell as an afterthought, Linux is vice versa.
- Crinus 7y agoFWIW you get the same on Linux by installing stuff in /usr/whatever/wherever, /usr/local/whatever/wherever or /opt (which is the closest to Program Files-like place) and making symlinks to the "global" binaries (those meant to be accessible via the shell) while keeping everything else in the application-specific folder. It isn't very uncommon to see binaries inside /usr/bin being symlinks to binaries in other directories, even if you stick with distribution-only packages.
- cmcaine 7y agoYou can have multiple versions of a program installed in linux. Most package managers won't help you very much with that, but it's about as easy as windows if the programs are interpreted or statically linked or compile easily with your system libraries. NixOS and distri are notable package managers that do make installing different versions of packages pretty easy.
- onion2k 7y ago...back in the day where UNIX was created there were just a few dozens of binaries, so it was "good enough". What's actually wrong with it though? Why isn't it still "good enough"? It's hard to read the list, but Linux has plenty of tools to fix that particular problem. I don't really see the issue.
- coldtea 7y agoIt's all a big dump, discoverability is bad. Name clauses. Version clauses. "All binaries inside a folder" needs renames to allow for a different version (even if it's a different minor version). It's just the binaries, which was OK back in the "program = single binary", before "man" even, days, but now it splits the program from different assets it uses (man pages, default configuration, image assets, etc). This in turn makes deleting/moving more difficult, and adds all kinds of baggage to package managers. >It's hard to read the list, but Linux has plenty of tools to fix that particular problem. That's a description of the problem to me. Needing "plenty of tools" to fix an initial bad commitment.
- raehik 7y agoThis is one of the many problems Guix solves on a slightly lower level than most package managers, because binaries live inside Guix packages (/usr/bin is simply populated by absolute symlinks). Of course package managers also do this, but Guix kind of lets you symlink to a (unique) package, rather than `install`.
- johnisgood 7y agoFor stuff I compile from scratch I just use a symlink-based package manager I found online: https://zolk3ri.name/cgit/zpkg/ https://zolk3ri.name/cgit/zpkg/ It seems very minimal but supports my requirements. It makes sense to me, because everything gets installed (usually via make install) to ~/.local/pkg/foo-1.0/ and the like, and then symlinks are created to, say, ~/.local/{bin,etc,include,lib,man,share,var}. According to the source code, it is configurable via environment variables. It seems to share similarities with GNU's stow.