<?xml version="1.0"?>
<rss version="2.0" 
><channel
 ><title
  >Brian Mastenbrook</title
  ><link
  >http://brian.mastenbrook.net/</link
  ><description
  >Brian Mastenbrook archives</description
  ><language
  >en</language
  ><item
  ><title
   >paste.lisp.org CAPTCHA in acrylic</title
   ><link
   >http://brian.mastenbrook.net/display/24</link
   ><pubDate
   >Mon, 19 May 2008 17:15:52 GMT</pubDate
   ><description
   >Becky Stern of the &lt;a href="http://blog.makezine.com/"&gt;MAKE magazine blog&lt;/a&gt; recreates CAPTCHAs in acrylic. Her &lt;a href="http://blog.makezine.com/archive/2008/05/captcha_paintings.html?CMP=OTC-0D6B4898490"&gt;latest creation&lt;/a&gt; is the CAPTCHA I created for &lt;a href="http://paste.lisp.org/"&gt;paste.lisp.org&lt;/a&gt;:
&lt;p&gt;
&lt;a href="http://www.etsy.com/view_listing.php?listing_id=11867558"&gt;&lt;img src="http://farm3.static.flickr.com/2283/2501934047_97f96b29b8_m.jpg" border="0"&gt;&lt;/a&gt;
&lt;p&gt;
The CAPTCHA is done purely using DIVs and CSS2. The font is &lt;a href="http://www.all-day-breakfast.com/cannam/"&gt;Chris Cannam's&lt;/a&gt; superb &lt;a href="http://www.all-day-breakfast.com/cannam/codec.html"&gt;Codec monospace bitmap font&lt;/a&gt;, which I've used as an Emacs font for years. The code which creates the CAPTCHA &lt;a href="http://paste.lisp.org/system-server/show/webutils/simple-captcha"&gt;can be viewed on paste.lisp.org&lt;/a&gt;.
&lt;p&gt;
The painting is &lt;a href="http://www.etsy.com/view_listing.php?listing_id=11867558"&gt;for sale&lt;/a&gt;, if you've got the perfect place to hang a 5x7 acrylic painting of "lisp".</description
   ></item
  ><item
  ><title
   >Public Service Announcement to Debian and Ubuntu Users</title
   ><link
   >http://brian.mastenbrook.net/display/23</link
   ><pubDate
   >Tue, 13 May 2008 16:09:20 GMT</pubDate
   ><description
   >&lt;blockquote&gt;
&lt;tt&gt;
A weakness has been discovered in the random number generator used by OpenSSL on Debian and Ubuntu systems.  As a result of this weakness, certain encryption keys are much more common than they should be, such that an attacker could guess the key through a brute-force attack given minimal knowledge of the system.  This particularly affects the use of encryption keys in OpenSSH, OpenVPN and SSL certificates.
&lt;/tt&gt;
&lt;/blockquote&gt;
&lt;p&gt;
The fix involves updating your OpenSSL packages and regenerating any private keys made on recent versions of Debian (etch and newer) or Ubuntu (Feisty or later). For more information, see:
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.debian.org/security/2008/dsa-1571"&gt;Debian DSA-1571-1&lt;/a&gt;
&lt;li&gt;&lt;a href="http://www.ubuntu.com/usn/usn-612-1"&gt;Ubuntu USN-612-1&lt;/a&gt;
&lt;/ul&gt;
This issue was caused by a Debian-specific patch to OpenSSL and does not affect distributions which aren't derived from Debian.</description
   ></item
  ><item
  ><title
   >MCL 5.2 has been released as open source</title
   ><link
   >http://brian.mastenbrook.net/display/22</link
   ><pubDate
   >Fri, 21 Mar 2008 19:53:12 GMT</pubDate
   ><description
   >Digitool has released MCL 5.2 as open source. From the announcement:
&lt;p&gt;
&lt;blockquote&gt;MCL 5.2 is now available at:
&lt;p&gt;
&lt;a href="ftp://ftp.clozure.com/pub/MCL/MCL-5.2-Final.dmg"&gt;ftp://ftp.clozure.com/pub/MCL/MCL-5.2-Final.dmg&lt;/a&gt;
&lt;p&gt;
It is open source.
I am sorry that it does not run on Intel. I hope that some users will  
be able
to find the resources for a port of MCL to Intel processors.
&lt;p&gt;
Please let me know of any questions or problems.
&lt;/blockquote&gt;
&lt;p&gt;
MCL is the distribution from which Clozure CL (nee OpenMCL) was derived. Clozure CL's compiler has been much enhanced over MCL's, which is currently PPC-only and not Rosetta compatible. MCL features a Carbon GUI with an Emacs clone named Fred, an interactive inspector and debugger, and a number of other useful tools.
&lt;p&gt;
I'd encourage anyone who is interested in making MCL Rosetta-capable or porting to Intel to sign up for the &lt;a href="http://clozure.com/mailman/listinfo/info-mcl"&gt;info-mcl mailing list&lt;/a&gt;. MCL is an important part of the Common Lisp legacy and it's good to see that it will not be lost to history like some other important implementations (Genera).</description
   ></item
  ><item
  ><title
   >New Publication</title
   ><link
   >http://brian.mastenbrook.net/display/21</link
   ><pubDate
   >Fri, 06 Jul 2007 01:17:06 GMT</pubDate
   ><description
   >Frank Weil, Brian Mastenbrook, David Nelson, Paul Dietz, and Aswin van den Berg. Automated Semantic Analysis of Design Models. To appear in &lt;i&gt;ACM/IEEE &lt;a href="http://models2007.isis.vanderbilt.edu/"&gt;10th International Conference on Model Driven Engineering Languages and Systems&lt;/a&gt; (MoDELS)&lt;/i&gt;, October 2007. &lt;a href="http://brian.mastenbrook.net/static/documents/weilmodels2007.pdf"&gt;PDF&lt;/a&gt;, 138 kB.
&lt;p/&gt;
Many of the techniques given in this paper are well known in the compiler community. The application to verification of models of industrial scale telecommunication applications has been able to spot significant but difficult-to-test problems.
&lt;p/&gt;
There will also be an experience paper given at the &lt;a href="http://www.pragmadev.com/sdl07/"&gt;13th System Design Language Forum&lt;/a&gt; in September. When I have a copy of this paper, I will post it.</description
   ></item
  ><item
  ><title
   >Packrat parsers in Lisp</title
   ><link
   >http://brian.mastenbrook.net/display/20</link
   ><pubDate
   >Tue, 12 Jun 2007 12:18:39 GMT</pubDate
   ><description
   >&lt;a href="http://www.cliki.net/cl-peg"&gt;CL-PEG&lt;/a&gt; is a &lt;a href="http://en.wikipedia.org/wiki/Parsing_expression_grammar"&gt;packrat parser&lt;/a&gt; generator in Common Lisp. (Found on &lt;a href="http://www.cliki.net/"&gt;CLiki&lt;/a&gt;.)</description
   ></item
  ><item
  ><title
   >New look for Planet Smalltalk</title
   ><link
   >http://brian.mastenbrook.net/display/19</link
   ><pubDate
   >Fri, 09 Mar 2007 13:09:06 GMT</pubDate
   ><description
   >&lt;a href="http://planet.smalltalk.org/"&gt;Planet Smalltalk&lt;/a&gt; has a new look. While I miss the ability to filter out blogs in languages I don't know, the page is much more readable in its new design.</description
   ></item
  ><item
  ><title
   >You don't bury survivors</title
   ><link
   >http://brian.mastenbrook.net/display/18</link
   ><pubDate
   >Fri, 02 Mar 2007 20:14:25 GMT</pubDate
   ><description
   >&lt;a href="http://www.codeslate.com/2007/01/you-dont-bury-survivors.html"&gt;Pure genius.&lt;/a&gt;</description
   ></item
  ><item
  ><title
   >I am not a number; I'm a free man!</title
   ><link
   >http://brian.mastenbrook.net/display/17</link
   ><pubDate
   >Fri, 22 Dec 2006 03:40:12 GMT</pubDate
   ><description
   >&lt;a href="http://www.westfield-sportscars.co.uk/"&gt;Westfield Sportscars&lt;/a&gt; has teamed up with the University of Warwick to produce a hybrid sports car based on the &lt;a href="http://en.wikipedia.org/wiki/Lotus_Seven"&gt;Lotus Seven&lt;/a&gt;. The Seven is the iconic car that The Prisoner drives in the  opening credits of the eponymous show. Needless to say, I'm in geek heaven. The Seven has been on my "buy someday" list for a while now (along with a garage to put it in). When that happens I might even be able to buy a hybrid version.
