<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5568788882760066320</id><updated>2011-09-19T23:40:10.717+02:00</updated><title type='text'>lichtblau's blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-7138816666159662228</id><published>2011-06-19T19:47:00.001+02:00</published><updated>2011-06-19T19:48:17.868+02:00</updated><title type='text'>Parsing and serializing with SAX</title><content type='html'>&lt;p&gt;
  Several years ago, I started working on the XML parser that Gilbert
  Baumann had written as part of his web browser called
  "&lt;a href="http://common-lisp.net/project/closure/"&gt;Closure&lt;/a&gt;".
  Since then, "Closure XML"
  (or &lt;a href="http://common-lisp.net/project/cxml/"&gt;cxml&lt;/a&gt; for short)
  has developed into a set of little libraries, one main goal being
  completeness and correctness with regard to the various standards they
  are following.
&lt;/p&gt;
&lt;p&gt;
  And standards abound in XML land, which is nice for implementors
  (thanks to the good test suites!) and nice for users (because the
  specs partially serve as documentation, and make it easy to transition
  between different languages implementing them).  But I've always tried
  to release cxml with enough documentation to get users started for all
  the parts that are implementation-specific.  And not all areas are
  covered by standards: Of course, the document format itself is
  specified strictly; the same goes for XPath, XSLT, schemas, etc.
&lt;/p&gt;

&lt;p&gt;
  But little is standardized in terms of API support, and that sort of
  choice is generally good: After all, a Lisp XML parser should fit into
  the Lisp world and not mimick (say) JavaScript too much.  But many
  good ideas can be borrowed from other languages.  Examples inspired by
  Java are
  &lt;a href="http://www.lichteblau.com/cxml-stp/"&gt;STP&lt;/a&gt;, motivated
  heavily by &lt;a href="http://www.xom.nu/"&gt;XOM&lt;/a&gt; (and tweaked for added
  lispiness) -- and SAX:
&lt;/p&gt;

&lt;p&gt;
  &lt;a href="http://en.wikipedia.org/wiki/Simple_API_for_XML"&gt;SAX&lt;/a&gt; is a
  classic Java API.  It defines a protocol of methods that get called by
  an XML parser, and each method call signifies an &lt;i&gt;event&lt;/i&gt;
  (e.g. that the parser saw a XML tag).  In cxml, SAX is one of two
  fundamental APIs offered (the other being a StAX-like pull-based
  interface), and it's essential to its inner workings.  Yet I had never
  bothered to document it fully.  For one thing, everyone seemed to know
  SAX from Java anyway.  It's also hidden from view for most users.  And
  ultimately, it's just a list of generic functions, right?
&lt;/p&gt;


&lt;p&gt;
  Technically it is just that, and yet it's central to communication
  between cxml's libraries, and it makes parsing and serialization in
  cxml &lt;i&gt;modular&lt;/i&gt; and &lt;i&gt;reusable&lt;/i&gt;.
  Hence &lt;a href="http://xach.livejournal.com/"&gt;some user&lt;/a&gt;s had long
  suggested to me that I should explain SAX in full.
&lt;/p&gt;

&lt;p&gt;
  So here it is:
  &lt;a style="font-weight: bold" href="http://common-lisp.net/project/cxml/saxoverview/"&gt;The SAX
  overview&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
  TL;DR:  Skip to the link above.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-7138816666159662228?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/7138816666159662228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=7138816666159662228' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/7138816666159662228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/7138816666159662228'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2011/06/parsing-and-serializing-with-sax.html' title='Parsing and serializing with SAX'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-4449518705113607529</id><published>2011-06-18T21:28:00.002+02:00</published><updated>2011-06-18T21:42:13.418+02:00</updated><title type='text'>SBCL on github and gitorious</title><content type='html'>&lt;p&gt;SBCL &lt;a href="http://random-state.net/log/3516349972.html"&gt;moved to git&lt;/a&gt; last week, and with the main repository hosted on &lt;a href="http://sbcl.git.sf.net"&gt;sf.net&lt;/a&gt;, several users have asked for an SBCL mirror on github.

&lt;p&gt;Automatically synced mirrors are available on github and gitorious (where SBCL branches had, of course, also been uploaded by contributors long before the official switch to git), and it will now be easier than ever to make your own repository and branches.

&lt;p&gt;The mirrors update several times a day:

&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://github.com/sbcl/sbcl"&gt;github.com/sbcl&lt;/a&gt;
&lt;li&gt;&lt;a href="http://gitorious.org/sbcl/sbcl"&gt;gitorious.org/sbcl&lt;/a&gt;
&lt;/ul&gt;

&lt;p&gt;Please test, and good luck with your SBCL hacking efforts!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-4449518705113607529?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/4449518705113607529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=4449518705113607529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/4449518705113607529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/4449518705113607529'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2011/06/sbcl-on-github-and-gitorious.html' title='SBCL on github and gitorious'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-7561677461317614525</id><published>2010-04-07T09:00:00.002+02:00</published><updated>2010-04-07T14:20:51.740+02:00</updated><title type='text'>More looping</title><content type='html'>For context, see Nathan's blog.

