From: Juan R.
Subject: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164466590.930214.30420@l39g2000cwd.googlegroups.com>
Today it is Saturday, I am empty from job, and just want to write
something here.

The Lots of Irrelevant Superfluous Parentheses appears to be rather
common between 'Cers', 'Phytoners', and other non
'Lispers'. I am unable to understand why the same people who likes
1+3*5 and blames (+ (* 5 3) 1) is so enthusiastic about XML. In XML,
one writes (MathML)

<apply><plus/><apply><times/><cn>5</cn><cn>3</cn></apply><cn>1</cn></apply>

Since i am empty today, I decided to count brackets: 4 curvy brackets
for LISP, 24 angle ones for XML.

If 6 times less brackets are considered Superfluous (or Silly) maybe
XML stands for eXcesive Mad angLe brackets.

From: hyperstring.net ltd
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164467965.052300.287770@45g2000cws.googlegroups.com>
Juan R. wrote:
> Today it is Saturday, I am empty from job, and just want to write
> something here.
>
> The Lots of Irrelevant Superfluous Parentheses appears to be rather
> common between 'Cers', 'Phytoners', and other non
> 'Lispers'. I am unable to understand why the same people who likes
> 1+3*5 and blames (+ (* 5 3) 1) is so enthusiastic about XML. In XML,
> one writes (MathML)
>
> <apply><plus/><apply><times/><cn>5</cn><cn>3</cn></apply><cn>1</cn></apply>
>
> Since i am empty today, I decided to count brackets: 4 curvy brackets
> for LISP, 24 angle ones for XML.
>
> If 6 times less brackets are considered Superfluous (or Silly) maybe
> XML stands for eXcesive Mad angLe brackets.

A Brilliant Post, very well put and exactly how I feel, those brackets
are beautiful, the way they close things and clearly indicate what is
where.

Paul
http://www.hyperstring.net
From: Juan R.
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164478369.618703.188400@45g2000cws.googlegroups.com>
hyperstring.net ltd wrote:
> A Brilliant Post, very well put and exactly how I feel, those brackets
> are beautiful, the way they close things and clearly indicate what is
> where.

Yes i also like those brackets, but the same people who hates the ()
appears to love the larger number of <>.

For instance, in Aug i suggested to MathML folks the usage of LISP as
input syntax for c-MathML [*] since them are developing one for MathML
3 now.

Reply from one of MathML authors is contained in [**].

I miserably fail to understand how anyone, at the one hand, can think
that (plus 2 3) will fail whereas at the same time promoting the XML
version

<apply><plus/> <cn>2</cn> <cn>3</cn></apply>

and claiming elsewhere a brilliant future for it!

[*] http://lists.w3.org/Archives/Public/www-math/2006Aug/0000

[**] http://lists.w3.org/Archives/Public/www-math/2006Aug/0001
From: ···············@gmail.com
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164480596.514898.305910@45g2000cws.googlegroups.com>
On Nov 25, 2:56 pm, "Juan R." <··············@canonicalscience.com>
wrote:
> The Lots of Irrelevant Superfluous Parentheses appears to be rather
> common between 'Cers', 'Phytoners', and other non
> 'Lispers'. I am unable to understand why the same people who likes
> 1+3*5 and blames (+ (* 5 3) 1) is so enthusiastic about XML. In XML,
> one writes (MathML)

I think if you wanted to convince non-Lisp programmers of this you'd
need to choose a slightly different argument. Not many programmers who
use XML regularly will sit there typing pages of XML in but will
instead generate and manipulate it with DOM, SAX, XSLT, XPath, etc.

It may not be all that obvious to, say, a Java programmer that you
could do it all within Lisp where code is data.

