[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: [RFC 1/6] Non-Turing-complete configuration files.
On Jan 16, 2009, at 5:25 PM, Peter TB Brett wrote:
> On Saturday 17 January 2009 00:15:46 Steven Michalske wrote:
>> KISS says
>>
>> key = value \n
>> next key = its value \n
>>
>> anything can parse this simple format
>>
>> an unknown key is a warning,
>
> I don't see how this is any different from:
>
> (key value)
>
> Except that in the case of using a Scheme-like syntax:
>
> 1. The configuration can be loaded directly by a Scheme
> interpreter's "read"
> function (and it's likely we'll have a Scheme interpreter
> available,
> whether it's Guile or TinyScheme).
>
> 2. Value can be an arbitrary data structure, e.g.
>
> (key ("this" "is" "a" "list" "of" "strings"))
> (key (("map" . "some") ("keys" . "to") ("useful" . "values")))
>
> And we get that 'for free', even if we don't use all of its
> potential
> initially.
But it's not free unless you already have a Lisp S-expression parser
in the tool that needs the information. One of the excellent design
features of gEDA is that the (sch, sym) file format is much easier to
parse from AWK, Perl, Python, etc. than S-expressions are. One of the
things that's hurting gEDA's flexibility is the increasing importance
of configuration files. Plugins are not the antidote: while they can
assist manual processes, they less effective for automation than
classic UNIX-style "filters".
>
> 3. The key-value pair can be spread across multiple lines.
>
> What you propose is as simple as a Scheme-like syntax, but much
> less flexible.
>
> Peter
>
>
> --
> Peter Brett
>
> Electronic Systems Engineer
> Integral Informatics Ltd
>
>
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user