Paraphrasing: "Yes we know this is different. Yes it is very simple. You may not be used to it, but it is easier to understand and work with. You don't have to use this. We like this and we are happy."
> make all programs relocatable - I would love to see that, but that would either mean: rewrite every app in the world to use `libprefix`
I’m curious about what they mean by `libprefix`. A web search doesn’t turn up any useful results.
Linux filesystems are generally case sensitive.
The big cost about Nix/Guix that puts people off is that it eliminates a human-readable filesystem. The traditional layout is gone or empty, replaced by a tonne of folders under `/nix/` called stuff like `240-572-9837wfgjh234098672-_bash` and you have to just... *trust* that your path and so on will work and stuff will just get found somehow.
You have to let go of navigating your own filesystem.
That's just too much for a lot of people. The filesystem layout is one of Unix's defining characteristics.
Whereas Gobo's goal is the opposite: yes, let us discard the traditional filesystem layout, but let's do it by making it more human readable instead.
You can work out where things are without knowing. There's better isolation. It's like semantic versioning, applied to the filesystem: a semantic filesystem layout, where folder names encapsulate versioning info and are more meaningful than the old 1970s reduce-typing-effort-at-all-costs approach.
Nix says ignore paths, ignore directories, you don't need them, we'll manage that for you.
Gobo says forget traditional paths, here are some better ones that you will find easier and more useful.
For me, that's an attractive proposition.
In real life, it seems that both were too much for most people.
My suggestion would be: why not merge them? Try to bring the advantages of Gobo -- readable, meaningful directory paths -- to a version of Nix.
Instead of a flat directory tree with hashes, a consistent algorithm that categorises apps and puts them in a tree:
/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
I am totally making these up, you understand, they're merely illustrative examples.
> /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.
Not really trust. Nix and Guix are not magic.
You can still use ldd to figure out what (now exact!) library anything is gonna use. Guix and Nix use the rpath feature.
And your profile directory in Guix is a normal directory called $HOME/.guix-profile . Currently, it has "bin" and "share" and "sbin" and "libexec" and "lib" and so on in there. That is what the end user uses. Entries in those do link to /gnu/store/xyz/bin/xyz (using regular symlinks), yes.
>Instead of a flat directory tree with hashes, a consistent algorithm that categorises apps and puts them in a tree:
One hash represents all the dependencies of that package, too.
One directory name in Guix's /gnu/store encodes both the direct sources and all the dependencies, all the way up to a bootstrap root (the latter of about 250 Bytes of binary). If any of the dependencies of bash changes, the hash will change, too. That also means that you will have multiple /gnu/store/*-bash-5.1.16 in there in a normal system.
But in your proposed case, you'd have to introduce some magical things which figure out and STORE the dependencies somehow differently in the background. Guix doesn't do that. It stores that in the file system, the end (as in directly in the file system, not as in "the system database blob is in file /foo"). No magical extra store.
That said, it would be possible to only change the guix profile layout to be what you suggest, and then still have symlinks to /gnu/store/<hash>-xyz in there. Probably like 5 h of work, and end user programs most likely will work on the first try. Patches welcome.
See guix/profiles.scm for what creates the profile. %user-profile-directory is $HOME/.guix-profile . profile-derivation is the function you want to change.
You can also use guix on top of whatever other Linux distribution and try it out like that. The package manager (which makes the profiles) also supports containers--so you can safely try out whether your change works.
> You have to let go of navigating your own filesystem.
Your broader point makes sense in that I get how a user-navigable filesystem is attractive, especially in the context of store paths being exposed to users as they are embedded in binaries and scripts. But I think the above is an overstatement.
Stuff on NixOS gets on your path the exact same way as it does on any distro: a bit of shell! Users can read through the `set-environment` script and the config NixOS generates for their shell in /etc and all that. They can check what binaries are on their PATH with `which -a` as usual. They can ask their shell where a given variable was defined using the usual tools it offers.
And the human-readable part of the filesystem does exist, just on top of the Nix store. The symlinks under /nix/var/nix/profiles/... or /run/current-system/sw are about as human-friendly as Unix ever is, imo.
Perhaps NixOS could do more to make those 'official', foreground them and document them, and even provide more loosely versioned paths to them like you suggest (making it easier to impurely manually build against them).
Losing human readability, when that was the primary Gobo design goal, is a fearfully high price to pay, as I explained upthread:
Also, there’s no actual use case for Nix store paths with the hashes stripped out. The actual path can easily be derived from whatever is at the root of the dependency. Things like Nix expressions, the result symlink, the system environment in /run/sw/current-system, and PATH. Those are “human readable.” From there, you can get the actual store paths. It doesn’t matter that they’re prefixed with a hash because they still have human readable names at the end, allowing you tell what they contain.
It’s similar to inspecting memory. You don’t want to start by examining raw bytes in memory dumps. It’s far more easier and meaningful to start by chasing variables instead.
The Unix filesystem layout was bodged together on the fly as Dennis and Ken got more disk drives to attach to their elderly DEC PDP computers.
http://lists.busybox.net/pipermail/busybox/2010-December/074...
https://en.m.wikipedia.org/wiki/Filesystem_Hierarchy_Standar...
You may get a better result with a device that has a usb dongle. Logitech models reportedly work. The Corsair unit I just bought works well for instance.
Leitner works despite having crap audio over usb.
It's not gonna happen without somebody making it happen. Be somebody. Systemd is influential because the people making it often are those somebodies but the fact is anyone can be that somebody, you don't need their blessing or that of some standards body to make anything.
I went as far as getting rid of libc. Made a lisp that runs directly on top of Linux using nothing but system calls. It can do anything other software can do: I run strace on a program, my lisp can do what it does if it just replicates those system calls, doesn't matter if it's simple I/O or mounting disks. I want to eventually boot Linux directly into it.
From a distro sense everything makes sense. dpkg -S this-file will tell me quickly why a /usr file is there. The distro is supposed to paint the picture for you.
What are the parts you think are the worst messes?
? What do you have in mind? I don't recall that being for applications
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s17.htm...
I don't think that's a valid claim. Something being organized on principles that are different from yours is not the same as it being disorganized in itself.
MacOS is better though.
The Unix under the hood is just standard stuff and Apples hides away detritus like .plist files. And sandboxed apps have their own little stub filesystems too.
Anyway I like the idea of GoboLinux a lot but kind of think GUIX, just abstracting it away might be the right approach.
I use both. I see no improvement whatsoever in the BSD approach.
The external monitor fiasco is a dealbreaker for me.
Unless you mean stuff like configuration? I think user configuration would still reside somewhere under the user's home dir
2. /sbin, as distinct from /bin, is for system management programs (not normally used by ordinary users) needed before /usr is mounted.
3. /usr/bin is for distribution-managed normal user programs.
4. There is a /usr/sbin with the same relationship to /usr/bin as /sbin has to /bin.
5. /usr/local/bin is for normal user programs not managed by the distribution package manager, e.g. locally compiled packages. You should not install them into /usr/bin because future distribution upgrades may modify or delete them without warning.
6. /usr/local/sbin, as you can probably guess at this point, is to /usr/local/bin as /usr/sbin to /usr/bin.
Nothing makes me feel dumber than trying to figure out where the heck anything is or gets placed in my Ubuntu machine.
And this is made somewhat worse by Linux file managers trying to hide any part of the filesystem that’s not your home folder or mounted drives.
I get why it’s done, the directory structure of your average Linux install is an absolute maze that’s sometimes confusing even for the technically inclined, let alone the home users targeted by major distributions. It’s ultimately treating the symptom and not the cause, though, and I think more Linux distributions should give serious thought to modernizations of their filesystem structures (as Gobo has).
It’s tempting to play with this myself. My goals would be to come up with a structure that’s reasonably self-explanatory, guides novices away from the dragons, and allows file managers to hide very little (maybe nothing) without consequence.
"dev" is obviously for developers. "run" is where the apps are located. "bin" is the recycle bin.
Fun comes when you have things like minecraft launchers that contain everything and all the worlds and saves inside the bundle.
While I agree with that in principle, in practice that's not true for a lot of applications that put a lot of stuff into ~/Library and /Library, and it's not unusual to see multi-step manual instructions on how to uninstall some apps on macOS. (Especially important if those apps add Login items) Windows' Add/Remove Programs at least gives a central space to trigger an uninstall, and most apps stick to it properly.
> To that, I can only respond that, in a properly configured shell like the one that comes by default with GoboLinux, typing /Programs takes the exact same number of keystrokes as typing /usr: slash, lowercase p, Tab.
You know why it never bothers me when I navigate in PowerShell (or cmd.exe for that matter)?
Because the shell is helpful for me and don't try to force me to conserve precious ticks and memory of PDP-11 lacking any usability.
It's always amusing to hear 'case sensitivity rUl3z!' fans who totally miss what it's just the result of the constraints of the original systems. It's not a feature.
More so, it's explicitly addressed:
>> To that, I can only respond that, in a properly configured shell like the one that comes by default with GoboLinux, typing /Programs takes the exact same number of keystrokes as typing /usr: slash, lowercase p, Tab.
>> https://gobolinux.org/doc/articles/clueless.html
Just 'set completion-ignore-case On' and have your life immensively better. Why? Because you now would need one less Shift keystroke per every filename starting with capitalised letter even if you don't use GoboLinux.
Or continue like it's still 1977, why not, your VT100, your rules.
EDIT: oh, noticed this later:
> Why bother installing another shell instead of just sticking with bash for normal navigation?
Yes, you don't even bother to know your own shell.
Just saying... macOS does this by default, and a few months ago, I tried to delete a folder called `~/ladybird` and accidentally nuked `~/Library` instead. I wasn't expecting it to autocomplete a filename with a different case.
For non-Mac users, `~/Library` holds more or less all the state for your user account. With it gone, not only do you lose all settings and things, you can't even log in. I had a machine in a very unstable condition and no time to fix it.
I put it to sleep, left it for a month or so until I had a couple of hours spare, created a new user account with admin rights, copied all my files to that account, removed my damaged account, rebooted, created a new user account for myself, copied all my files back in, reset permissions as appropriate, and then logged in to it.
I then had to re-configure all my apps, which took most of the time. Now the machine was stable again, I cleared out the stuff in the admin account.
(No, it's not connected to my network TimeMachine, because it's my work laptop and I want to keep that stuff separate from my personal stuff on my home Macs. All the data is backed up to my company's cloud servers, but that doesn't store any macOS config stuff.)
So in the end, I just had to recreate my browser profiles, reimport my bookmarks and stuff, recreate all my email accounts in Thunderbird – because Mozilla still hasn't got Mozilla Sync for T'bird, dammit – and it was an inconvenience. No actual data lost.
But it has left me strongly conflicted on the subject of case-insensitive tab-completion.
Whether literally any shell can, I don't know. With zsh, bash and tcsh it is certainly possible.
set completion-ignore-case on
in your .inputrcedit: Now I see it's a 20-year project.
That to say the least, the current mess is being forced down or throat by steam, unless your distros don't play video games.
And among the population of gamers, I am pretty sure a large majority have a dedicated gaming rig.
This seems, at face value without a deep understanding, to be the simplest way to do it. Again the caveat is my lack of knowledge.
Flatpak and NixOS are more complex because it's worth it. For example, they don't duplicate exact versions of dependencies on disk.
Doesn't feel like GoboLinux would either, does it?
FreeBSD does a good job with this: applications are installed into a standard Unix filesystem with conventional packages and the ports collection. Isolation is then implemented via jails.
The Linux equivalent of using standalone isolation layers, like firejail, on top of standard distro packaging, is far superior to Flatpak.
All of these are all still behind how Android stores apps. On Android each application can be distributed using a single file that is easy to distribute. Each application is properly sandboxed. Each application gets its own directory. And something all of the other things mentioned here are missing, each application gets its own subdirectories in the app's directory for storing its state (there are different ones for each user).
I ran GoboLinux 012-015 for a few years on a server that I used for hosting version control software and for the most part it kicked ass.
What was a bit of a stumbling point is that if you needed a package that didn't readily exist, you'd have to create the recipe. The language for creating GoboLinux recipes is perfectly understandable, the issue was often one package would depend on a dozen or a few dozen libraries and you'd spend a lot of time chasing that down, getting the versioning for those libraries right, THEN finding a URL for those libraries/packages, and THEN creating the recipe.
I eventually moved over to Debian and I still cringe and config files in "/etc" maybe the binary was put in "/usr/bin" or "/usr/local/bin".
I'm in the camp that finds systemd annoying and kind of like an octopus (you'll often resort to using a find command to locate the associated .service file, you can't rely on them being in once place, the CLI isn't really intuitive) in contrast Gobo had a very simple set of scripts to manage services and it was very easy to work with.
But, the convinience of just being able to 'apt get' what you need or 'dpkg -i <blah.deb>' outweighs the much more sane and intelligence behind GoboLinux. These days the number of Linux distributions people support has dropped from the myraid of options it used to be to now almost always including Debian (or Ubuntu) by default so you it's unlikely you can't get a package or some program installed, even if it outside the repositories.
macOS definitely does something similar to GoboLinux and it makes working with macOS on the CLI (at least prior to the current versions which are fairly user-hostile) pretty easy -- your pen drive will be located in /Volumes, configuration files for a program under ~/Library, etc.
FWIW, if the service is loaded you can just `systemctl status foo` and it'll tell you starting on the second line of output exactly what file(s) are in play, ex.
# systemctl status getty@tty1.service
● getty@tty1.service - Getty on tty1
Loaded: loaded (/lib/systemd/system/getty@.service; enabled; preset: enabled)
=> /lib/systemd/system/getty@.serviceIt's frankly kind of inspiring that they've stuck with it.
https://www.gnu.org/software/stow/manual/stow.html
This was very useful in early 2000s running shared linux machines with a diverse set of software for scientific applications.
(He was a local GoboLinux fan, but went off the map. Hope he's fine.)
So, a dependency map that contains "Foo = 1.0" would cause Foo/1.0/bin/uninstall.sh to be the one mapped to /System/Index/bin.
This is way more meaningful than the /bin & /usr/bin split that distros are increasingly moving away from because multiple versions of the same software or forks can coexist on the same system. This model also makes /usr/local unnecessary.
You also said it here: https://news.ycombinator.com/item?id=39533554
I honestly don't see the connection.
The idea of Gobo was to replace the cryptic Unix filesystem hierarchy with something clearer and more human-readable, and in so doing, replace a whole bunch of things that package managers do, making them almost unnecessary.
Your point doesn't address this at all. You're talking about building from source instead of using a package manager, as far as I can see?
But compiling from source still puts the resultant binaries somewhere in the existing Unix filesystem layout. It doesn't matter where the binaries come from. This isn't about where they come from -- it's about where they go.
It’s a shame that it didn’t get more traction. We probably wouldn’t have needed Docker or any of the gazillion package managers that are proliferating today if it had.
100% feel this way too. So much of the reason why we use containers is just not spreading crap all over the filesystem. It's why single binary distributables made popular by Golang are such a winner, ex: Caddy.
> the filesystem is the database
is such an epiphany for GoboLinux, truly atomic.
Of course nix also has one quite big issue, and that it is input addressed rather than content addressed, but its moving towards content addressed model which will reduce rebuilds and resource use https://nixos.wiki/wiki/Ca-derivations
Edit, additionally, yes. Such distributions are suitable for essentially any task for which any other distribution is suitable. The primary caution that I would offer anyone when venturing away from RHEL/Debian is how much you trust whatever organization to still be around in five years. If you're comfortable managing everything yourself, pick whatever; otherwise, it's "safest" to choose something that either contractually will still be around (RHEL), or is governed in a way that ensures some continuity (Debian).
It came along 22 years after Unix itself.
It's never too late.
Remember that Windows itself was a flop until version 3, and that -- Windows 3.0, in 1990 -- was the little snowball rolling down a mountain that brought multitasking multimedia networked GUI computers to the mainstream.
And thereby created the mainstream marketplace of x86-32 computers: the substrate that allowed Linux to grow.
(DOS made so little use of the 80386 that an 80286 PC was adequate, and after 5 years the 386 made little inroads into the mass market -- they were too expensive, even after the 1989 budget-model 80386, the 386SX. But Windows 3 ran much better on a 386 than a 286, and soon after Windows came along, the 286 was dead.)
Yes, they cite that among other UNIX like OSes while completely ignoring the most successful implementation of their idea, (by several orders of magnitude) Windows. I don't find that cute, I find it ignorant.
Jokes aside, this completely ignores the fact that there is a reason for /usr/bin and /usr/local/bin and /etc and the sbin directories. A lot of it has to do with permissions. If you've ever been a member of a multi-user server you might understand.
I will grant you tho; a lot of people never bother learning and just shove binaries where ever they can get it to work first.
In case anyone wants to know. Here is a good explanation:
I've administered multi-user servers and I can only guess at what you mean. Like... I've seen distros that default non-admin users to not having sbin directories in their PATH, but even then it's not like that's a security thing, it just makes your path a little cleaner. What security benefit do you see to the different directories?
(In fairness, I can see non-security reasons to split things up - the traditional reason is that /bin is local, /usr is on NFS and shared between every machine in the lab, and /usr/local is non-packaged software built from source. But none of that is a security argument.)
[1] https://gobolinux.org/doc/articles/clueless.html "I am not clueless"
Too, if /usr is on tape, that's a lot slower in random access than even a contemporary disk, which matters because you also don't have enough core memory to avoid paging binaries - so even things you might not need to fix a broken system still may be worth putting in /bin if you can afford the space, if they're frequently enough used to be worth the speedup.
I believe the difference between /bin and /sbin per se had to do with dynamic versus static linking, with /sbin reserved for statically linked versions of binaries critical to bring up or repair a system - after all, if something in /bin is linked against libraries in /usr/lib, then you still won't be using it if you can't mount /usr.
I'm not so sure about that part, though; it's been a very long time since any of this mattered at all to how Unix is operated in practice, and it is really only of interest to those curious about how the constraints of early hardware informed the evolution of historical filesystem layout conventions. Even I'm not old enough to have actually worked with such systems, although I don't miss it by much, and am certainly old enough to have studied a great deal more about them than some.
edit: If you're really interested in the topic, then you should certainly spend some time with Rob Landley's collection of historical documents [1], which Google is apparently no longer competent to find based on their content - some of this I was actually looking for in the course of composing this reply, and only found it when I happened to search the name on a mailing list message linked in another reply here. So much for "information wants to be free" - apparently on today's Internet there's no money left in making information able to be found.