Phil
From: Juan R.
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164481507.820671.82240@j72g2000cwa.googlegroups.com>
···············@gmail.com wrote:
> On Nov 25, 2:56 pm, "Juan R." <··············@canonicalscience.com>
> wrote:
> > The Lots of Irrelevant Superfluous Parentheses appears to be rather
> > common between 'Cers', 'Phytoners', and other non
> > 'Lispers'. I am unable to understand why the same people who likes
> > 1+3*5 and blames (+ (* 5 3) 1) is so enthusiastic about XML. In XML,
> > one writes (MathML)
>
> I think if you wanted to convince non-Lisp programmers of this you'd
> need to choose a slightly different argument.

I wannot convince anyone. I simply noticed that i never read people who
blames about Lots of Irrelevant Superfluous Parentheses blaming about
eXcessive Mad angLe brackets.

If 4 () are considered silly by some then what are 24 for encoding the
_same_?

> Not many programmers who
> use XML regularly will sit there typing pages of XML in but will
> instead generate and manipulate it with DOM, SAX, XSLT, XPath, etc.

Well, i used XSLT, XPath and DOM and my main query hold still.

XSLT also match the eXcessive Mad angLe brackets
From: ···············@gmail.com
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164483533.056746.274420@l39g2000cwd.googlegroups.com>
On Nov 25, 7:05 pm, "Juan R." <··············@canonicalscience.com>
wrote:

> > need to choose a slightly different argument.I wannot convince anyone. I simply noticed that i never read people who
> blames about Lots of Irrelevant Superfluous Parentheses blaming about
> eXcessive Mad angLe brackets.

FWIW I totally agree with you.

But what I'm wondering is who these people actually are. Are they
serious programmers who we should try and convince of the merits of the
syntax in order to get more people interested in Lisp? Or are they
trolls just looking for an argument? If they're the former then I can
understand why you're intrigued. But in my (admittedly brief) time
looking through the archives of this group, I've seen more of the
latter unfortunately! But I may be wrong.

> > Not many programmers who
> > use XML regularly will sit there typing pages of XML in but will
> > instead generate and manipulate it with DOM, SAX, XSLT, XPath, etc.
>Well, i used XSLT, XPath and DOM and my main query hold still.
>
> XSLT also match the eXcessive Mad angLe brackets

Agree on XSLT but not the others...

Phil
From: Juan R.
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164532629.239787.298390@l39g2000cwd.googlegroups.com>
···············@gmail.com wrote:
> But what I'm wondering is who these people actually are. Are they
> serious programmers who we should try and convince of the merits of the
> syntax in order to get more people interested in Lisp?

Good point. I do not know skill for several of those. Moreover, some of
comments one finds on the Internet are anonimous.

> > XSLT also match the eXcessive Mad angLe brackets
>
> Agree on XSLT but not the others...

Yes. XPath and DOM do not use today eXcessive Mad angLes, but there is
plans for a XpathX.

Just for comparison, look for normal query on "3.1.1 XQuery solution in
XQuery Use Cases" [*]

and look for proposed XML version "3.1.2 A Solution in XQueryX:"

Maybe in some years we could see something so Mad for XPath.

If tomorrow i wrote XQueryLisp ((()) () (())), _some_ people will blame
me because the ().

If W3C writes XqueryX, i am convinced that some people like that. And
people who do not like, often will say criticism in private.

[*] http://www.w3.org/TR/xqueryx/
From: Pedro Kröger
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <87wt5j2y1z.fsf@gmail.com>
"Juan R." <··············@canonicalscience.com> writes:

> Since i am empty today, I decided to count brackets: 4 curvy brackets
> for LISP, 24 angle ones for XML.

And it doesn't work only for xml. for example, compare a simple
fibonacci function in pascal and in lisp:

function fib(N : integer) : integer;
begin
  if N < 2 then 
    fib := N
  else
    fib := fib (N - 1) + fib (N - 2);
end;

(defun fib (n)
  (if (< n 2)
      n
      (+ (fib (- n 1))
         (fib (- n 2)))))

If you take out of the pascal code all the things it has in common with
the lisp code you'll end up with these syntax elements:

: integer : integer ;
begin
then
fib :=
else
fib := ;
end;

