4 ms·
Don't even get me started on the registry.
by TylerE 1mo ago
Don't even get me started on the registry.
- self_awareness 1mo agoHow's registry different than ~/Library/Application Support?
- frollogaston 1mo agoIt's not a directory tree you can just browse in the filesystem, it's a few database files. Idk much about Windows, but at first glance I like how you can browse the Windows registry all in one place without digging through other files.
- self_awareness 1mo agoBut it has directories and files inside, right? It's only the program that is used to browse is different. It's like you don't use explorer but regedit. It's the only difference. On macOS it's not like you can always type what's inside the plist files with a text editor, sometimes you need to use 'plutil' anyway (if a plist is binary). So to browse Application Support you still often need thirdparty software anyway. Years ago I did a small project that mapped windows hive (registry) files as a filesystem through fuse on linux. It mapped to a filesystem concept nearly flawlessly. edit: can't reply anymore for today ('posting too fast'), so i just reply here: What is a file if not a key/value entry in a directory? Anyway, you can put custom binary data in registry, one value type is just "binary". But you shouldn't! Just like in Application Support - you can but you shouldn't. Registry just enforces it more. Entering regedit also requires to elevate it if you want to change system settings (HKEY_LOCAL_MACHINE). Changing user settings doesn't need elevation (HKEY_CURRENT_USER).
- frollogaston 1mo agoYou use regedit, and only registry keys/values are in there, not other kinds of files. And editing systemwide plists on Mac means authenticating each time you touch one unless you're using a sudo terminal or sudo Finder. It does meaningfully change the experience for whoever is digging into it. Also, Mac plists have two formats, xml and the non-text kind. Now mentioning that, I kinda hate both formats.
- inigyou 1mo agoWhat, you don't like <key>foo</key><string>bar</string> instead of foo=bar or <foo>bar</foo>
- frollogaston 1mo agoThe dicts and arrays make it even more fun
- frollogaston 1mo agoSorry to hear they're throttling you... ~/Library/Preferences is the usual location for plists. Application Support usually has other stuff, but can have plists too. Plists can be anywhere I guess, but the `defaults` CLI only looks in a few places unless you specify a path manually.
- inigyou 1mo agoActually the registry doesn't enforce that the stored bytes match the type. If you want, you can store 800 bytes and call it a DWORD.
- wpm 1mo agoBecause the registry holds configuration data, and Application Support holds various helper tools and other random crap? The closest analogue to the registry on macOS are the ~/Library/Preferences and /Library/Preferences folders.
- inigyou 1mo agooh my god, non-file structured data! That's terrible! Everything should be a file in ~/.appname!