[Openmcl-devel] ccl manual (was Re: trace on recursive functions)
Tim Bradshaw
tfb at tfeb.org
Sun Dec 13 11:51:05 PST 2009
On 12 Dec 2009, at 02:36, Ron Garret wrote:
> There's a technology called S-expressions you might want to look
> into. S-expressions are kind of like XML, but with a much saner
> syntax. You don't have to manually match up your end tags, which
> makes S-expressions much easier to compose and to read than XML.
> There are a lot of tools for manipulating S-expressions, including
> an editor called Emacs, and another one called Hemlock. It is
> borderline trivial to transform S-expressions into XML, or any other
> format you like. S-expressions have even been used as the base
> syntax for a full-featured programming language called Lisp. If you
> haven't looked at it you really should. It's quite nifty.
And here's a thing. I once made my living teaching, and as a result
had to write a lot of documents, usually in a tearing hurry. I had a
thing called HTOUT which I'd written before that, as a fairly trivial
hack to embed HTML (really any SGML-family language with some caveats)
into Lisp, using a fairly obvious syntax (there are several things
that do this of course, and I make no great claims for HTOUT). I
found it *much easier* to write documentation *in this syntax* than
XML, because XML is, frankly, such a pile of shit (and I say this as
someone who worked with SGML in the early 90s: XML is, just, an
improvement over SGML-based systems, but they haven't fixed any of the
interesting stuff). I wrote quite a substantial manual like this.
Macros and editor support outweighed the requirement to put all the
actual text in quotes.
Later on, we had a system called DTML which used HTOUT's backend but a
parser which was more oriented to text: the syntax looked like <em|
this> or <a :name "foo"|this> (note no closing tags). Between two of
us we write a couple of hundred page manual in a week or so (of long
days) using DTML. It was almost as good for authoring as TeX and far
better for the processing, unless all you ever wanted was paper output.
It's not surprising that DTML was a better syntax for text than XML,
what is surprising is that raw S-expressions are, as well.
(I'm not offering DTML because the implementation needs a bunch of
work to make its macros not be just completely mad, and I don't have
time.)
--tim
More information about the Openmcl-devel
mailing list