which gives a total of 15. OTOH, if you take out all the things that the
lisp code has in common with the pascal code, you'll end up with these
syntax elements:

(
(()
(()())))

a total of 12 parentheses. Not only the lisp code has _fewer_
'elements', but they are uniform (just parentheses), while the pascal
code have all sorts of different things.

Pedro Kroger
From: Ken Tilton
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <U%1ah.5629$kz3.5099@newsfe08.lga>
Juan R. wrote:
> Today it is Saturday, I am empty from job, and just want to write
> something here.
> 
> The Lots of Irrelevant Superfluous Parentheses appears to be rather
> common between 'Cers', 'Phytoners', and other non
> 'Lispers'. I am unable to understand why the same people who likes
> 1+3*5 and blames (+ (* 5 3) 1) is so enthusiastic about XML. In XML,
> one writes (MathML)
> 
> <apply><plus/><apply><times/><cn>5</cn><cn>3</cn></apply><cn>1</cn></apply>
> 
> Since i am empty today, I decided to count brackets: 4 curvy brackets
> for LISP, 24 angle ones for XML.
> 
> If 6 times less brackets are considered Superfluous (or Silly) maybe
> XML stands for eXcesive Mad angLe brackets.
> 

Choir, Juan. Juan, choir.

hth, kt

-- 
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."
    -- Smiling husband to scowling wife, New Yorker cartoon
From: Lars Rune Nøstdal
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <pan.2006.11.25.15.50.48.914846@gmail.com>
On Sat, 25 Nov 2006 06:56:30 -0800, Juan R. wrote:

> Today it is Saturday, I am empty from job, and just want to write
> something here.
> 
> The Lots of Irrelevant Superfluous Parentheses appears to be rather
> common between 'Cers', 'Phytoners', and other non
> 'Lispers'. I am unable to understand why the same people who likes
> 1+3*5 and blames (+ (* 5 3) 1) 