[&lt;b&gt;Edit:&lt;/b&gt; I've just learned on IRC from Maciej Katafiasz that iterate also has a &lt;a href="http://common-lisp.net/project/iterate/doc/Named-Blocks.html#Named-Blocks"&gt;feature&lt;/a&gt; built in which renders this hack unnecessary.  Even more iterate awesomeness!  I'll leave this post up though, because I still think it' s pretty cute that SBCL optimizes this case so nicely.]

&lt;pre&gt;
MY-USER&gt; (defun outer-collect-in-inner-loop ()
           (declare (optimize speed (safety 0) (debug 0)))
           (iter (for outer from 0 below 10)
                 (declare (type (integer -1 10) outer))
                 (flet ((outer-collect (x) (collect x)))
                   (iter (for inner from 0 below 10)
                         (declare (type (integer -1 10) inner))
                         (outer-collect (+ (* 10 outer) inner))))))
OUTER-COLLECT-IN-INNER-LOOP
&lt;/pre&gt;
Note that the COLLECT in the outer loop is ITERATE's collecting feature.  The trick is to use it in a FLET before starting the inner loop, thereby making it available further down.
Declarations added only to get a nicer disassembly.
&lt;pre&gt;
MY-USER&gt; (OUTER-COLLECT-IN-INNER-LOOP)
(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99)
&lt;/pre&gt;
Okay, it works.  But how is it being compiled?
&lt;pre&gt;
MY-USER&gt; (disassemble 'OUTER-COLLECT-IN-INNER-LOOP)
; disassembly for OUTER-COLLECT-IN-INNER-LOOP
; 069222FF:       31C9             XOR ECX, ECX               ; no-arg-parsing entry point
;      301:       BE17001020       MOV ESI, 537919511
;      306:       BF17001020       MOV EDI, 537919511
;      30B:       BA17001020       MOV EDX, 537919511
;      310:       48C7C1F8FFFFFF   MOV RCX, -8
;      317:       E977000000       JMP L5
;      31C:       90               NOP
;      31D:       90               NOP
;      31E:       90               NOP
;      31F:       90               NOP
;      320: L0:   31DB             XOR EBX, EBX
;      322:       48C7C3F8FFFFFF   MOV RBX, -8
;      329:       EB5B             JMP L4
;      32B:       90               NOP
;      32C:       90               NOP
;      32D:       90               NOP
;      32E:       90               NOP
;      32F:       90               NOP
;      330: L1:   488BD1           MOV RDX, RCX
;      333:       486BD20A         IMUL RDX, RDX, 10
;      337:       4C8BCB           MOV R9, RBX
;      33A:       4E8D040A         LEA R8, [RDX+R9]
;      33E:       4989AC24B8000000 MOV [R12+184], RBP
;      346:       4D8B5C2468       MOV R11, [R12+104]
;      34B:       498D5310         LEA RDX, [R11+16]
;      34F:       4939542470       CMP [R12+112], RDX
;      354:       765C             JBE L7
;      356:       4989542468       MOV [R12+104], RDX
;      35B:       498D5307         LEA RDX, [R11+7]
;      35F: L2:   4931AC24B8000000 XOR [R12+184], RBP
;      367:       7402             JEQ L3
;      369:       CC09             BREAK 9                    ; pending interrupt trap
;      36B: L3:   4C8942F9         MOV [RDX-7], R8
;      36F:       48C7420117001020 MOV QWORD PTR [RDX+1], 537919511
;      377:       4881FE17001020   CMP RSI, 537919511
;      37E:       7529             JNE L6
;      380:       488BF2           MOV RSI, RDX
;      383:       488BFA           MOV RDI, RDX
;      386: L4:   4883C308         ADD RBX, 8
;      38A:       488BD3           MOV RDX, RBX
;      38D:       4883FA50         CMP RDX, 80
;      391:       7C9D             JL L1
;      393: L5:   4883C108         ADD RCX, 8
;      397:       488BD1           MOV RDX, RCX
;      39A:       4883FA50         CMP RDX, 80
;      39E:       7C80             JL L0
;      3A0:       488BD6           MOV RDX, RSI
;      3A3:       488BE5           MOV RSP, RBP
;      3A6:       F8               CLC
;      3A7:       5D               POP RBP
;      3A8:       C3               RET
;      3A9: L6:   48895701         MOV [RDI+1], RDX
;      3AD:       488BFA           MOV RDI, RDX
;      3B0:       EBD4             JMP L4
;      3B2: L7:   6A10             PUSH 16
;      3B4:       4C8D1C25601B4200 LEA R11, [#x421B60]        ; alloc_tramp
;      3BC:       41FFD3           CALL R11
;      3BF:       5A               POP RDX
;      3C0:       488D5207         LEA RDX, [RDX+7]
;      3C4:       EB99             JMP L2
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-7561677461317614525?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/7561677461317614525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=7561677461317614525' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/7561677461317614525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/7561677461317614525'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2010/04/for-context-see-nathans-blog.html' title='More looping'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-4087226049363238341</id><published>2009-08-12T13:23:00.007+02:00</published><updated>2009-08-12T18:32:28.107+02:00</updated><title type='text'>cl-perec blog series by pinterface</title><content type='html'>&lt;p&gt;For several years, the best (and only) option for portable access to relational databases from Common Lisp has been the CLSQL library, a free reimplementation of LispWorks' CommonSQL interface with support for many backend databases, a lispy SQL abstraction as well as simple object-relational mapping support.

&lt;p&gt;Recently, several alternatives have emerged: Postmodern provides particularly good support tailored to PostgreSQL only, other libraries abstract away from relational databases entirely, and finally, there are two new stars on the library horizon: CL-RDBMS and CL-PEREC.

&lt;p&gt;Having used CLSQL for several years, I am currently investigating a switch to CL-RDBMS and PEREC for a code base of non-trivial size, aiming to improve scalability, portability across databases, and last not least readability of the code base.

&lt;p&gt;And I am very happy with everything I have found so far:

&lt;p&gt;In the CL-RDBMS/PEREC ecosystem, work is split into two layers.

&lt;ul&gt;
&lt;li&gt;
CL-RDBMS forms the lower layer.  It abstracts over database access libraries (currently with support for PostgreSQL, Oracle, and SQLite) and defines an optional, Lispy, extensible syntax for SQL for data definition and query statements.

&lt;li&gt;The optional PEREC layer is the one which really shines.  It is an object-relational mapping (ORM) seamlessly integrating CLOS classes with database tables.
&lt;/ul&gt;

&lt;p&gt;Highlights:
&lt;ul&gt;
&lt;li&gt;Sensible caching model: Configurable caching of slots within a transaction, but not between transactions.
&lt;li&gt;Object identity preserved (within a transaction).
&lt;li&gt;Protection against accidental cross-transaction access.
&lt;li&gt;Lispy SELECT statements using code that looks like ordinary CLOS use, but which usually compiles down to efficient database-side SQL statements.
&lt;/ul&gt;

&lt;p&gt;Overall, an architecture that is ideal for robust, scalable setups with multiple threads and processes without risk of the "oversold concert tickets" situation reported for a popular Lisp web site based on older ORM software a few years ago...

&lt;p&gt;The only fly in the ointment for me was the lack of introductory material.  PEREC comes with an extensive test suite and nice examples, but I would have wished for a few more hints to get me started.

&lt;p&gt;Thanks to fellow blogger &lt;a href="http://pinterface.livejournal.com/"&gt;pinterface&lt;/a&gt;, my wish has been granted.  He has written a blog series about PEREC with many details about getting set up, and including various customization tips.

&lt;p&gt;Articles &lt;a href="http://pinterface.livejournal.com/tag/cl-perec"&gt;in the series&lt;/a&gt;:

&lt;ol&gt;
&lt;li&gt;&lt;a href="http://pinterface.livejournal.com/34706.html"&gt;Getting Started with cl-perec&lt;/a&gt;
&lt;li&gt;&lt;a href="http://pinterface.livejournal.com/35042.html"&gt;Persisting Simple Types with cl-perec&lt;/a&gt;
&lt;li&gt;&lt;a href="http://pinterface.livejournal.com/35586.html"&gt;Sensible Serializing with cl-perec&lt;/a&gt;
&lt;li&gt;&lt;a href="http://pinterface.livejournal.com/35935.html"&gt;Peering Down the Rabbit Hole with cl-perec&lt;/a&gt;
&lt;/ol&gt;

&lt;p&gt;PEREC is still evolving, but the tips presented are definitely helpful for PEREC as implemented today. Also check the comments on the blog articles, written by PEREC's author!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-4087226049363238341?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/4087226049363238341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=4087226049363238341' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/4087226049363238341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/4087226049363238341'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2009/08/cl-perec-blog-series-by-pinterface.html' title='cl-perec blog series by pinterface'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-8528103809114151355</id><published>2009-04-14T08:37:00.007+02:00</published><updated>2009-04-14T12:32:47.260+02:00</updated><title type='text'>Ben Hyde's project dependency graph</title><content type='html'>Ben Hyde &lt;a href="http://enthusiasm.cozy.org/archives/2009/04/the-briar-patch"&gt;writes about clbuild&lt;/a&gt; and has a very nice graph of project dependencies in his post.&lt;br&gt;
&lt;br&gt;
His approach is extraordinarily simple and uses a small Lisp program to parse clbuild's dependencies file and write out a .dot file.  Of course, using Graphviz is a well-known approach for this kind of dependency diagram.  Bill Clementson &lt;a href="http://bc.tech.coop/blog/051012.html"&gt;mentioned&lt;/a&gt; Richard Newman's graphs a few years ago.&lt;br&gt;
&lt;br&gt;
But Ben's graph is a fresh take on this because of the way it uses clbuild's recorded dependency information, which shows dependencies of &lt;i&gt;projects&lt;/i&gt; rather than dependencies of &lt;i&gt;systems&lt;/i&gt;. What's the difference between projects and systems?  Lisp projects often contain multiple .asd files.&lt;br&gt;
&lt;br&gt;
Before thinking about the details of that distinction, let's look at the picture. Here's his graph, showing Hunchentoot, Drakma, cxml, and others:&lt;br&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_TGUWGKSMB1I/SeQ2GL79C2I/AAAAAAAAAfQ/K4CKfhJbE8I/s1600-h/ben-deps-full.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 236px; height: 320px;" src="http://4.bp.blogspot.com/_TGUWGKSMB1I/SeQ2GL79C2I/AAAAAAAAAfQ/K4CKfhJbE8I/s320/ben-deps-full.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5324440139370138466" /&gt;&lt;/a&gt;&lt;br&gt;
Observations:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;Yes, there's a lot of &lt;tt&gt;Babel&lt;/tt&gt; in there.  (It deserves it!)&lt;br&gt;
&lt;li&gt;The project dependency graph is not transitive.  Note how &lt;tt&gt;CXML&lt;/tt&gt; depends on &lt;tt&gt;Babel&lt;/tt&gt;, which in turn needs &lt;tt&gt;Stefil&lt;/tt&gt;.  But &lt;tt&gt;CXML&lt;/tt&gt; itself does not depend on &lt;tt&gt;Stefil&lt;/tt&gt;.  How can that be?  It's because the &lt;i&gt;system&lt;/i&gt; &lt;tt&gt;CXML&lt;/tt&gt; depends only on the &lt;i&gt;system&lt;/i&gt; &lt;tt&gt;babel&lt;/tt&gt;.  And that's not where the use of &lt;tt&gt;Stefil&lt;/tt&gt; comes from.  It's actually just &lt;tt&gt;babel-tests&lt;/tt&gt; that needs &lt;tt&gt;Stefil&lt;/tt&gt;, and that isn't needed when you're compiling &lt;tt&gt;CXML&lt;/tt&gt;.&lt;br&gt;
&lt;li&gt;Where there &lt;i&gt;are&lt;/i&gt; indirect dependencies, the graph shows them in full.  Note that CL+SSL has an arrow to babel here, although it doesn't use it directly.  This indirect dependency is due to its use of CFFI.
&lt;/ul&gt;&lt;br&gt;
While probably not suitable for all dependency graphs, I think that this explicit display of indirect dependencies gives very nice results in this case, because it highlights commonly used libraries like Babel more than an ordinary graph would have done.&lt;br&gt;
&lt;br&gt;
You can download his code at &lt;a href="http://github.com/bhyde/clbuild2dot/tree/master"&gt;github&lt;/a&gt;.  Note that you don't even have to download the projects that you want to compute a graph for, if you replace the call to &lt;tt&gt;directory&lt;/tt&gt; with any other test of your choice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-8528103809114151355?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/8528103809114151355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=8528103809114151355' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/8528103809114151355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/8528103809114151355'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2009/04/ben-hydes-project-dependency-graph.html' title='Ben Hyde&apos;s project dependency graph'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_TGUWGKSMB1I/SeQ2GL79C2I/AAAAAAAAAfQ/K4CKfhJbE8I/s72-c/ben-deps-full.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-362338164922300588</id><published>2009-04-04T11:59:00.000+02:00</published><updated>2009-04-04T12:00:11.901+02:00</updated><title type='text'>XSLT 1.0 implemented in Common Lisp</title><content type='html'>&lt;p&gt;
  Newly
  released: &lt;a href="http://common-lisp.net/project/xuriella/"&gt;Xuriella
  XSLT&lt;/a&gt;, the first implementation of XSLT written entirely in Common
  Lisp.
&lt;/p&gt;
&lt;p&gt;
  Based
  on &lt;a href="http://common-lisp.net/project/plexippus-xpath/"&gt;Plexippus
  XPath&lt;/a&gt;, Xuriella is an implementation of XSLT 1.0, written by Ivan
  Shvedunov and me.
&lt;/p&gt;
&lt;p&gt;
  Xuriella is quite complete and correct -- we run the official
  testsuite, with more than 95% of tests currently passing.
&lt;/p&gt;
&lt;p&gt;
  &lt;b&gt;Extensions&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
  One advantage of a pure-Lisp implementation is that extension
  elements (as well as XPath extensions) can be defined easily.
&lt;/p&gt;
&lt;p&gt;
  That's a huge plus because XSLT itself is a very specialized
  programming language -- it excels at XML/HTML generation and
  transformation only.  Being able to write custom extensions in Lisp
  helps with any non-XML-ish parts of the task which XSLT itself might
  not handle conveniently.
&lt;/p&gt;
&lt;p&gt;
  &lt;b&gt;Documentation&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
  If you just want to try applying stylesheets, there are only two
  functions you need to know about: &lt;tt&gt;parse-stylesheet&lt;/tt&gt;
  and &lt;tt&gt;apply-stylesheet&lt;/tt&gt;.
&lt;/p&gt;
&lt;p&gt;
  For details about these functions (and all others, including those for
  extensions), refer to the
  &lt;a href="http://common-lisp.net/project/xuriella/atdoc/index.html"&gt;API documentation&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  &lt;b&gt;Example&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
  The &lt;a href="http://common-lisp.net/project/xuriella/example.html"&gt;example&lt;/a&gt;
  uses Hunchentoot and Xuriella with XSLT as a template language in a
  simple directory listing request.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-362338164922300588?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/362338164922300588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=362338164922300588' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/362338164922300588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/362338164922300588'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2009/04/xslt-10-implemented-in-common-lisp.html' title='XSLT 1.0 implemented in Common Lisp'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-3242024777856910175</id><published>2008-12-07T11:58:00.001+01:00</published><updated>2008-12-07T12:00:05.993+01:00</updated><title type='text'>Plexippus XPath released</title><content type='html'>&lt;p&gt;
  The first version of Ivan
  Shvedunov's &lt;a href="http://common-lisp.net/project/plexippus-xpath/"&gt;Plexippus
  XPath&lt;/a&gt; has been released, an implementation of XPath 1.0, written
  entirely in Common Lisp.
&lt;/p&gt;
&lt;p&gt;
  Plexippus has been available from darcs for a few months now, and we
  have had some early users (thanks for testing the code at that early
  stage), but this is the first tarball release.  New tarballs for cxml
  and its other add-on projects are also available now, so that you don't
  have to juggle with git, darcs, and CVS anymore.

&lt;/p&gt;
&lt;p&gt;
  &lt;b&gt;Beta version: SBCL-only&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
  Plexippus is well-tested on SBCL, but has not yet been ported to any
  other Lisp implementation. That's why this release is declared as a
  beta version.
&lt;/p&gt;
&lt;p&gt;
  (Ports to other Lisps mainly involve support code for non-trapping
  floating-point arithmetic.  Patches are welcome.)
&lt;/p&gt;
&lt;p&gt;
  &lt;b&gt;The XPath protocol&lt;/b&gt;

&lt;/p&gt;
&lt;p&gt;
  For extensibility, Plexippus defines a protocol of generic functions
  to implement the XPath data model, so any object model for XML can be
  queried using Plexippus if it implements these generic functions.
  Out-of-the-box, there is support
  for &lt;a href="http://www.lichteblau.com/cxml-stp/"&gt;cxml-STP&lt;/a&gt; (a DOM
  alternative) and cxml's DOM.
  
&lt;/p&gt;
&lt;p&gt;
  &lt;b&gt;Some examples&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
  Let's parse a test document first (no XPath involved yet):
&lt;/p&gt;

&lt;pre style="background-color: #eeeeee; border: 1px solid #cccccc;"&gt;
CL-USER&gt; (defparameter *document*
    (cxml:parse "&amp;lt;test a='1' b='2'&gt;
                          &amp;lt;child&gt;hello world&amp;lt;/child&gt;
                        &amp;lt;/test&gt;"
         (stp:make-builder)))
*DOCUMENT*
&lt;/pre&gt;
&lt;p&gt;
  Find and add the two attributes as numbers:
&lt;/p&gt;
&lt;pre style="background-color: #eeeeee; border: 1px solid #cccccc;"&gt;CL-USER&gt; (xpath:evaluate "test/@a + test/@b" *document*)
3.0d0&lt;/pre&gt;
&lt;p&gt;
  Find the element called &lt;tt&gt;child&lt;/tt&gt; and its string value.
  (Using &lt;tt&gt;string()&lt;/tt&gt; in the expression itself would also have worked.)

&lt;/p&gt;
&lt;pre style="background-color: #eeeeee; border: 1px solid #cccccc;"&gt;CL-USER&gt; (xpath:string-value (xpath:evaluate "//child" *document*))
"hello world"&lt;/pre&gt;
&lt;p&gt;
  Iterate over all elements, in document order:
&lt;/p&gt;
&lt;pre style="background-color: #eeeeee; border: 1px solid #cccccc;"&gt;CL-USER&gt; (xpath:do-node-set (node (xpath:evaluate "//*" *document*))
    (format t "found element: ~A~%"
     (xpath-protocol:local-name node)))
found element: test
found element: child&lt;/pre&gt;
&lt;p&gt;
  &lt;a href="http://common-lisp.net/project/plexippus-xpath/examples.html"&gt;More
  examples here&lt;/a&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-3242024777856910175?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/3242024777856910175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=3242024777856910175' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/3242024777856910175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/3242024777856910175'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2008/12/plexippus-xpath-released.html' title='Plexippus XPath released'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-3611057425297793501</id><published>2008-07-26T18:38:00.001+02:00</published><updated>2008-12-11T07:41:19.880+01:00</updated><title type='text'>lisp-berlin</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.katzundgoldt.de/rumpfkluft.htm"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_TGUWGKSMB1I/SItQQhBySjI/AAAAAAAAAXk/uQG0LorNg9E/s320/toll.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5227360037167581746" /&gt;&lt;/a&gt;[rumpfkluft.de]
&lt;br&gt;
&lt;br&gt;
Lispers are meeting up on a regular basis almost &lt;a href="http://xach.livejournal.com/173670.html"&gt;everywhere&lt;/a&gt;.  But does Berlin have a Lisp user group?  If so, where would you start looking for it?  Until recently, the only resources available were the mailing lists &lt;a href="http://common-lisp.net/mailman/listinfo/eurolisp"&gt;eurolisp&lt;/a&gt; (targeting everyone and no one in particular) and &lt;a href="http://common-lisp.net/mailman/listinfo/lisp-hh"&gt;lisp-hh&lt;/a&gt; (frequented by  Hamburg Lispers).
&lt;br&gt;
&lt;br&gt;
Now, thanks to &lt;a href="http://netzhansa.blogspot.com/"&gt;Hans&lt;/a&gt;, we have our own Wiki and mailing list.  For your future Lisp needs in Berlin, we present lisp-berlin: &lt;a href="http://groups.google.com/group/lisp-berlin"&gt;http://groups.google.com/group/lisp-berlin&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
See &lt;a href="http://groups.google.com/group/lisp-berlin/web/treffen"&gt;lisp-berlin/treffen&lt;/a&gt; for Katrin's "Stammtisch", which has been a regular meeting for about a year now.
&lt;br&gt;
&lt;br&gt;
We would like to organize meetings replacing the Stammtisch later this year, ideally in a place that is not as excessively casual, so stay tuned for more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-3611057425297793501?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/3611057425297793501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=3611057425297793501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/3611057425297793501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/3611057425297793501'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2008/07/lisp-berlin.html' title='lisp-berlin'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_TGUWGKSMB1I/SItQQhBySjI/AAAAAAAAAXk/uQG0LorNg9E/s72-c/toll.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-752653463811545713</id><published>2008-02-05T21:48:00.000+01:00</published><updated>2008-02-05T21:47:56.725+01:00</updated><title type='text'>clbuild FAQ</title><content type='html'>&lt;p&gt;
Since bloggers started covering clbuild (&lt;a href="http://boinkor.net/archives/2008/01/a_public_service_announcement.html"&gt;1&lt;/a&gt;,&lt;a href="http://bc.tech.coop/blog/080116.html"&gt;2&lt;/a&gt;), there has been a noticable surge of newbie questions.
&lt;/p&gt;
&lt;p&gt;
To record answers to those questions, there is now a longer &lt;a href="http://common-lisp.net/project/clbuild/#faq"&gt;FAQ&lt;/a&gt; for clbuild, covering these topics:
&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt; How does clbuild differ from asdf-install?
      &lt;li&gt; My favourite application is not supported.  How can I
      add it?
      &lt;li&gt; Why did you get rid of all tarball-only downloads?
      &lt;li&gt; It doesn't load my ~/.sbclrc!
      &lt;li&gt; "clbuild lisp" doesn't seem to use my monster.core!
      &lt;li&gt; Can I start the lisp with swank already preloaded?
      &lt;li&gt; Can I run emacs and slime without going through "clbuild slime"?
      &lt;li&gt;Is the "dependencies" file autogenerated?
      &lt;li&gt;The "dependencies" file is broken!
      &lt;li&gt;Why is clbuild written in shell?  Lisp is so much better.
      &lt;li&gt; Does it work on cygwin?
&lt;/ul&gt;
&lt;p&gt;
Note the slime-related changes, which allow swank startup the way Bill is explaining it in his post, but without the workarounds.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-752653463811545713?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/752653463811545713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=752653463811545713' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/752653463811545713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/752653463811545713'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2008/02/clbuild-faq.html' title='clbuild FAQ'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-4527520645488446842</id><published>2007-12-25T21:46:00.000+01:00</published><updated>2007-12-26T00:21:52.151+01:00</updated><title type='text'>comp.lang.lisp needs to stop complaining about overcommit</title><content type='html'>&lt;i&gt;or: How I got sucked back into SBCL hacking on Christmas.&lt;/i&gt;

&lt;pre&gt;
: david@radon:~; ps -o pid,vsz,rss,comm -p `pidof sbcl`
  PID    VSZ   RSS COMMAND
 1019 570424  4424 sbcl
: david@radon:~; ps -o pid,vsz,rss,comm -p `pidof sbcl`
  PID    VSZ   RSS COMMAND
 1019 963320 404204 sbcl
: david@radon:~; ps -o pid,vsz,rss,comm -p `pidof sbcl`
  PID    VSZ   RSS COMMAND
 1019 3988328 825804 sbcl
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-4527520645488446842?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/4527520645488446842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=4527520645488446842' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/4527520645488446842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/4527520645488446842'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/12/complanglisp-needs-to-stop-whining.html' title='comp.lang.lisp needs to stop complaining about overcommit'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-1530879994929708518</id><published>2007-10-27T16:27:00.000+02:00</published><updated>2007-10-27T16:27:35.241+02:00</updated><title type='text'>Ten years of Closure HTML</title><content type='html'>More than a decade ago, Gilbert Baumann started writing the Closure web browser.  It includes a great HTML parser, written all in Lisp.&lt;br&gt;
&lt;br&gt;
Released today, &lt;a href="http://common-lisp.net/project/closure/closure-html"&gt;Closure HTML&lt;/a&gt; is a stand-alone version of the parser.&lt;br&gt;
&lt;br&gt;
It supports HTML 4, understands malformed HTML, and can (optionally) be used in conjunction with Closure XML and its data structures.&lt;br&gt;
&lt;br&gt;
An easy way to get started with Closure HTML itself is with its LHTML builder, which represents HTML elements as simple lisp lists.&lt;br&gt;
&lt;br&gt;
Together, the two parsers can be used to turn HTML into XHTML or vice versa, and in particular to parse HTML into DOM or STP.  Even for users who only parse and work with XHTML internally, the new code can be useful to emit normal HTML 4 as the last step of processing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-1530879994929708518?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/1530879994929708518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=1530879994929708518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/1530879994929708518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/1530879994929708518'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/10/ten-years-of-closure-html.html' title='Ten years of Closure HTML'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-3100595552040239930</id><published>2007-08-30T22:47:00.000+02:00</published><updated>2007-08-30T22:58:21.561+02:00</updated><title type='text'>Forking SBCL for Dummies</title><content type='html'>&lt;p&gt;
  &lt;a href="http://repo.or.cz/"&gt;http://repo.or.cz/&lt;/a&gt; hosts a git repository for SBCL
  and makes it easy to publish your own fork of SBCL.
&lt;/p&gt;&lt;p&gt;
  Here is a quick step-by-step
  guide for anyone planning to have his repository hosted there.
  (All of this will be painfully obvious to the git experts.)
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://repo.or.cz/m/reguser.cgi"&gt;Register a user account&lt;/a&gt;.  All you need is an SSH public key, no questions asked.&lt;/li&gt;
&lt;li&gt;Create the fork.  Find the &lt;a href="http://repo.or.cz/w/sbcl.git"&gt;SBCL project&lt;/a&gt; and go to "fork".  Enter a project name for the fork and an admin password.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;&lt;p&gt;
Done.  Now you have a fork, but you need to initialize it first.
&lt;/p&gt;&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;Go to your "Project Settings" page and &lt;em&gt;add yourself as a user&lt;/em&gt;.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;&lt;p&gt;
  Otherwise you cannot push to your own project.
&lt;ul&gt;
&lt;li&gt;Push into the fork.  One way to do this is to clone the normal SBCL repository, then use
&lt;pre&gt;git push --all ssh://yourusername@repo.or.cz/srv/git/sbcl/yourprojectname.git&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;&lt;p&gt;
Don't forget the --all, which instructs git to push all refs.  Whatever a ref is, anyway.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-3100595552040239930?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/3100595552040239930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=3100595552040239930' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/3100595552040239930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/3100595552040239930'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/08/forking-sbcl-for-dummies.html' title='Forking SBCL for Dummies'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-1030387692581590340</id><published>2007-08-26T21:06:00.000+02:00</published><updated>2007-08-26T22:30:32.813+02:00</updated><title type='text'>cloak</title><content type='html'>&lt;p&gt;
It is unfinished, slow, buggy, unmaintained, in need of a rewrite -- and now &lt;b&gt;you&lt;/b&gt; can hack it yourself!
&lt;/p&gt;
&lt;p&gt;
Doesn't that sound exciting?&amp;#160; &lt;i&gt;Of course&lt;/i&gt; it does.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Prerequisites.&lt;/b&gt; Only Linux/x86 is supported&lt;sup&gt;1&lt;/sup&gt;. You will need several hours of spare CPU time, about 1 GB of RAM, and lots of disk space.
Compilation involves building &lt;a href="http://www.sbcl.org/"&gt;SBCL&lt;/a&gt; and &lt;a href="http://www.gnu.org/software/classpath/"&gt;classpath&lt;/a&gt; first, so make sure to install all required dependencies first.  Debian users can run
&lt;pre&gt;# apt-get install sbcl svn cvs wget jikes
# apt-get build-dep classpath&lt;/pre&gt;
to do so.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Build script.&lt;/b&gt; Grab cloak using git [edit: needs git 1.5, no idea why]:
&lt;pre&gt;$ git clone &lt;a href="http://www.lichteblau.com/git/cloakbuild.git"&gt;http://www.lichteblau.com/git/cloakbuild.git&lt;/a&gt;&lt;/pre&gt;
and compile it using clbuild-like commands:
&lt;pre&gt;$ ./build update
$ ./build world&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Usage.&lt;/b&gt; The &lt;tt&gt;bin&lt;/tt&gt; directory contains scripts called &lt;tt&gt;java&lt;/tt&gt;, &lt;tt&gt;javac&lt;/tt&gt; (courtesy of ecj), &lt;tt&gt;javap&lt;/tt&gt;, and &lt;tt&gt;javah&lt;/tt&gt; that run Lisp with the right arguments.
&lt;/p&gt;
&lt;pre&gt;$ ./bin/java -version
CLOAK Virtual Machine, running on SBCL 0.9.8.6 (Linux 2.6.22 X86)

Copyright (C) 2003-2007 David Lichteblau
&lt;/pre&gt;
&lt;p&gt;
Technically it is a precompiler, and to avoid unpleasant surprises at run time, you might want to run
&lt;pre&gt;./bin/precompile foo.jar&lt;/pre&gt;
before starting anything non-trivial.
&lt;/p&gt;
&lt;p&gt;
Finally, read cloak/TODO and start hacking.
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;What's new?&lt;/b&gt; Compared to the big binary tarball available previously, this one comes with sources only, has been updated for current SBCL, and for Classpath 0.91 (which is still ancient, but a little step forward).  The scripts in bin/ are also new.
&lt;p&gt;
&lt;br&gt;
&lt;sup&gt;1&lt;/sup&gt; No AMD 64 support yet.  For now, use an x86 chroot instead.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-1030387692581590340?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/1030387692581590340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=1030387692581590340' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/1030387692581590340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/1030387692581590340'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/08/cloak.html' title='cloak'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-6164245046891987507</id><published>2007-08-05T14:34:00.001+02:00</published><updated>2007-08-05T14:34:51.388+02:00</updated><title type='text'>A new data structure for XML</title><content type='html'>&lt;a href="http://lichteblau.blogspot.com/2007/07/theres-exactly-one-way-to-do-it.html"&gt;As mentioned earlier&lt;/a&gt;, I set out to define an alternative to the W3C's Document Object Model, inspired heavily by Java's XOM, but made for Common Lisp.&lt;br/&gt;
&lt;br/&gt;
The result is STP, a data structure for XML that is full-featured and uses CLOS, but is more natural than DOM and gets namespaces right. Its implementation &lt;a href="http://www.lichteblau.com/cxml-stp/"&gt;cxml-stp&lt;/a&gt; is available as an add-on library for Closure XML.&lt;br/&gt;
&lt;br/&gt;
(For most purposes, it should be preferable to other alternatives, but DOM fans -- in case there are any -- can be assured that DOM support in cxml will not go away either.)&lt;br/&gt;
&lt;br/&gt;
Read more about STP in the &lt;a href="http://www.lichteblau.com/cxml-stp/tutorial/"&gt;tutorial&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-6164245046891987507?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/6164245046891987507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=6164245046891987507' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/6164245046891987507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/6164245046891987507'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/08/new-data-structure-for-xml.html' title='A new data structure for XML'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-5318169846902863886</id><published>2007-07-28T21:16:00.000+02:00</published><updated>2007-07-28T21:26:00.810+02:00</updated><title type='text'>Macros for XSLT</title><content type='html'>Gary King is &lt;a href="http://metabang.com/unclogit/?p=150"&gt;confused because [XSLT] seems so ridiculously verbose&lt;/a&gt;.  Others have already suggested &lt;a href="http://www.idealliance.org/papers/extreme/proceedings/html/2006/Novatchev01/EML2006Novatchev01.html"&gt;mad&lt;/a&gt; higher-order function tricks using XSLT 2.0.&lt;br/&gt;
&lt;br/&gt;
My solution: Macros.  If XSLT lacks an element to do what you want (creating a text node with a newline, in Gary's case), just invent the feature you need and send your XSLT stylesheet through &lt;i&gt;another&lt;/i&gt; XSLT stylesheet to implement it.&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;BR&lt;/b&gt;&lt;br/&gt;
&lt;br/&gt;
Say you have &lt;a href="http://www.lichteblau.com/blog/br/demo.xsl" style="color: green"&gt;demo.xsl&lt;/a&gt; which wants to use&lt;br/&gt;
&lt;pre style="color: green"&gt;  &amp;lt;x:br/&gt;&lt;/pre&gt;&lt;/br&gt;
to emit a newline.  (In this example, `x' is simply the namespace for our extensions.) Write an additional stylesheet &lt;a href="http://www.lichteblau.com/blog/br/macros.xsl" style="color: blue"&gt;macros.xsl&lt;/a&gt; and send the original &lt;tt style="color: green"&gt;demo.xsl&lt;/tt&gt; through the macro stylesheet to generate the actual XSLT source code.  A macro template for &amp;lt;x:br&gt; would be as simple as:&lt;br/&gt;
&lt;pre style="color: blue"&gt;
  &amp;lt;xsl:template match="x:br"&gt;
    &lt;span style="color: black"&gt;&amp;lt;_xsl:text&gt;&lt;/span&gt;&amp;lt;xsl:text&gt;&lt;span style="color: black"&gt;&amp;amp;#10;&lt;/span&gt;&amp;lt;/xsl:text&gt;&lt;span style="color: black"&gt;&amp;lt;/_xsl:text&gt;&lt;/span&gt;
  &amp;lt;/xsl:template&gt;
&lt;/pre&gt;
In the macro stylesheet, &lt;tt style="color: blue"&gt;xsl&lt;/tt&gt; is the namespace of the "macro definition" and &lt;tt&gt;_xsl&lt;/tt&gt; is the namespace of the "macro expansion".  (If you care about details, the trick is to use &lt;tt style="color: blue"&gt;xsl:namespace-alias&lt;/tt&gt; to make the XSLT processor believe they are different namespaces.)&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;DOTIMES&lt;/b&gt;&lt;br/&gt;
&lt;br/&gt;
For a more interesting example of macro use, suppose we want to repeat our code &lt;em&gt;count&lt;/em&gt; times.  Doing this kind of iteration involves a recursive template call, which we want to hide.  We will define a macro &lt;tt&gt;&amp;lt;x:dotimes&gt;&lt;/tt&gt; that can be used like this:&lt;br/&gt;
&lt;pre style="color: green"&gt;
  &amp;lt;x:dotimes var="i" count="3"&gt;
    &amp;lt;xsl:value-of select="$i"/&gt;
  &amp;lt/x:dotimes&gt;
&lt;/pre&gt;
Our macro stylesheet replaces each use of &lt;tt&gt;&amp;lt;x:dotimes&gt;&lt;/tt&gt; with a template call, and adds a recursive template as a top-level element:&lt;br/&gt;
&lt;pre&gt;&lt;span style="color: blue"&gt;  &amp;lt;xsl:template match="xsl:stylesheet"&gt;
    &amp;lt;xsl:copy&gt;
      &amp;lt;xsl:apply-templates select="@*|node()"/&gt;
      &amp;lt;xsl:for-each select="//x:dotimes"&gt;&lt;/span&gt;
        &amp;lt;_xsl:template name="x:dotimes_{generate-id()}"&gt;
          &lt;i&gt;... recursive template definition here ...&lt;/i&gt;
        &amp;lt;/_xsl:template&gt;&lt;span style="color: blue"&gt;
      &amp;lt;/xsl:for-each&gt;
    &amp;lt;/xsl:copy&gt;
  &amp;lt;/xsl:template&gt;
  
  &amp;lt;xsl:template match="x:dotimes"&gt;&lt;/span&gt;
    &amp;lt;_xsl:call-template name="x:dotimes_{generate-id()}"&gt;
      &lt;i&gt;... parameters elided for brevity ...&lt;/i&gt;
    &amp;lt;/_xsl:call-template&gt;&lt;span style="color: blue"&gt;
  &amp;lt;/xsl:template&gt;&lt;/span&gt;&lt;/pre&gt;
Download the full &lt;a href="http://www.lichteblau.com/blog/br/macros.xsl"&gt;macros.xsl&lt;/a&gt; and &lt;a href="http://www.lichteblau.com/blog/br/demo.xsl"&gt;demo.xsl&lt;/a&gt; to try the example.  To run it with xsltproc, use the Makefile in the same directory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-5318169846902863886?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/5318169846902863886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=5318169846902863886' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/5318169846902863886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/5318169846902863886'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/07/macros-for-xslt.html' title='Macros for XSLT'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-4699826229022243628</id><published>2007-07-01T16:30:00.000+02:00</published><updated>2007-10-26T22:05:14.944+02:00</updated><title type='text'>There's exactly one way to do it</title><content type='html'>&lt;a href="http://www.xom.nu/"&gt;XOM&lt;/a&gt; is a DOM alternative written in Java and &lt;i&gt;for&lt;/i&gt; Java -- in contrast to DOM, which feels wrong in almost every language.&lt;br/&gt;
&lt;br/&gt;
&lt;a href="http://www.xom.nu/whatswrong/img0.html"&gt;Key phrases&lt;/a&gt;:&lt;br/&gt;
&lt;ul&gt;&lt;li&gt;"Comatose lists"&lt;/li&gt;  &lt;li&gt;This is a cathedral, not a bazaar&lt;/li&gt; &lt;li&gt;There's exactly one way to do it&lt;/li&gt;&lt;li&gt;The Wrong Side of 80/20&lt;/li&gt;&lt;/ul&gt;
&lt;br/&gt;
Lots of good ideas waiting to be stolen.  Stay tuned for a Common Lisp adaptation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-4699826229022243628?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/4699826229022243628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=4699826229022243628' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/4699826229022243628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/4699826229022243628'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/07/theres-exactly-one-way-to-do-it.html' title='There&apos;s exactly one way to do it'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-6017947702487558568</id><published>2007-06-24T16:03:00.000+02:00</published><updated>2007-07-28T20:04:34.539+02:00</updated><title type='text'>clbuild has a new home</title><content type='html'>As Planet Lisp readers &lt;a href="http://lukego.livejournal.com/2530.html"&gt;should&lt;/a&gt; &lt;a href="http://www.advogato.org/person/crhodes/diary.html?start=113"&gt;already&lt;/a&gt; &lt;a href="http://lukego.livejournal.com/3137.html"&gt;know&lt;/a&gt;, Luke Gorrie's &lt;i&gt;clbuild&lt;/i&gt; has been evolving slowly in at least three different darcs repositories for the last few months.&lt;br/&gt;
&lt;br/&gt;
Someone must have decided that it was time to give it a new home and created a shiny new clbuild project on common-lisp.net.&lt;br/&gt;
&lt;br/&gt;
This completely empty project looked a little sad and lonely though, so I gave it a &lt;a href="http://common-lisp.net/project/clbuild"&gt;home page&lt;/a&gt;.&lt;br/&gt;
&lt;br/&gt;
Hope you don't mind -- or if you do, you shouldn't have given me write access...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-6017947702487558568?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/6017947702487558568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=6017947702487558568' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/6017947702487558568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/6017947702487558568'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/06/clbuild-has-new-home.html' title='clbuild has a new home'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-3238320411868019832</id><published>2007-05-27T01:25:00.000+02:00</published><updated>2007-07-28T20:05:01.799+02:00</updated><title type='text'>Relax NG for cxml</title><content type='html'>&lt;a href="http://relaxng.org/spec-20011203.html"&gt;Relax NG&lt;/a&gt; is the friendly schema validation standard for XML with clean namespace support, data types, and uniform treatment of attributes.  It is closed under union (allows ambiguity).  And it offers a compact non-XML syntax.&lt;br/&gt;
&lt;br/&gt;
Released today, &lt;a href="http://www.lichteblau.com/cxml-rng/"&gt;cxml-rng&lt;/a&gt; is my implementation of Relax NG in Common Lisp, as an extension to &lt;a href="http://www.common-lisp.net/project/cxml"&gt;Closure XML&lt;/a&gt;.&lt;br/&gt;
&lt;br/&gt;
Learn Relax NG through van der Vlist's &lt;a href="http://books.xmlschemata.org/relaxng/page2.html"&gt;book&lt;/a&gt;, read &lt;a href="http://www.thaiopensource.com/relaxng/design.html"&gt;The Design of Relax NG&lt;/a&gt; by James Clark, &lt;a href="http://www.grappa.univ-lille3.fr/tata/"&gt;pump subtrees&lt;/a&gt;, or try cxml-rng yourself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-3238320411868019832?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/3238320411868019832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=3238320411868019832' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/3238320411868019832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/3238320411868019832'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/05/relax-ng-for-cxml.html' title='Relax NG for cxml'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-1551743811402345975</id><published>2007-03-28T10:28:00.000+02:00</published><updated>2007-07-28T20:05:29.734+02:00</updated><title type='text'>Federal trojan horse</title><content type='html'>(Apologies for non-Lisp content.)&lt;br/&gt;
&lt;br/&gt;
German police is going to install surveillance software on suspects' computers.&lt;br/&gt;
&lt;br/&gt;
They are going to install it online through the Internet without anyone noticing, and of course they will do it without exploiting security vulnerabilities.  Here is what the president of the Federal Criminal Police Office &lt;a href="http://www.taz.de/pt/2007/03/26/a0119.1/text"&gt;has to say about it&lt;/a&gt; (in german):&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;taz&lt;/b&gt;: How will the "Online-Search" of a computer work technically then?&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Ziercke&lt;/b&gt;: Naturally I cannot discuss that publically.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-1551743811402345975?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/1551743811402345975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=1551743811402345975' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/1551743811402345975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/1551743811402345975'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/03/federal-trojan-horse.html' title='Federal trojan horse'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-7682778808089326367</id><published>2007-03-10T20:15:00.000+01:00</published><updated>2007-07-28T20:07:01.090+02:00</updated><title type='text'>clbuild on cygwin</title><content type='html'>&lt;b&gt;Step 1: SBCL&lt;/b&gt;&lt;br/&gt;
&lt;br/&gt;
Install &lt;a href="http://sbcl.sourceforge.net/platform-table.html"&gt;SBCL&lt;/a&gt; using its Windows .msi installer.&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Step 2: Cygwin and darcs&lt;/b&gt;&lt;br/&gt;
&lt;br/&gt;
Since clbuild is a shell script, you need to install cygwin, even though SBCL itself does not depend on it.&lt;br/&gt;
&lt;br/&gt;
Get it from &lt;a href="http://www.cygwin.com/setup.exe"&gt;cygwin.org&lt;/a&gt;.  Make sure to select all packages that clbuild uses to download software.  You will need at least  &lt;b&gt;cvs&lt;/b&gt;, &lt;b&gt;subversion&lt;/b&gt;, and &lt;b&gt;wget&lt;/b&gt;.  In addition, you might want to install &lt;b&gt;emacs&lt;/b&gt; (for slime) and  &lt;b&gt;X&lt;/b&gt; (for CLIM with the CLX backend).&lt;br/&gt;
&lt;br/&gt;
[EDIT: Don't use emacs from cygwin, install the native Windows port of Emacs instead.--2007-06-24]&lt;br/&gt;
&lt;br/&gt;
Not included with cygwin is &lt;b&gt;darcs&lt;/b&gt;, but it has a cygwin port, so download it manually from &lt;a href="http://wiki.darcs.net/DarcsWiki/CategoryBinaries#head-c7910dd98302946c671cf63cb62712589b392074"&gt;darcs.net&lt;/a&gt; and add it to your $PATH.&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Step 3: clbuild&lt;/b&gt;&lt;br/&gt;
&lt;br/&gt;
Cygwin support is new in my clbuild tree, so until another clbuild hacker merges those changes, fetch it from:&lt;br/&gt;
&lt;br/&gt;
&lt;pre style="background-color: #cccccc"&gt;$ darcs get http://www.lichteblau.com/blubba/clbuild
&lt;/pre&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Step 4: Bleeding edge&lt;/b&gt;&lt;br/&gt;
&lt;br/&gt;
ASDF as included with SBCL 1.0.3 does not work with clbuild, so you need to replace it with a version including my patch for Windows shortcut support.&lt;br/&gt;
&lt;br/&gt;
Download &lt;a href="http://www.lichteblau.com/blubba/shortcut/asdf.lisp"&gt;asdf.lisp&lt;/a&gt; and &lt;a href="http://www.lichteblau.com/blubba/shortcut/asdf.fasl"&gt;asdf.fasl&lt;/a&gt; and copy them into the &lt;tt&gt;asdf/&lt;/tt&gt; subdirectory of your SBCL installation, replacing the original versions.  (&lt;a href="http://www.lichteblau.com/blubba/shortcut/asdf.diff"&gt;diff&lt;/a&gt;)&lt;br/&gt;
&lt;br/&gt;
[EDIT: the asdf.fasl linked there isn't up-to-date anymore, but asdf.lisp and asdf.diff are still there, including some fixes.  Drop them into your source tree and recompile SBCL.  --2007-06-24]&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Run clbuild&lt;/b&gt;&lt;br/&gt;
&lt;br/&gt;
That's it.  Now just run clbuild:&lt;br/&gt;
&lt;br/&gt;
&lt;pre style="background-color: #cccccc"&gt;$ cd clbuild
clbuild$ chmod +x clbuild
clbuild$ ./clbuild build
&lt;/pre&gt;
&lt;br/&gt;
To run CLIM applications using the CLX backend, start an X server first and set $DISPLAY accordingly.  (It appears to be necessary to specify an IP address in $DISPLAY so that CLX does not attempt a unix domain socket connection.)&lt;br/&gt;
&lt;br/&gt;
&lt;pre style="background-color: #cccccc"&gt;clbuild$ X&amp;
clbuild$ export DISPLAY=127.0.0.1:0
clbuild$ ./clbuild listener
&lt;/pre&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Optional: Gtkairo&lt;/b&gt;&lt;br/&gt;
&lt;br/&gt;
To try CLIM's gtkairo backend instead, download GTK+ from &lt;a href="http://downloads.sourceforge.net/gimp-win/gtk%2B-2.10.6-1-setup.zip"&gt;gimp-win.sf.net&lt;/a&gt;.    (For some reason, the installer is wrapped in a zip file.)&lt;br/&gt;
&lt;br/&gt;
Add the &lt;tt&gt;bin&lt;/tt&gt; directory of that GTK+ installation to your PATH and configure clbuild to use gtkairo:&lt;br/&gt;
&lt;br/&gt;
&lt;pre style="background-color: #cccccc"&gt;clbuild$ export PATH="/cygdrive/c/Programme/gtk-2.10/bin:$PATH"
clbuild$ export CLIM_BACKEND=gtkairo
clbuild$ ./clbuild listener
&lt;/pre&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;a href="http://www.lichteblau.com/blubba/shortcut/listener-windows.png"&gt;ObScreenshot&lt;/a&gt; of the listener.&lt;br/&gt;
&lt;br/&gt;
(Expect to find some gtkairo/Windows repainting bugs though.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-7682778808089326367?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/7682778808089326367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=7682778808089326367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/7682778808089326367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/7682778808089326367'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/03/clbuild-on-cygwin.html' title='clbuild on cygwin'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-648409894392905530</id><published>2007-03-03T12:34:00.000+01:00</published><updated>2007-07-28T20:07:52.495+02:00</updated><title type='text'>Klacks parsing</title><content type='html'>&lt;a href="http://common-lisp.net/project/cxml"&gt;Closure XML&lt;/a&gt; has been based on a SAX-like API for several years now (in addition to the DOM implementation on top of that).  But although the pervasive use of SAX within CXML itself has been a success story, most users seem to prefer DOM usage over SAX handler hacks.  Anyone who has ever parsed a non-trivial schema using SAX knows why: Maintaining separate &lt;tt&gt;start-element&lt;/tt&gt; and &lt;tt&gt;end-element&lt;/tt&gt; methods is very inconvenient.  Code ends up dispatching on tag names using huge &lt;tt&gt;case&lt;/tt&gt; forms while doing all bookkeeping manually in slots of the handler instance.&lt;br/&gt;
&lt;br/&gt;
Starting with the current release of CXML, there is now a new parser interface called &lt;a href="http://common-lisp.net/project/cxml/klacks.html"&gt;Klacks&lt;/a&gt;.&lt;br/&gt;
&lt;br/&gt;
Similar to StAX, the new interface is more convenient than SAX, while still providing the same features as the old one, including validation.&lt;br/&gt;
&lt;br/&gt;
Basically, the klacks parser can be used as a (rather sophisticated) tokenizer, and you get to write a recursive&amp;#160;descent parser based on that.&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;SAX and StAX&lt;/b&gt; are Java's protocols for XML parsing.  Sometimes they are being referred to as low-level interfaces for "expert" use only (the suggested alternative being something like DOM), but their purpose is really to parse XML without building an in-memory representation.&lt;br/&gt;
&lt;br/&gt;
Low-level or not, they are the right choice when parsing into application-defined data structures or when performing simple on-the-fly transformation of XML data as it is being read.&lt;br/&gt;
&lt;br/&gt;
In SAX, an XML parser will process the entire document in one go, emitting events as it sees them.  User code needs to implement its own handler class, with methods for the events it cares about.  The SAX concept is known as "push-based".&lt;br/&gt;
&lt;br/&gt;
In contrast, the "pull-based" &lt;a href="http://jcp.org/en/jsr/detail?id=173"&gt;StAX&lt;/a&gt; parsing model is similar to working with an input stream.  User code starts by creating an input stream object for the XML document, then reads events from that stream one by one.  (Klacks uses the term &lt;i&gt;source&lt;/i&gt; instead of &lt;i&gt;stream&lt;/i&gt;, to avoid confusion with Common Lisp streams.)&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;API design choices.&lt;/b&gt; StAX distinguishes between a high-level API, which creates a Java object for each event, and the low-level API, which just returns an enum indicating the type of event, and has separate methods to access the current event's data.&lt;br/&gt;
&lt;br/&gt;
Klacks has just one set of functions for both purposes, since it seemed more lispy to use multiple values.  Instead of returning just a keyword indicating the event type, the main klacks functions always include useful event data as additional return values.&lt;br/&gt;
&lt;br/&gt;
Java's StAX also includes classes for XML serialization.  No such extension was needed for CXML, since it already supports convenient serialization using SAX events.  The &lt;tt&gt;with-element&lt;/tt&gt; macro and related functions make generation of those events easy.&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Simple klacks parsing example:&lt;/b&gt;&lt;pre&gt;* (defparameter *source* (cxml:make-source "&amp;lt;example&gt;text&amp;lt;/example&gt;"))
* (klacks:peek-next *source*)
:START-DOCUMENT
* (klacks:peek-next *source*)
:START-ELEMENT
NIL                      ;namespace URI
"example"                ;local name
"example"                ;qualified name
* ...
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-648409894392905530?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/648409894392905530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=648409894392905530' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/648409894392905530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/648409894392905530'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/03/klacks-parsing.html' title='Klacks parsing'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5568788882760066320.post-7556226331013247833</id><published>2007-02-24T12:30:00.000+01:00</published><updated>2007-07-28T20:08:33.539+02:00</updated><title type='text'>McCLIM's tab layout</title><content type='html'>&lt;a href="http://www.paoloamoroso.it/log/"&gt;Paolo Amoroso&lt;/a&gt; used to blog about McCLIM commits.  But he stopped posting updates some months ago, so here is my own report, starting with the tab-layout.&lt;br/&gt;
&lt;br/&gt;
The original tab-layout, written by &lt;a href="http://bl0rg.net/~mgr"&gt;Max-Gerd Retzlaff&lt;/a&gt;, implements a CLIM pane similar to what GTK+ calls GtkNotebook, using only portable CLIM mechanisms to do so:&lt;br/&gt;
&lt;br/&gt;
&lt;img border="0" src="http://www.lichteblau.com/img/generic-clim-tabs.png"&gt;&lt;br/&gt;
&lt;br/&gt;
With my changes, committed a few weeks ago, the tab-layout's architecture is now closer to other gadgets in CLIM, which are split into an abstract superclass and several frame-manager-specific subclasses.  This new version allows the Gtkairo backend to implement its own subclass using a native GtkNotebook:&lt;br/&gt;
&lt;br/&gt;
&lt;img border="0" src="http://www.lichteblau.com/img/gtkairo-clim-tabs.png"&gt;&lt;br/&gt;
&lt;br/&gt;
One aspect of the tab-layout that still stands out is the use of presentations and commands.  While both are fundamental CLIM concepts, other gadgets defined in CLIM 2 come without any integration into the presentation system, so there was some discussion about turning the tab-layout into a "proper" gadget using simple callbacks instead of commands.&lt;br/&gt;
&lt;br/&gt;
In the end, I decided to keep the use of presentations in the generic tab layout and hack its Gtkairo version to simulate them, too.  To me, the greatest advantage of this implementation is that, thanks to presentations, there is an easy way to define context menus for tab pages in a CLIMy way.&lt;br/&gt;
&lt;br/&gt;
You can try the new-and-improved tab-layout using simple demo code included with clim-examples (start it using &lt;tt&gt;(clim-demo::demodemo)&lt;/tt&gt;), or by trying one of currently two real applications featuring tabs.  One of them is &lt;a href="http://common-lisp.net/project/beirc/"&gt;beirc&lt;/a&gt;, the other is the web browser &lt;a href="http://common-lisp.net/project/closure/"&gt;closure&lt;/a&gt;, which now supports tabbed browsing!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5568788882760066320-7556226331013247833?l=lichteblau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lichteblau.blogspot.com/feeds/7556226331013247833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5568788882760066320&amp;postID=7556226331013247833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/7556226331013247833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5568788882760066320/posts/default/7556226331013247833'/><link rel='alternate' type='text/html' href='http://lichteblau.blogspot.com/2007/02/mcclims-tab-layout.html' title='McCLIM&apos;s tab layout'/><author><name>David Lichteblau</name><uri>http://www.blogger.com/profile/05088343424853670990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
