Earlier quoted context omitted.
> If a user doesn't know what .ssh/ or .bash_history are, and it can hurt them to accidentally delete or modify them, why show them by default? Because they are there. To prevent accidental deletion you can show an icon with a skull and crossbones or name a directory "configuration files" so that it is obvious what's in there. > if they do get them there is no safeguard to stop them destroying the system If the folde…
> Hiding hidden files is annoying because you have to add -a to ls command Have you ever heard of aliases?
Dotfile madness (2019)
121–130 of 185 posts
Re: Dotfile madness (2019)
#122Earlier quoted context omitted.
You're directly depending on platform-specific stuff the moment you look up the user directory, because it's not $HOME on Windows either. There is a difference between being cross-platform, and being Linux but mangling it so it technically works on other platforms.
It's just a different variable: USERPROFILE. https://stackoverflow.com/a/42700844/512904 > being Linux but mangling it so it technically works on other platforms Sounds like the easiest way to solve this problem. I don't blame or shame developers for choosing it. This is simple and works everywhere: char * home = getenv("USERPROFILE"); if (home) { // Use home directory } The answer demonstrating the Windows API way h…
Just because you aren't used to it doesn't mean it's 'bullshit'. Might I provide a counterexample to the 'simplicity' of Linux? Developing video games natively on Linux is such a pain point that the industry has standardised around simply translating Windows syscalls and Direct3D shaders to their Linux equivalents, because the latter is so heavily fragmented to develop natively for. Also known as Proton.
Re: Dotfile madness (2019)
#123Earlier quoted context omitted.
>What's the point of hiding some of the files in a directory from user? It only makes things more confusing. If a user doesn't know what .ssh/ or .bash_history are, and it can hurt them to accidentally delete or modify them, why show them by default? It's like training wheels on a bike. >For example the folder might look empty but in fact it could contain thousands of hidden files. You want to delete it as it is empt…
> If a user doesn't know what .ssh/ or .bash_history are, and it can hurt them to accidentally delete or modify them, why show them by default? It's like training wheels on a bike. This is really the problem with the home directory. It’s supposed to be the place where the user puts their files, but it’s also a place where applications put their files, usually without asking the user. The battle is lost - the home dir…
Re: Dotfile madness (2019)
#124Earlier quoted context omitted.
> Hiding hidden files is annoying because you have to add -a to ls command Have you ever heard of aliases?
You are suggesting a workaround instead of solving the original problem.
Re: Dotfile madness (2019)
#125Earlier quoted context omitted.
The reason app developers think it's fine to dump them in $HOME is because Linux hides them. Those app developers do not bother hiding them on Windows. The specific functionality being used does not 'work just fine everywhere'. It is not the case that Linux functionality is How Computing Works with every deviation being 'out of the way', not even in a hypothetical world where Linux isn't the drastic minority of machi…
Regular windows users do not visit $HOME often either. They work mostly in Desktop, Documents and Downloads. They can’t even “go up” from these anymore for more than a decade. None of the non-tech users I know would even understand me if I told them to look at their homedir. So yeah, it’s fine regardless. Btw, many native, no-linux windows apps, including Microsoft ones love to create their bs folders like “My Games”…
Re: Dotfile madness (2019)
#126What I personally find more egregious are dotfiles and dot-dirs on Windows , created by half-baked ports of Unix-first software (such as `ssh`). Windows has `%APPDATA%` and `%LOCALAPPDATA%` that are accessible with `ShGetKnownFolderPath`[0], using the appropriate `KNOWNFOLDERID`[1]; all programs should put their configuration and cache data in these paths. Windows also doesn't know what the dot at the beginning of a…
I think "hidden" files are a bad idea. What's the point of hiding some of the files in a directory from user? It only makes things more confusing. For example the folder might look empty but in fact it could contain thousands of hidden files. You want to delete it as it is empty but accidentally delete important system files. Even worse, imagine if all files on an USB drive are marked as hidden. You see that the driv…
By default, Explorer hides hidden files (and goes one step further and doesn't display file extensions: why???), so do Finder, Dolphin, Nautilus, and even `ls` by default.
Re: Dotfile madness (2019)
#127Earlier quoted context omitted.
The reason app developers think it's fine to dump them in $HOME is because Linux hides them. Those app developers do not bother hiding them on Windows. The specific functionality being used does not 'work just fine everywhere'. It is not the case that Linux functionality is How Computing Works with every deviation being 'out of the way', not even in a hypothetical world where Linux isn't the drastic minority of machi…
> Linux hides them Linux doesn't hide anything. It's POSIX and GNU programs that choose not show anything that starts with a dot by default. As far as Linux is concerned they're just normal files on the file system. It doesn't have to be that way. Personally I have my system configured so that all "hidden" files are shown because I hate the concept of hidden anything. I used to do this in Windows too. > The specific…
I would actually argue otherwise: the registry is the perfect place to put configuration data, provided Microsoft's guidelines[0] on registry key creation/deletion and hive use are followed. I would argue every OS should have its own 'registry' for a universal location to set configuration for programs.
On the other hand, if every application has its own configuration file, then every application shall have its own configuration file parsing/serialising/deserialising routine. It's also what has led to this explosion of 'config file formats': .json, .yaml, .ini, .conf, .cfg, .toml, .xml.
I guess this is why people dislike systemd so much: it reminds them too much of Windows.
[0]: https://learn.microsoft.com/en-us/windows/win32/sysinfo/regi...
You appear to have an attitude of UNIX/Linux > Windows, which is unfortunate. The two OS families are different, but I personally believe neither is superior to the other. Both OSs suck in their own ways, both OSs are better in their own ways (this conclusion after using Windows and Linux both on a 70:30 time ratio).
Windows is in every way as modern an OS as Linux is, but just like Linux, has inherited strange baggage from its 40-year-old past, like 'a file cannot have COM in its name'.
Re: Dotfile madness (2019)
#128Earlier quoted context omitted.
Asked out of ignorance, but do the envvars not allow one to easily co-locate data/config/cache by setting them all to the same value?
Not in a way that would be useful here, I think: I prefer ~/.firefox/cache to ~/.cache/firefox and this requires the variables being unique per program (although, you could probably wrap each program with a script that sets the relevant environment variables to achieve this effect)
Each of the data, config, and cache envvars would all be set to ~/.data in this setup (though “data” isn’t a name I’d use)
Re: Dotfile madness (2019)
#129Earlier quoted context omitted.
It's just a different variable: USERPROFILE. https://stackoverflow.com/a/42700844/512904 > being Linux but mangling it so it technically works on other platforms Sounds like the easiest way to solve this problem. I don't blame or shame developers for choosing it. This is simple and works everywhere: char * home = getenv("USERPROFILE"); if (home) { // Use home directory } The answer demonstrating the Windows API way h…
'This Windows bullshit' is merely the Windows equivalent of a veritable zoo [0] of Unix/POSIX/Linux headers and functions including unistd.h, sys/types.h, sys/socket.h, fcntl.h, sys/ipc.h, semaphore.h, stdarg.h, signal.h, pthread.h, and so on. Just because you aren't used to it doesn't mean it's 'bullshit'. Might I provide a counterexample to the 'simplicity' of Linux? Developing video games natively on Linux is such…
Honestly I don't even disagree with you. I think POSIX sucks. I think even the libc sucks. However there is no way you can look at the Windows API mess above and think it's somehow better than the portable and clean getenv function call. Maybe you can "get used" to that cruft but I can't. If I had to deal with code like that the first thing I'd do is abstract it away so I don't have to deal with it anymore. That's exactly how Windows is and should be treated by everyone.
Video games, your counter example, are probably the most platform-specific software imaginable. There's a reason pretty much everybody uses an engine these days. There is no way you can compare that stuff to getting a user's home directory and writing files in there.
Also, for video games it ultimately doesn't matter how sucky the APIs are since it's all about market share anyway and people will use whatever they need to get it done. First parties don't put in effort into porting games to Linux because they don't see the money. Valve puts in effort because it gives them their own platform that they control and therefore leverage over Microsoft and its app store. Emulation and compatibility layers are a proven solution when first parties aren't playing ball. If they don't want to make it work on Linux, people will make it work whether they want it or not.
Re: Dotfile madness (2019)
#130Earlier quoted context omitted.
> Linux hides them Linux doesn't hide anything. It's POSIX and GNU programs that choose not show anything that starts with a dot by default. As far as Linux is concerned they're just normal files on the file system. It doesn't have to be that way. Personally I have my system configured so that all "hidden" files are shown because I hate the concept of hidden anything. I used to do this in Windows too. > The specific…
> Even worse would be suggesting the use of the registry. I would actually argue otherwise: the registry is the perfect place to put configuration data, provided Microsoft's guidelines[0] on registry key creation/deletion and hive use are followed. I would argue every OS should have its own 'registry' for a universal location to set configuration for programs. On the other hand, if every application has its own confi…
Few people follow that stuff. I wouldn't be surprised if Microsoft's own people didn't follow that stuff. The result is of course a mess that users have to clean up with software like CCleaner or whatever people use these days.
It sucks even if those guidelines are followed. Configuration is data and belongs to the users. I know people who really like portable applications that they can keep on a USB drive and use anywhere and this registry bullshit breaks that.
> I would argue every OS should have its own 'registry' for a universal location to set configuration for programs.
And I would argue otherwise. The Windows registry is essentially a poor excuse for a proper file system. I think at least one Linux desktop environment tried to reinvent this crap and it sucked just as hard.
> every application shall have its own configuration file parsing/serialising/deserialising routine
The Windows registry values are essentially memory dumps of C types. It's perfectly possible to simply dump raw bytes into binary files on Linux too if you don't care about stuff like endianness. The result would be strictly superior to the Windows registry because the files are being stored in a real file system.
> I guess this is why people dislike systemd so much: it reminds them too much of Windows.
I like systemd.