comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@acm.org>
Subject: Re: config files proposal
Date: Sun, 09 Jun 2002 20:54:45 GMT
Date: 2002-06-09T20:54:45+00:00	[thread overview]
Message-ID: <wkelfgrx4b.fsf@acm.org> (raw)
In-Reply-To: e1a50f2.0206040741.65f37cd9@posting.google.com

antonio_duran@hotmail.com (Antonio Duran) writes:

> 1. In my experience, most of the time, config files are writen, edited
> or modified by humans and read and interpreted by programs. With this
> in mind, in my modest opinion, the importance of having an API for
> writing to config files is secondary. What is important is having the
> means that allow a human user to understand what is in the config
> file.

True.

> Configuration tasks are simpler if the config file is commented and
> handling comments is difficult if you use an API call to write to
> the file. 

Good point; I hadn't thought of that.

I think this makes XML a better idea; we can allow for a "comment" tag
that is saved in the memory image, and written back out.

> When config file gets complicated enough one must write an
> application to handle it (eg. Comanche to mantain Apache config
> files).

Yes. We need to support both modes of operation.

> 2. Seems that there is a consensus in that a config file must store
> key/value(s) pairs. I don't understand the requirement to use
> Wide_String for keys. I'm from Spain and I usually write in Spanish
> but when programming in Ada I must adhere to the Ada syntax, I can't
> write Ada identifiers that are syntactically correct spanish words
> and the Ada reserved words are english words. 

Yes, but there's no reason config files have to have the same
restrictions. 

> Supporting Wide_String could be a cool feature for, for example,
> mantaining localized messages in different languages, however: is
> this the purpose of config files?. 

You could use them that way. In this particular case, the Gnu
'get_text' facility is probably better. But if you have only a few
messages, and also other things to configure, a config file would be a
good place to do this.

> I think the purpose of config files is to provide parameters to a
> program or application and not to be used as a repository for
> localized versions of program messages. Of course, they could be
> used in that way. I suggest that keys in config file meet the Ada
> syntax for identifier and be case-insensitive.

Ok, thanks for your input. 

But, I'd like you to think again :). Can you come up with any
situation in which you would use Wide_String keys? Do you use
Wide_String for anything in your applications?

Here in the US, it's easy to think "ASCII solves all problems"; I'd
appreciate some input from someone for whom that is not true.

> 3. I think that is important to handle more than one config file in
> a single program. From my point of view, one of the most important
> drawbacks of layouts such as the Windows Registry is that everything
> is on a single place so applications that can access to a single
> part can also write other parts. In complicated apps it could be
> desirable to mantain a set of different config files one for each
> part of the application. The ability for handling multiple config
> files in a single program should be a requirement for a config file
> handling package.

Yes, I intend to support this. Please check the draft spec when I post
it, to see if it meets these needs.

> 4. I don't understand very well the implications of "... specified
> by generic parameter at compile time ..." (API req. 5). Does this
> mean that the name or the path of the file must be hard coded?. 

only the defaults; API req 7 allows the application to override these
defaults. 

> If so I think we've missed totally the point (should I recompile
> each time I change the name or location of the config file?).

The point was that some applications (typically from Gnu and/or Linux)
put config files in very standard places, like /usr/local/share. So
this default should be compiled in on Linux. However, other
applications will want to specify thier own places for config files,
so that has to be allowed as well.

> 5. Regarding to the file syntax, long time ago I worked on a system
> that runs on CAIS (Common APSE Interface Set). 

> <snip example>

> There are, however, some drawbacks in this representation:
> 
> - A escaping schema is needed for unprintable characters in strings
> (?).
> - Nested '(' and ')' would add a high degree of complexity for the
> human user/reader.

And it's really only readable for people who know Ada; we'd like this
to be useful to a wider audience.

-- 
-- Stephe



  parent reply	other threads:[~2002-06-09 20:54 UTC|newest]

