Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysinst split project - The Configuration File

At Tue, 15 Dec 2009 07:24:18 +0000, David Holland 
<> wrote:
Subject: Re: sysinst split project - The Configuration File
>   1. Most of the rest of this thread is conflating *configuration* and
> *scripting*. Configuration should not be Turing-complete, because it
> becomes unmanageable. (See "sendmail".) Scripting is Turing-complete
> by definition.

I'm not so sure about that.

For one I think your argument using Sendmail as an example is more or
less worthless.

Sendmail configurations essentially describe a state machine -- and they
were not, at least when they gained their infamy, written in a truly
Turing Complete programming language.  The real problem with Sendmail
configurations is that they are written in a language that is worse
(i.e. more terse, convoluted and more difficult to understand) than Perl.

>   3. Configuration should be done in a concise and legible format,
> such as key/value pairs, nested key/value pairs, columnar tables, or
> whatever. Since XML is content-free^W^W just syntax,

Indeed, on both points!  :-)

>  any such sane
> format can easily be represented as XML.

Well, perhaps, but then you necessarily throw away the "legible format"
part again.

>   4. Parsers are cheap.

Sometimes they are not -- or rather there are scales of complexity and
overhead and other such costs in parsers, especially depending on the
language syntax they are intended to work with.

> If you have both configuration and scripting, the configuration data
> should be made available (as data, in a clearly defined schema) to the
> user scripts.

Indeed.  Typically in my experience this is easiest done, and perhaps
more importantly most effective, if the configuration language is the
same one as is used to define data structures and values in the
scripting language of choice, if at all possible.  But then I am very
much a lisp fan.  :-)

                                                Greg A. Woods
                                                Planix, Inc.

<>       +1 416 218 0099

Attachment: pgpKznYehln6D.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index