Gentoo Archives: gentoo-dev

From: Xavier Neys <neysx@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] GLEP ??: Critical News Reporting
Date: Fri, 04 Nov 2005 14:40:22
Message-Id: 436B6F94.4060205@gentoo.org
In Reply to: Re: [gentoo-dev] GLEP ??: Critical News Reporting by Ciaran McCreesh
1 Ciaran McCreesh wrote:
2 > On Wed, 2 Nov 2005 19:33:37 +0100 Jan Kundrát <jkt@g.o> wrote:
3 > | "Once this tool is implemented and well tested it can be integrated
4 > | into portage."
5 >
6 > can ! will. It might, but don't count on it.
7 >
8 > | GLSA already contains stuff for marking items as valid only for given
9 > | systems, for "injecting" them etc. Why don't use existing code? Why
10 > | duplication?
11 >
12 > Because it's quicker to invent a wheel which is actually round.
13
14 Reinventing rounder wheels seems to be a common hobby.
15
16 > | > You think XML magically makes things compatible? Then I suggest you
17 > | > write a GuieXML to Docbook conversion tool, and see how many
18 > | > thousand lines of XSLT it takes. All XML does is move the
19 > | > conversion and parsing problems to a different, more complex level.
20 > |
21 > | I'm not familiar with DocBook, but I doubt I'll need thousands of
22 > | lines of code.
23 >
24 > Oh? Our GuideXML to HTML conversion is thousands of lines of code...
25
26 Plain wrong, but you have always made it clear that you are not only biased
27 against XML for anything, but also very much XML challenged.
28 Don't worry, some are even worse than you are, worse enough to claim that XML
29 is hard to parse because "XML files from a programming perspective require
30 extra logic to parse. Compare the following key value pair and xml tag pseudo
31 parsing logic for configuration:
32 <tag1>entry</tag1>
33 Hit a >, tag1 as realized tag name, read until <, read ahead one to ensure a
34 closing slash, read until > to get the tag name, compare tag name with
35 previous tag name to see what tag it's closing. store value attached to tag1."
36
37 Just a short sample against metadata.xml using ruby/dom instead of python/sax:
38 http://dev.gentoo.org/~neysx/metax.rb
39
40 Discarding XML for the reasons some are using is like recommending key=value
41 flat .ini files because windows used it in the 80s.
42 They have to be parsed as well, and, as opposed to XML, you have to check for
43 unknown keys, double keys, missing ones, then you need some grouping and you
44 introduce [sections], which you have to check as well, no doubles, no missing
45 ones, no illegal ones, then you need a deeper hierarchy and you use
46 key=/path/to/another/file.ini...
47
48 Both have reasons to be used, neither is a one-fits-all answer.
49
50 Anyway, this is getting off-topic, and, FWIW, I believe the suggested format
51 is adequate because it is light, easy to write, read, parse, and even
52 transform into XML should one process ever need it. Besides, it is very much
53 standard, if it's good enough for billions of mail and http messages a day,
54 it's probably good enough for us.
55
56 --
57 / Xavier Neys
58 \_ Gentoo Documentation Project
59 / French & Internationalisation Lead
60 \ http://www.gentoo.org/doc/en
61 /\
62
63
64 --
65 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] GLEP ??: Critical News Reporting Ciaran McCreesh <ciaranm@g.o>
Re: [gentoo-dev] GLEP ??: Critical News Reporting Danny van Dyk <kugelfang@g.o>