comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: A standard package for config files is needed
Date: Wed, 29 May 2002 15:49:02 -0400
Date: 2002-05-29T19:49:05+00:00	[thread overview]
Message-ID: <ad3bbh$p54$1@nh.pace.co.uk> (raw)
In-Reply-To: 4519e058.0205291059.737616ec@posting.google.com

Well, my understanding of the original post was that it was a hypothetical
"Hey! Ada programs have to initialize themselves, so why don't we build
something to interpret initialization files or something similar to the
registry???" Not that it had to duplicate exactly what the registry does -
although there may be those who would want that.

So if you've got a general "Initialization" need - why could you not use
Maps? You look up something based on a key. The "something" could be a
string or it could be a record or whatever seemed to make sense for the
actual implementation. Decide what requirements need to be satisfied then
build the structure to suit that. If you want a tree-like structure, it
might be viewed as a Map of Maps. My idea was that if you had Maps
implemented, you could build a registry-like structure out of it as a basic
building block & end up with another useful component for Grace.

If we had a "Registry" (I use the term in the loose sense) package that was
built from Maps, it might make sense to build a "Registry Editing" package -
although this gets you into having to think about what sort of user
interface you want to support. It could suck it up and spit it out to a text
file, but I'm not sure I'd need that sort of behavior so long as my program
could set configuration information and then retrieve it next time it
started up. (Streams might be good enough for me.) I could see how others
would likely disagree, so I wouldn't consider it a hard requirement - but
then you get into arguing about what sort of format it should have. XML has
advantages in terms of it being able to get infinitely complex as needed,
but then you need a DOM as well as something to interpret it as a
"Registry".

Just a thought as to how to make Grace be more useful.....

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Ted Dennison" <dennison@telepath.com> wrote in message
news:4519e058.0205291059.737616ec@posting.google.com...
>
> If you were to use a Grace-style map, I think you'd have to view every
> value as a string (most likely, an Ada.Strings.Unbounded_String). His
> example showed numbers, which presumably folks would want to
> manipulate as numbers, not strings. Then again, Ada's 'value makes it
> pretty easy to do the transformation. However, the user would have to
> handle any errors due to the value being the wrong type.
>
> Its tough to tell from nothing more than an uncommented example, but
> it looked like there was a wee bit more structure to it than just a
> bunch of attribute/value pairs. If that's the case, Maps could
> probably not be used, and a special structure might be required. It
> would be nice to know how much structure there really should be, and
> what it could be.
>
> The way the NT registry works, Keys are stored in a hierarchy (think
> of them as directories), and each one may have multiple "values". A
> value has 3 attributes, its name, its *type*, and its actual value.
> There are lots of different possible types, but in general they are
> all a pain to deal with. :-)  Most folks just stick to the string or
> string array types.
>
> > Assuming we get a Grace component to do this, it might even make a nice
> > extension to the Grace library - a descendent of Maps that handles
>
> If we are talking of it as a standard Ada thing, then I agree.





  reply	other threads:[~2002-05-29 19:49 UTC|newest]