&lt;p/&gt;
The &lt;a href="http://www.teslamotors.com/"&gt;Tesla Roadster&lt;/a&gt; is based on a much more recent &lt;a href="http://www.lotuscars.com/"&gt;Lotus&lt;/a&gt; design, the Elise.</description
   ></item
  ><item
  ><title
   >Lisp image uptimes</title
   ><link
   >http://brian.mastenbrook.net/display/16</link
   ><pubDate
   >Sun, 10 Dec 2006 03:13:21 GMT</pubDate
   ><description
   >Prior to &lt;a href="http://www.sbcl.org/news.html"&gt;SBCL 1.0&lt;/a&gt;, &lt;tt&gt;GET-INTERNAL-RUN-TIME&lt;/tt&gt; returned the time since the first call to &lt;tt&gt;GET-INTERNAL-RUN-TIME&lt;/tt&gt; in that image, not the time since image start. Thus, when I tried &lt;a href="http://xach.livejournal.com/94777.html"&gt;Xach's uptime reporting code&lt;/a&gt;, my longest-running image reported an uptime of 0 seconds.
&lt;p&gt;
Fortunately Linux keeps this around in the proc data structures, and &lt;tt&gt;ps&lt;/tt&gt; can pull it out in human readable form:
&lt;p&gt;
&lt;pre&gt;$ ps -eo pid,lstart,cmd | grep sbcl
17848 Tue Jun 27 06:25:03 2006 sbcl&lt;/pre&gt;
&lt;p&gt;
As of this writing, my longest-running image is 165 days, 15 hours, 41 minutes, and 58 seconds old, which bests Xach's by 19 days. This image is also a commercial application: it provides a web application to &lt;a href="http://www.formallymodern.com/"&gt;Formally Modern Tuxedo&lt;/a&gt;, a family formalwear store in Chicago.
&lt;p&gt;
The image which provides this blog is much younger (90 days, 7 hours, 10 minutes, and 4 seconds). I'll likely upgrade this image to &lt;a href="http://www.sbcl.org/"&gt;SBCL 1.0&lt;/a&gt; soon.</description
   ></item
  ><item
  ><title
   >Emacs notes</title
   ><link
   >http://brian.mastenbrook.net/display/15</link
   ><pubDate
   >Sun, 29 Oct 2006 19:35:09 GMT</pubDate
   ><description
   >If you haven't been following the goings-on of the Emacs Unicode branch, you may be unaware that there is a &lt;a href="http://www.emacswiki.org/cgi-bin/wiki/XftGnuEmacs"&gt;working Xft GNU Emacs&lt;/a&gt; available.
&lt;p/&gt;
That Emacs looks like this when compiled with the GTK backend:
&lt;p/&gt;
&lt;center&gt;
&lt;a href="http://brian.mastenbrook.net/static/files/screenshots/emacs-xft.png" target="_blank"&gt;&lt;img border="0" src="http://brian.mastenbrook.net/static/files/screenshots/emacs-xft_s.png"/&gt;&lt;/a&gt;&lt;br/&gt;
&lt;i&gt;Click for larger image.&lt;/i&gt;
&lt;/center&gt;
&lt;p/&gt;
I've received many requests in the past for my Emacs colors. Thanks to some prompting by email from a fellow named Krishna, I've taken the time to learn how to use &lt;a href="http://www.emacswiki.org/cgi-bin/wiki/ColorTheme"&gt;color-theme&lt;/a&gt; and produced &lt;a href="http://brian.mastenbrook.net/static/files/dotfiles/color-theme-pastelmac.el"&gt;this theme&lt;/a&gt;. The font I use is &lt;a href="http://www.gnome.org/fonts/"&gt;Bitstream Vera Sans Mono&lt;/a&gt;, which is easy to read and has a distinguishable zero ('&lt;tt&gt;0&lt;/tt&gt;').</description
   ></item
  ><item
  ><title
   >A good way to waste a lot of time</title
   ><link
   >http://brian.mastenbrook.net/display/14</link
   ><pubDate
   >Tue, 10 Oct 2006 12:07:16 GMT</pubDate
   ><description
   >Attempting to run your own mail server is a good way to waste a lot of time. I switched from &lt;a href="http://wiki.dovecot.org/MailboxFormat/mbox"&gt;mbox&lt;/a&gt; to &lt;a href="http://wiki.dovecot.org/MailboxFormat/Maildir"&gt;Maildir&lt;/a&gt; a few months ago, and I never quite got my IMAP server (&lt;a href="http://www.dovecot.org/"&gt;Dovecot&lt;/a&gt;) working correctly.