One can write 1 + 3 * 5 in Lisp also:

  cl-user> (nfx 1 + 3 * 5)
  16
  cl-user> (macroexpand-1 '(nfx 1 + 3 * 5))
  (+ 1 (* 3 5))

..because it is a programmable language:
  http://www.cl-user.net/asp/libs/gloria-infix


> is so enthusiastic about XML. In XML, one writes (MathML)
> 
> <apply><plus/><apply><times/><cn>5</cn><cn>3</cn></apply><cn>1</cn></apply>
> 
> Since i am empty today, I decided to count brackets: 4 curvy brackets
> for LISP, 24 angle ones for XML.
> 
> If 6 times less brackets are considered Superfluous (or Silly) maybe
> XML stands for eXcesive Mad angLe brackets.

*shrug* Yes, XML is a mess. I do not understand how people cannot see
how much of it is bloated and unneeded.

  http://en.wikipedia.org/wiki/XML#Weaknesses_of_XML
  http://c2.com/cgi/wiki?XmlSucks

-- 
Lars Rune Nøstdal
http://lars.nostdal.org/
From: jakemiles
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164473113.119002.243130@45g2000cws.googlegroups.com>
Let them have their crap.  The real question is how can I get paid to
use lisp on a daily basis instead of java/xml?

On Nov 25, 10:50 am, Lars Rune Nøstdal <···········@gmail.com> wrote:
> On Sat, 25 Nov 2006 06:56:30 -0800, Juan R. wrote:
> > Today it is Saturday, I am empty from job, and just want to write
> > something here.
>
> > The Lots of Irrelevant Superfluous Parentheses appears to be rather
> > common between 'Cers', 'Phytoners', and other non
> > 'Lispers'. I am unable to understand why the same people who likes
> > 1+3*5 and blames (+ (* 5 3) 1)One can write 1 + 3 * 5 in Lisp also:
>
>   cl-user> (nfx 1 + 3 * 5)
>   16
>   cl-user> (macroexpand-1 '(nfx 1 + 3 * 5))
>   (+ 1 (* 3 5))
>
> ..because it is a programmable language:
>  http://www.cl-user.net/asp/libs/gloria-infix
>
> > is so enthusiastic about XML. In XML, one writes (MathML)
>
> > <apply><plus/><apply><times/><cn>5</cn><cn>3</cn></apply><cn>1</cn></apply>
>
> > Since i am empty today, I decided to count brackets: 4 curvy brackets
> > for LISP, 24 angle ones for XML.
>
> > If 6 times less brackets are considered Superfluous (or Silly) maybe
> > XML stands for eXcesive Mad angLe brackets.*shrug* Yes, XML is a mess. I do not understand how people cannot see
> how much of it is bloated and unneeded.
>
>  http://en.wikipedia.org/wiki/XML#Weaknesses_of_XML
>  http://c2.com/cgi/wiki?XmlSucks
> 
> --
> Lars Rune Nøstdalhttp://lars.nostdal.org/
From: hyperstring.net ltd
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164486430.069531.149040@j44g2000cwa.googlegroups.com>
jakemiles wrote:
> Let them have their crap.  The real question is how can I get paid to
> use lisp on a daily basis instead of java/xml?
>

You know Jake - we have built a very successful software house and
we're running Lisp, people really care about what it does, not what
it's written in (some do I know, but my clients prefer our windowing
environment for running their website - our whole server is in Lisp.

Paul
www.hyperstring.net
From: Lars Rune Nøstdal
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <pan.2006.11.25.17.20.22.612092@gmail.com>
On Sat, 25 Nov 2006 08:45:13 -0800, jakemiles wrote:

> Let them have their crap.  The real question is how can I get paid to
> use lisp on a daily basis instead of java/xml?-- 

Start independently? Many customers do not care whether if it's in Lisp as
long as things gets done - and with Lisp I get things done. :)

-- 
Lars Rune Nøstdal
http://lars.nostdal.org/
From: Lars Rune Nøstdal
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <pan.2006.11.25.17.24.28.356462@gmail.com>
On Sat, 25 Nov 2006 18:20:22 +0100, Lars Rune Nøstdal wrote:

> On Sat, 25 Nov 2006 08:45:13 -0800, jakemiles wrote:
> 
>> Let them have their crap.  The real question is how can I get paid to
>> use lisp on a daily basis instead of java/xml?-- 
> 
> Start independently? Many customers do not care whether if it's in Lisp as
> long as things gets done - and with Lisp I get things done. :)

I forgot: http://lispjobs.wordpress.com/

-- 
Lars Rune Nøstdal
http://lars.nostdal.org/
From: Juan R.
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164478867.020256.223350@m7g2000cwm.googlegroups.com>
Lars Rune Nøstdal wrote:
> On Sat, 25 Nov 2006 06:56:30 -0800, Juan R. wrote:
>
> > Today it is Saturday, I am empty from job, and just want to write
> > something here.
> >
> > The Lots of Irrelevant Superfluous Parentheses appears to be rather
> > common between 'Cers', 'Phytoners', and other non
> > 'Lispers'. I am unable to understand why the same people who likes
> > 1+3*5 and blames (+ (* 5 3) 1)
>
> One can write 1 + 3 * 5 in Lisp also:
>
>   cl-user> (nfx 1 + 3 * 5)
>   16
>   cl-user> (macroexpand-1 '(nfx 1 + 3 * 5))
>   (+ 1 (* 3 5))
>
> ..because it is a programmable language:
>   http://www.cl-user.net/asp/libs/gloria-infix

True and the same hold for XML. I could write

<apply><nfx/><cn>1</cn><plus/><cn>3</cn><times/><cn>5</cn></apply>

transforming it via a XSLT to final

<apply><plus/><apply><times/><cn>5</cn><cn>3</cn></apply><cn>1</cn></apply>

I save some few brackets here but still there are _many more_ than in
LISP and i never see one of 'Ceers' blaming XML in that way.
>
> *shrug* Yes, XML is a mess. I do not understand how people cannot see
> how much of it is bloated and unneeded.
>
>   http://en.wikipedia.org/wiki/XML#Weaknesses_of_XML
>   http://c2.com/cgi/wiki?XmlSucks

I wrote in some of that. It would be no difficult to know where i did
;-)
From: Marc Battyani
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <PKidnRW8Bt5Y7vXYnZ2dnUVZ8qudnZ2d@giganews.com>
"Lars Rune N�stdal" <···········@gmail.com> wrote

