The need for a common configuration system

I’ve been using tiling window managers for a good few months now and my manager of choice so far has been awesome. Version 3.0 just came out a few days ago but for the first time I’m seriously considering not upgrading, even though I’m  a fan ofo keeping my system up-to-date and fairly bleeding edge. i’m new sure that the new release packs number of nice feature and would probably a good thing to have. There’s just one thing that is keeping me from upgrading right now: the fact that the config files are now in Lua.

What that little detail means is that my old configuration is useless and that I now have to devote time and energy to getting to grips with a new config format and recreating something that I already had working for months. Before people start with the arguments regardign infinite customizability, here’s my take: I really don’t care if the new system lets my config file turn my window manager into a whistling teapot. If I have to invest time and energy without nothing to gain in the process, that’s not a good thing. I’m not criticizing the technical decision to use Lua (since I have no experience with it) and I can understand how a lot of people will appreciate the greater flexibility. But for most users, even people like me who are decently tech savvy we don’t want something to be fixed if it isn’t broken. The ideal thing to do (if a change to Lua was a certainty) was to have provided a script that would migrate the existing config file to something that the new system could use. I hope someone out there is working on something of the sort, and I’ll put off updating for a while until then.

Understanding that this is open source, there’s certainly the whole “if you don’t like it, do it yourself” which I think people are justified in making. If I new more about Lua and awesome and was sufficiently interested in the project, I might actually have done it (considering that I am interested in programming languages and compilers and that translation is a big part of those fields). That being said, isn’t the whole point of open source to make softwware that people can actually use without having to pay a heavy price for? Let’s remember that the price can be in terms of time and effort as well as money. 

However there is a larger issue at stake here rather than just awesome’s decision to move to Lua. There are a proliferation of config file formats out there for applications, especailly for Linux application that have tradiitionally have human-editable plain text config files. While the good thing is that you don’t need a special program to edit your configuation file, the bad news is that you have to get used to a myriad of different config syntaxes which are only vaguely similar to each other. Throw in config files that are actually little programs written in scripting languages and you quickly have a high increase in what you have to learn to be able to just get your programs to work the way you want them to. 

To be fair, on the other side you have full blown GUIs which write to closed binary configuration systems. this means that you can’t edit files with a simple text editor, and you might not be able to write programs that automatically edit the configs either. So where do the two ends meet? 

We could start with a uniform configuration syntax. XML is a viable choice. But anyone who has spent time actually editing XML by hand knows that it is not a painless experience. And XML would be overkill for the simple configuration needs of most small software programs. Perhaps some sort of CSS like syntax with nested property lists would cover a lot of ground. Without a large scale survey of curreny config syntaxes and what sort of things programs allow to be configured, it would be hard to come up with something that works for a lot of people. 

For sake of argument, let’s assume that there is some such syntax. We would need libraries that can easily parse the syntax and make the data available for the program. These libraries would have to be in multiple languages without a fairly consistent interface. They would also have to small and lightweight so that simple programs can include them if necessary. Finally there has to be GUI support. Editing text files might be the simplest way to do things, but it’s not that simple if people aren’t used to it already. Considering a uniform syntax, it might be possible to generate GUIs automatically (especially since there will already be libraries to do parsing). This would mean that developers no longer have to worry about writing configuration code at all. They just decide what options they want to be user-configurable and how the config file maps to internal variables and options and then let the libraries worry about reading the files and building an interface.

I’m not sure how much effort this would take, but my feeling is that it would be doable with a good team and enough time. In fact this might be a good summer project to work on. I do hope that something like this comes along because I’m starting to get tired of learning configuration syntaxes for every new program I want to use.


Published by

Shrutarshi Basu

Programmer, writer and engineer, currently working out of Cornell University in Ithaca, New York.

One thought on “The need for a common configuration system”

  1. There already exists a human readable, machine parseable
    format: YAML; it has bindings
    for most of the popular languages already.

    I don’t know why it isn’t used more; it certainly does
    not have the expressibility of a full blown scripting
    language like Lua, or Python — that could be a reason.

    This switch to Lua has made many people frustrated; I was
    reading quite a few posts on Planet Debian about this.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s