<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>A view from the hill - Lisp</title>
    <link>http://hillview.bugwriter.net/</link>
    <description>Blogging Holgers little world</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1 - http://www.s9y.org/</generator>
    <pubDate>Fri, 02 May 2008 12:51:20 GMT</pubDate>

    <image>
        <url>http://hillview.bugwriter.net/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: A view from the hill - Lisp - Blogging Holgers little world</title>
        <link>http://hillview.bugwriter.net/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>UCW leadership change</title>
    <link>http://hillview.bugwriter.net/archives/108-UCW-leadership-change.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/108-UCW-leadership-change.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=108</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=108</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    In case you&#039;re interested in continuation-based web development with Common Lisp, it might be of interest to learn that &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=456&amp;amp;entry_id=108&quot;  onmouseover=&quot;window.status=&#039;http://common-lisp.net/pipermail/bese-devel/2008-April/003221.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://common-lisp.net/pipermail/bese-devel/2008-April/003221.html&quot;&gt;Drew Campsie has voluntered to take over UCW development&lt;/a&gt;. Marco Baringer, initiator and maintainer of &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=457&amp;amp;entry_id=108&quot;  onmouseover=&quot;window.status=&#039;http://common-lisp.net/project/ucw/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://common-lisp.net/project/ucw/&quot;&gt;UncommonWeb&lt;/a&gt; (aka UCW) &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=458&amp;amp;entry_id=108&quot;  onmouseover=&quot;window.status=&#039;http://common-lisp.net/pipermail/bese-devel/2008-April/003232.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://common-lisp.net/pipermail/bese-devel/2008-April/003232.html&quot;&gt;seemed somwhat relieved&lt;/a&gt; that finally somebody with more time on his hand steps up to take over. &lt;br /&gt;
&lt;br /&gt;
That Marco hadn&#039;t had the time to keep pushing UCW is quite obvious from the mailing list archive. Lately Attila Lendvai seemed to me (an innocent external observer) to had pushed UCW foreward, however, as he &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=459&amp;amp;entry_id=108&quot;  onmouseover=&quot;window.status=&#039;http://common-lisp.net/pipermail/bese-devel/2008-April/003228.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://common-lisp.net/pipermail/bese-devel/2008-April/003228.html&quot;&gt;Attila announced&lt;/a&gt;, he wants to go into a different direction than Drew.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been using ucw-dev during the last two years and the current situation really called for a change, in my opinion. UCWs main problem, as I observe it, is lacking documentation and clearly stated goals which way UCW will go. The automatically extracted documentation doesn&#039;t contain information how the bits fit together and &lt;strong&gt;all&lt;/strong&gt; tutorials are a) incomplete, b) outdated as far as they are targetting ucw-dev, whereas development has mainly happened in ucw-ajax. However, it was not all clear that ucw-ajax really would become the main line of UCW. &lt;br /&gt;
&lt;br /&gt;
I like UCWs component architecture a lot and will eagerly follow what is going to happen. With two prominent developers such as Marco and Attila more or less leaving the project, it will be interesting to see with how much activity development will happen from now on.&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 30 Apr 2008 22:06:42 +0200</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/108-guid.html</guid>
    
</item>
<item>
    <title>Escaping from sql-reader-syntax in CL-SQL</title>
    <link>http://hillview.bugwriter.net/archives/100-Escaping-from-sql-reader-syntax-in-CL-SQL.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/100-Escaping-from-sql-reader-syntax-in-CL-SQL.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=100</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=100</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    This post is mainly a reference post about a particular topic whose solution wasn&#039;t immediately obvious to me from the docs to CL-SQL. Using CL-SQL with (enable-sql-reader-syntax), I had written a routine that looks basically likes this:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;pre&gt;
(defun data-by-some-criteria (criteria &amp;key (dbspec +db-spec+)  (dbtype +db-type+))
  (with-database (db dbspec :database-type dbtype :if-exists :old)
    (let (dbresult)
      (if criteria
	  (setq dbresult
		(select &#039;some-model &#039;other-model
			:where [and [= [some.criteria] criteria]
			            [= [some.foreign_id] [other.id]]]
			:order-by &#039;([other.name] [some.foreign_id] 
				          [year] [some.name])
			:database db))
          (setq dbresult
		(select &#039;some-model &#039;other-model
			:where [and [null [some.criteria]]
			            [= [some.foreign_id] [other.id]]]
			:order-by &#039;([other.name] [some.foreign_id] 
				          [year] [some.name])
			:database db))
      (when dbresult
	(loop for (some other) in dbresult
	      collect some)))))
