Hacker News new | ask | show | jobs
by YourDadVPN 1095 days ago
I think the best way to achieve this is by providing an OS API that results in the files always being created in the same place. Applications/libraries could still choose their own filenames and syntax, just the location would be OS controlled. I think there is room for a new desktop/laptop OS to emerge and one good idea from mobile OS design I would like to see is having everything be an API call that allows the OS to impose standardisation, permissions and user preferences rather than the free-for-all desktop OSes have (though I propose letting the user run non-compliant applications, and not porting the iOS app store only model into the OS).
1 comments

You're basically suggesting the windows registry.
The problem with the Windows registry, at least back in the day, was that it was a single file that could be corrupted and it would wreck your whole system.

I think having a standard utility API for *nix configs makes a lot of sense. I'm surprised it doesn't exist.

I tried to find one, and there are some libraries for reading and parsing in every language, but nothing that seems to cover everything.

This bash script seems to be a fairly "built in" way to parse them: https://unix.stackexchange.com/questions/441076/which-is-the...

> The problem with the Windows registry, at least back in the day, was that it was a single file that could be corrupted and it would wreck your whole system.

Exactly. But Registry has been using NTFS and it's capabilities for rollbacks and recovery. Therefore, the problem is mostly solved. There are occasions [0] of bugs causing corruptions though but they are very rare.

0. https://www.bleepingcomputer.com/news/microsoft/windows-10-n...

macOS has something similar also with defaults [1].

https://macos-defaults.com/#%F0%9F%99%8B-what-s-a-defaults-c...