Re: Canonical pushes upstart into user session - systemd developer complains
On 2012-11-29 15:46:35 +0100, Wouter Verhelst wrote:
> On Mon, Nov 26, 2012 at 05:00:14PM +0100, Vincent Lefevre wrote:
> > On 2012-11-26 07:27:08 +0900, Norbert Preining wrote:
> > > Ever heard of
> > > grep, sed, awk, ....
> > > all these nice things that make your life happy.
> > These tools are broken when dealing with multibyte characters.
> No they're not.
> > For instance, with:
> > foo = aéb
> > a "grep 'a.b' file" will find nothing in the C locale.
> But it will in a UTF8 locale,
Unfortunately the C locale is the only really portable one.
> or in an ISO-8859-1 locale, for instance.
> In a C locale, the é character simply does not exist, so you can't enter
The config file may have been generated under some locale (or in
an application where locales are ignored or can be ignored, say
GNU Emacs), but scripts may run in other locales, in particular C
for more portability.
> If you entered it in a UTF8 locale and then switched to a C locale
> to try to parse it, that can't work.
There's no such problem with XML, where the encoding of the documents
are handled internally and locales do not matter. So, one can handle
XML whatever the environment. Let's get back to XML?
> The default .subversion/config file is a piece of documentation, not a
> configuration file. I agree that there's far too much noise in there.
> However, that's not a flaw of the format, it's a flaw of the subversion
> default config file.
But comments may be useful, and again, there's no such problem
with XML. XML tools can hide comments and so on. So, you have
config and the documentation at the same place, which is fine.
> > And this format is also easy to break without noticing the breakage.
> That claim is true for any structured file format, including XML.
Less likely with XML, because of validation (you have well-formedness
checking in standard, without anything special to write). This is from
> > > Everything but XML. *EVERYTHING*.
> > This is your opinion. I disagree. XML is nice for things like
> > validation and complex operations. XML is easy (easier) to edit
> > if you use the "right" tools.
> XML is great for the things it was made for, but it's not a very useful
> configuration file format. XML requires far too much noise to be put in
> the config file for that.
This verbosity, or redundancy (I wouldn't call that noise), is
useful to avoid some form of undetected breakage. That's a choice.
> In addition, your implicit claim that it's difficult to validate
> ini-style configuration files, or to do complex operations on them, is
> just false. There are plenty of libraries to parse .ini files, too, for
And interfaces in various programming languages?
And command-line tools?
The advantage of XML is that it is more common.
Vincent Lefèvre <email@example.com> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)