&lt;/pre&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
This is ugly because the only difference between those two select statements is the check for the criteria, but I had no idea how to combine the two select statements into one, because it&#039;s not possible to embed lisp code (apart from symbols) into an sql-expression (i.e. the type of arguments for :where or :order etc.).&lt;br /&gt;
&lt;br /&gt;
With the next requirement things would become far worse: The order-by statement needs to get more flexible so that it is possible to sort results by year first. Given the approach shown above this would result in at least four select statements, which is horrible. So, naturally I wanted a single select statement with programmatically obtained  :where and :order-by sql expressions.&lt;br /&gt;
&lt;br /&gt;
Step 1: It occured to me that it should be possible to have the arguments in a variable and simply refer to the variable. E.g., using a more simple example:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;pre&gt;
(let (where-arg)
  (if (exact-comp-needed)
      (setq where-arg &#039;[= [column] someval])
      (setq where-arg &#039;[like [column] someval]))
  (select &#039;model :where where-arg))
&lt;/pre&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
So I could now have my two different where-args and two different order-args and use a single select statement. Main problem solved. &lt;br /&gt;
&lt;br /&gt;
Step 2: But for the :where arg in my original problem, only a small fraction of the sql-expression differs. So how do I avoid hard coding the entire value of where-arg? How can I combine some variable part of an sql-expression with some fixed parts? I.e, ultimately I want something like:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;pre&gt;
(let (comp-op where-arg)
  (if (exact-comp-needed)
      (setq comp-op &#039;=)
      (setq comp-op &#039;like))
  (setq where-arg &#039;[ &amp;lt;put comp-op here&amp;gt; [column1] someval])
  (select &#039;model :where where-arg))
&lt;/pre&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
But with CL-SQL modifying the reader, there seems to be no way to make &amp;lt;put comp-op here&amp;gt; work. I didn&#039;t knew how to get the usual variable evaluation into the sql-expression, or how to escape from CL-SQL&#039;s sql-reader-syntax to normal lisp evaluation.  &lt;br /&gt;
&lt;br /&gt;
Somewhere in the back of my head where was that itch that CL-SQL might offer some low-level access to sql expressions. And indeed it does. There are two useful functions, sql-expression and sql-operation. sql-operation &quot;returns an SQL expression constructed from the supplied SQL operator or function operator and its arguments args&quot; (from the cl-sql docs), and we can supply the operator and its arguments from lisp -- which is exactly what I want.&lt;br /&gt;
&lt;br /&gt;
Now, the nice thing is that it&#039;s easy to mix partly handcrafted sql expressions with CL-SQL special sql syntax constructs that will be automatically handled by the reader (if you enable it only via enable-sql-reader-syntax, of course). I.e., for &amp;lt;put comp-op here&amp;gt; we can use sql-operation, but the rest stays essentially the same:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;pre&gt;
(let (where-arg)
  (if (exact-comp-needed)
      (setq where-arg (sql-operation &#039;= [column1] someval))
      (setq where-arg (sql-operation &#039;like [column1] someval)))
  (select &#039;model &#039;other-model  :where where-arg))
&lt;/pre&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Now, coming back to my original problem, based on this approach I can split out the common part of the :where and :order arguments and combine those with the varying parts as needed and hand them down to a single select statement. Problem solved.&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 22 Feb 2008 12:04:50 +0100</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/100-guid.html</guid>
    
</item>
<item>
    <title>Twentieth century boys</title>
    <link>http://hillview.bugwriter.net/archives/98-Twentieth-century-boys.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/98-Twentieth-century-boys.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=98</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=98</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    This is just a minor rambling inspired by a &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=389&amp;amp;entry_id=98&quot;  onmouseover=&quot;window.status=&#039;http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/ef6822230da2c706/d448366d4a559cad#d448366d4a559cad&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;recent thread on cll&quot;&gt;recent thread on cll&lt;/a&gt; about the ups and downs of using Rails. What I find really overwhelming is the lack of proofs that other (typically Lisp-based) frameworks really have so much benefit over the established more traditional frameworks (e.g. Rails, Zope, plain PHP, ...). All I can see is starter documents, tutorials etc. that show how to program yet another blog or reddit clone in some particular framework. I miss fair comparisons and detailed discussions why and where exactly that one particular way of doing things has benefits. And especially with regard to those reddit clone prototypes: AFAICT, reddit was far beyond implementing some half-baked prototype (in Lisp) when they decided to switch (to Python). Yes, for demo purposes reinventing the wheel with some unround edges might be acceptable, but in reality only rolling wheels will be sold and this is where the challenge is.&lt;br /&gt;
&lt;br /&gt;
I believe that while it&#039;s nice that frameworks help with implementing your 500 line application, they really need to show their value with large applications. Where is a discussion of a large on-line shopping system in, say, UCW and CL-SQL, with secure shopping over SSL, login handling, input validation, distribution over multiple servers etc.?  Now, I&#039;m not suggesting that UCW, Weblocks etc. can&#039;t be used to build such websites, but it would be nice to see a much more in-depth explanation/discussion/comparison of how to do it. That would also help increase the credibility of Lisp or at least, of lispers discussing (other) web frameworks. 
    </content:encoded>

    <pubDate>Tue, 22 Jan 2008 19:04:00 +0100</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/98-guid.html</guid>
    
</item>
<item>
    <title>CLOS Video in German/auf Deutsch</title>
    <link>http://hillview.bugwriter.net/archives/96-CLOS-Video-in-Germanauf-Deutsch.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/96-CLOS-Video-in-Germanauf-Deutsch.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=96</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=96</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    In case you&#039;re interested in object-oriented programming in Lisp and happen to speak German, you&#039;ll be happy to learn that &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=379&amp;amp;entry_id=96&quot; title=&quot;http://p-cos.blogspot.com/2007/12/reflection-in-potsdam.html&quot;  onmouseover=&quot;window.status=&#039;http://p-cos.blogspot.com/2007/12/reflection-in-potsdam.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Pascal Costanza&lt;/a&gt; of ContextL and AspectL fame (apart of his postings to cll), has given a &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url=aHR0cDovL3d3dy50ZWxlLXRhc2suZGUvcGFnZTUwX2xlY3R1cmUzMzUyLmh0bWw8YnIgLz4NCg==&amp;amp;entry_id=96&quot;  onmouseover=&quot;window.status=&#039;http://www.tele-task.de/page50_lecture3352.html&amp;lt;br /&amp;gt;
&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://www.tele-task.de/page50_lecture3352.html&quot;&gt;talk about CLOS&lt;/a&gt;, the Common Lisp Object System at the Hasso-Plattner Institut, Potsdam. And while we&#039;re at it, Pascal also has a very interesting &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=380&amp;amp;entry_id=96&quot;  onmouseover=&quot;window.status=&#039;http://p-cos.blogspot.com/2007/12/origin-of-advice.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://p-cos.blogspot.com/2007/12/origin-of-advice.html&quot;&gt;blog post about the origins of the advice facility&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
German:&lt;br /&gt;
Falls Dich, lieber Leser, interessiert, wie man objekt-orientiert in Lisp programmiert, solltest Du Dich darüber freuen, dass &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=379&amp;amp;entry_id=96&quot;  onmouseover=&quot;window.status=&#039;http://p-cos.blogspot.com/2007/12/reflection-in-potsdam.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://p-cos.blogspot.com/2007/12/reflection-in-potsdam.html&quot;&gt;Pascal Costanza&lt;/a&gt;, bekannt durch ContextL und AspectL (abgesehen von seinen Postings in cll), einen &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=382&amp;amp;entry_id=96&quot;  onmouseover=&quot;window.status=&#039;http://www.tele-task.de/page50_lecture3352.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://www.tele-task.de/page50_lecture3352.html&quot;&gt;Vortrag in Deutsch über CLOS&lt;/a&gt;, dem Common Lisp Object System, am Hasso Plattner Institut in Potsdam gehalten hat. Und weil wir gerade dabei sind, Pascal hat außerdem einen sehr interessanten &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=380&amp;amp;entry_id=96&quot;  onmouseover=&quot;window.status=&#039;http://p-cos.blogspot.com/2007/12/origin-of-advice.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://p-cos.blogspot.com/2007/12/origin-of-advice.html&quot;&gt;Blogeintrag über die Geschichte von &#039;advice&#039;&lt;/a&gt;.&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Thu, 20 Dec 2007 00:40:02 +0100</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/96-guid.html</guid>
    
</item>
<item>
    <title>Swing the heartache: Interactive DB maintenance in Lisp</title>
    <link>http://hillview.bugwriter.net/archives/93-Swing-the-heartache-Interactive-DB-maintenance-in-Lisp.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/93-Swing-the-heartache-Interactive-DB-maintenance-in-Lisp.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=93</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=93</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    Every now and then, I&#039;m still blown away by the elegant power that the repl (read-eval-print-loop) of Common Lisp provides for everyday tasks. A recent example: I needed to fix a broken column definition in one of my Postgres databases. I&#039;m not a DB pro, so I will just drop the column. But of course, we want to retain the old data, so here we go (using CL-SQL):&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
&lt;code&gt;
SOMEDB&gt; (connect +db-spec+)
#&lt;CLSQL-POSTGRESQL-SOCKET:POSTGRESQL-SOCKET-DATABASE localhost/db/schauer OPEN {D8EABF1}&gt;
SOMEDB&gt; (defvar *olddata* (select [id] [data] :from [sometable]))
*OLDDATA*
SOMEDB&gt; (execute-command &quot;ALTER TABLE sometable DROP COLUMN data;&quot;)
NIL
SOMEDB&gt; (execute-command &quot;ALTER TABLE sometable ADD COLUMN data varchar;&quot;)
NIL
SOMEDB&gt; (loop for (id value) in *olddata*
                  do (update-records [sometable] 
                                 :attributes &#039;(data) 
                                 :values (list value) 
                                 :where [= [id] id]))
NIL
SOMEDB&gt; (disconnect)
&lt;/code&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
That&#039;s it. First we open a connection, store away the olddata (which will be returned as a list of tuples) in a global variable, modify the table and finally restore the data. Now, what I find really nice about this is that I can operate on the data as if I had an intersection of psql, shell and a real programming language, which is pretty much the point of this blog post. I think that Ruby probably provides a similar environment with irb. And, hey, today I learned that XEmacs comes with an interface to postgres, so I might have been able to do it from within my favourite editor, too ... 
    </content:encoded>

    <pubDate>Wed, 21 Nov 2007 23:16:16 +0100</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/93-guid.html</guid>
    
</item>
<item>
    <title>Lisp golf</title>
    <link>http://hillview.bugwriter.net/archives/90-Lisp-golf.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/90-Lisp-golf.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=90</wfw:comment>

    <slash:comments>11</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=90</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    Some time &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=342&amp;amp;entry_id=90&quot;  onmouseover=&quot;window.status=&#039;http://hillview.bugwriter.net/archives/78-Splitting-the-dark-side-....html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;Splitting the dark side&quot;&gt;ago&lt;/a&gt;, I was looking at splitting some text with Elisp, Perl, Ruby and Common Lisp. Yesterday, when I again had to do quite the same thing, it occurred to me that the Common Lisp solution was unnecessary complex/long. I&#039;m not a Perl guru, but I believe the following is probably hard to beat even with Perl:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
&lt;code&gt;
CL-USER&gt; (format t &quot;~{&amp;lt;li&amp;gt;~A&amp;lt;/li&amp;gt;~%~}&quot; (cl-ppcre:split &quot;\\|&quot; &quot;Kim Wilde|Transvision Vamp|Ideal|Siouxsie and the Banshees|Nena|Iggy Pop&quot;))

&amp;lt;li&amp;gt;Kim Wilde&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Transvision Vamp&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Ideal&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Siouxsie and the Banshees&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Nena&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Iggy Pop&amp;lt;/li&amp;gt;
NIL
&lt;/code&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
For the uninitiated, it&#039;s not the cl-ppcre library which is interesting here but the built-in iteration facilities of format. See the &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=343&amp;amp;entry_id=90&quot;  onmouseover=&quot;window.status=&#039;http://www.lisp.org/HyperSpec/Body/sec_22-3-7.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://www.lisp.org/HyperSpec/Body/sec_22-3-7.html&quot;&gt;Hyperspec on the control-flow features of format&lt;/a&gt; for details. Now, I usually tend to avoid the mini languages that come with Common Lisp like the one of format or loop when writing real programs, but when using Lisp as a glorified shell they come in very handy. 
    </content:encoded>

    <pubDate>Fri, 09 Nov 2007 09:33:43 +0100</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/90-guid.html</guid>
    
</item>
<item>
    <title>Automated unit testing via ASDF?</title>
    <link>http://hillview.bugwriter.net/archives/88-Automated-unit-testing-via-ASDF.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/88-Automated-unit-testing-via-ASDF.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=88</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=88</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    Dear Lazyweb, I&#039;m looking for a way to automate unit testing with the help of ASDF. I&#039;m using &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=337&amp;amp;entry_id=88&quot;  onmouseover=&quot;window.status=&#039;http://www.cliki.net/xlunit&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://www.cliki.net/xlunit&quot;&gt;XLUNIT&lt;/a&gt; at the moment, but this isn&#039;t really relevant. What I want to achieve is that on every compilation of some source file, it&#039;s corresponding test file will be loaded (and hence the tests it contains run). However, what I seek to avoid is simply adding the test files to the component definition; the test files should be kept separately. From what I gather from the ASDF documentation, this should be possible using :perform forms, but the very same docs leave me wondering how. What I found (looking at Jörg Höhles asdf file for iterate) is how to load and run a complete test-system, but this is not what I want to do. Ideally, I would like to have a single perform instruction looking something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
&lt;code&gt;
(defmethod asdf:perform ((op test-op) c)
  (when (asdf:glorified-find-component &quot;my-component&quot; c)
        (let ((component-test (find-component-test c)))
            (when component-test
                   (asdf:operate &#039;asdf:load-op &#039;component-test)))))
&lt;/code&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Here &lt;code&gt;#&#039;glorified-find-component&lt;/code&gt; needs to recursively follow the components parent and &lt;code&gt;#&#039;find-component-test&lt;/code&gt; should return a component &lt;code&gt;c-test&lt;/code&gt; (with c expanded, obviously). Now, I guess I&#039;m just clumsily reinventing the wheel and hence I&#039;m wondering if somebody has already solved &quot;the problem&quot;.&lt;br /&gt;
&lt;br /&gt;
While I&#039;m at it (it referring to testing), &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=338&amp;amp;entry_id=88&quot;  onmouseover=&quot;window.status=&#039;http://common-lisp.net/project/stefil/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://common-lisp.net/project/stefil/&quot;&gt;Stefil&lt;/a&gt; looks like a very interesting test environment in case you&#039;re developing your programs with Emacs and &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=339&amp;amp;entry_id=88&quot; title=&quot;http://common-lisp.net/project/slime/&quot;  onmouseover=&quot;window.status=&#039;http://common-lisp.net/project/slime/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Slime.&lt;/a&gt; From there,  I found a link to &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=340&amp;amp;entry_id=88&quot;  onmouseover=&quot;window.status=&#039;http://aperiodic.net/phil/archives/Geekery/notes-on-lisp-testing-frameworks.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://aperiodic.net/phil/archives/Geekery/notes-on-lisp-testing-frameworks.html&quot;&gt;Phil Gregory&#039;s test framework comparison&lt;/a&gt; which I found much more enlightening than the &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=341&amp;amp;entry_id=88&quot;  onmouseover=&quot;window.status=&#039;http://wiki.alu.org/Test_Frameworks&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://wiki.alu.org/Test_Frameworks&quot;&gt;ALUs list of test frameworks&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Tue, 06 Nov 2007 00:54:00 +0100</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/88-guid.html</guid>
    
</item>
<item>
    <title>Splitting the dark side ...</title>
    <link>http://hillview.bugwriter.net/archives/78-Splitting-the-dark-side-....html</link>
            <category>Emacs</category>
            <category>Lisp</category>
            <category>Programming</category>
    
    <comments>http://hillview.bugwriter.net/archives/78-Splitting-the-dark-side-....html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=78</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=78</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    For a review, I needed to get the track list of a given CD. As the track list wasn&#039;t available via CDDB, I went to &lt;i&gt;some large online store&lt;/i&gt; and found the tracklist. I need to convert it to XML, though. The original data I fetched looks like so:&lt;br /&gt;
&lt;br /&gt;
1. Fox In A Box&lt;br /&gt;
2. Loaded Heart&lt;br /&gt;
3. All Grown Up&lt;br /&gt;
4. Pleasure Unit&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
whereas I need:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li id=&quot;1&quot;&amp;gt;Fox In A Box&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li id=&quot;2&quot;&amp;gt;Loaded Heart&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li id=&quot;3&quot;&amp;gt;All Grown Up&amp;lt;/li&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
After cutting the original data to my Emacs, writing out a simple file and using Perl for that simple transformation seemed just gross. In the past, I&#039;ve been an Emacs hacker. But no more, or so it seems, since it took me nearly half an hour just to come up with this simple function:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;pre&gt;
(defun tracklist-to-li (point mark)
  &quot;Generate a string with &amp;lt;li&amp;gt;-elements containing tracks.
Assumes that one every line of region, a track position 
and the track name is given.&quot;
  (interactive &quot;r&quot;)
  (save-excursion 
    (goto-char point)
    (let ((current-pos (point))
	  (result &quot;&quot;))
      (while (re-search-forward &quot;^\\([0123456789]+?\\)\.[ \t]+\\(.*\\)$&quot; 
				mark t)
	(setq result
	      (concat result
		      &quot;&amp;lt;li id=\&quot;&quot;
		      (match-string 1)
		      &quot;\&quot;&amp;gt;&quot;
		      (match-string 2)
		      &quot;&amp;lt;/li&amp;gt;\n&quot;))
	(setq current-pos (point)))
      (message result))))
&lt;/pre&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
What took the most time was that I&#039;ve had forgotten to escape the grouping parenthesis in the regular expression and that it took me a little while to accept that there is really no \d or equivalent character class in Emacs regexps. Which probably means that I&#039;ve been doing too much in Perl, sed and the like. OTOH, it just may hint at the horror of regular expressions handling in Emacs. What I also dislike is that whenever you want some result in Emacs and see it, too, you have to invoke an interactive operation like &lt;code&gt;message&lt;/code&gt;. Of course, there is IELM,  but this doesn&#039;t really help you for interactive functions operating on regions.&lt;br /&gt;
&lt;br /&gt;
And five minutes later, I realize I need to convert some string like &quot;The (International) Noise Conspiracy|The&lt;br /&gt;
Hi-Fives|Elastica&quot; into a similar list structure. With a simple cut &amp;amp; paste and roughly 30 seconds later, I have&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;pre&gt;
[bauhaus-&gt;~]perl -e &#039;$a=&quot;The (International) Noise Conspiracy|The Hi-Fives|Elastica&quot;; @a=split(&quot;\|&quot;,$a); 
foreach $b  (sort @a) { print &quot;&amp;lt;li&amp;gt;$b&amp;lt;/li&amp;gt;\n&quot;; }&#039;
&lt;/pre&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Hmm. Perhaps I&#039;ve come quite a long way on the dark side already ...&lt;br /&gt;
&lt;br /&gt;
On the other hand, in Ruby, this is just as simple (I&#039;m using irb, the interactive ruby shell here):&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;pre&gt;
irb(main):008:0&gt; a=&quot;The (International) Noise Conspiracy|The Hi-Fives|Elastica&quot;
=&gt; &quot;The (International) Noise Conspiracy|The Hi-Fives|Elastica&quot;
irb(main):009:0&gt; a.split(&quot;|&quot;).each {|string|
irb(main):010:1* print &quot;&amp;lt;li&amp;gt;&quot;
irb(main):011:1&gt; print string
irb(main):012:1&gt; print &quot;&amp;lt;/li&amp;gt;\n&quot;
irb(main):013:1&gt; }
&amp;lt;li&amp;gt;The (International) Noise Conspiracy&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;The Hi-Fives&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;Elastica&amp;lt;/li&amp;gt;
=&gt; [&quot;The (International) Noise Conspiracy&quot;, &quot;The Hi-Fives&quot;, &quot;Elastica&quot;]
&lt;/pre&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The difference here is the implicit array Ruby generates, which of course in Perl you could hide in the array position of the foreach loop. Note the annyoing misfeature of irb to always show the prompt even when your still continuing your current input line.&lt;br /&gt;
&lt;br /&gt;
In Common Lisp we can do it just as short:&lt;br /&gt;
&lt;code&gt;
&lt;pre&gt;
CL-USER&gt; (let* ((a &quot;The (International) Noise Conspiracy|The Hi-Fives|Elastica&quot;)
		          (splits (ppcre:split &quot;\\|&quot; a)))
	           (loop
      	              for string in splits
	              do 
	                  (format t &quot;&amp;lt;li&amp;gt;~S&amp;lt;/li&amp;gt;~%&quot; string)))
&amp;lt;li&amp;gt;&quot;The (International) Noise Conspiracy&quot;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&quot;The Hi-Fives&quot;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&quot;Elastica&quot;&amp;lt;/li&amp;gt;
NIL
&lt;/pre&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The same thing here: The result of the split could have been easily embedded in the loop.&lt;br /&gt;
&lt;br /&gt;
The lesson, of course, is that in the end this example only serves to show that things that are easy to achieve in a high-level are indeed easy to achieve. Or to put it otherwise that the use of regular expressions is no more a discriminating feature between programming languages. 
    </content:encoded>

    <pubDate>Wed, 08 Aug 2007 23:34:14 +0200</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/78-guid.html</guid>
    
</item>
<item>
    <title>Explicit resource handling in Lisp</title>
    <link>http://hillview.bugwriter.net/archives/73-Explicit-resource-handling-in-Lisp.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/73-Explicit-resource-handling-in-Lisp.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=73</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=73</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    Recently, there was a discussion about &quot;the rise of functional languages&quot; over on &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=294&amp;amp;entry_id=73&quot; title=&quot;http://lwn.net/&quot;  onmouseover=&quot;window.status=&#039;http://lwn.net/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; &gt;Linux weekly news&lt;/a&gt;, in which one of the participant claimed that one of the major reasons why nobody uses functional languages in industrial settings would be the lack of explicit resource handling (where a resource is some supposedly &quot;alien&quot; object in the system, say a database handle or something like that).  What he was referring to was the inability to run code on allocating/deallocating a piece of resource. Of course, some people pointed him to various solutions, in particular I recurred to the usual WITH-* style-macros in which one would nest the access to the data while at the same time hiding all what one would do on allocation/de-allocation. His reply went something along the lines that such objects may need to be long-lived (thus a WITH-macro is inappropriate) and that the only resort would be the garbage collector and that there simply is no way of running code at a guaranteed (de-allocation) time. I have to admit that I have no idea how I could code around that problem in Common Lisp (garbage collection even isn&#039;t a defined term in the ANSI specification of CL, and I&#039;m very sure I haven&#039;t seen any mention of allocation/deallocation in it). &lt;br /&gt;
&lt;br /&gt;
Now, some months later, there is a discussion in comp.lang.lisp on the topic of &quot;portable finalizers&quot; and Rainer Joswig pointed to this &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=295&amp;amp;entry_id=73&quot;  onmouseover=&quot;window.status=&#039;http://common-lisp.net/project/bknr/static/lmman/resour.xml&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://common-lisp.net/project/bknr/static/lmman/resour.xml&quot;&gt;chapter in the Lisp machine manual&lt;/a&gt; which talks about explicit resource handling the lisp machine. From the excerpt, I can&#039;t judge whether resources are first-class CLOS objects and hence the functions to handle them are generic functions, but if so that would actually allow running code on deallocating a resource, of course with the price of having to handle allocation/deallocation manually. I really wonder if any of todays CL implementations offers the same or at least similar functionality? 
    </content:encoded>

    <pubDate>Wed, 04 Jul 2007 14:48:53 +0200</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/73-guid.html</guid>
    
</item>
<item>
    <title>Fun with loop</title>
    <link>http://hillview.bugwriter.net/archives/72-Fun-with-loop.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/72-Fun-with-loop.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=72</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=72</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    Using Common Lisp, I want to split a list into two parts, in which the first resulting part has a fixed size (say 20 elements) and the rest, well, contains the rest of the list. This should also work when the list is actually shorter than the limit, which means I can&#039;t use subseq. The typically approach I would have chosen would involve the two traditional functions for doing something iteratively in CL, i.e. do, dotimes or dolist. However, this is ugly, and for the sake of learning something new, I had a look at how to solve the problem with loop.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://hillview.bugwriter.net/archives/72-Fun-with-loop.html#extended&quot;&gt;Continue reading &quot;Fun with loop&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 28 Jun 2007 18:08:32 +0200</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/72-guid.html</guid>
    
</item>
<item>
    <title>Somethin' else</title>
    <link>http://hillview.bugwriter.net/archives/67-Somethin-else.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/67-Somethin-else.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=67</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=67</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    Today, I was bitten by this problem: &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=288&amp;amp;entry_id=67&quot;  onmouseover=&quot;window.status=&#039;http://lists.b9.com/pipermail/clsql-help/2006-October/000686.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://lists.b9.com/pipermail/clsql-help/2006-October/000686.html&quot;&gt;Illegal :ASCII character starting at byte position 16&lt;/a&gt;. I had some data I wanted to exchange with my Postgres DB but somehow, my Emacs consistently lost his connection to SBCL when I hit data with special chars (German umlauts encoded in ISO Latin 1). Investigating further, it became clear that SBCL had the problem without Slime, too. I was rather surprised then to see the solution in the thread linked to above: It was indeed a slime setting that fixed the problem. On a second look, I don&#039;t encounter the exact same problem, as I have trouble with encoded data in the database, not with the initial connect. But &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=289&amp;amp;entry_id=67&quot;  onmouseover=&quot;window.status=&#039;http://lists.b9.com/pipermail/clsql-help/2006-October/000692.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://lists.b9.com/pipermail/clsql-help/2006-October/000692.html&quot;&gt;the solution suggested by Nikodemus Siivola&lt;/a&gt; helps me as well. There have been at last two other threads on the mailing list with regard to Unicode and Postgres, the &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=290&amp;amp;entry_id=67&quot;  onmouseover=&quot;window.status=&#039;http://lists.b9.com/pipermail/clsql-help/2007-April/000805.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://lists.b9.com/pipermail/clsql-help/2007-April/000805.html&quot;&gt;last one&lt;/a&gt; is from April this year. Somebody from the slime camp could probably explain what that slime-setting does to SBCL that it affects SBCL connection to Postgres via CL-SQL. Perhaps I&#039;ll go and have a look. Ah, the joys of open source.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Update:&lt;/strong&gt;I was under a wrong impression. I previously had set SB-IMPL::*default-external-format* to :LATIN-1, a suggestion from the same thread. The slime setting only handles the communication issue with Emacs, but setting the variable on the sbcl side fixes the real problem. 
    </content:encoded>

    <pubDate>Sun, 13 May 2007 23:05:32 +0200</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/67-guid.html</guid>
    
</item>
<item>
    <title>Lambda calculus is only a child's game</title>
    <link>http://hillview.bugwriter.net/archives/62-Lambda-calculus-is-only-a-childs-game.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/62-Lambda-calculus-is-only-a-childs-game.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=62</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=62</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    Have a look at these &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=148&amp;amp;entry_id=62&quot;  onmouseover=&quot;window.status=&#039;http://worrydream.com/AlligatorEggs/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://worrydream.com/AlligatorEggs/&quot;&gt;alligator eggs&lt;/a&gt;! 
    </content:encoded>

    <pubDate>Tue, 08 May 2007 23:05:51 +0200</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/62-guid.html</guid>
    
</item>
<item>
    <title>Fire it up</title>
    <link>http://hillview.bugwriter.net/archives/54-Fire-it-up.html</link>
            <category>Emacs</category>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/54-Fire-it-up.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=54</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=54</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    Moving back in time is easy when the tools you&#039;re using are a versioning control system like CVS or RCS [1], (X)Emacs, it&#039;s versioning control interface VC, a Common Lisp system such as SBCL and Slime, the superior lisp interaction mode for Emacs. Yesterday, I was debugging a part of my current hobby project which involves a web interface made with Uncommon Web (UCW). One bit of that web interface that I hadn&#039;t paid particular attention to in the last round of modifications had stopped working. But the source that dealt with that particular bit seemed quite innocent to me.&lt;br /&gt;
&lt;br /&gt;
I then looked through the log of modifications I did to the file (which is under version control via RCS) by hitting &quot;C-x v l&quot; (equivalent to &quot;M-x vc-print-log&quot;). Turned out that I did some modifications between versions 1.5 and 1.6 to the part under consideration. Hitting &quot;C-x v ~&quot; (vc-version-other-window) and entering numbers 1.5 (and afterwards 1.6) re-generated the old versions, XEmacs directly visiting these corresponding buffers. This feature alone is worth noting: When extracting the older versions, the current version won&#039;t be overwrittten, the older versions will be put into the filesystem with the version number added as a suffix, e.g. foo.lisp.~1.5~.&lt;br /&gt;
&lt;br /&gt;
Now, to see what was happening in between those two versions, I first looked at the differences between the two files. &quot;M-x ediff&quot; and selecting the two buffers, it was easy to spot the part of the code I changed. Next, have a look at the effects caused by the changes: For that I did a &quot;C-c C-k&quot; (slime-compile-and-load-file) on the old versions respectively, so I could then see the old behaviour in real life -- i.e., I could directly use the web app in that older version in my Firefox without any further ado. Of course, this also has to do with the fact that there weren&#039;t many interactions between the part of the app in question and other parts of the system, in particular I needn&#039;t to check out older versions of other files for the compilation to succeed. Actually, loading that old version certainly broke other functionality of the app, but that wasn&#039;t the issue: I only wanted to figure out how the old version worked wrt. to that particular part that wasn&#039;t working in my current state, hence a fully working old version wasn&#039;t what I was looking for.&lt;br /&gt;
&lt;br /&gt;
Now, it did require a little more close attention to the changes I made to discover the mistake. But I think it&#039;s amazing in how few steps it&#039;s possible to regenerate an old behaviour. All the while, my current state of affairs remained largely untouched, I didn&#039;t need to create any copies or move files around or do a larger recompilation. I think that&#039;s a highly effective way of discovering the introduction of a bug.&lt;br /&gt;
&lt;br /&gt;
Update: Kent Pitman, who&#039;s giving cll another of his (lately very rare) visits, pointed to one of his older papers (&lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=136&amp;amp;entry_id=54&quot;  onmouseover=&quot;window.status=&#039;http://www.nhplace.com/kent/PS/Hindsight.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://www.nhplace.com/kent/PS/Hindsight.html&quot;&gt;Accelerating Hindsight&lt;/a&gt;), which I&#039;m surely have seen before but totally forgotten, which talks about how good Common Lisp is for rapid prototyping. What I&#039;ve shown above is actually just an example of two points in this paper: dynamic redefinition and editor integration. Go figure.&lt;br /&gt;
&lt;br /&gt;
Footnotes:&lt;br /&gt;
[1] Yeah, I know, using rcs or cvs and not bazaar, mercurial or git makes me look like an oldtimer. That said, I do use subversion in my day job, too. I stick with rcs and cvs for smaller (read: one person involved) projects mainly due to one reason: There is no support for the newer kids on the block in the VC shipping with XEmacs. Yes, I know that the VC shipping with FSF Emacs has support for subversion (at least), but unfortunately it&#039;s not compatible.&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 13 Apr 2007 11:06:55 +0200</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/54-guid.html</guid>
    
</item>
<item>
    <title>cl-task</title>
    <link>http://hillview.bugwriter.net/archives/51-cl-task.html</link>
            <category>Linux</category>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/51-cl-task.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=51</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=51</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    Reading &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=130&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://bc.tech.coop/blog/070403.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://bc.tech.coop/blog/070403.html&quot;&gt;Bill Clementson&#039;s blog&lt;/a&gt; pointed me to Edi Weitz new &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=131&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://weitz.de/starter-pack/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;http://weitz.de/starter-pack/&quot;&gt;STARTER-PACK&lt;/a&gt; Lisp package, which tries to overcome one of Common Lisp perceived entry level problems for newcomers, when compared to e.g. Python. Python is known to come with &quot;batteries included&quot; which actually means that you&#039;ll have lots of libraries for everyday problems installed out of the box. For Common Lisp, not much has been accomplished in this area, as most people still seem to be debating on &lt;a href=&quot;news: comp.lang.lisp&quot;  title=&quot;news: comp.lang.lisp&quot;&gt;comp.lang.lisp&lt;/a&gt; about standarization. Edi&#039;s starter pack  instead does the right thing: It provides a simple selection of common packages, some of which could be called to have achieved de-facto standard level (e.g. his own CL-PPCRE package). Unfortunately, it&#039;s for Windows and Lispworks only, which Bill ported to Mac/LW.&lt;br /&gt;
Being a Debian user since many years (should be roughly ten years now), I think that it would be fairly simple to achieve something similar (but not at all comparable) to STARTER-PACK. There are already a lot of Common Lisp packages in Debian, what&#039;s missing, however, is a CL-TASK package. Such a package could do what all other task-* packages do in Debian: Have dependencies on the most common packages. This would provide at least a starting point for the newbies with CL in Debian. I think, I&#039;m going to discuss this with Peter van Eynde via mail and also on cll. 
    </content:encoded>

    <pubDate>Wed, 04 Apr 2007 09:04:24 +0200</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/51-guid.html</guid>
    
</item>
<item>
    <title>Uncommon woes</title>
    <link>http://hillview.bugwriter.net/archives/43-Uncommon-woes.html</link>
            <category>Lisp</category>
    
    <comments>http://hillview.bugwriter.net/archives/43-Uncommon-woes.html#comments</comments>
    <wfw:comment>http://hillview.bugwriter.net/wfwcomment.php?cid=43</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://hillview.bugwriter.net/rss.php?version=2.0&amp;type=comments&amp;cid=43</wfw:commentRss>
    

    <author>nospam@example.com (Holger Schauer)</author>
    <content:encoded>
    It has been claimed that Common Lisp would provide better error handling than other languages, where &quot;better&quot; equates equally to &quot;provide &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=120&amp;amp;entry_id=43&quot;  onmouseover=&quot;window.status=&#039;http://www.nhplace.com/kent/Papers/Condition-Handling-2001.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;Kent Pitman&#039;s paper on conditions&quot;&gt;superior error handling facilities&lt;/a&gt; and to &quot;clear error messages&quot;. As a mere application programmer, I strongly believe in that this should carry over to libraries, but unfortunately lately I get the impression that this tradition isn&#039;t given enough respect by some of the more younger kids on the block. &lt;br /&gt;
&lt;br /&gt;
As my pet peeve example of late, consider &lt;a href=&quot;http://hillview.bugwriter.net/exit.php?url_id=121&amp;amp;entry_id=43&quot;  onmouseover=&quot;window.status=&#039;http://common-lisp.net/project/ucw/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;  title=&quot;UncommonWeb&quot;&gt;UCW&lt;/a&gt;: it&#039;s a prime example of how to assemble a lot of functionality by relying on other libraries. Unfortunately, standing on giants shoulders can be become quite a task if the giants start shaking. To me, UCW gives really horrible error messages. Most of the time, you&#039;ll get no idea where to look for the error. &lt;br /&gt;
&lt;br /&gt;
As a simple example, when UCW encounters an error while parsing some tal file, you just might get the error message &quot;NIL is not a character&quot;, which won&#039;t give you any clue what caused the problem. Sometimes, you won&#039;t get an error message at all, but simply get no result at all. As an example, I took one tal file from some test project, modified it a little and tested it on my new application. I didn&#039;t get any output from the variables referenced. After a lot of time spend debugging the lisp-side of the code, I finally saw the light: I forgot to change the lisp package referred to in the tal-file header, hence UCW tried (unsuccessfully) to access variables that didn&#039;t even exist. A warning (in UCWs log) would have been very helpful.&lt;br /&gt;
&lt;br /&gt;
Another problem might be related to the code walking UCW does: sometimes you may get an error about unbound variables while trying to render some component.  With UCW this problem occurs more often (and I think this might be due to the code walking), as sometimes a &lt;code&gt;(with-slots (foo) component &amp;amp;body)&lt;/code&gt; is not sufficient to avoid the accessor, i.e. &lt;code&gt;(foo component)&lt;/code&gt;. Well, that kind of error isn&#039;t uncommon: it&#039;s easy to mistype a variable name or to forget (or -- as in UCWs case -- to not knowing that you should) use the syntax for a variable when instead you should have used a CLOS accessor. So usually, you&#039;ll take a quick glance at the error message or the backtrace and then fix the error in the erroneous piece of code. Not so with UCW: usually it&#039;s near to impossible to find the damned piece of code because the backtrace won&#039;t show you even the name of the component. The name of the variable typically will not be of much help either, if you happen to move state information through several components, (re-)using the same slot names all over the place. &lt;br /&gt;
&lt;br /&gt;
So, to sum up, what I believe is that UCW falls short on is coping with the errors its building blocks may generate. The result is that while the resulting code for some application may be terse and even pretty [1], it may take a lot of time to get it right because of the amount of time wasted debugging unclear error messages. Please, library designers: support your local errors.&lt;br /&gt;
&lt;br /&gt;
Footnotes:&lt;br /&gt;
[1] I don&#039;t think that the code for an UCW application is pretty, but that&#039;s another story.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 02 Feb 2007 08:31:19 +0100</pubDate>
    <guid isPermaLink="false">http://hillview.bugwriter.net/archives/43-guid.html</guid>
    
</item>

</channel>
</rss>