Live data from Hacker News

Why the Windows Registry sucks technically (2010)

rwmj.wordpress.com

261–270 of 342 posts

Re: Why the Windows Registry sucks technically (2010)

#261

Earlier quoted context omitted.

I love editing files in /etc ending in conf! Some are pseudo-INI (OpenSSL), some are pseudo-XML (Apache2 and friends), some are some kind of unholy amalgamation between C and YAML (nginx, dhcp daemons), others are some kind of TOML derivative (systemd, NetworkManager) and there's also some diet JSON in there! Netplan uses YAML, of course, though JSON will probably also parse. It's always a fun adventure to reverse en…

> some kind of TOML derivative (systemd, NetworkManager) A bit off-topic, but it's funny to me that you identified these as a "TOML derivative", when both of the mentioned pieces of software predate TOML. Systemd uses D-Bus's flavor of INI. IDK if NetworkManager uses exactly that same flavor or not, but it's pretty similar at least.

Fair enough! I don't know the exact formats and their history, all of that was developed long before I started really using Linux.

Either way, when I edited the files for the first time, it's like "oh, it's like TOML but...". They're not necessarily bad, though nesting of configuration groups isn't always as obvious. I suppose these are part of the evolution of Linux config file design!

Re: Why the Windows Registry sucks technically (2010)

#262
post #63

Earlier quoted context omitted.

I get where you're coming from, but I think the biggest pro for the "UNIX way" is that text on a filesystem extremely accessible. You don't need a specialized tool to read & modify configuration, you just need a text editor. And while there's no standard for how the data is structured, it's usually pretty easy to figure it out from context. I think it's also really easy to underestimate all the tooling built around t…

General Linux tools built for text, in a world where everything is plain text and the shell doesn't know how to navigate anything other than a file system. In PowerShell you can cd into HKEY_LOCAL_MACHINE as easily as any drive, and Select-String is perfectly capable of searching registry keys. The baseline is only text and files on systems that don't have anything better to offer.

> The baseline is only text and files on systems that don't have anything better to offer.

Also pretty much all external programs on Windows. Anything that isn't itself implemented as a PowerShell cmdlet has this problem. And it's all shell-specific.

Re: Why the Windows Registry sucks technically (2010)

#264
post #126

Earlier quoted context omitted.

What UNIX way? The religious text files scattered everywhere on the FOSS clones? The adoption of registry ideas by GNOME on gconf? The configuration databases used by HP-UX and Aix? The plists used by NeXTSTEP and macOS? The settings per app used on Android (technically UNIX based at its Linux kernel)

Exactly this. Unix is a bit of a mess, at least that's understandable because it's 'open'. MS registry is a bit nutty, it should be refactored in some simple, clean way, which is apparently extremely difficult to do for big companies, especially those that consider 'backwards compatibility' to be 'everything'.

> especially those that consider 'backwards compatibility' to be 'everything'.

Thank god there are companies that still think about backwards compatibility and are not intent in breaking everything because there's a shiny new thing ... ahem ... "refactoring in some simple clean way"

Re: Why the Windows Registry sucks technically (2010)

#265
post #85

I don't understand how people figure out what registry entries to make out of the ether for certain changes. I don't know why most programs have an in-program settings menu, an external settings.json or something similar, and then registry entries to configure similar things. I don't know why Windows has almost 0 policing about programs editing the registry. If you uninstall a program, why is it so hard to remove all…

This is mindboggling to me. One of the richest companies in thew world just leaves this janky partially documented mess for developers to wade through like mud. How can MS claim to hire 'the best of the best' when such a commonly interfaced piece of their product is garbabe? Why isn't it refactored to be clear, concise, with simple documentation and tutorials? If we were to be cynical we could say 'they don't want yo…

backwards compatibility. that's why.

Re: Why the Windows Registry sucks technically (2010)

#266

The Windows registry is sort of a copy of the Mac's "resource fork". The original Mac had files with both a data fork, the file contents, and a "resource fork", which is a tree-like database. Preferences and such were stored in resource forks. This was a good idea, implemented badly. Because it was originally designed for floppy disks, writes were very expensive. So resource forks were left open in an inconsistent st…

files on NTFS also have alternate streams. this is how Windows knows you're executing a file downloaded from the internet via internet explorer, for example.

it's easy to hide stuff in those streams as well.

Re: Why the Windows Registry sucks technically (2010)

#267
post #70
post #53

Earlier quoted context omitted.

Nobody in their right mind would put every field into a separate file though. (Yes, I do know about qmail.)

Yes but that is the comparison being made, that the registry is like a filesystem and thus should have just been a filesystem. If the suggestion is to put many fields in one file then that's a different suggestion.

There have been filesystems that don’t use strict block sizes - Reiser4 IIRC. It’s not done often because the savings are tiny and it complicates implementation a lot.

A bigger problem I can see is that Unix file system semantics is… hairy; see rename(2) atomicity guarantees for example. So it could make sense to replace it not with a typical filesystem, but something more RESTful.

Re: Why the Windows Registry sucks technically (2010)

#268
post #61

Earlier quoted context omitted.

> Manually editing the registry though... That way lies madness. It's much scarier and it's much more fragile. How... exactly? There's no way to create a syntax error as trivial as you can in config files. How is using regedit or powershell commands more fragile (I understand "scarier" in a way everything you're not used to is scary).

Well the article points to a way of preventing following entries to be read by having an entry in non alphabetical order. But how often have you ran into syntax errors for system configuration files in Linux? I can't say that this has been much of an issue in my experience.

Start making raw edits directly to an ext4 disk rather than using published libs/APIs, and you'll soon find some new horrors to be scared about.

Re: Why the Windows Registry sucks technically (2010)

#269
post #178

https://www.libelektra.org/home is an attempt to bring a registry to linux. It doesn't have the problems of its windows equivalent. I wish this project was more popular.

Why? The windows registry is a disaster. The whole idea is wrong. You want to keep configuration with the thing being configured. Most Mac installs are "drag the folder on to your disk". You are done.

Microsoft didn't even intend to use it for long. developers discovered apis for it and started using it despite it being unsupported at the time.

Microsoft's extreme backwards compatibility decisions have kept it around since then, and now since it is still supported, it is still used.

the registry was first intended to be an internal implementation detail while something better was designed. us hackers ruined that plan, but we're still happy to blame Microsoft for their compatibility promises and our own misuse of the registry.

Re: Why the Windows Registry sucks technically (2010)

#270

Earlier quoted context omitted.

I hate this fanatical love of the UNIX way. I really hate that as of today Windows is the only non UNIX OS. I trully believe that this fact set us back. No more exciting new OSes only boring unix.

What good does having a non-UNIX OS do if it insists on doing everything worse than UNIX? The bet on "everything is an object" was a honest and competent one, but unfortunately it didn't work. "Everything is a file" works better on practice. Unfortunately, that was the last real attempt on Windows to improve things. Yes, the lack of diversity in OSes is bad. But Windows doesn't fix it. (Android and iOS were the last…

> The bet on "everything is an object" was a honest and competent one, but unfortunately it didn't work. "Everything is a file" works better on practice.

With the right interface, the object approach can be more pleasant to use. Administration via PowerShell is way more consistent than in Bash.

Post reply on HN