News for hackers. Stuff that matters.
Re:Writing a Simple Windows Driver in Rust by pjmlp on Saturday February 08, 2025 @02:22PM (#42985444)
Just like a UNIX file system ends up filled with .dotfiles garbage I didn't ask about to have around.

And better know where they come from, as there is no clean way to safely remove them.

Re:Writing a Simple Windows Driver in Rust by p_ing on Saturday February 08, 2025 @03:13PM (#42985806)
Just get a registry! Problem solved ;)

Apps are terrible at this on Windows. Sometimes it's in %USERPROFILE%, sometimes in one of the three %appdata% folders, then My Docs, other times in %ProgramData%, and even worse, %PUBLIC%.

There's a registry for a reason, but even Microsoft doesn't use it for x-platform apps.

Re:Writing a Simple Windows Driver in Rust by keyringlight on Saturday February 08, 2025 @03:43PM (#42986012)
The only way I can see it getting solved is the OS sandboxing everything behind the scenes, redirecting everything the application spews in random locations to The One True Profile Folder per application. Even then it wouldn't be without challenges, off the top of my head some method if you actually wanted an application to get out of its sandbox and look at the real documents folder, another method for App1 to look at files in App2's sandbox (and detecting when this is desired), or what to do if an application is able to change how it identifies itself to the OS (new versions?).
Re:Writing a Simple Windows Driver in Rust by pjmlp on Sunday February 09, 2025 @03:55AM (#42989423)
Hence UWP, with its rampdown, the newly introduced Win32 app sandbox model for .msix distribution.
Re:Writing a Simple Windows Driver in Rust by pjmlp on Saturday February 08, 2025 @03:15PM (#42985829)
Like GNOME?

There are rules when to use what, but usually folks rather code away instead of reading documentation.

Re:Writing a Simple Windows Driver in Rust by the8472 on Saturday February 08, 2025 @04:41PM (#42986434)
maybe if microsoft had a registryfs...
Re:Writing a Simple Windows Driver in Rust by p_ing on Saturday February 08, 2025 @04:59PM (#42986548)
You can browse/manipulate the registry with PowerShell. There's an OOTB provider for it.

    cd HKCU:
https://learn.microsoft.com/powershell/scripting/samples/wor...
Re:Writing a Simple Windows Driver in Rust by the8472 on Saturday February 08, 2025 @08:10PM (#42987605)
[delayed]
Re:Writing a Simple Windows Driver in Rust by int_19h on Saturday February 08, 2025 @10:47PM (#42988284)
The registry hasn't been the recommended place for Win32 app settings for well over two decades now. The guidance is to only use it for system stuff that's already these, and have config files in the standard designated locations under %AppData% (depending on whether they are machine-specific or user-specific; ideally, apps are supposed to support both).
Re:Writing a Simple Windows Driver in Rust by pjmlp on Sunday February 09, 2025 @03:53AM (#42989414)
Also since Windows 8 it is sandboxed for Store apps actually.
Re:Writing a Simple Windows Driver in Rust by jandrese on Saturday February 08, 2025 @04:08PM (#42986225)
Dotfiles are going out of fashion as most stuff ends up in .config now.
Re:Writing a Simple Windows Driver in Rust by adastra22 on Saturday February 08, 2025 @04:30PM (#42986370)
That's a dotfile...
Re:Writing a Simple Windows Driver in Rust by paride5745 on Saturday February 08, 2025 @05:19PM (#42986678)
What is meant is that instead of ~/.app/config, you are getting now ~/.config/app/config.

It’s much cleaner and it comes with a more logical and useful split of config and cache stuff, e.g. you can just skip .cache when rsync-ing to a remote storage instead of having a long list of per-app escapes…

Re:Writing a Simple Windows Driver in Rust by queuebert on Saturday February 08, 2025 @06:20PM (#42987076)
Not really. Now when I want to uninstall something, I have to look in multiple places for its artifacts, rather than just nuking .<appname>. And there is no universal pattern of use. It's even worse than /usr vs /opt.
Re:Writing a Simple Windows Driver in Rust by ablob on Sunday February 09, 2025 @06:06AM (#42989920)
This is an issue that really can't be fixed imo. If use the scheme "app/storage" then migration/deletion of singular apps is easy, but if you want to touch just a part of every program (e.g. delete the cache) then its filled with the same tedium you were initially complaining about with regards to uninstalling. On the other hand, the scheme "storage/app" allows you to "nuke" the cache for every installed program without touching the config at all (while lessening the ease of complete removal).

As I don't usually remove programs (or install new ones, for that matter) the scheme that works best for me and many others is "storage/app". In an ideal world a hybrid scheme might be possible, but as it stands now it is not an option and one way has to be chosen over the other.

Re:Writing a Simple Windows Driver in Rust by adastra22 on Saturday February 08, 2025 @08:51PM (#42987818)
I understand what was meant. They're both dotfiles.
Re:Writing a Simple Windows Driver in Rust by saagarjha on Saturday February 08, 2025 @10:12PM (#42988129)
Uh, clearly that's a dotdirectory
Re:Writing a Simple Windows Driver in Rust by adastra22 on Sunday February 09, 2025 @04:52AM (#42989639)
Fair enough.
Re:Writing a Simple Windows Driver in Rust by int_19h on Saturday February 08, 2025 @10:50PM (#42988286)
The equivalent of .config on Windows is ~/AppData.

The problem, as usual, is that apps ignore it and do whatever they want. Such as e.g. using dotfiles directly in ~ instead.

Re:Writing a Simple Windows Driver in Rust by nicce on Saturday February 08, 2025 @02:30PM (#42985510)
> Just like a UNIX file system ends up filled with .dotfiles garbage I didn't ask about to have around.

Which one is better - a configuration file in some place or default configuration buried inside binary blob?

Re:Writing a Simple Windows Driver in Rust by ddulaney on Saturday February 08, 2025 @02:40PM (#42985580)
Default configuration IMO.

I actually really like the way git does it, where it reads each of these in order, last one wins.

- Default configuration compiled in

- Global configuration

- Per-user configuration

- Per-project configuration

You can opt-in to however much configuration complexity you need. Just cloning the occasional thing? Don't bother configuring, the global defaults are probably good enough. Simple commits and pushes? Make a user-level dotfile in your $XDG_CONFIG_HOME to set some basic info. Complex per-project aliases? If you want that, go ahead and opt in.

Contrast that with programs that just dump their whole default config into my home dir on first run. Just filling up with nonsense, often no way to tell what I changed or didn’t.

Re:Writing a Simple Windows Driver in Rust by nicce on Saturday February 08, 2025 @03:53PM (#42986110)
That is good one, I agree. I have seen some odd cases, where the configuration options were hided too well when they were compiled to the binary itself. But that is probably an another issue.
Re:Writing a Simple Windows Driver in Rust by hulitu on Saturday February 08, 2025 @05:00PM (#42986561)
> You can opt-in to however much configuration complexity you need.

TO DO. /s

Re:Writing a Simple Windows Driver in Rust by pjmlp on Saturday February 08, 2025 @02:44PM (#42985607)
Hardly makes a difference when the outcome is the same.

Also no one edits text files by hand, we use tools for that, tools that manipulate what is anyway a stream of bytes, whose meaning is given by whatever tool is used to manipulate such stream of bytes.

Re:Writing a Simple Windows Driver in Rust by Zopieux on Sunday February 09, 2025 @06:10AM (#42989929)
Speak for yourself.
Re:Writing a Simple Windows Driver in Rust by pjmlp on Sunday February 09, 2025 @09:36AM (#42990931)
I am indeed.
Re:Writing a Simple Windows Driver in Rust by hulitu on Saturday February 08, 2025 @04:46PM (#42986465)
> And better know where they come from, as there is no clean way to safely remove them.

Add a cron job to delete them ? /s

Re:Writing a Simple Windows Driver in Rust by queuebert on Saturday February 08, 2025 @06:18PM (#42987068)
You mean you don't need .local, .config, .cache, .fonts, and .<appname> x <# of apps>? /s

Makes me want to run off a read-only DVD.