Live data from Hacker News

Why the Windows Registry sucks technically (2010)

rwmj.wordpress.com

161–170 of 342 posts

Re: Why the Windows Registry sucks technically (2010)

#161

Earlier quoted context omitted.

> The UNIX way is undeniably more flexible since it isn't a virtual filesystem, it is just a filesystem. Unix simply doesn't have a "way" in that regard, other than a loose convention to put text files in "/etc". Every application comes up with its own format. Parsing that file is application-specific. Updating a value in a text file means re-writing the whole file again. It is a technically-inferior approach that ha…

> Unix simply doesn't have a "way" in that regard, other than a loose convention to put text files in "/etc". So? The registry doesn't have much of a way either - the actual fields are simply a loose convention. > Every application comes up with its own format. Same with Windows applications - one application might store an IP address as a dotted-octet string, another might store it as a single 32 bit integer. > Pars…

> the actual fields are simply a loose convention.

Let alone some windows program end up just save a blob in it and totally ignore the typing.

Who care about the field type if I can save everything in a single blob(?

Re: Why the Windows Registry sucks technically (2010)

#163
post #88

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.

The people at nixos and guix are doing it differently. No longer is the configurarion just state in files, scattered who knows where that cannot be understood fully by anyone. Insteady everything is defined centrally and then neatly versioned and managed by the system. If you think the unix way of throwing files in a directory sucks, check them out!

Unfortunately, Nix's documentation sucks. Plus, there's a steep learning curve to the Nix programming language. I don't understand why they couldn't just use a language instead of inventing one that is only usable within the Nix system.

Overall, really cool idea (dropped my jaw when I first saw it in action), but poorly implemented.

Re: Why the Windows Registry sucks technically (2010)

#164
post #116
post #95

Earlier quoted context omitted.

> I can’t and shouldn’t be able to write to /etc as an ordinary or guest user. You're right, you shouldn't. If you are able to, your distro is very odd and I'd recommend seeking a new one. > Sounds like you’re just one of many anti-windows people, exactly what was pointed out about people bashing the registry. There's no need to attack people.

This is emphatically NOT true. If you absolutely could not write to /etc, then you would never be able to change your password. The passwd, chsh, chfn, and other utilities allow a non-privileged user to make controlled changes to privileged files via the setuid/gid system calls. A user can trigger controlled writes to files in /etc.

It's more so that users can ask the administrator to write to `/etc/` for them.

The administrator in this case has an automated tool that handles this requæst but the actual user the writing occurs under is the root user.

Re: Why the Windows Registry sucks technically (2010)

#165

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.

Actually there are lots of exciting non unix OS. https://distrowatch.com/dwres.php?resource=links It's just that they don't have market share or a raison-d'etre for widespread adoption.

Be and Morph are worth a look.

Re: Why the Windows Registry sucks technically (2010)

#166
post #138
post #18

Earlier quoted context omitted.

To be fair, Microsoft doesn't rely on the registry for complex configurations either, even IIS uses .config files.

You can’t look at HKEY_CLASSES_ROOT and claim with a straight face it’s not complex, and it’s a central piece to how a lot of things work in Windows.

HKCR has a lot of entries, but the data underneath those entries isn't particularly complex.

Its only really big misstep (apart from the fundamental issues with the registry in general) is that file associations and COM registrations are all intermingled in the same namespace. But those can be and are interconnected (see how the Office file types handle their registrations, for example), so it's kind of understandable how they ended up where they did.

Re: Why the Windows Registry sucks technically (2010)

#167
Therein lies the secret of corporate success. This was not dobe by an expert - neitger by a bearded guru who learned things the hard way nor an academician who studied databases and data representation, but by a reasonably competent employee. Sort of like a corporate equivalent of the lowest bidder. Thus, the code does only what the immefiate requirements were at the time.

Re: Why the Windows Registry sucks technically (2010)

#168

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…

> 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…

> Sure it would be great if all configuration was written in a single configuration format.

I think the root cause is there is and was no readily available system standard/interface. I would claim that the majority of the files are doing boring things and could have, and would have, been made in some standard format, and possibly placed in some standard organization, if a system standard had existed. Or, perhaps I've too heavily discounting the desire for nerds to create something new, even when reasonable, but not perfect, alternatives already exist.

Systemd showed me how homogenization and standards are generally disliked, when it comes to things around configuration files, even if there's absolutely massive utility.

Re: Why the Windows Registry sucks technically (2010)

#169
post #159

Earlier quoted context omitted.

Application writers are free to use which ever format they choose on Windows, as well. The Registry is just yet another option -- Microsoft does not force developers to use it. I don't see the Unix convention as the more "liberal" one, here. It typically has _one less_ option.

> The Registry is just yet another option It's not just "another option". It's a system standard option that exists, and can be easily accessed programmatically. There's no equivalent in Unix, since there is no standard, and whatever is available will depend on the distribution. "Here's a built in option, but do whatever" is very different than "do whatever!".

Do you know where Microsoft calls out the Registry as the current best practice in https://docs.microsoft.com/en-us/windows/apps/?

Re: Why the Windows Registry sucks technically (2010)

#170

I really appreciate when people use technical facts to criticize something, like with this. It is a well written take-down of the implementation of the Windows Registry as of both today and 2010. I suspect if the concept of the registry was created today it would look more like a database (e.g. Sqlite), although organizing it like a virtual FileSystem does have a certain appeal, and unfortunately I don't know of a da…

> The UNIX way is undeniably more flexible since it isn't a virtual filesystem, it is just a filesystem. Unix simply doesn't have a "way" in that regard, other than a loose convention to put text files in "/etc". Every application comes up with its own format. Parsing that file is application-specific. Updating a value in a text file means re-writing the whole file again. It is a technically-inferior approach that ha…

OpenWRT worked around this by creating UCI, its own configuration system that it uses to generate all package-specific configuration files: https://openwrt.org/docs/guide-user/base-system/uci

Configuration for all supported packages is stored in files under /etc/config in UCI's own text format, and OpenWRT's init scripts generate service-specific config files based on the UCI settings when the service is (re)started. For example, to configure Samba, users don't edit smb.conf directly, they set UCI settings like samba.workgroup, sambashare.path, etc.

There's a `uci` command-line utility to read and modify settings, and UCI forms the basis for the OpenWRT web interface.

debconf does something similar for Debian packages, though I haven't seen any packages that use debconf to completely supplant vendor configuration formats the way UCI does. https://en.wikipedia.org/wiki/Debian_configuration_system

Post reply on HN