[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: [RFC 1/6] Non-Turing-complete configuration files.



2009/1/17 Peter Clifton <pcjc2@xxxxxxxxx>:
> On Sat, 2009-01-17 at 21:31 +0100, Árpád Magosányi wrote:

> You're missing the point.
>
> If we allow config to be turing complete, a valid config file might be:
>
> (set! foobar (* 2 43))
> (set! blah (+ foobar 99))
> (page-width blah)
>
> There is no way to represent that in a GUI which would offer a page
> width edit box in number + coordinate units. Even if you were to wipe
> out the (page-width blah) and re-write as (page-width 185), you'd be
> breaking the user's intended config and leaving un-needed variables
> assigned in the config file which will float about in the scheme
> interpreter after being assigned.

No. The user is either advanced enough to write a config file tha way
he likes, or uses the GUI to do it for him, but not both. And even
that requirement can be loosened by separating machine-generated and
hand-written parts of the config.

> What we _are_ saying, is that your _config_ file will _not_ be executed,
> and any intelligence is based on defined primitives which the program
> will provide - NOT by the scripting language. (Sandboxing is then
> trivial - which it is not when we're using guile).

And you will have to reinvent the wheel for each primitives you want to provide.
While the config is small, then the whole thing does not worth the
effort of changing configuration architecture. When it becomes
complicated, every new primitive will be another effort spent on an
unimportant thing instead of real enhancement of the software itself.

>
>> Unfortunately nowadays the average firewall admin have absolutely no
>> clue about network, protocols and security, so a GUI is a must.
>> And yes, firewall config is different than config of some tools: the
>> configuration in itself is a modelling problem, in a world of several
>> object classes and their interrelations. So our GUI just writes Zorp
>> config, does not read it.
>
> Since our config files are expected to be user-writable, we have to
> define a legal syntax.

I think it would be instructive to take a tour in the /etc directory
of a Debian or Ubuntu system. All of the config files are expected to
be user writable, just do not use config generator tools afterwards.
If one needs config generator, then one uses it, if wants extra, then
writes config by hand. This wheel is also invented long ago. A lot of
engineering hours are already spent on thinking through this class of
problems, and the right solution is already found. You just have to
learn from it.


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user