Gentoo Archives: gentoo-dev

From: John Nilsson <john@×××××××.nu>
To: stuart@g.o
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Antwort: Re: [gentoo-dev] YaST will be GPL [Virus checked]
Date: Mon, 22 Mar 2004 09:41:46
Message-Id: 1079948519.956.119.camel@newkid.milsson.nu
In Reply to: Re: [gentoo-dev] Antwort: Re: [gentoo-dev] YaST will be GPL [Virus checked] by Stuart Herbert
1 On Sun, 2004-03-21 at 20:21, Stuart Herbert wrote:
2 > It'll never happen. XML isn't something that everyone accepts is always a
3 > good thing. In many languages, handling XML content programmatically is a
4 > RightRoyalPain(tm). And we currently lack adequate XML-aware diff and grep
5 > tools - two things essential to making this work.
6
7 So why would you handle XML? Use a library or other tool to parse the
8 file. Part of this project would be to develop the tools needed to get
9 and set configuration in a simple way.
10
11 > So how would the config tool know how to generate the XML file? A schema is
12 > nowhere near enough.
13
14 Are you sure?
15
16 > > This schema would also contain the documentation for the configuration
17 > > file. From this Schema a man-page could be generated. Thus config tools
18 > > and man-pages would have the same source of information.
19 >
20 > A bit like Perl and their POD files?
21
22 I don't know Perl... i gather POS is to Perl as reStructuredText is to
23 Python.
24 The idea is the same, but it would be silly to not use a xml syntax for
25 docs too.
26
27 > XML is a reasonable choice for marking up data such as configuration files.
28 > Personally, I prefer to use it when you're feeding structured data from one
29 > system to another - because of the ability to validate the input. I'd rather
30 > use a relational database technology than XML in static files on disk,
31 > because it's much more searchable and shareable. But that's just me.
32
33 If you mean that configuration should be saved in binary format, I don't
34 agree. I believe that a configuration file must be readable/editable in
35 the most basic format still humanly comprehensible, and backwards
36 compatible. This means ASCII (Or equivalent subset of any compatible
37 charmap).
38 In any way, configurations is inherently more hierarchal then relational
39 in nature. Just take a look at the evolution of the configuration files
40 for some major apps. Most enhancements seems to be about the hierarchal
41 structure, hint: XF86Config.
42
43 > How many packages are there in the Gentoo tree? Over six thousand. Let's say
44 > you could convert each one in an average of one man day's effort. I think
45 > that's optimistic, but it keeps it simple. Now, a man year is around 200
46 > days of effort, allowing for weekends, holidays, illness, and overheads. So
47 > that's 30 man years of effort to convert what we have today.
48 >
49 > If you had RedHat's money, maybe it could be done. But Gentoo people are
50 > volunteers. On average, volunteers on activities outside normal work and
51 > family commitments manage a man month's worth of effort over 12 months of
52 > elapsed time. So you're really looking at 360 years to get it done by
53 > volunteers.
54
55 Did I mention dream? ;-) But just to adjust your math, forking also
56 means merging packages providing similar services so it's not quite 6k
57 packages...
58 Gentoo is about choice I hear people screaming. I believe some choices
59 should be made by developers and some by users. Making a clear
60 separation of whom should make which might even give booth more choice
61 with fewer packages.
62
63 > How are you going to get the authors of 6,000+ packages to agree to follow a
64 > single XML schema?
65
66 Flexibility, ease of use, and quicker market adoption of the package.
67 Less newbie support?
68
69 > I can't think of a way in which you could prevent duplication of validation
70 > logic except one - the validation logic would have to be written in some form
71 > of scripting language such as JavaScript, and be part of the XML schema
72 > itself. XML Schema itself is insufficient, and the moment your shared
73 > library of code starts needing callbacks (think of the getopt function as an
74 > example of what I mean) then you end up with duplicated logic.
75
76 Am I mistaken in that you can express any constraint in an XSD?
77
78 ex. from http://www.w3.org/TR/xmlschema-2/ Section: "4.3.4 pattern"
79 <simpleType name='better-us-zipcode'>
80 <restriction base='string'>
81 <pattern value='[0-9]{5}(-[0-9]{4})?'/>
82 </restriction>
83 </simpleType>
84
85 Are there any reasons for the validation to be part of the application
86 logic?
87 The whole point in using XSD is that the XSD IS the validation logic and
88 that the validation engine is completely separate from the application.
89
90 > I think it would help if you had a clearly defined problem to direct your
91 > research at, and a wide background study of how things are done today and the
92 > myriad of reasons why.
93 >
94 > Best regards,
95 > Stu
96
97 I'm in the process of implement a kind of laboratory for this kind of
98 research. A kind of crossbreed between a wiki and phpBB, a RFC factory
99 if you will. The XML/Configuration matter is the perfect test case and
100 will be initialized as soon as I have something ready.
101
102 Even though I feel you are a tad negative, I value your input.
103
104 -John

Attachments

File name MIME type
signature.asc application/pgp-signature