Search this site:

Configuration files for humans and for computers

Erich wonders about a sane way to reorganize the configuration file mess we have, going in fact farther than Aigars’ previous rant on the topic: Not only it would be really desirable to do away with the dotfile-as-everything-but-more mess, it would be really, really nice to do it in a more or less standard way. Erich suggests four base configuration syntaxes - I won’t reveal too much, as his message deserves being read as well ;-) But hey, I have a question here: I know XML is well-established and well-supported, and I’m told there are a couple several hundred thousand people who think it is really cool and even human-editable. Still, I hate XML. Configuration files are often, yes, written by the programs themselves - But one of my most beloved features of Unix-like systems is that I am free to poke in them, as they are meant to be human-editable. XML is not human-editable. I’m sorry, say whatever you want, but keeping XML valid and happy is… Just not for me. Why not pushing instead something prettier, and with almost the same feature set of XML, plus a much-enhanced readability/modifyability? Why not promoting my dear and beloved YAML? (Yes, the YAML project home page is valid YAML) [update: I was kindly requested in a comment to link to the YAML project page, which hosts more information. I’m keeping the other link anyway. ] Note: No, this only looks like a rant, but it is really a question. Honest!


Gunnar 2007-01-16 06:07:55

Re: Re: Configuration files for humans and for computers

Well, in a Unix system, you have Unix tools. In the case of an emergency, the toolset will always include a simple vi-like editor. It won’t necessarily include Conglomerate or Eclipse!

Marius Gedminas 2007-01-12 15:13:36

Re: Configuration files for humans and for computers

While it is a mistake to push XML everywhere, there are use cases where XML is the best choice. Structured documents, for example. I don’t know about configuration files. It would be silly to use XML where INI would suffice.

But YAML? I tried to read the spec once. I barely retained my sanity. How can anyone remember all the syntactic quirks and different data types? How can anybody claim it is simpler than XML?

(BTW there are error messages above the header, and the text of the posting is squished into an uncomfortably narrow column in the middle of your blog page.)

ssam 2007-01-14 04:46:09

Re: Configuration files for humans and for computers

“XML is not human-editable”

is that because you are using tools designed for editing text files?

ascii is not human-editable if you only have a binary editor. you would regularly make files that were not valid ascii. thats why unix has should good text utilities.