Re: Future of LISP. Alternative to XML. Web 3.0?



Juan R. wrote:
CanonML is so easy to type like TeX and is more powerful than XML

You have me sold!
Here are some random thoughts.


the # is substituted by \ as in TeX.

Great! I find [\em this] to be more readable than [#em this], because
of the shape of the symbol. Also \ is faster to type than # and people
will recognize it from TeX.


It has been discovered that XML namespaced languages are very
unreadable
....
Also multiple namespaces A:B:C are permitted. As in S(cheme)XML you
can use the URL directly because not XML limitations for tag names.

These are good points, but I personally still find prefix namespaces
more readable. Maybe it's because I'm accustomed to it, but

[\xsl:template [\@:match cd]

is easier to read than

[\template:xsl [\match:@ cd]

I also don't understand why would anybody need multiple namespaces per
tag. Isn't one already too much? :)


attributes are just data and for avoiding naming conflicts are in an
attribute namespace @

Excellent idea!
This is compact, unified and readable:

[\div [\@:id one] [\@:class left red] This is the text.]

Byt the way, I still find postfix namespaces more cumbersome to read:

[\div [\id:@ one] [\class:@ left red] This is the text.]

But maybe it's just force of habit.


No special symbol for operators. Operators are written in caps

This I strongly object to. You would lose case sensitivity on tag
names; you would add strange things, where [CD] is matched by

[XSL:TEMPLATE [@:MATCH cd]

(notice the case of "cd")

More importantly, you would need to escape any uppercase text,
introducing tons of ['STRANGE SYNTAX] just to say SIMPLE THINGS.

Not good.


<b> a</b> becomes [\b [\sp] a]

So you would discard all text nodes containing just whitespace, and also
strip whitespace from the beginning and end of the remaining text nodes?
What about inter-word whitespace? Would you collapse *any* whitespace
to a single horizontal space? As in 's/\s+/ /g' ?

It does make sense, but then [\em markup] usage would suffer.


I write [a \over 2] at editing/storing layer but this is transformed
to [\fract [\num a] [\den 2]] at the structural layer.

This requires the reader to know that \over becomes \num and \den.

I think it violates XML's independence from the application language and
therefore is bad. But see below for a possible solution!


_any_ XML odd WS rule could be implemented in CanonML at a _macro_
level because backward compatibility, simply it will be not done at
the fundamental layer by default because is all a mess.

The idea of CanonML macros is great! I think it can be extended
further. I suggest using '[\' for structure, while '[#' for macros and
for other reader directives. Examples:

[\div [#markup Here, only [\em word-delimiting]
space is preserved, although collapsed. ]]

-> "Here, only /word-delimiting/ space is preserved, although collapsed."


[#markup [\div In the following code snippet, newlines/whitespace are
not collapsed, although whitespace is still stripped from
the beginning and end of the code snippet:
[#pre
(defun fact (n)
(if (zerop n) 1
(* n (fact (1- n)))))
]]]

-> "... of the code snippet: (defun fact (n)
(if (zerop n) 1
(* n (fact (1- n)))))"


[\b [#sp] a] <- this is the "<b> a</b>" example. [#sp] is not [\sp]!!!


But wait, there's more!


[#define [a \over b]
[\fract [\num a] [\den b]]]

[#define [\copyright]
[\p Copyright (C) 2006 Innovative Ideas, Inc.]]

[#import MathML] <- this is where all the positional stuff is #define'd


I am receiving feedback and discussing it off-line with a number of
specialists (except LISP ones who remain uninterested :)

Too bad :(

Have you read Paul Graham's article* about programming language
popularity? This project has great potential (web 3.0 indeed!)
I'd hate to see it die.

Do you have a mailing list yet?


Toby

* http://www.paulgraham.com/popular.html
.



Relevant Pages

  • Re: xml.parsers.expat loading xml into a dict and whitespace
    ... whitespace after a tag to that part of the dict. ... Let's say I write a simple xml parser, for an xml file that just loads ...
    (comp.lang.python)
  • Re: Extra Space in IE - The Sequel
    ... characters (which includes space chars, newlines, carriage returns, ... ASCII char 255 etc etc) are to be collapsed to a single whitespace ... end tag. ... Authors should rely on user agents not to render whitespace after a start ...
    (comp.infosystems.www.authoring.html)
  • Re: asp.net 1.1 generates spurious whitespace
    ... there are 2 tab characters between the end of the img tag and the ... Visual Studio .NET 2002 or 2003). ... notorious for mangling your HTML into what *they* want it to look ... can't handle the extraneous whitespace, ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Render text with line breaks
    ... You could always blast the text directly into a tag, ... css style with "whitespace: pre;" on the element you put the text into. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: 2 Questions about validations
    ... [XML requires whitespace between attributes] ... > My curious mind wonders why any one would find it necessary to set up ... the end tag. ...
    (comp.infosystems.www.authoring.html)