Thread overview: 130+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-28 10:59 A standard package for config files is needed Preben Randhol
2002-05-28 12:09 ` Martin Dowie
2002-05-28 12:09   ` Preben Randhol
2002-05-28 16:33 ` Darren New
2002-05-28 18:10   ` achrist
2002-05-28 20:28     ` Darren New
2002-05-28 22:35   ` Mark Biggar
2002-05-29  3:13     ` Hyman Rosen
2002-05-29  7:18       ` Pascal Obry
2002-05-29 14:40         ` The commercial world needs Ada was " Robert C. Leif
2002-05-29 16:29           ` Darren New
2002-05-29 23:26             ` Robert C. Leif
2002-05-30  0:10               ` Darren New
2002-05-29 17:08         ` Hyman Rosen
2002-05-29 19:34           ` Larry Kilgallen
2002-05-29 11:01   ` Preben Randhol
2002-05-29 16:23     ` Darren New
2002-05-29 21:42       ` achrist
2002-05-30  9:53         ` Preben Randhol
2002-05-30 14:45         ` Gautier
2002-05-30 17:00           ` achrist
2002-05-28 20:44 ` Marin David Condic
2002-05-29 11:05   ` Preben Randhol
2002-05-29 18:09   ` Ted Dennison
2002-05-29 18:59   ` Ted Dennison
2002-05-29 19:49     ` Marin David Condic [this message]
2002-05-30 17:52       ` Ted Dennison
2002-05-30 18:21         ` Preben Randhol
2002-05-30 22:55           ` Darren New
2002-05-31 15:52             ` Ted Dennison
2002-05-31 21:31               ` tmoran
2002-06-01 15:39                 ` Stephen Leake
2002-06-03 13:05                 ` Marin David Condic
2002-05-30 20:00         ` Marin David Condic
2002-05-31  6:43         ` Mats Karlssohn
2002-05-31 22:04           ` Robert C. Leif
2002-05-29  2:18 ` SteveD
2002-05-29 11:07   ` Preben Randhol
2002-05-29 12:57     ` SteveD
2002-05-29 13:05       ` Preben Randhol
2002-05-29 13:52         ` SteveD
2002-05-29 13:57           ` Preben Randhol
2002-05-29 16:30           ` Darren New
2002-05-29 19:24             ` Simon Wright
2002-05-30  9:54               ` Preben Randhol
2002-05-29 14:41     ` Robert C. Leif
2002-05-29 14:59       ` Martin Dowie
2002-05-29 15:30       ` Preben Randhol
2002-05-29 15:32       ` Preben Randhol
2002-05-29 19:29         ` Simon Wright
2002-05-31 16:26           ` Preben Randhol
2002-05-31 16:01       ` Ted Dennison
2002-06-01  2:27         ` Robert C. Leif
2002-06-01 16:38           ` Ted Dennison
2002-06-01 17:48             ` Robert C. Leif
2002-06-01 18:11               ` Pascal Obry
2002-06-02  3:30                 ` XML and Ada was " Robert C. Leif
2002-06-02  6:52                   ` Pascal Obry
2002-06-02 16:29                     ` XML and Ada Robert C. Leif
2002-06-02  7:54                   ` XML and Ada was RE: A standard package for config files is needed Gerhard Häring
2002-06-02 15:51                     ` Darren New
2002-06-02 19:02                       ` Preben Randhol
2002-06-02 20:52                         ` Gerhard Häring
2002-06-03  6:10                           ` Preben Randhol
2002-06-02 22:06                         ` Stephen Leake
2002-06-03  2:17                           ` Robert C. Leif
2002-06-04 18:48                             ` Georg Bauhaus
2002-06-05 14:17                               ` Robert C. Leif
2002-06-06 14:15                                 ` Georg Bauhaus
2002-06-07  0:33                                   ` Robert C. Leif
2002-06-07 10:55                                     ` Georg Bauhaus
2002-06-03  2:21                           ` Robert C. Leif
2002-06-03 14:20                             ` Marin David Condic
2002-06-04  1:39                               ` SteveD
2002-06-03  6:13                           ` Preben Randhol
2002-06-04 18:54                           ` Georg Bauhaus
2002-06-09 20:01                             ` Stephen Leake
2002-06-09 22:24                               ` Eric G. Miller
2002-06-10 12:31                                 ` Stephen Leake
2002-06-12  4:17                                   ` Eric G. Miller
2002-06-01 20:36               ` Preben Randhol
2002-06-02  3:30                 ` Robert C. Leif
2002-06-01 20:31             ` Preben Randhol
2002-05-29  7:22 ` Volkert
2002-05-29 14:41   ` Robert C. Leif
2002-05-29 18:26   ` tmoran
2002-05-30  7:41     ` Volkert Barr
2002-05-30  8:34       ` tmoran
2002-05-30  9:03         ` Volkert Barr
2002-05-30 13:39         ` Marin David Condic
2002-05-31 16:25           ` Ted Dennison
2002-05-31 16:50             ` Preben Randhol
2002-05-31 22:24               ` Ted Dennison
2002-06-01 15:44                 ` Stephen Leake
2002-05-31 17:25             ` Marin David Condic
2002-06-01 13:51               ` Preben Randhol
2002-06-03 13:23                 ` Marin David Condic
2002-06-04 11:46                   ` Preben Randhol
2002-06-01 15:53               ` Stephen Leake
2002-05-30 15:08         ` Stephen Leake
2002-05-30 16:07           ` Preben Randhol
2002-05-31 16:39         ` Preben Randhol
2002-05-31 21:31           ` tmoran
2002-05-31  9:05     ` Georg Bauhaus
2002-05-31 11:01       ` Florian Weimer
2002-05-31 13:15       ` Marin David Condic
2002-06-01 15:46         ` Stephen Leake
2002-06-01 16:50           ` Darren New
2002-05-31 13:34       ` Stephen Leake
2002-05-29 19:05   ` Ted Dennison
2002-05-30  7:49     ` Volkert Barr
2002-05-31 16:42       ` Preben Randhol
2002-05-29 17:56 ` Chad R. Meiners
2002-05-29 18:25 ` Ted Dennison
2002-05-30 19:58 ` Jacob Sparre Andersen
2002-05-30 20:12   ` Marin David Condic
2002-05-31  7:37     ` Preben Randhol
2002-05-31 13:21       ` Marin David Condic
2002-05-31 13:46         ` Marin David Condic
2002-06-01 11:23           ` Preben Randhol
2002-06-01 11:10         ` Preben Randhol
2002-06-01 15:50         ` Stephen Leake
2002-06-03 12:53         ` Jacob Sparre Andersen
2002-05-30 23:08   ` Darren New
2002-05-31 13:30   ` Stephen Leake
2002-06-03  1:00 ` Robert I. Eachus
2002-06-03  6:24   ` Preben Randhol
2002-06-03 15:54     ` Darren New
2002-06-03 16:49       ` Darren New
2002-06-09 21:27   ` Stephen Leake
replies disabled

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