Thread overview: 132+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-02 16:07 config files proposal Stephen Leake
2002-06-02 21:29 ` Darren New
2002-06-02 22:00   ` Darren New
2002-06-02 22:16   ` Stephen Leake
2002-06-03  4:20     ` Darren New
2002-06-09 20:16       ` Stephen Leake
2002-06-10  1:33         ` Darren New
2002-06-10 12:35           ` Stephen Leake
2002-06-10 15:42             ` Darren New
2002-06-10 14:23           ` Georg Bauhaus
2002-06-03 14:56     ` Ted Dennison
2002-06-03 16:08       ` Darren New
2002-06-03 16:24         ` Jean-Marc Bourguet
2002-06-03 16:50           ` Darren New
2002-06-04 11:07             ` Preben Randhol
2002-06-04 19:55         ` Ted Dennison
2002-06-09 20:43           ` Stephen Leake
2002-06-09 20:39         ` Stephen Leake
2002-06-10  1:33           ` Darren New
2002-06-10 10:17             ` Preben Randhol
2002-06-09 20:29       ` Stephen Leake
2002-06-10  1:33         ` Darren New
2002-06-10 18:58         ` Ted Dennison
2002-06-11 18:11           ` Stephen Leake
2002-06-03 15:13     ` Preben Randhol
2002-06-04 15:41 ` Antonio Duran
2002-06-04 15:51   ` Darren New
2002-06-05 10:17     ` Antonio Duran
2002-06-05 14:31     ` Ted Dennison
2002-06-05 19:12   ` Syntactically correct spanish identifiers (Was: config files proposal) Jacob Sparre Andersen
2002-06-06  1:49     ` Robert Dewar
2002-06-07  8:07       ` Antonio Duran
2002-06-07 15:37         ` Robert Dewar
2002-06-09 20:54   ` Stephen Leake [this message]
2002-06-10  1:33     ` config files proposal Darren New
2002-06-10 12:40       ` Stephen Leake
2002-06-10 15:45         ` Darren New
2002-06-11 13:15           ` Ted Dennison
2002-06-11 16:36             ` Darren New
2002-06-12  7:40               ` Volkert Barr
2002-06-12 15:45                 ` Darren New
2002-06-13  8:17                   ` Volkert Barr
2002-06-13 13:20                   ` Ted Dennison
2002-06-13 13:38                 ` Georg Bauhaus
2002-06-11 13:09       ` Ted Dennison
2002-06-13 15:52     ` Georg Bauhaus
2002-06-04 17:06 ` Darren New
2002-06-09 21:01   ` Stephen Leake
2002-06-06  7:57 ` Volkert Barr
2002-06-06 10:04   ` sk
2002-06-06 11:33     ` Volkert Barr
2002-06-06 13:56       ` sk
2002-06-07  8:24   ` Volkert
2002-06-07  9:01     ` Jason King
2002-06-07 11:01       ` Preben Randhol
2002-06-07 17:06         ` Darren New
2002-06-07 17:13           ` Preben Randhol
2002-06-07 17:33             ` Darren New
2002-06-07 18:26               ` Preben Randhol
2002-06-09 21:08               ` Stephen Leake
2002-06-07 15:07       ` Volkert
2002-06-07 15:12       ` Ted Dennison
2002-06-09 21:16         ` Stephen Leake
2002-06-09 21:05   ` Stephen Leake
2002-06-13  9:08 ` Antonio Duran
2002-06-13 14:15   ` Stephen Leake
2002-06-13 21:04     ` Antonio Duran
2002-06-14 16:15       ` Stephen Leake
2002-06-13 18:38   ` Ted Dennison
  -- strict thread matches above, loose matches on Subject: below --
2002-06-14  0:19 Config_Files proposal Stephen Leake
2002-06-18 17:07 Stephen Leake
2002-06-18 21:55 ` Darren New
2002-06-19 16:11   ` Stephen Leake
2002-06-19 16:51     ` Darren New
2002-06-19 18:39       ` Stephen Leake
2002-06-19 19:48         ` Darren New
2002-06-20 14:03           ` Stephen Leake
2002-06-20 16:36             ` Darren New
2002-06-20 17:49               ` Jacob Sparre Andersen
2002-06-20 20:00                 ` Stephen Leake
2002-06-20 20:16                   ` Darren New
2002-06-20 20:45                     ` Stephen Leake
2002-06-21  2:06                     ` Ted Dennison
2002-06-21 12:55                       ` Marin David Condic
2002-06-24 13:20                         ` Stephen Leake
2002-06-21 15:29                       ` Darren New
2002-06-24 13:16                         ` Stephen Leake
2002-06-24 15:06                           ` Darren New
2002-06-24 17:09                             ` Stephen Leake
2002-06-24 17:57                               ` Darren New
2002-06-24 18:53                                 ` Stephen Leake
2002-06-24 21:24                                   ` Darren New
2002-06-29  3:15                                   ` Ted Dennison
2002-06-28 23:21                           ` Randy Brukardt
2002-06-29  3:01                             ` Ted Dennison
2002-07-01 20:58                               ` Randy Brukardt
2002-07-02  0:31                                 ` Ted Dennison
2002-07-02  4:43                                   ` Randy Brukardt
2002-07-05 21:51                                     ` Robert I. Eachus
2002-06-20 19:54               ` Stephen Leake
2002-06-19  6:53 ` Dr. Michael Paus
2002-06-19 15:18   ` Ted Dennison
2002-06-19 15:08 ` Ted Dennison
2002-06-19 16:18   ` Robert I. Eachus
2002-06-19 16:53     ` Darren New
2002-06-19 18:22       ` Stephen Leake
2002-06-20 13:12         ` Marin David Condic
2002-06-24 13:09           ` Stephen Leake
2002-06-24 15:08             ` Darren New
2002-06-24 17:13               ` Stephen Leake
2002-06-24 17:59                 ` Darren New
2002-06-24 19:04                   ` Stephen Leake
2002-06-24 21:29                     ` Darren New
2002-06-25 12:52                     ` Georg Bauhaus
2002-06-25 12:45                 ` Georg Bauhaus
2002-06-19 21:32       ` Georg Bauhaus
2002-06-19 18:20     ` Stephen Leake
2002-06-21 20:04       ` Robert I. Eachus
2002-06-24 13:39         ` Stephen Leake
2002-06-19 16:48   ` Marin David Condic
2002-06-20 13:04     ` Georg Bauhaus
2002-06-20 13:53       ` Marin David Condic
2002-06-20 14:19     ` Stephen Leake
2002-06-20 15:37     ` Ted Dennison
2002-06-19 18:15   ` Stephen Leake
2002-06-20  1:35     ` Ted Dennison
2002-06-20 14:10       ` Stephen Leake
2002-06-20 20:50         ` Jacob Sparre Andersen
2002-06-20 20:58           ` Stephen Leake
2002-06-21  2:21           ` Ted Dennison
2002-06-24 13:22             ` Stephen Leake
2002-06-20  1:37     ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox