9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: dvd@davidashen.net
To: 9fans@cse.psu.edu
Subject: Re: [9fans] UN to fund linux for the 3rd world
Date: Sat,  4 Sep 2004 02:11:57 +0500	[thread overview]
Message-ID: <7b5276ea55fd401b349935bc70cbd690@davidashen.net> (raw)
In-Reply-To: <ec9c7c33a28fd5e749680ae948168048@terzarima.net>

>>>Interestingly enough, a number of projects that were XML-based are now 
>>>S-expression based, so I guess it works for them too. 
> 
> several of us have used non-xml syntax (eg, Xduce) even when one
> of the possible physical representations might be xml.  the scanner
> is tiny, the syntax can be used directly in a programming language without
> itching or retching, and what matters is the underlying abstraction anyway.

How widely is Xduce used?

> xml provides (slightly weird) trees; s-expressions are trees not lists.

Everything is a tree. At the time of SGML, some used to define SGML syntax
to be parentheses based, that is, s-expressions you like so much. But see below.


> all of the non-xml forms i know seem to be clear cut about whether a
> character is or is not part of a string.  i like the precision, myself.

> the power comes from tree operations, not the syntax of the tree
> representation (but see below).

The power comes from both. Not having to think about a parser is a great
relief.

> it would be fair to say that xml's providing a dtd
> was an advance.  

The opposite. The fact XML does NOT need a DTD is one of its most
important advantages, and that is why it only has one lexical syntax
instead of many.

(it was SGML really, but by eliminating `&' XML
> eliminated a real nuisance.)  fortunately, that helpful step was subsequently
> itself eliminated by inventing Xschema, so i don't need to be all that fair!

There is also Relax NG, http://relaxng.org/ .

> but was really a cunningly disguised way of getting people to stop
> using XML directly (let alone XSLT) and start using lisp and s-expressions.

Yes, that's useful sometimes; in my Relax NG (compat syntax) based XML
validator I use embedded Scheme interpreter for extensible data types
library; the library is based on complete implementation of XML Schema
Unicode regular expressions I wrote in r5rs scheme.

Different tools are good for different jobs. But this is not because s-expressions
are better than XML. XML is a tree model and a serialization format; the former
gives tools for validation, the latter gives tools for parsing and generation. Both
work amazingly well; in cases when neither is necessary and a different syntax
is preferrable, for example, for human perception, a different syntax can be
used. 

XML with its data model and serialization format is the best available solution
for most tasks. Where human eyes and brain are involved, parentheses- or
curly-braces-based syntax is frequently used; with equivalent XML representation for the ease of validation and interchange convenience.

XML is like automatic garbage collection: while there are always proponents
of 'better' hand-crafted memory management discplines, automatic gc always
wins because it makes the developer free from the trouble of memory leaks.
At the price of lower performance and greater memory requirements in certain
cases. 

Just make something that works better.

David



  reply	other threads:[~2004-09-03 21:11 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.44.0409031316170.22793-100000@maxroach.lanl.gov>
2004-09-03 19:53 ` Charles Forsyth
2004-09-03 21:11   ` dvd [this message]
2004-09-03 20:48 ` dvd
2004-09-03 20:52   ` ron minnich
2004-09-03 21:15     ` dvd
2004-09-02 10:37 Aharon Robbins
2004-09-02 11:10 ` lucio
2004-09-02 18:54   ` dvd
2004-09-02 19:20     ` Boris Maryshev
2004-09-02 21:40     ` Charles Forsyth
2004-09-02 21:55       ` Boris Maryshev
2004-09-03  5:20       ` dvd
2004-09-03  6:22         ` lucio
2004-09-03  7:49         ` Charles Forsyth
2004-09-03 17:48           ` Jack Johnson
2004-09-03 17:52             ` ron minnich
2004-09-03 18:22               ` dvd
  -- strict thread matches above, loose matches on Subject: below --
2004-09-02  9:40 Aharon Robbins
2004-09-02  9:44 ` Dick Davies
2004-09-02 10:11 ` lucio
2004-09-02 10:52   ` George Michaelson
2004-09-02 11:21     ` lucio
2004-09-02 18:32       ` Jack Johnson
2004-09-02 22:58         ` Adrian Tritschler
2004-09-02 15:11 ` Sam
2004-09-02 19:51   ` boyd, rounin
2004-09-02 22:06 ` geoff
2004-09-03  2:33 ` Dan Cross
2004-09-01 14:48 boyd, rounin
2004-09-01 17:57 ` Jack Johnson
2004-09-01 17:59   ` boyd, rounin
2004-09-01 20:39     ` Tim Newsham
2004-09-01 21:16       ` boyd, rounin
2004-09-01 21:45         ` C H Forsyth
2004-09-02  3:24           ` Dan Cross
2004-09-02  3:31             ` George Michaelson
2004-09-02  4:24               ` Dan Cross
2004-09-02  5:15                 ` Jeff Sickel
2004-09-02  5:38                   ` andrey mirtchovski
2004-09-02  6:24                     ` Zigor Salvador
2004-09-03  2:10                   ` Dan Cross
2004-09-02 19:27                 ` boyd, rounin
2004-09-02 20:38                   ` Charles Forsyth
2004-09-02 22:44                     ` Adrian Tritschler
2004-09-03  3:00                   ` Dan Cross
2004-09-03  3:01                     ` boyd, rounin
2004-09-02  5:03               ` Skip Tavakkolian
2004-09-02  5:13                 ` George Michaelson
2004-09-02  9:10             ` Dick Davies
2004-09-03  2:13               ` Dan Cross
2004-09-03  2:38                 ` George Michaelson
2004-09-05  0:30                 ` Dick Davies
2004-09-05  0:31                   ` boyd, rounin
2004-09-05  1:11                   ` Jack Johnson
2004-09-05  2:50                     ` boyd, rounin
2004-09-02 14:26             ` ron minnich
2004-09-02 21:48               ` Wes Kussmaul
2004-09-02 22:09                 ` andrey mirtchovski
2004-09-03  0:21                   ` Wes Kussmaul
2004-09-03  0:40                     ` andrey mirtchovski
2004-09-03  4:39                   ` Jack Johnson
2004-09-03  2:53               ` Dan Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b5276ea55fd401b349935bc70cbd690@davidashen.net \
    --to=dvd@davidashen.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).