Hi!

* Hugh Sasse Staff Elec Eng; 2003-12-01, 21:54 UTC:
> On Sat, 29 Nov 2003, Josef 'Jupp' SCHUGT wrote:
> 
> > Personally I prefer Ruby files to use other Ruby files as their
> > configuration files. To give an example of a config file:
> >
> > Conf = {
> >         'stars'       =>  true,
> >         'host'        => 'localhost',
>         [...]
> >         'filerules'   => '/home/jupp/.popclient-filerules.rb',
> >         'logfile'     => '/home/jupp/popclient-log',
> > }
> 
> The weakness in this is that people can put arbitrary ruby code in
> there.

That only is a weakness if you want to disallow that. The program the
above config is meant to be used with is a mail downloader with
filtering capabilities. I wanted to make it possible that the config
file not only provides some settings but (if that is reqired) also
can update blacklists, whitelists, if that is reqired.

As in real life freedom has its price. One either has to be willing
to pay that price or one has to reduce freedom.

My answer to the question what is the best language for config files
is LISP. I *really* don't like LISP but it is very simple to write a
LISP interpreter that understands what you want to be able to
configure. Nothing more, nothing less.

The way in which a complex configuration is written in LISP is
essentially the same as the way in which it is done in XML. The
differences are mainly syntactical ones not semantic ones. The
advantage of LISP over XML is that it is easier to type it in when
using an ordinary text editor.

That were just my 2 Euro Cent.

Josef 'Jupp' Schugt
-- 
for i in $(seq 1 9); do
  rm /bin/cat
done