&lt;p&gt;
It turns out it was a &lt;a href="http://www.dovecot.org/list/dovecot/2006-September/016312.html"&gt;bug in JFS&lt;/a&gt;. Now that I've got my Maildir hosted on an ext3 loop filesystem, everything is running fine.</description
   ></item
  ><item
  ><title
   >iTunes, iPod, and Gapless Playback</title
   ><link
   >http://brian.mastenbrook.net/display/13</link
   ><pubDate
   >Wed, 13 Sep 2006 12:20:59 GMT</pubDate
   ><description
   >Apple released a new version of &lt;a href="http://www.apple.com/itunes/"&gt;iTunes&lt;/a&gt; yesterday that includes a new Gapless Playback feature for both iTunes and the iPod. I've been ripping my albums as one continuous track since I started using iTunes due to the lack of this feature. I can't imagine listening to &lt;a href="http://www.amazon.com/DE9-Closer-Edit-Richie-Hawtin/dp/B00005NVK3/sr=8-3/qid=1158149494/ref=pd_bbs_3/102-8820761-8168117?ie=UTF8&amp;s=music"&gt;this album&lt;/a&gt; with gaps in between tracks.
&lt;p&gt;
Gapless playback seems to work for any album which would play back without gaps if you burned it to a CD from iTunes. This includes content ripped from CDs and purchased (iTunes Music Store) content from a few particular labels, including &lt;a href="http://www.globalunderground.co.uk/"&gt;Global Underground&lt;/a&gt;. However, iTMS albums from &lt;a href="http://www.distinctiverecords.com/"&gt;Distinctive Records&lt;/a&gt; still do not play back correctly; now it sounds as if they skip a beat in between tracks. I'd recommend &lt;i&gt;not&lt;/i&gt; purchasing content  from Distinctive via iTunes until they fix this issue.</description
   ></item
  ><item
  ><title
   >Spam-B-Gone</title
   ><link
   >http://brian.mastenbrook.net/display/12</link
   ><pubDate
   >Mon, 03 Jul 2006 14:33:05 GMT</pubDate
   ><description
   >I first heard of &lt;a href="http://www.greylisting.org/"&gt;greylisting&lt;/a&gt; when I asked why mail delivery on &lt;a href="http://www.common-lisp.net/"&gt;common-lisp.net&lt;/a&gt; was taking so long. A few months and hundreds of &lt;a href="http://spamusement.com/"&gt;spam emails&lt;/a&gt; later, I decided to try it on my own server, but with a more reasonable delay of 60 seconds. I've received no spam since I installed &lt;a href="http://isg.ee.ethz.ch/tools/postgrey/"&gt;postgrey&lt;/a&gt;.
&lt;p&gt;
Of course, at some point the spammers will catch on, but if this brings the spam down to a reasonable level, I'm all for it. Hooray!</description
   ></item
  ><item
  ><title
   >Allegro CL 8.0 Express Edition Available</title
   ><link
   >http://brian.mastenbrook.net/display/11</link
   ><pubDate
   >Wed, 14 Jun 2006 18:01:23 GMT</pubDate
   ><description
   >The long-awaited free trial of Allegro CL 8.0 is &lt;a href="http://www.franz.com/downloads/"&gt;now available&lt;/a&gt;. Those looking for a free way to try their code on Allegro now have the ability to use the latest version of Franz's flagship product. In addition the trial supports Franz's new database, &lt;a href="http://www.franz.com/products/allegrocache/index.lhtml"&gt;AllegroCache&lt;/a&gt;.</description
   ></item
  ><item
  ><title
   >Can someone else work on your code?</title
   ><link
   >http://brian.mastenbrook.net/display/10</link
   ><pubDate
   >Fri, 03 Feb 2006 00:03:18 GMT</pubDate
   ><description
   >Stefan Scholl &lt;a href="http://www.no-spoon.de/articles/2006/02/02/dont-say-no"&gt;asks whether you can get someone else to work on your Common Lisp program&lt;/a&gt;. I think that if you ask most people whether someone else could maintain their code, they would answer no, regardless of the language. It's not because they are so proud of their own abilities that they doubt anybody else's ability to maintain their work. Rather many programmers I've talked to think their code is so bad that nobody else can understand it.
&lt;p&gt;
I work with a large Common Lisp codebase at work, and I'm often surprised at how easy it is to maintain and make changes to even the "bad" parts of the code. I think this is a combination of having good tools and having test cases for the code. Regression testing makes it easier to understand what impact a change has on multiple test cases. The ability to run just one of those test cases, break inside the function you're interested in, and then inspect the local variables helps an awful lot too.
&lt;p&gt;
I think this also prevents a lot of people from asking for help with their codebase by opening it up. They feel the code is not ready for public distribution because it's not good enough. No code is, once it's subjected to real users and their requirements. The adaptability of the codebase is what matters.</description
   ></item
  ><item
  ><title
   >Dear Diary</title
   ><link
   >http://brian.mastenbrook.net/display/9</link
   ><pubDate
   >Fri, 27 Jan 2006 01:21:51 GMT</pubDate
   ><description
   >The subject of how to teach programming always elicits from me a feeling of vague unease. I find it hard to engage an elaborate discussion of whether &lt;a href="http://www.htdp.org/"&gt;HtDP&lt;/a&gt; or &lt;a href="http://mitpress.mit.edu/sicp/"&gt;SICP&lt;/a&gt; is better for a new programmer. My gut reaction is that neither is right, really. It's not that I don't think Scheme is a good language to teach. It's the idea of learning how to program in the modern environment which makes me uneasy. It's too tempting.
