[toronto-lisp] SGML, Scheme and a historical anecdote
David Penton
djp at arqux.com
Wed Oct 7 18:20:14 UTC 2009
This is a reminiscence that may be a bit over-long. You may wish to
spend your time wisely and just skip reading it ;-)
At the Oct. 6 meeting I made a vague reference to having heard about
Scheme for the first time in connection with SGML. I was not
altogether sure that my memory was correct, but a quick check in
wikipedia confirms the connection. The sgml stylesheet language DSSSL
is said to be "based on a subset of Scheme." (http://en.wikipedia.org/wiki/DSSSL
)
Moreover, its connection with my own history now reminds me that, like
Brian Connoy, I too missed an earlier chance to dive into learning
lisp/lisp-like languages. This is where I first heard about Scheme.
In the early 2000's I was heavily involved in a project whose main
objective was to put Canadian federal legislation online. XML was the
big deal back then, so we planned to use it to mark up, store, print
and search Canadian statutes and regulations.
One of the biggest problems encountered was how to print legislation
marked up as XML. The legacy system used legislation created in
WordPerfect, which was then converted to the input format of custom
implementation of one of the phototypesetting engines of the day (I
forget which one.) The legacy printing system was becoming
unsupportable due to its age, the large quantity of cruft in the code
and the gradual disappearance (through death, insanity etc.) of most
people who knew how to use it.
The jackass whose responsibility it was to replace the legacy printing
system had absolutely no clue about XML. He had spent years at the
Canada Gazette, and had done everything in MS Word plus a bunch of
crap he had kluged up in VB or some other horror. He absolutely could
NOT grasp the idea of hierarchical data structures, trees etc. When I
tried to explain recursion and tree structures to him he just lost his
temper.
The project bogged down almost to the point of cancellation over this
issue. The House of Commons techical staff were in a total panic.
I "tactfully" informed the project manager that the guy in charge of
printing was a total fucking idiot. Eventually I began investigating
methods of printing XML and SGML on my own. I discovered Jade (a DSSSL
engine) and also JadeTex. I had used TeX heavily for some time, so I
proposed that we go that direction.
As it turned out, DSSSL was in fairly bad repute with a lot of people
who had considerable influence on the project. This was almost
entirely because (to paraphrase these people) "DSSSL = Scheme and
Scheme is *weird* and NOBODY uses Scheme for anything useful." This
same bunch also had a lot of prejudice against TeX. The desktop
publishing, or rather word processing paradigm ruled supreme in their
world. And anyway, in the structured markup world at the time many
people thought that SGML was too complex, and hence so was anything
related to it. (That's why we have XML, I guess.) (For a contrary
view check out some of the recently deceased Erik Naggum's rants about
XML.)
At that point I began to investigate XSLT and XSL-FO. XSLT engines
were reasonably advanced at the time (XSLT 1.0 I think). XSL-FO was
pretty new. Only a rather half-baked open source version (FOP, an
apache project) was readily available. Hardly anyone was all that
worried about printing out XML, because the focus was all on its use
for web site content, or SOAP, and that kind of stuff. So transforming
XML to HTML and styling with CSS was about all anyone seemed to care
about.
So, one April easter weekend I worked for four days straight (with
about two hours of sleep per day) to do a 'proof of concept' print
engine. I bashed together something using the project's XML for
legislation and XSLT outputting to XSL-FO. This worked fairly well. It
also gave me a quick introductory lesson in (more or less) functional
style, or at least without being able to rely on side-effects.
As it all turned out, I had so offended the people in charge of the
print engine project that they persuaded management to
(a) take my proof of concept stuff
(b)hire consultants to produce a production-quality system based on
it
(c) acquire a commercial XSL-FO engine (Antenna House), and
(d) banish me to some remote part of the project for having
insulted the dimwit whose job I had largely done.
I became the official project pariah for a time. So much for being
technically right, but tactlessly, vociferously, and impolitically so.
It would not surprise me to find out that the almost-functional nature
of XSLT is based on the same rationale for basing DSSSL on Scheme. I
have read some explanations of the advantages the designers thought
might result from making XSLT side-effectless, but I did not
understand them at the time. Perhaps learning Scheme some day might
clarify the matter for me.
I seems that the prevailing prejudice against DSSSL and Scheme caused
me to miss my chance to dive into the lisp/scheme world seven or eight
years ago.
- Dave -
More information about the toronto-lisp
mailing list