2

I'm serious - is it really fun for *nix sysadmins spending half of their life on spotting typo in httpd.conf ? Why not use xml or json - (write gui tools would be easier)

1
  • I actually love this question. There seems to be config by command CLI, conf files (of many types). It all can appear befuddled at times as you get stuck in many layers of the onion. Many of these things have had to stand the test of time, and were designed by humans trying to solve a problem.
    – Mark
    Jul 24, 2021 at 16:06

3 Answers 3

11

This quite a utopian request. More or less similar to asking why is there more than a single:

  • programming language
  • operating system
  • right side of the road to drive a car
  • measurement system
  • alphabet

Open Source (and close source for that matter) developers are simply free to choose the format that best suit their needs. It is unlikely to change at least in the Unix/Linux world although trends do happen.

By the way, xml used to be quite popular but at the same time was bothering others for its lack of readability and tolerance. A consensus might appear in the future on some format, and json is indeed not bad and has a bunch of different languages implementations.

7
  • 2
    it's no a utopia - if all .net apps could have one app.config which is good enough then why linux conf file couldn't be standardized ? OMG - people ! configuring application is not a magic ! Mar 17, 2010 at 10:28
  • 1
    Now you are getting at a specific framework. Its not OS specific. This is true for almost any framework and not even close to be a good comparison for your original question.
    – artifex
    Mar 17, 2010 at 10:35
  • @artifex - so what ? Is there anything in linux config files which can't be expressed as valid json ? Mar 17, 2010 at 11:09
  • 4
    Probably not, although "linux config files" is vague but I'm afraid you are missing the point. Is there any measurement that can't be expressed using the metric system ? No. Why do airplane pilots still use feet and miles all over the world ? because it's their choice. All definitive standardization is an utopia. Standards evolve. There is freedom of choice. Of course if you narrow the scope to a single operating system and a single framework, it is something more reachable, but still untrue. As far as I know, nothing forbids a .net developer to use its custom configuration file format.
    – jlliagre
    Mar 17, 2010 at 11:27
  • Claiming I'm wrong while I simply describing the real world isn't going to help you in your quest. If you want to promote a syntax, do it. Find a name, create a site, a community around it, evangelize developers. I'm afraid you'll have a hard time though and find people like myself who do not care that much about configuration file syntax variants. To clarify, imposing a syntax would stop innovation and the perfect solution is missing. There might never be a "one size fit all" syntax like you seem to expect. Unix and Gnu/Linux developers are usually quite serious about their freedom of choice.
    – jlliagre
    Mar 17, 2010 at 18:03
2

Linux is just a kernel. GNU Software bundled in distributions is another story. The team working on distributions take care about quality of software and packaging, but most of the time they aren't involved in the development of the particular piece of software.

As mentioned above, a lot of stuff is many years old, and lots of notation comes out from history.

Personally I disagree, that any kind of GUI would be easier than text-file configuration. Using XML would make things a lot harder in many places. Standard config files are way easier to parse from command line using tools like awk/sed and so forth.

Aside from that, what "typo spotting" are you refering too? Most of the software has mechanisms which will show you where exactly is the problem.

7
  • 1.Selecting something from combobox IS easier than writing it in config file. 2. you know that "something is wrong" after you write config file and try to rerun service Don't you really see the difference ? Mar 17, 2010 at 9:52
  • There is no reason to clog-up a clean server install with just apache with loads of GUI tools. It may be easier, but at some point you will begin to thumb on the flexability of the program to provide a useable GUI.
    – artifex
    Mar 17, 2010 at 10:40
  • @j23tom: Selecting something from combobox IS NOT easier than writing it in config file when generating that file via script.
    – jscott
    Mar 17, 2010 at 10:53
  • @jscott that's very good point, but then why not use xml or json ? Mar 17, 2010 at 11:20
  • @j23tom: Please don't think that there is a "standard" XML or JSON format for any files either. Have a look at the iTune prefs XML config file -- it contains more binary data than text. :(
    – jscott
    Mar 17, 2010 at 13:06
0

A lot of it is historical. You find the same on the MS world... ...old stuff uses either arcane syntax that is made up, or INI files, new stuff from the .NET era is XML based.

In the unix world, you really have to look at the age of some of the software. Yes, it did go through revisions, but with no config standards anywhere.... noone ever made one up that got weight. Without that... well... nothing ever gets enough momentum to trigger other people to rewrite.

The negative side of no central instance trying to push for a standard.

Which sucks. Comparing the sometimes tremendous complex web.conig in asp.net with some easier unix configurations, I am STILL better off with the XML. As you said - easier to write tools, easier to check etc. After all, XML has a lot of tooling support.

Not the answer you're looking for? Browse other questions tagged .