[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: a debconf backend db finally...



On Sun, Feb 25, 2001 at 08:49:48PM -0600, Steve Langasek wrote:
> On Sun, 25 Feb 2001, Sam TH wrote:
> 
> > "Because everything should be XML" is a dumb reason to do something.
> > But that isn't a reason not to use XML.  Is there a reason that you
> > don't think the advantages of using XML that I mentioned (already
> > available tools for both sysadmins editing the files, and programs
> > parsing the files) apply?
> 
> * for many of us, writing a parser in C for a simple text format is easier
> than writing a proper DTD

Yeah, but one of the beautiful things about XML is that you don't need
a DTD.  All you need to do to support that format in my last email is
register some callbacks with expat.  DTD's might be nice for
documentation, but are uneccessary for writing the parser, and can
certainly be created after the fact (or never).  

> * Joey's parser is probably an order of magnitute smaller as a library than
> libxml, and gives the same results

A quick analysis shows libxml2 to contain about 58000 lines of
source.  Joey's parser is probably even smaller than 6000 lines, but
expat is only 9000 lines, which are already written, and packaged in
debian.  And that's several thousand lines that don't need to be
rewritten again and again.

> 
> * almost none of the other config files in /etc are XML-based, so there's no
> network effect to speak of
> 

Network effects have to start somewhere, right?  And XML tools do
already exist, even is most sysadmins running debian don't use them.  

> * he appears to already have code written that uses this format, so why change
> it now?
> 

Now there's an argument that's convincing.  :-)  For debconf, this is
probably not going to change, since the code is already written.  But
if you're thinking about doing this sort of thing, parsing simple text
files is a solved problem, and there are tools to do it for you.  Your
time could be better spend on you actual app.  


> Dreading the day when I need a tool more complex than 'sed' for editing my
> system config,

Is there something you could do with sed(1) to Joey's original format
that you couldn't do to my XML?
           
	sam th		     
	sam@uchicago.edu
	http://www.abisource.com/~sam/
	GnuPG Key:  
	http://www.abisource.com/~sam/key

Attachment: pgppV7avrKcgv.pgp
Description: PGP signature


Reply to: