[CALUG] Ruby and Rusty Rails
clinton at unknownlamer.org
Thu Oct 19 17:43:56 CDT 2006
James Ewing Cottrell 3rd <JECottrell3 at Comcast.NET> writes:
> Speaking of LISP, HTML and XML would have worked much better as
> S-expressions. Consider:
> (html ()
> (head () (title () A Web Page))
> (body ()
> (h2 ((color . red)(font . times)) Off With His Head!)
> (p ((color . black) Curiouser (i () and) curiouser.)))
What you describe is essentially 3NF of SXML which is much much nicer
to work with than XML in any non-Lisp/Scheme language. Whenever I have
to transform XML docs for work (they insist on using PHP due to
general lack of brain power / "we can't have you become
irreplacement") I write a scheme program to do it. XSLT sucks compared
to SXSLT (or even just using the Scheme list operations on the XML).
I used to hate XML but now I tolerate it since it's so easy to process
in my favorite language as it is merely a tree. The external
representation is of little consequence when you can write tools to
easily deal with it (e.g. it'd be trivial to make nxml-mode in emacs
display the document as an sexp if you really wanted).
Common Lisp has cxml (which is basically SXML with the @ to start the
attributes alist) for parsing and transforming XML, and UCW includes
yaclml that is great for generating XML (you can translate Zope TAL
templates into it, define your own tag macros, ...).
'Obsolete' 1950s technology proving itself to be better than
everything else out that for the problems that the industry wants to
solve nowadays. I say let the unwashed masses suffer with their lesser
languages while those of us who can use the good ones safe much effort
and profit more.
Jabber:clinton at hcoop.net AIM:unknownlamer IRC:unknown_lamer at fnode#hcoop
I'm just thinking aloud; isn't thinking allowed?
443E 4F1A E213 7C54 A306 E328 7601 A1F0 F403 574B
More information about the lug