&lt;p&gt;
Like a lot of people my age, I learned to program in BASIC. It was a mostly self-directed activity. There were people who showed me the basics of the language, but after a certain point I learned a lot from a reference manual and other people's programs. (Back in those days it was possible to go to the local library and check out books filled with BASIC source for various programs, mostly games.) I learned because it was fun. Part of the reason it was fun was the sense of accomplishment in making the machine do something useful. The other part was that it felt like I could accomplish most of the things that I had seen the machine do. The Apple II was not an especially complicated machine. Simple graphics, sound, and disk I/O are all firmly within the grasp of the beginning programmer.
&lt;p&gt;
I think the urge to do what you've seen the machine already do is found in most beginning programmers. Very few programmers learn how to program without already knowing what their computer can do. So it's only natural to expect to be able to create GUIs, use the network, and create flashy 3D games when you first learn how to program today, despite the fact that most working programmers don't use most of that, most of the time. (No, I'm not going to quantify that.)
&lt;p&gt;
If you're going to teach programming on modern computers, there are two options: you can give in, and integrate this into the curriculum, or you can hold out, and attempt to teach good thinking discipline before teaching shader models and light maps. Neither method is all that great.
&lt;p&gt;
If I had to teach programming today, I'd be sorely tempted to start with one of TI's or HP's high-end calculators. These machines resemble the machines that I learned programming on quite a bit more than modern computers do, and they share the same essential characteristics. It's easy to create useful programs, and the full range of the machine's capabilities are easy to harness. They also teach the fundamentals of programming in a modern environment because they are based on dynamically typed languages with garbage collection.
&lt;p&gt;
Of course, neither machine is based on Scheme or Lisp. I have no problem with teaching these languages, because it's not the &lt;i&gt;language&lt;/i&gt; which I am concerned about. It's the context in which that language is learned. Even &lt;a href="http://www.squeak.org/"&gt;Squeak&lt;/a&gt; which to some degree establishes its own context, at least visually, tries far too hard to show off its abilities to produce GUIs, web programs, and 3D graphics.
&lt;p&gt;
I think many of the issues involved in teaching programming are conflated with the issues of teaching introductory computer science. I learned to program long before I learned anything of computer science. Of course what I learned in my undergraduate studies helped to mature my abilities, but it was not essential to the task of learning how to make the machine do something useful and debug it when it doesn't do what I want. Learning to program was about exploring systems of knowledge. I still remember when the thought of installing Linux brought a sense of glee, just because it was large and complicated and was not something which I already knew. There is very little in the academic context which could have evoked that same feeling.
&lt;p&gt;
Learning how to program is tied to an individual's mode of learning and problem solving far more than the academic context allows for. I think that one day universities will realize that solid programming skills in at least one language should be a prerequisite for a Computer Science curriculum, just as music majors are expected to already play one instrument. In fact there's much that we could learn from the field of music education - perhaps the best way to teach programming is one-on-one with someone who can adapt his teaching style to the individual's learning style. I wonder if practicing programmers will start to give programming lessons on the side to pass along their love of the discipline. It might do a lot of good for education in general.
&lt;p&gt;
&lt;b&gt;Briefly&lt;/b&gt;: when I wrote about &lt;a href="http://brian.mastenbrook.net/display/7"&gt;XML mixed mode&lt;/a&gt; I was under the delusion that I had somehow worked around &lt;a href="http://www.lispworks.com/documentation/HyperSpec/Body/v_call_a.htm"&gt;CALL-ARGUMENTS-LIMIT&lt;/a&gt; by making the XML tag in &lt;tt&gt;(&amp;lt;tag&amp;gt; body1 body2 body3)&lt;/tt&gt; a macro which was bound by a lexically-surrounding &lt;tt&gt;WITH-XML&lt;/tt&gt; form. I hadn't; those element body arguments still ended up as arguments to &lt;tt&gt;LIST&lt;/tt&gt;. The &lt;tt&gt;WITH-XML&lt;/tt&gt; macro is really unnecessary, and now &lt;tt&gt;&amp;lt;tag/&amp;gt;&lt;/tt&gt; reads as a form which returns an object, while &lt;tt&gt;&amp;lt;tag&amp;gt;&lt;/tt&gt; reads as a &lt;tt&gt;LAMBDA&lt;/tt&gt; form which can be used at the head of a list or evaluated to return a function. That function, when called, returns an object which represents the tag wrapped around the arguments as a body list.
&lt;p&gt;
I also have an implementation of XML to XML transformations based on pattern matching, using XML mixed mode for the lexical syntax of patterns. This is intended to replace the hacky templating system I wrote for cl-blog, which was so poorly designed that it was incredibly difficult to express conditional or iterated expansion. The new system is much nicer, and allows templates to be created by people who do not know the template system.
&lt;p&gt;
I recently started working on a generic system for intentional types in Common Lisp. Since I am working on a library for web programming, this should have been a no-brainer, as the task which I have spent the most time solving is perfect for such a system. I already have a good abstraction set up for producing and processing forms, but the processing of values from strings and conversion of strings to values was always a little bit hacky.
&lt;p&gt;
Of course, CLIM also offers an intentional type system for presenting and accepting values, but the mechanics are tied into CLIM. I think it would be useful to have a generic system for defining and representing intentional types, as well as defining operations using those intentional types. I may even provide &lt;a href="http://www.nhplace.com/kent/PS/EQUAL.html"&gt;an equality operator&lt;/a&gt;.</description
   ></item
  ><item
  ><title
   >paste.lisp.org et al</title
   ><link
   >http://brian.mastenbrook.net/display/8</link
   ><pubDate
   >Mon, 16 Jan 2006 15:33:09 GMT</pubDate
   ><description
   >Until the common-lisp.net migration is complete and all DNS records have been updated, paste.lisp.org and related services will be down. I will update this post when they are available again.