>
> One can write 1 + 3 * 5 in Lisp also:
>
>  cl-user> (nfx 1 + 3 * 5)
>  16
>  cl-user> (macroexpand-1 '(nfx 1 + 3 * 5))
>  (+ 1 (* 3 5))
>
> ..because it is a programmable language:
>  http://www.cl-user.net/asp/libs/gloria-infix

And as it's Common Lisp, there are more than one way to do it... ;-)

http://www.cl-user.net/asp/search?search=infix

BTW if somebody knows of another one, please just add it to the CLD.

Marc
From: Simon Brooke
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <r03n34-n6p.ln1@gododdin.internal.jasmine.org.uk>
in message <·······················@l39g2000cwd.googlegroups.com>, Juan R.
(···············@canonicalscience.com') wrote:

> Today it is Saturday, I am empty from job, and just want to write
> something here.
> 
> The Lots of Irrelevant Superfluous Parentheses appears to be rather
> common between 'Cers', 'Phytoners', and other non
> 'Lispers'. I am unable to understand why the same people who likes
> 1+3*5 and blames (+ (* 5 3) 1) is so enthusiastic about XML. In XML,
> one writes (MathML)
> 
>
<apply><plus/><apply><times/><cn>5</cn><cn>3</cn></apply><cn>1</cn></apply>
> 
> Since i am empty today, I decided to count brackets: 4 curvy brackets
> for LISP, 24 angle ones for XML.

XML is just a more prolix way of writing SExprs. It always has been. It's
not new to notice that. And it isn't new to notice that SExprs are a very
powerful tool for representing data.

-- 
·····@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/

                        ;; An enamorata is for life, not just for weekends.
From: Dustan
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164548571.394499.265990@l12g2000cwl.googlegroups.com>
Juan R. wrote:
> Today it is Saturday, I am empty from job, and just want to write
> something here.
>
> The Lots of Irrelevant Superfluous Parentheses appears to be rather
> common between 'Cers', 'Phytoners', and other non
> 'Lispers'. I am unable to understand why the same people who likes
> 1+3*5 and blames (+ (* 5 3) 1) is so enthusiastic about XML.

This kind of statement is known as a 'blanket statement'. It refers to
all people of a wide variety, thus almost guaranteeing that it is not
true. (that is my own way of saying I don't like XML, though I prefer
'1+3*5' to '(+ (* 5 3) 1)')

> In XML,
> one writes (MathML)
>
> <apply><plus/><apply><times/><cn>5</cn><cn>3</cn></apply><cn>1</cn></apply>
>
> Since i am empty today, I decided to count brackets: 4 curvy brackets
> for LISP, 24 angle ones for XML.
>
> If 6 times less brackets are considered Superfluous (or Silly) maybe
> XML stands for eXcesive Mad angLe brackets.

Wow... This truly impresses me. Everyone on this thread agrees, and
everyone on this thread must make a point of it. So... what's the point
of starting such a pointless thread? Is it just to get someone like me
watching the thread riled up enough to respond?

Well, in that case, you got what you wanted. And if you want to rant up
a response, I suggest you actually read this; the worst rebuttal
possible (in any situation) is a misinformed one.

I personally find the parentheses a bit overwhelming, but I'm not
letting that stop me from learning Lisp. For some people, the
parentheses are a nice visual addition to the language; for others,
they are about the most annoying thing you could do to screw up a
language. There's no such thing as a 'right' or 'wrong' programming
language; there's just a preferred programming language for each person
in the world.

Pedro Kr�ger, I challenge you to come up with a similar argument using
python vs lisp instead of pascal vs lisp (python happens to be my
personally preferred programming language). I'm not saying python is
better than lisp. I'm saying the languages are *different*, and that's
*not* a bad thing; in fact, it's a very good thing, because it gives
people options.

You can continue your one-sided rant all you want, but I'm telling you,
it's pointless. It's very clear that you prefer lisp to other
programming languages, but that doesn't mean other programming
languages are bad; it means that they are terrible and completely
distasteful to the 15 or so who have posted here. Neither you nor the
others who find Lisp to be superfluous can be considered right or
wrong, simply because it's purely a matter of opinion.

my 2 cents (and I'm not planning on offering any more)
Dustan
From: Pedro Kröger
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <871wnpwmxv.fsf@gmail.com>
"Dustan" <············@gmail.com> writes:

> Pedro Kröger, I challenge you to come up with a similar argument using
> python vs lisp instead of pascal vs lisp (python happens to be my
> personally preferred programming language). I'm not saying python is
> better than lisp. I'm saying the languages are *different*, and that's
> *not* a bad thing; in fact, it's a very good thing, because it gives
> people options.

Nobody is saying that languages are equal or _should_ be equal. My point
was that, while people tend to get overwhelmed by lisp parenthesis,
other languages have to deal roughly with the some amount of syntax
elements, but because they are divided between commas, dots, and so on
people don't get overwhelmed.

About your 'challenge', python has these:

:
:
return
else
:
return

giving a total of 6, while lisp has the same 12 parens as before. of
course I could argue that the _total_ of characters is greater in python
(19) than in lisp (12) but that's silly since we use moderns editors
these days with things like auto-completion. these same editors help me
with the parens. in the lisp code I only typed the open-parenthesis, it
inserted the closing parenthesis automatically ;)

Pedro Kroger
From: Andreas Thiele
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <ekbsjr$am5$02$1@news.t-online.com>
> ...
> If 6 times less brackets are considered Superfluous (or Silly) maybe
> XML stands for eXcesive Mad angLe brackets.
>

Yes, obviously. XML is nothing new.

It's just a long-tongued version of what we call s-expr.

Andreas

P.S. There are folks out who start 'meta programming' on XML. Really crazy! The could just program in Lisp.
From: Frank Buss
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <my2u4xv8tft.lu5gnd60n0wk$.dlg@40tude.net>
Juan R. wrote:

> Since i am empty today, I decided to count brackets: 4 curvy brackets
> for LISP, 24 angle ones for XML.
> 
> If 6 times less brackets are considered Superfluous (or Silly) maybe
> XML stands for eXcesive Mad angLe brackets.

If you want to encode this XML document:

<p x="10" y="20" z="30"><c>content</c></p>

you have to think about how to encode attributes. If you use a list, which
is empty for no attributes, it looks like this:

(p((x "10")(x "20")(z "30"))(c()content))

so the sexp is only 1 char smaller than the XML encoding and for me the XML
encoding looks more readable.

To make it more readable, you would format it like this in Lisp:

(p ((x "10") (x "20") (z "30"))
   (c ()
      content))

Formatting it in XML for better readability needs less characters:

<p x="10" y="20" z="30">
  <c>content</c>
</p>

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Juan R.
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <1164549356.461037.179540@45g2000cws.googlegroups.com>
Frank Buss wrote:
> Juan R. wrote:
>
> > Since i am empty today, I decided to count brackets: 4 curvy brackets
> > for LISP, 24 angle ones for XML.
> >
> > If 6 times less brackets are considered Superfluous (or Silly) maybe
> > XML stands for eXcesive Mad angLe brackets.
>
> If you want to encode this XML document:
>
> <p x="10" y="20" z="30"><c>content</c></p>
>
> you have to think about how to encode attributes. If you use a list, which
> is empty for no attributes, it looks like this:
>
> (p((x "10")(x "20")(z "30"))(c()content))
>
> so the sexp is only 1 char smaller than the XML encoding and for me the XML
> encoding looks more readable.

I was not discussing about readability, etc. I just noticed that same
XML encoding for LISP math needs of 6 times more brackets and that i
know people who blames LISP and does not blame XML when would do it 6
times more. Just I did mean that nothing more.

Now, let me do some adittional comments on your post.

In my opinion the XML structure

<p x="10" y="20" z="30"><c>content</c></p>

is well represented like

(p (@ (x "10") (y "20") (z "30")) (c "content"))

which is better structured and powerfull than XML (e.g. multiple level
of recursive metadata, ordering...) and still concise enough. Another
option is

(p (@x "10") (@y "20") (@z "30") (c "content"))

You typed an allmost HTML-like example using no namespaces and
one-character tags. HTML did born with <p>, <i>, <b>... This no more
the rule in XML design because one letter tags are not descriptive (and
because the number of different tags containing a single letter is very
limited for modern markup needs).

Any modern XML application uses namespaces (xsl: fo: html: mml:) and
larger tag names.  For example, <para> or even <Paragraph>, <bold>,
<italic> <template> <block> <mrow> <group> <author> <chapter>... Now
compare next two formats

(txt:para
     (@ (txt:xinc "10") (txt:yyy "20") (txt:zoo "30"))
(txt:content "content"))

<txt:para
     txt:xinc="10" txt:yyy="20" txt:zoo="30">
<txt:content>content</txt:content></txt:para>

The S-expr format is more concise, is not? Moreover if value for yyy
attribute is not a string, you cannot represent it in XML, whereas you
can in s-expr.

txt:yyy=<% $alpha %> is not valid XML. Some PHP pages use this class of
invalid XML for generating dynamic HTML.

(txt:yyy (% $alpha))

> To make it more readable, you would format it like this in Lisp:
>
> (p ((x "10") (x "20") (z "30"))
>    (c ()
>       content))
>
> Formatting it in XML for better readability needs less characters:
>
> <p x="10" y="20" z="30">
>   <c>content</c>
> </p>

Readability is personal but please look those

(p (@ (x "10") (y "20") (z "30"))
  (c "content"))

[p [@ [x "10"] [y "20"] [z "30"]]
  [c "content"]]

[p [@ [x "10"] [y "20"] [z "30"]]
  [c "content"]
]

or this real XML [*]

<m:math>
  <m:apply>
    <m:times/>
    <m:ci>a</m:ci>
    <m:apply>
      <m:plus/>
      <m:ci>b</m:ci>
      <m:ci>c</m:ci>
    </m:apply>
  </m:apply>
</m:math>

S-EXPR copy

(m:math
  (m:apply
    (m:times)
    (m:ci a)
    (m:apply
      (m:plus)
      (m:ci b)
      (m:ci c) )))

What you find more readable? note that XML example i copied was not the
more complex on the page i link, and still examples illustrated there
are simple for my real field of interest. Also i would notice that page
uses m prefix. mml prefix is more usual and even needed for some tools
for instance docbook. If you substitute m: by mml: you will find that
XML format is more unreadable (i think).

[*] http://cnx.org/content/m9008/latest/
From: Lars Rune Nøstdal
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <pan.2006.11.26.14.01.18.123949@gmail.com>
On Sun, 26 Nov 2006 13:41:21 +0100, Frank Buss wrote:

> Juan R. wrote:
> 
>> Since i am empty today, I decided to count brackets: 4 curvy brackets
>> for LISP, 24 angle ones for XML.
>> 
>> If 6 times less brackets are considered Superfluous (or Silly) maybe
>> XML stands for eXcesive Mad angLe brackets.
> 
> If you want to encode this XML document:
> 
> <p x="10" y="20" z="30"><c>content</c></p>
> 
> you have to think about how to encode attributes. If you use a list, which
> is empty for no attributes, it looks like this:
> 
> (p((x "10")(x "20")(z "30"))(c()content))
> 
> so the sexp is only 1 char smaller than the XML encoding and for me the XML
> encoding looks more readable.
> 
> To make it more readable, you would format it like this in Lisp:
> 
> (p ((x "10") (x "20") (z "30"))
>    (c ()
>       content))
> 
> Formatting it in XML for better readability needs less characters:
> 
> <p x="10" y="20" z="30">
>   <c>content</c>
> </p>

Both Lisp and XML needs to be split into several lines and indented
properly for the structure to be visible as soon as you reach a certain
threshold. It's only for simple examples one can see structure when
not doing this.

What about:

  ((p x "10" y "20" z "30")
   ((c)content))

..or..

  ((p :x "10" :y "20" :z "30")
   ((c)content))

Using keywords makes Emacs highlight stuff differently which makes the
attribute-part of attribute/value-pairs more visible.


-- 
Lars Rune Nøstdal
http://lars.nostdal.org/
From: Frank Buss
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <sn2yp80luyln$.1m5u86dqhu027$.dlg@40tude.net>
Lars Rune N�stdal wrote:

>   ((p :x "10" :y "20" :z "30")
>    ((c)content))
> 
> Using keywords makes Emacs highlight stuff differently which makes the
> attribute-part of attribute/value-pairs more visible.

keywords are better. But you have to use double quotes for text, too, if it
could contain parantheses, or you have to escape all parantheses.

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Giorgos Keramidas
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <87mz6bndt8.fsf@kobe.laptop>
On Sun, 26 Nov 2006 15:01:18 +0100,
Lars Rune N�stdal <···········@gmail.com> wrote:
> On Sun, 26 Nov 2006 13:41:21 +0100, Frank Buss wrote:
>> If you want to encode this XML document:
>> 
>> <p x="10" y="20" z="30"><c>content</c></p>
>> 
>> you have to think about how to encode attributes. If you use a list, which
>> is empty for no attributes, it looks like this:
>> 
>> (p((x "10")(x "20")(z "30"))(c()content))
>> 
>> so the sexp is only 1 char smaller than the XML encoding and for me the XML
>> encoding looks more readable.

This is, of course only _one_ of the possible s-exps which can map to
the original XML document (and it has a duplicate 'x' attribute, which
is a minor buglet, but let's ignore that for a while).

Another one is:

    (p :x 10 :y 20 :z 30
       (c content))

which is probably more `Lispy'.

> Both Lisp and XML needs to be split into several lines and indented
> properly for the structure to be visible as soon as you reach a
> certain threshold. It's only for simple examples one can see structure
> when not doing this.
>
> What about:
>
>   ((p x "10" y "20" z "30")
>    ((c)content))

Or even the one I used above, which is IMHO *far* more readable than the
XML version :-)
From: Tim Bradshaw
Subject: Re: Lots of Irrelevant Superfluous Parentheses
Date: 
Message-ID: <ekm2lg$gh6$1$8302bc10@news.demon.co.uk>
On 2006-11-29 03:15:31 +0000, Giorgos Keramidas 
<········@ceid.upatras.gr> said:

> Another one is:
> 
>     (p :x 10 :y 20 :z 30
>        (c content))
> 
> which is probably more `Lispy'.

This has issues (possible issues anyway) with something like

<foo x 10>content</foo>

which naturally would be

(foo :x 10 "content")

Which makes the job of something that interprets this a little more 
interesting.  I've always used the put-the-tag-and-attributes-in-a-list 
thing:

((foo :x 10) "content")

with a special case of (foo "content") for the zero-attribute case.  
Since this is common that minimises effort in practice.

My experience, incidentally, is that typing the sexp version of 
{HT,X,SG}ML is less work than typing {HT,X,SG}ML even after requiring 
string quotes etc - I once wrote a fairly substantial document that 
way.  Obviously a syntax designed to not require this is better than 
either, and that's what we ended up using.

--tim