Current-Users archive

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

Re: sysinst split project - The Configuration File

At Mon, 14 Dec 2009 18:57:57 +0100, "Volker A. Brandt" <> 
Subject: Re: sysinst split project - The Configuration File
> > LUA is one language -- XML is a family of languages.
> Hmmmm... yes and no.  XML is a method to structure data.  Together
> with XSLT and other things, you can implement languages.

Well, to me language doesn't necessarily imply that it represents
instructions which can be executed.  A "language" can simply describe
something as well.  If I understand correctly you're using "languages"
in this context to describe something that can be used to write
executable instructions for computers.

So, well, XML is, as I understand it, mostly just a semantic-free syntax
and a framework for defining the semantics that may be added to it or
used with it.  The DTD brings structure and semantics to whatever is
represented in the XML syntax.

I guess "XSLT and other things" would additionally implement what you're
calling languages here, i.e. something that can cause actions to be
carried out based on the semantics of the language.

> > As for trying to count the number of people who "know" one language or
> > another, well that's a specious argument in this context.  XML syntax
> > might be easy to know, and a given XML DTD might be simple to
> > understand, but SGML style syntax overall is a _horrible_ syntax for
> > both humans and computers to use.
> I respectfully disagree.  I find it not so bad, and computers don't care.

Indeed there are far too many people who have become accustomed to the
SGML-style of syntax.  We can thank the use of HTML for the WWW for
that.  It really is unfortunate that the chosen foundation for
hypertext markup was SGML.  I think that's a very sad accident of
history.  That's my personal opinion, of course, but seems I'm not alone
in thinking such things, and it is based on my own extensive experience
in this field.

However even if as a result of this accident many people, including
yourself, are familiar with SGML-like syntax and you don't really find
it all that bad, that still doesn't make it any less difficult overall
for either humans or computers to use.  :-)

As for the computers not caring, well perhaps they don't directly care
so much, but someone still has to write and maintain the code that makes
them capable of handling XML and DTDs and such, and it's easy to show
that such code is far larger and far more complex and far more difficult
to write and maintain than many other options, especially other
domain-specific solutions.  Humans do often care when their computers
suddenly need more resources to solve a given problem.

> > The very fact that you need to use a
> > set of tools to manipulate it in any way, and the fact these tools
> > consist of relatively massive amounts of code, is sure evidence of this
> > fact.
> My tool is called emacs. :-)  And you would need an interpreter for any
> scripting language, i.e. a "tool to manipulate" the script.

No doubt emacs can be used to include subsystems which can properly
manipulate XML structured data.  However that still means including a
whole lot more "unnecessary" code and tools.

Sure, XML experts can no doubt manually manipulate XML with any plain
text editor, even ed(1).  I can write and manipulate machine code as raw
numbers too.  That doesn't mean it's easy, or that I should.

The point of a good computer language, be it one intended for writing
machine instructions, or be it one for writing structured data, is that
it makes a good human interface to the computer.  An ideal computer
language is easy for a human to learn natively and it is also easy for a
computer to parse and make use of.  Both aspects are important!

> We are talking about a configuration file.  It will be touched by humans,
> and processed by machine.  This holds true for Lua and XML both.  It is
> just text that to you need to read and understand.

Exactly -- it needs to be expressed in a way that's easy for both humans
and for computers to parse and understand.

I will continue to claim that lua, or awk, or something equally simple
in syntax and semantics is far better for both humans and computers.

> So does that mean that Lua could not process XML?

Why would anyone even dream of layering XML on top of a language that
can already be used very easily to describe and write structured data?

I believe such unnecessary complexity and layering is not good for
either humans or computers!

To me it also begs the question of whether there's some hidden agenda
somehow causing XML to be propped up as an answer.  Like trying to get
it's foot in the door, or something like that.

XML might, at times, be a good answer for data interchange between
disparate environments, though even then I think there are much better
solutions (though I agree that ASN.1 is probably not one of them), since
even then one must pre-suppose that one end of the interchange or
another must somehow already be tied inextricably to using XML -- or at
least feel that they are.  ;-)

> > If XML in any form is the best answer you can come up with
> > then you've probably asked the wrong question in the first place --
> > either that or it's the only tool in your toolbox.
> I find this remark uncalled for.  One of the things that steered me
> away from working on NetBSD is that unhealthy tendency in this community
> to propose one single "true" way and dismiss everything else, coupled
> with a severe case of NIH syndrome.  (Not to dramatize things -- of course
> the main reason was lack of time, as usual.

Sorry, but I far too often see XML champions jump up and down and posit
XML as the only acceptable solution to a problem without giving any good
explanation as to why it's even in the running, never mind explaining
why they think it's the _only_ acceptable solution.  This happens
everywhere, it's not just a phenomenon restricted to the NetBSD world.

>  Code speaks louder than
> words.)

Indeed, which is I think why lua was proposed as the best suitable
extension language and configuration language for sysinst, since as I
understand it there's already a prototype implementation using lua.

Note I'm not saying lua is the best or only solution here either.  I
just think XML is the wrong solution and that there are better solutions
available, including lua.

> Anyway, I would have liked to see a "parameterized sysinst + native
> packaging tool + system packages + automated netboot" installation system
> for NetBSD.  It would have gone a long way towards acceptance of NetBSD
> outside the "hardcore" user community.

Indeed -- we definitely agree on that topic!

                                                Greg A. Woods
                                                Planix, Inc.

<>       +1 416 218 0099

Attachment: pgpvPo376YSCN.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index