&lt;p&gt;
&lt;b&gt;Edit: &lt;/b&gt;&lt;a href="http://paste.lisp.org/"&gt;paste.lisp.org&lt;/a&gt; is available again.
&lt;p&gt;
Thanks,
&lt;br&gt;
Brian</description
   ></item
  ><item
  ><title
   >XML Mixed Mode: A New Lexical Syntax for XML Generation in Lisp</title
   ><link
   >http://brian.mastenbrook.net/display/7</link
   ><pubDate
   >Sat, 24 Dec 2005 20:58:36 GMT</pubDate
   ><description
   >Current representations of XML in Lisp use lists of symbols and strings as the basic representation of tags and tag contents. While these representations are adequate for processing XML, they are not the most convenient representation for producing XML documents from code. The list-based representation relies on Lisp's basic list template functionality, quasiquotation, to express templated XML output. In this representation, the only template inclusion operators are a direct inclusion of one list element and a splicing of multiple list operations. As a result, basic idioms such as a conditional inclusion of a tag must be represented as a conditional splice of a list containing one tag.
&lt;p&gt;
Futhermore, quasiquotation is often used in macros, which implies that macros which generate code which generates XML involve either two levels of quasiquotation or abandoning quasiquotation for list templating in one or the other of the macro or the XML-generation code. Either approach leads to contorted code: two levels of quasiquotation leads to difficult-to-read syntax such as &lt;tt&gt;,',@&lt;/tt&gt; and abandoning quasiquotation leads to an explosion of list construction forms.
&lt;p&gt;
Abandoning the use of templates seems preferable. To do this, an unambiguous means of differentating code and XML productions is required. In Common Lisp, only symbols or lists starting with LAMBDA are allowed as the first element of a list which is to be evaluated as a form. Thus, symbols must be used to represent tags. Since the output should be arbitrary XML, and not one particular XML schema, any tag name should be allowed. In order to keep the mechanism unambiguous, these tag names should never collide with existing user code, and thus should be part of a separate package.
&lt;p&gt;
XML Mixed Mode solves this problem by introducing a reader macro which translates a superset of XML tags into newly created symbols, which can then be found by a macro and bound to macros or symbol macros that expand to XML-producing code. Thus XML tags are used directly in the Lisp code, which leads to a greater correspondence between the code and the data it produces.
&lt;p&gt;
Here is an example of XML Mixed Mode in Common Lisp:
&lt;p&gt;
&lt;tt&gt;&lt;span class="paren1"&gt;(&lt;span class="default"&gt;&lt;i&gt;&lt;span class="symbol"&gt;defun&lt;/span&gt;&lt;/i&gt; main-menu &lt;span class="paren2"&gt;(&lt;span class="default"&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;span class="paren2"&gt;(&lt;span class="default"&gt;&lt;i&gt;&lt;span class="symbol"&gt;with-xml&lt;/span&gt;&lt;/i&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren3"&gt;(&lt;span class="default"&gt;&lt;i&gt;&lt;span class="symbol"&gt;flet&lt;/span&gt;&lt;/i&gt; &lt;span class="paren4"&gt;(&lt;span class="default"&gt;&lt;span class="paren5"&gt;(&lt;span class="default"&gt;link &lt;span class="paren6"&gt;(&lt;span class="default"&gt;handler text&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren6"&gt;(&lt;span class="default"&gt;&lt;i&gt;&lt;span class="symbol"&gt;let&lt;/span&gt;&lt;/i&gt; &lt;span class="paren1"&gt;(&lt;span class="default"&gt;&lt;span class="paren2"&gt;(&lt;span class="default"&gt;url &lt;span class="paren3"&gt;(&lt;span class="default"&gt;urlstring &lt;span class="paren4"&gt;(&lt;span class="default"&gt;handler-url handler&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren1"&gt;(&lt;span class="default"&gt;&amp;lt;li&amp;gt; &lt;span class="paren2"&gt;(&lt;span class="default"&gt;&amp;lt;a href=?url&amp;gt; text&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren4"&gt;(&lt;span class="default"&gt;&amp;lt;ul&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren5"&gt;(&lt;span class="default"&gt;link 'main-handler &lt;span class="string"&gt;"Main"&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren5"&gt;(&lt;span class="default"&gt;&lt;i&gt;&lt;span class="symbol"&gt;if&lt;/span&gt;&lt;/i&gt; &lt;span class="special"&gt;*is-authorized*&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren6"&gt;(&lt;span class="default"&gt;link 'logout-handler &lt;span class="string"&gt;"Logout"&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren6"&gt;(&lt;span class="default"&gt;link 'login-handler &lt;span class="string"&gt;"Login"&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren5"&gt;(&lt;span class="default"&gt;link 'new-project-handler &lt;span class="string"&gt;"New Project"&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="paren5"&gt;(&lt;span class="default"&gt;link 'new-task-handler &lt;span class="string"&gt;"New Task"&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/tt&gt;
&lt;p&gt;
The XML mixed mode syntax includes extensions for using the value of a Lisp symbol as a tag name, attribute name, attribute value, and as a list of attribute name / value pairs. When an XML start tag is the first position of a form to be evaluated, and that form has been surrounded lexically by a use of WITH-XML, it creates an XML form whose contents are the result of concatenating the other elements of the evaluated form. The normal XML syntax for a tag with an empty body is also supplied.
&lt;p&gt;
I have converted my &lt;a href="http://trail.unmutual.info/"&gt;Trail&lt;/a&gt; task-tracking application to use XML mixed mode for output. This version is not running on the live Trail instance on my server because cl-blog has not yet been converted, and the library that both applications depends on has also been converted to require XML mixed mode. However, you can see &lt;a href="http://www.unmutual.info/xml-mixed-mode/trail.html"&gt;the source of the converted version&lt;/a&gt; as an example of both XML mixed mode and some new improvements to my as yet unreleased CL web programming library (which will change names from "webutils" before it's released).</description
   ></item
  ><item
  ><title
   >Can I make a request?</title
   ><link
   >http://brian.mastenbrook.net/display/6</link
   ><pubDate
   >Wed, 21 Dec 2005 13:16:18 GMT</pubDate
   ><description
   >&lt;b&gt;To:&lt;/b&gt; The Lisp Community&lt;br&gt;
&lt;b&gt;Cc:&lt;/b&gt; Santa Claus&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; The R-word Site in Lisp&lt;p&gt;
I'd like to make a request. While I appreciate the urge to show off your particular toolbox of web programming in Lisp abstractions by implementing a site which allows users to submit links and vote them up and down, can you please &lt;i&gt;refrain&lt;/i&gt; from saying that you've implemented the R-word site in Lisp in an absurdly small number of lines of code until all of the following hold?
&lt;p&gt;
&lt;ul&gt;&lt;li&gt;Links &lt;i&gt;must&lt;/i&gt; survive a server reboot. If you haven't gotten this implemented, you haven't really implemented anything but a toy.
&lt;li&gt;Does it, *ahem*, escape HTML properly?
&lt;li&gt;Is it foolproof? Is it smarter-than-foolproof? When I see an &lt;a href="http://homepage.mac.com/svc/LispMovies/reddit.lisp.html"&gt;R-word clone&lt;/a&gt; which starts off with &lt;tt&gt;:unsecure t&lt;/tt&gt;, I begin to suspect that the answer is "no".
&lt;/ul&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&lt;b&gt;-- The Management&lt;/b&gt;
&lt;p&gt;
&lt;b&gt;Edit:&lt;/b&gt; Sven responds by email: "The option &lt;tt&gt;(:unsecure t)&lt;/tt&gt; means that no login is enforced. The default for KPAX &lt;tt&gt;(:unsecure nil)&lt;/tt&gt; would enforce login against any of a number of sources (but that would then require registration and account management, not hard but too much for a demo)." So this is right for a demo - but clearly some form of access control (whether by login or captcha) is required for a real site to prevent flooding by bots.&lt;p&gt;
He also adds: "The Reddit story had a serious impact on the Lisp community; showing that it is possible and even easy to write web applications in Lisp seems like a logical reaction. In my opinion we should indeed not try to better them or prove them wrong. The right reaction is to try to fix some of the problem they mentioned."&lt;p&gt;
My concern is that by underselling the amount of work necessary to produce a complete web application, and showing off a lot of little prototypes, the Lisp community may come off as un-serious. "See! I can do this in 4 hours! 2 hours! 20 minutes!", when the end result is clearly only a prototype (and this is true of all of the Reddit clones I've seen - and all clearly indicated as such) does nothing to disprove the typical reader's takeaway from the Reddit conversion: that Lisp is good for prototypes and unsuitable when the rubber hits the road.</description
   ></item
  ><item
  ><title
   >Climbing the abstraction tree</title
   ><link
   >http://brian.mastenbrook.net/display/5</link
   ><pubDate
   >Wed, 21 Dec 2005 02:42:18 GMT</pubDate
   ><description
   >Somewhere noodling around in my brain is a theory of how programmers must practice at a thing (language, domain of programming , etc.) for a while before they can contribute things which are of value to other people. It's been over a two and a half years since my first forays into the world of web programming in Common Lisp, and only recently do I think I'm getting to that point. Nothing documented yet - I'm still climbing the abstraction tree on a number of different projects, but the change has been fairly rapid and what I have now allows me to bang out small programs with ease.
&lt;p&gt;
One example of this would be a little &lt;a href="http://trail.unmutual.info/"&gt;task tracking program&lt;/a&gt; which I recently moved to run on my public web server instead of locally. It hosts tasks for a few of the personal projects I'm working on, as well as some private projects, which you shouldn't be able to see without logging in. It also (like any good Web 3.0 application) &lt;a href="http://trail.unmutual.info/view-source"&gt;serves its own source&lt;/a&gt;. It's obvious that I haven't gotten rid of &lt;i&gt;all&lt;/i&gt; the superfluous bits yet, but it's getting really close. I expect solutions to the remaining bits expressed in ways which don't offend my sensibilities can't be far off.
&lt;p&gt;
We've gone from the dreaded R-word topic on &lt;a href="http://planet.lisp.org/"&gt;Planet Lisp&lt;/a&gt; to impending political hysteria. In an attempt to flush as much of it as possible, I'll reproduce the following &lt;a href="http://www.lileks.com/bleats/archive/05/1205/122005.html"&gt;ditty from James Lileks&lt;/a&gt;. It cracked me up, not least because I'm still recovering from my own data loss.
&lt;p&gt;
&lt;blockquote&gt;
Ladies and Gentlemen: Miss Shirley Bassey.
&lt;p&gt;
Dumm-dum (wa wah wah wah wah!) DUMM-DUM (wa wah wah wah wah)
&lt;p&gt;
Dissssk failure!&lt;br&gt;
It's the thing, the thing that you oft denied&lt;br&gt;
And now you cry&lt;br&gt;
(da da-da, da da)
&lt;p&gt;
Such a bliss nailer&lt;br&gt;
(wa wah wah wah wah!)&lt;br&gt;
B-tree's hosed, directory's naught but hash&lt;br&gt;
Magnetic rash
&lt;p&gt;
How you shrugged at the long access time&lt;br&gt;
How you thought "disk's just full, all is fine"&lt;br&gt;
Now you know you've many bad sectors - &lt;br&gt;
Killed your data like Mister Lecter, that's the 
&lt;p&gt;
DISK FAILURE&lt;br&gt;
(wa wah wah wah wah!)&lt;br&gt;
Sys admin, you'd better begin to pray&lt;br&gt;
Last backup: May!
&lt;/blockquote&gt;
&lt;p&gt;
If hard drive crashes were a common occupational hazard circa 1943, this is what they'd sound like.</description
   ></item
  ></channel
 ></rss
>