<?xml version="1.0"?>
<rss version="2.0">
<channel>
	<title>Planet Lisp</title>
	<link>http://planet.lisp.org/</link>
	<description>Planet Lisp</description>
	<language>en</language>


<item>
	<title>Lispjobs: Common Lisp and Ruby on Rails Programmers, MNCA Dental, Ft Lauderdale, Florida</title>
	<guid isPermaLink="true">http://lispjobs.wordpress.com/2012/02/02/common-lisp-programmers-mnca-dental-ft-lauderdale-florida/</guid>
	<link>http://lispjobs.wordpress.com/2012/02/02/common-lisp-programmers-mnca-dental-ft-lauderdale-florida/</link>
	
	<description>&lt;p&gt;MCNA Dental of Ft Lauderdale has landed every contract it went for and is quickly becoming a standout in the field of dental insurance. We are developing cutting-edge enterprise software to help manage that growth. Management has asked me to let the world know MCNA is looking for solid, self-starting Common Lisp and/or Ruby/Rails developers who can self-manage on significant sub-projects and execute them efficiently, handling everything from design to coding on their own.&lt;/p&gt;
&lt;p&gt;&amp;#8220;Candidates should be willing to relocate to sunny Ft Lauderdale, FL for permanent or consulting positions, permanent preferred.&lt;/p&gt;
&lt;p&gt;&amp;#8220;We are doing very cool things in Common Lisp and Postgres but using Ruby/Rails3 as a bridge to manage the new business now. Ruby/Rails developers can expect to be doing Lisp in the future. The future also includes the IT department spinning off as a standalone enterprise involved in more than just dental insurance. We have a strong team of five developers but given the ambitious software goals and rapid growth MCNA has room for several strong candidates. Note that a strong developer in any Lispy language will be considered for a permanent position. &lt;/p&gt;
&lt;p&gt;&amp;#8220;Resumes and letters of interest can be sent to ktilton at mcna dot net&lt;/p&gt;
&lt;br /&gt;  &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lispjobs.wordpress.com/648/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lispjobs.wordpress.com/648/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lispjobs.wordpress.com/648/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lispjobs.wordpress.com/648/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lispjobs.wordpress.com/648/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lispjobs.wordpress.com/648/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lispjobs.wordpress.com/648/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lispjobs.wordpress.com/648/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lispjobs.wordpress.com/648/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lispjobs.wordpress.com/648/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lispjobs.wordpress.com/648/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lispjobs.wordpress.com/648/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lispjobs.wordpress.com/648/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lispjobs.wordpress.com/648/" /&gt;&lt;/a&gt; &lt;img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lispjobs.wordpress.com&amp;blog=504450&amp;post=648&amp;subd=lispjobs&amp;ref=&amp;feed=1" width="1" height="1" /&gt;</description>
	
	<pubDate>Thu, 02 Feb 2012 23:04:52 GMT</pubDate>
</item>

<item>
	<title>Jorge Tavares: Sorting algorithms used in the CL implementations</title>
	<guid isPermaLink="true">http://jorgetavares.com/2012/02/02/sorting-algorithms-used-in-the-cl-implementations/</guid>
	<link>http://jorgetavares.com/2012/02/02/sorting-algorithms-used-in-the-cl-implementations/</link>
	
	<description>&lt;p&gt;Which &lt;a href="http://en.wikipedia.org/wiki/Sorting_algorithm"&gt;sorting algorithm&lt;/a&gt; should one implement when developing a program? The best answer is probably &lt;em&gt;none&lt;/em&gt;. Use the sort provided by your system/library/etc. Unless you know your input data has some special properties that you can take advantage of, the provided sort should be enough for your needs and probably is more efficiently implemented. &lt;/p&gt;
&lt;p&gt;However, I think it is important to know what sorting algorithm is implemented. If one knows the properties of the data, it is possible to understand if the provided sort can or will pose a problem. In the same way a programmer shouldn&amp;#8217;t implement a sorting algorithm every time it needs to sort something, the programmer should also be aware of the limitations/advantages of the system sort. That way one can decide if a special sort is needed or not.&lt;/p&gt;
&lt;p&gt;Common Lisp provides the functions &lt;a href="http://www.lispworks.com/documentation/lw50/CLHS/Body/f_sort_.htm"&gt;sort&lt;/a&gt; and &lt;a href="http://www.lispworks.com/documentation/lw50/CLHS/Body/f_sort_.htm"&gt;stable-sort&lt;/a&gt;. The &lt;a href="http://www.lispworks.com/documentation/lw50/CLHS/Front/index.htm"&gt;HyperSpec&lt;/a&gt; describes their operation well but it does not define the sorting algorithm. That decision is left free to the implementations. In addition, both functions don&amp;#8217;t necessarily share the same algorithm. The difference between the two is that the second function sorts in a way that guarantees &lt;a href="http://en.wikipedia.org/wiki/Sorting_algorithm#Stability"&gt;stability&lt;/a&gt;, i.e., two elements that are equal remain in the same position after sorting is completed. The use of sort and stable-sort requires some care (see the section &lt;a href="http://www.aiai.ed.ac.uk/~jeff/lisp/cl-pitfalls"&gt;sort pitfalls&lt;/a&gt;) but lets focus on the algorithms and not on its usage.&lt;/p&gt;
&lt;p&gt;What sorting algorithms do the major open source &lt;a href="http://common-lisp.net/~dlw/LispSurvey.html"&gt;CL implementations&lt;/a&gt; actually implement? I was curious about it and went to check the source for &lt;a href="http://common-lisp.net/project/armedbear/"&gt;ABCL&lt;/a&gt;, &lt;a href="http://ccl.clozure.com/"&gt;CCL&lt;/a&gt;, &lt;a href="http://clisp.org/"&gt;CLISP&lt;/a&gt;, &lt;a href="http://www.cons.org/cmucl/"&gt;CMUCL&lt;/a&gt;, &lt;a href="http://ecls.sourceforge.net/"&gt;ECL&lt;/a&gt; and &lt;a href="http://www.sbcl.org/"&gt;SBCL&lt;/a&gt;. Not surprising, we find some differences between the implementations. What it was more unexpected to discover is that some implementations also use different sorting algorithms according to the sequence type. A quick survey of the findings is summarized in the following table (if anythings is incorrect, please tell me). The links for the source code are in the implementation name (careful, in CCL and SBCL there are two links).&lt;/p&gt;
&lt;table width="690" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Implementation&lt;/th&gt;
&lt;th&gt;sort&lt;/th&gt;
&lt;th&gt;stable-sort&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://svn.common-lisp.net/armedbear/trunk/abcl/src/org/armedbear/lisp/sort.lisp"&gt;ABCL&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;merge sort (lists) / quicksort&lt;/td&gt;
&lt;td&gt;merge sort&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://trac.clozure.com/ccl/browser/trunk/source/level-1/l1-Mergesort.lisp"&gt;C&lt;/a&gt;&lt;a href="http://trac.clozure.com/ccl/browser/trunk/source/lib/sort.lisp"&gt;CL&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;merge sort (lists) / quicksort&lt;/td&gt;
&lt;td&gt;merge sort&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://clisp.hg.sourceforge.net/hgweb/clisp/clisp/file/e789e5f15ae3/src/sort.d"&gt;CLISP&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;tree sort&lt;/td&gt;
&lt;td&gt;tree sort&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://trac.common-lisp.net/cmucl/browser/src/code/sort.lisp"&gt;CMUCL&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;heapsort&lt;/td&gt;
&lt;td&gt;merge sort&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://ecls.git.sourceforge.net/git/gitweb.cgi?p=ecls/ecl;a=blob;f=src/lsp/seqlib.lsp;h=4ad06d67fab06bb2263cc5b2ce54b8c0d6af09a6;hb=HEAD"&gt;ECL&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;merge sort (lists) / quicksort&lt;/td&gt;
&lt;td&gt;quicksort (strings + bit vectors) / merge sort&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://sbcl.git.sourceforge.net/git/gitweb.cgi?p=sbcl/sbcl.git;a=blob;f=src/code/sort.lisp;h=06cd2c6664d62c83d2ed7e2c28ae04b6b6478305;hb=refs/heads/master"&gt;SB&lt;/a&gt;&lt;a href="http://sbcl.git.sourceforge.net/git/gitweb.cgi?p=sbcl/sbcl.git;a=blob;f=src/compiler/srctran.lisp;h=16accff9e535c3f8e03fccaf71884d8e1c3d8ae6;hb=refs/heads/master"&gt;CL&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;merge sort (lists) / heapsort&lt;/td&gt;
&lt;td&gt;merge sort&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;br /&gt;
In terms of the implementation of sort, &lt;a href="http://en.wikipedia.org/wiki/Quicksort"&gt;quicksort&lt;/a&gt; is the most used algorithm, followed by &lt;a href="http://en.wikipedia.org/wiki/Heapsort"&gt;heapsort&lt;/a&gt;. The choice for these algorithms is expected. Both have an average-case performance of O(&lt;em&gt;n&lt;/em&gt;lg&lt;em&gt;n&lt;/em&gt;) and heapsort guarantees a worst-case performace of O(&lt;em&gt;n&lt;/em&gt;lg&lt;em&gt;n&lt;/em&gt;) too. Quicksort has a worst-case performance of O(&lt;em&gt;n&lt;sup&gt;2&lt;/sup&gt;&lt;/em&gt;) but it can be optimized in several ways so that it also gives an expected worst-case performance of O(&lt;em&gt;n&lt;/em&gt;lg&lt;em&gt;n&lt;/em&gt;). However, it seems that the quicksort implementations are not completely optimized. In ECL (and ABCL) quicksort implements a partition scheme which deals better with duplicate elements (although is not the three-way partitioning) but it always picks as pivot the first element. CCL chooses the pivot with a median-of-3 method and always sorts the smaller partition to ensure a worst-case stack depth of O(lg&lt;em&gt;n&lt;/em&gt;). &lt;/p&gt;
&lt;p&gt;As for CLISP, I think it uses a &lt;a href="http://en.wikipedia.org/wiki/Tree_sort"&gt;tree sort&lt;/a&gt; but I am not entirely sure. The only source file I could find with a sort implementation was &lt;a href="http://clisp.hg.sourceforge.net/hgweb/clisp/clisp/file/e789e5f15ae3/src/sort.d"&gt;sort.d&lt;/a&gt; and it looks like it contains an implementation of tree sort with a self-balanced binary tree, which also gives this algorithm an average and worst-case performance of O(&lt;em&gt;n&lt;/em&gt;lg&lt;em&gt;n&lt;/em&gt;). &lt;/p&gt;
&lt;p&gt;As expected, most of the implementations use &lt;a href="http://en.wikipedia.org/wiki/Merge_sort"&gt;merge sort&lt;/a&gt; to implement stable-sort since it is a stable sort with average and worst-case performance of O(&lt;em&gt;n&lt;/em&gt;lg&lt;em&gt;n&lt;/em&gt;). Apparently, all implementations are bottom-up merge sorts with the exception of CCL and ECL. Another interesting thing is that merge sort is also used for lists in sort, in most of the implementations. However, I found it surprising to find quicksort in the stable-sort column because it is not a stable algorithm. Since it is only used for strings and bit vectors, it is not really an issue. While reading the source code of the implementations, I realized that ABCL was using quicksort in stable-sort for all non-list sequences. This is a problem that exists in the current &lt;a href="http://common-lisp.net/project/armedbear/releases/1.0.1/"&gt;1.0.1 release&lt;/a&gt; but I&amp;#8217;ve sent a &lt;a href="http://trac.common-lisp.net/armedbear/ticket/196"&gt;bug report&lt;/a&gt; &lt;a href="http://trac.common-lisp.net/armedbear/changeset/13838"&gt;with a quick fix&lt;/a&gt; to the maintainers. The next release should have stable-sort fixed.&lt;/p&gt;
&lt;p&gt;This exploration of the sorting algorithms used in the open source implementations was very educational and interesting to me. I&amp;#8217;ve learned what algorithms are actually used and enjoyed seing how they were implemented. Just spotting the issue in ABCL stable-sort made this review worthwhile. I think there is still room for improvement in some implementations but knowing now the strengths and weaknesses of the sorts in CL is already good enough. On a final note, I just wonder what are the algorithms used in &lt;a href="http://www.franz.com/products/allegro-common-lisp/"&gt;ACL&lt;/a&gt; and &lt;a href="http://www.lispworks.com/products/lispworks.html"&gt;LW&lt;/a&gt;.   &lt;/p&gt;
&lt;br /&gt;Filed under: &lt;a href="http://jorgetavares.com/category/programming/"&gt;Programming&lt;/a&gt; Tagged: &lt;a href="http://jorgetavares.com/tag/common-lisp/"&gt;Common Lisp&lt;/a&gt;, &lt;a href="http://jorgetavares.com/tag/lisp/"&gt;Lisp&lt;/a&gt;, &lt;a href="http://jorgetavares.com/tag/sorting-algorithms/"&gt;Sorting Algorithms&lt;/a&gt;, &lt;a href="http://jorgetavares.com/tag/survey/"&gt;Survey&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jorgetavares.wordpress.com/823/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jorgetavares.wordpress.com/823/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jorgetavares.wordpress.com/823/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jorgetavares.wordpress.com/823/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jorgetavares.wordpress.com/823/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jorgetavares.wordpress.com/823/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jorgetavares.wordpress.com/823/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jorgetavares.wordpress.com/823/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jorgetavares.wordpress.com/823/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jorgetavares.wordpress.com/823/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jorgetavares.wordpress.com/823/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jorgetavares.wordpress.com/823/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jorgetavares.wordpress.com/823/"&gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jorgetavares.wordpress.com/823/" /&gt;&lt;/a&gt; &lt;img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jorgetavares.com&amp;blog=3353190&amp;post=823&amp;subd=jorgetavares&amp;ref=&amp;feed=1" width="1" height="1" /&gt;</description>
	
	<pubDate>Thu, 02 Feb 2012 09:45:29 GMT</pubDate>
</item>

<item>
	<title>John Q. Splittist: A year of living vi-rously</title>
	<guid isPermaLink="true">http://blog.splittist.com/2012/01/31/a-year-of-living-vi-rously/</guid>
	<link>http://blog.splittist.com/2012/01/31/a-year-of-living-vi-rously/</link>
	
	<description>&lt;p&gt;For reasons which are not apparent* even to myself (although I suspect it had to do with general contrariness mixed with regret for some &lt;a title="FEP: I want to learn lisp but I don't want to use emacs" href="http://blog.splittist.com/2007/08/25/lisp-fep-i-want-to-learn-lisp-but-i-dont-want-to-use-emacs/"&gt;arrogant comments&lt;/a&gt; from the past) I spent 2011 emacs-free. More than that, I spent it using only vi (or, rather,&amp;nbsp;&lt;a title="Vim" href="http://www.vim.org/"&gt;vim&lt;/a&gt;) to do my text &amp;#8211; including program text &amp;#8211; editing. Since I couldn&amp;#8217;t get &lt;a title="slimv.vim : Superior Lisp Interaction Mode for Vim (" for="for"&gt;SLIMV&lt;/a&gt; to work at the beginning of 2011 &amp;#8211; it is in &lt;em&gt;much&lt;/em&gt; better shape now &amp;#8211; I even gave up the wonder that is Slime/Swank.&lt;/p&gt;
&lt;p&gt;I can report that, even for a duffer like me, it is possible to develop very efficiently with vi(m) and a repl running in another terminal. So there, old-splittist!&lt;/p&gt;
&lt;p&gt;And just to make sure I&amp;#8217;m not making any forward progress, I&amp;#8217;ve switched back to emacs for 2012. Now my buffers are full of &amp;#8220;jjjj&amp;#8221; and &amp;#8220;kkkk&amp;#8221;&amp;#8230;&lt;/p&gt;
&lt;p&gt;* I do &lt;a title="Old #lisp logs - now discontinued" href="http://blog.splittist.com/2009/04/30/old-lisp-logs/"&gt;this&lt;/a&gt; a lot, don&amp;#8217;t I?&lt;/p&gt;</description>
	
	<pubDate>Tue, 31 Jan 2012 14:24:58 GMT</pubDate>
</item>

<item>
	<title>Russ Tyndall: I Published My Common Lisp Docstring Search Engine</title>
	<guid isPermaLink="true">http://russ.unwashedmeme.com/blog/?p=391</guid>
	<link>http://russ.unwashedmeme.com/blog/?p=391</link>
	
	<description>&lt;p&gt;My Common Lisp documentation search engine has been published to &lt;a href="http://lisp-search.acceleration.net"&gt;http://lisp-search.acceleration.net&lt;/a&gt;. In a &lt;a href="http://russ.unwashedmeme.com/blog/?p=385"&gt;previous post&lt;/a&gt; I wrote about using the montezuma full-text search engine to build an index of documentation available from within my common lisp runtime.  I ended up going the extra mile on this one and indexing all of the documentation available for all of the packages in quicklisp (as well as readme files and other packages that sbcl had already loaded).  The result is a 90M search index (4M tar.gz) that can be used search through all of the doc strings of all of the easily loadable packages.&lt;/p&gt;

&lt;p&gt;The user interface is a bit clunky,  searches don't always return the most relevant results first, but it is live, fast, and seems already useful.  Perhaps with some help from the internet, this search engine can reach its full potential. I named the software package that does this manifest-search-web, because it was inspired by gigamonkey's manifest project.  I still have not come up with a reasonable name for the published search engine (lisp-search seems a touch blasé and under-descriptive).
&lt;/p&gt;

&lt;p&gt; Hopefully, I will never again spend time writing a library only to find the already written, open source alternative after I publish mine. Also, perhaps this will inspire better doc-strings, now that doc-strings might be what leads to someone finding your project.
&lt;/p&gt;


&lt;p&gt;Other things todo: 
&lt;ul&gt;&lt;li&gt;Integrate manifest-search with slime&lt;/li&gt;
&lt;li&gt;Have the documentation index be distributable in quicklisp (not sure how to do that efficiently)&lt;/li&gt;
&lt;li&gt;Find a way to unify CLIKI, l1sp.org, lisp-search and other lisp documentation resources into a more cohesive single website / search&lt;/li&gt;
&lt;li&gt;Improve the query language to ensure that it behaves according to user expectations as opposed to lucene expectations&lt;/li&gt;
&lt;/ul&gt;

As always, &lt;a href="https://github.com/AccelerationNet/manifest-search-web/issues"&gt;please report bugs and make   suggestions&lt;/a&gt; for improvements. Cheers and happy lisping.
&lt;/p&gt;</description>
	
	<pubDate>Mon, 30 Jan 2012 21:13:38 GMT</pubDate>
</item>

<item>
	<title>Tamas K Papp: cl-cairo2: new maintainer, new license</title>
	<guid isPermaLink="true">http://tkpapp.blogspot.com/2012/01/cl-cairo2-new-maintainer-new-license.html</guid>
	<link>http://tkpapp.blogspot.com/2012/01/cl-cairo2-new-maintainer-new-license.html</link>
	
	<description>&lt;p&gt;&lt;a href="http://www.cliki.net/cl-cairo2"&gt;cl-cairo2&lt;/a&gt; was one of the first Common Lisp libraries I wrote, but I haven't been using it much for the last year or so (currently I am experimenting with &lt;a href="http://www.cliki.net/CL-PDF"&gt;cl-pdf&lt;/a&gt; as a backend for my new plotting library, which will be released soon).  I have been pretty busy with research, so I didn't have time to merge (and test) patches, also, I didn't even contemplate updating the library to make use of the latest version of &lt;a href="http://cairographics.org/"&gt;cairo&lt;/a&gt;.  So when &lt;a href="https://github.com/rpav"&gt;Ryan Pavlik&lt;/a&gt; contacted me about adding compatibility with &lt;a href="https://github.com/rpav/cl-freetype2"&gt;cl-freetype2&lt;/a&gt;, I asked him whether he wants to take over as a maintaner.  He kindly agreed, so I have transferred the &lt;a href="https://github.com/rpav/cl-cairo2"&gt;repository&lt;/a&gt; to him, and he already merged a lot of patches.
&lt;/p&gt;
&lt;p&gt;
One last thing that I wanted to fix before handing the repository over is the license.  Originally, the library was licensed under the GPL &amp;mdash; in retrospect, I think that
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I was very naive about software licenses, and didn't really understand what GPL means in the context if Common Lisp (I still don't claim that I do :-P), and
&lt;/li&gt;
&lt;li&gt;I didn't realize that there are a lot of commercial applications in the Common Lisp world, whose authors are wary of depending on GPL'ed libraries.
&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;
Consequently, I received many complaints about the license of the library, and decided to change it.  I picked the &lt;a href="http://www.boost.org/users/license.html"&gt;Boost Software License&lt;/a&gt;, and contacted all who contributed to the library for permission.  All contributors approved the change, so now the library has &lt;a href="http://www.gnu.org/licenses/license-list.html#boost"&gt;a simple, permissive non-copyleft free software license&lt;/a&gt;.  However, it is always possible that I missed someone, so &lt;b&gt;if you contributed to cl-cairo2 in the past but didn't hear from me regarding the license change, please get in touch&lt;/b&gt; (eg via the Github &lt;a href="https://github.com/rpav/cl-cairo2/issues"&gt;issue tracker&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
I would like to thank (in alphabetical order) Ala'a Mohammad Alawi, Jay Bromley, Pau Fernández, Johann Korndoerfer, Peter Mikula, and especially Kei Suzuki (who did the last major reorganization) for their contributions to the library (again, I apologize if I missed anyone).  I would also like to thank Ryan for taking over &amp;mdash; I am convinced that the library is in good hands.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/5966353302263378647-5478554361857492091?l=tkpapp.blogspot.com" alt="" /&gt;&lt;/div&gt;</description>
	
	<pubDate>Thu, 26 Jan 2012 09:12:00 GMT</pubDate>
</item>

<item>
	<title>ABCL Dev: Closing in on CLOSER-MOP in abcl-1.1.0-dev</title>
	<guid isPermaLink="true">http://abcl-dev.blogspot.com/2012/01/closing-in-on-closer-mop-in-abcl-110.html</guid>
	<link>http://abcl-dev.blogspot.com/2012/01/closing-in-on-closer-mop-in-abcl-110.html</link>
	
	<description>&lt;div dir="ltr"&gt;In response to inquiries recently on #abcl (from @loke among others), we'd like to point out that recent work on the &lt;a href="http://trac.common-lisp.net/armedbear/timeline"&gt;Armed Bear trunk&lt;/a&gt;--what will be &lt;a href="http://trac.common-lisp.net/armedbear/milestone/1.1.0"&gt;abcl-1.1-&lt;/a&gt;-by &lt;a href="http://article.gmane.org/gmane.lisp.armedbear.devel/2166"&gt;Rudi&lt;/a&gt;&amp;nbsp;has started to converge on a plausible AMOP strategy. &amp;nbsp;Stay tuned.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/4235439971837126416-7497101764971053727?l=abcl-dev.blogspot.com" alt="" /&gt;&lt;/div&gt;</description>
	
	<pubDate>Tue, 24 Jan 2012 22:32:00 GMT</pubDate>
</item>

<item>
	<title>Andy Hefner: Piddling Plugins</title>
	<guid isPermaLink="true">http://ahefner.livejournal.com/19770.html</guid>
	<link>http://ahefner.livejournal.com/19770.html</link>
	
	<description>&lt;p&gt;The &lt;a href="https://github.com/ahefner/shuffletron" rel="nofollow"&gt;Shuffletron&lt;/a&gt; music player, in various branches, has accumulated some neat features (particularly &lt;a href="http://last.fm" rel="nofollow"&gt;last.fm&lt;/a&gt; scrobbling in &lt;a href="https://github.com/redline6561/shuffletron" rel="nofollow"&gt;Brit Butler's&lt;/a&gt; branch) that deserve merging, and ought to be cleanly separated from the core of the program. Leslie Polzer sent me a novel implementation early on which used generic functions for extensibility, adding/removing methods via the MOP as plugins load/unload. Clever as that was (and I'm impressed how little code is required, rereading the patch now), I wasn't comfortable with it, and the lack of a pressing need for a plugin interface let me put it off for a good long while.&lt;/p&gt;

&lt;p&gt;Building extensibility around generic functions seemed the right thing to do though, and a slightly different idea, of writing plugins in the style of mixins and calling CHANGE-CLASS to enable them at runtime, stuck in the back of my head until (with some prodding) I was motivated to try it out. It's hardly a new idea (both Gsharp and McCLIM contain implementations of similar ideas, as does the AMOP book, just to name a few examples), and a minimal implementation doesn't take much code at all:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defvar *configurations* (make-hash-table :test 'equal))

(defun configuration (plugins)
  (or (gethash plugins *configurations*)
      (setf (gethash plugins *configurations*)
            (make-instance 'standard-class
                           :name (format nil "MY-APPLICATION~{/~A~}" plugins)
                           :direct-superclasses (cons (find-class 'my-application)
                                                      (mapcar #'find-class plugins))))))

(defun reconfigure (application plugins &amp;rest; initargs)
  (apply #'change-class application (configuration plugins) initargs))

(defun active-plugins (instance)
  (mapcar #'class-name (rest (sb-mop:class-direct-superclasses (class-of instance)))))

(defun enable-plugin (application plugin &amp;rest; initargs)
  (apply #'reconfigure application (adjoin plugin (active-plugins application)) initargs))

(defun disable-plugin (application plugin)
  (reconfigure application (remove plugin (active-plugins application))))

(defun make-application (&amp;rest; initargs)
  (apply 'make-instance (configuration '()) initargs))&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This isn't an ideal implementation, and there's a limit to how good it's going to get when CLOS doesn't fully support anonymous classes. However, a more serious attempt should work on arbitrary classes, provide a place to hang init/shutdown code for plugins, and the ability to list which plugins are enabled within an instance.&lt;/p&gt;

&lt;h2&gt;Piddling Plugins&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/ahefner/piddling-plugins" rel="nofollow"&gt;Piddling-plugins&lt;/a&gt; adds these features using only slightly more code than above, along with some superfluous macro magic for writing defun-style definitions that are extensible by plugins. I've made light use of it in a branch of Shuffletron, confirming to myself that it's a good fit.&lt;/p&gt;
&lt;p&gt;The code is tiny and self-explanatory, so I'll just post the examples from the README file for fun.&lt;/p&gt;

&lt;h2&gt;Examples&lt;/h2&gt;

&lt;p&gt;Imagine we have written a music player, looking something like this deliberately simplified code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(defclass music-player () ())

(defun run-music-player ()
  ;; You need to set or bind *application* to your application instance
  ;; if you use defun-extensible. It's a good idea even if you don't.
  (let ((*application* (make-instance 'music-player)))
    (init-audio)
    (init-library *application*)
    (loop (execute-command (read-line)))))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Functions extensible by plugins can be defined using &lt;code&gt;DEFUN-EXTENSIBLE&lt;/code&gt;.
This is just syntactic sugar for defining a generic function specialized
on the application object, with a wrapper that passes in the value of &lt;code&gt;*APPLICATION*&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(defun-extensible execute-command (command)
  ...)

(defun-extensible play-song (song)
  ...)

(defun-extensible song-finished (song)
  ...)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Plugins extend the behavior of the application by defining methods on the extensible functions (or rather the generic functions defined behind the scenes, which are prefixed by "EXTENDING-"):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(defclass scrobbler ()
  ((auth-token :accessor auth-token)))

(defmethod plugin-enabled (app (plugin-name (eql 'scrobbler)) &amp;amp;key &amp;amp;allow-other-keys)
  (setf (auth-token app) (get-auth-token))
  (format t "~&amp;amp;Scrobbler enabled.~%"))

(defmethod plugin-disabled (app (plugin-name (eql 'scrobbler)))
  (format t "~&amp;amp;Scrobbler disabled.~%"))

(defmethod extending-song-finished :after ((plugin scrobbler) song)
  (scrobble song (auth-token plugin)))

(defclass status-bar () ())

(defmethod extending-play-song :after ((plugin status-bar) song)
  (redraw-status-bar))

(defmethod extending-execute-command :after ((plugin status-bar) command-line)
  (declare (ignore command-line))
  (redraw-status-bar))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To enable a plugin:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(enable-plugin *application* NAME [INITARGS...])
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To disable a plugin:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(disable-plugin *application* NAME)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To set precisely which plugins are enabled:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(reconfigure *application* LIST-OF-PLUGINS [INITARGS...])
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;References&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Strandh R., Hamer J., Baumann G. "Using Stealth Mixins to Achieve Modularity" (2007)
&lt;ul&gt;
&lt;li&gt;Implentation in Gsharp: &lt;a href="http://common-lisp.net/cgi-bin/gitweb.cgi?p=projects/gsharp/gsharp.git;a=blob;f=utilities.lisp" rel="nofollow"&gt;http://common-lisp.net/cgi-bin/gitweb.cgi?p=projects/gsharp/gsharp.git;a=blob;f=utilities.lisp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;"Modes" implementation in McCLIM's ESA framework (formerly part of Climacs)
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://git.boinkor.net/gitweb/mcclim.git/blob/HEAD:/ESA/utils.lisp#l446" rel="nofollow"&gt;http://git.boinkor.net/gitweb/mcclim.git/blob/HEAD:/ESA/utils.lisp#l446&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Throwaway classes (comp.lang.lisp): &lt;a href="http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/78ef4a5fcd6a1661?pli=1" rel="nofollow"&gt;http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/78ef4a5fcd6a1661?pli=1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The Art of the Metaobject Protocol, Section 2.4
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.foldr.org/~michaelw/lisp/amop-programmatic-class.lisp" rel="nofollow"&gt;http://www.foldr.org/~michaelw/lisp/amop-programmatic-class.lisp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;ContextL - &lt;a href="http://common-lisp.net/project/closer/contextl.html" rel="nofollow"&gt;http://common-lisp.net/project/closer/contextl.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Dynamic Classes - &lt;a href="http://common-lisp.net/project/dynamic-classes/" rel="nofollow"&gt;http://common-lisp.net/project/dynamic-classes/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
	
	<pubDate>Mon, 23 Jan 2012 12:15:37 GMT</pubDate>
</item>

<item>
	<title>Zach Beane: ZS3 updates</title>
	<guid isPermaLink="true">http://xach.livejournal.com/300745.html</guid>
	<link>http://xach.livejournal.com/300745.html</link>
	
	<description>I updated &lt;a href="http://www.xach.com/lisp/zs3/"&gt;ZS3&lt;/a&gt;, my CL library for interacting with Amazon S3,&amp;nbsp;with a few new features.&lt;br /&gt;&lt;br /&gt;First, there's support for S3's new multi-object deletion system. In the past, S3 required one API call per object to delete stuff. Now you can delete up to 1000 objects with a single call, and ZS3's existing &lt;a href="http://www.xach.com/lisp/zs3/#delete-objects"&gt;delete-objects&lt;/a&gt; function has been updated to use the new interface and will automatically split up the objects to be deleted into groups of 1000 as needed.&lt;br /&gt;&lt;br /&gt;Multi-object deletion can be a big deal, since each API call costs money.&lt;br /&gt;&lt;br /&gt;Second, there's support for the &amp;quot;reduced redundancy&amp;quot; storage class. Reduced redundancy storage is less durable than standard storage, and it comes with a corresponding reduction in cost. You can choose reduced redundancy when using &lt;a href="http://www.xach.com/lisp/zs3/#put-object"&gt;put-object&lt;/a&gt; or related functions, or set the storage class after the fact with &lt;a href="http://www.xach.com/lisp/zs3/#set-storage-class"&gt;set-storage-class&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Third, there's support for automatic object expiration, aka bucket lifecycle configuration. With bucket lifecycle rules you can specify that objects with names that match a certain prefix expire after a certain period of time. You can change a bucket's lifecycle configuration with &lt;a href="http://www.xach.com/lisp/zs3/#bucket-lifecycle"&gt;bucket-lifecycle&lt;/a&gt; and related functions.&lt;br /&gt;&lt;br /&gt;Automatic expiration of objects is another way to save money on API calls. If objects are deleted automatically, you don't need to use any API calls at all to get rid of them.&lt;br /&gt;&lt;br /&gt;Please let me know if there's an S3 feature you really want to see in ZS3. I feel like I'm on a roll and would love to add some more stuff that people need.</description>
	
	<pubDate>Sat, 21 Jan 2012 15:35:57 GMT</pubDate>
</item>

<item>
	<title>Vladimir Sedach: Upcoming presentation about Parenscript</title>
	<guid isPermaLink="true">http://carcaddar.blogspot.com/2012/01/upcoming-presentation-about-parenscript.html</guid>
	<link>http://carcaddar.blogspot.com/2012/01/upcoming-presentation-about-parenscript.html</link>
	
	<description>I'm going to be giving a talk about &lt;a href="http://common-lisp.net/project/parenscript/"&gt;Parenscript&lt;/a&gt; to the &lt;a href="http://www.meetup.com/Montreal-Scheme-Lisp-Users-Group/"&gt;Montreal Scheme/Lisp Users Group&lt;/a&gt; on Thursday, January 19 (meeting details &lt;a href="http://www.meetup.com/Montreal-Scheme-Lisp-Users-Group/events/46269562/"&gt;here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;The slides I'm going to be using are &lt;a href="https://sites.google.com/site/vsedach/parenscript_mslug.pdf"&gt;here&lt;/a&gt;, and a list of links referenced in the talk is below. The &lt;a href="http://carcaddar.blogspot.com/2007/09/lisping-in-nyc.html"&gt;last time&lt;/a&gt; I gave a presentation on Parenscript was to &lt;a href="http://www.lispnyc.org/"&gt;LispNYC&lt;/a&gt; in 2007. Parenscript has received a huge number of changes and improvements since then, and continues to be the best language/compiler to JavaScript and one of the best tools available for web application development. What's also new since 2007 are libraries and tools that extend Parenscript: &lt;a href="https://github.com/gonzojive"&gt;Red Daly&lt;/a&gt; has added CLOS and the Common Lisp condition system to JavaScript as a Parenscript library, and there are now several options for interactive development with SLIME in your browser.&lt;br /&gt;&lt;br /&gt;Links:&lt;ul&gt;&lt;li&gt;&lt;a href="http://common-lisp.net/project/parenscript/"&gt;Parenscript&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://ceaude.twoticketsplease.de/js-lisps.html"&gt;Moritz Heidkamp's survey of Lisp-in-JavaScript implementations&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.kantz.com/jason/programs/jsgen/"&gt;Jason Kantz's JSGEN&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://github.com/gigamonkey/monkeylib-foo/blob/master/lispscript.lisp"&gt;Peter Seibel's Lispscript&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://github.com/gonzojive/paren-psos"&gt;Red Daly's PSOS&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Dumping_Grounds#Language"&gt;Catherine Gaudron and Marc Feeley's JavaScriptScheme Scheme to JavaScript compiler&lt;/a&gt;&lt;br /&gt;&lt;li&gt;Web frameworks: &lt;a href="http://bknr.net/html/home.html"&gt;BKNR&lt;/a&gt;, &lt;a href="http://common-lisp.net/project/ucw/"&gt;UCW&lt;/a&gt;, &lt;a href="http://weblocks.viridian-project.de/"&gt;Weblocks&lt;/a&gt;, &lt;a href="http://common-lisp.net/project/teepeedee2/"&gt;teepeedee2&lt;/a&gt;&lt;br /&gt;&lt;li&gt;Libraries: &lt;a href="http://common-lisp.net/project/suave/"&gt;Suave&lt;/a&gt;, &lt;a href="https://github.com/paddymul/css-lite"&gt;css-lite&lt;/a&gt;, &lt;a href="http://common-lisp.net/project/clouchdb/"&gt;clouchdb&lt;/a&gt;, &lt;a href="http://common-lisp.net/project/uri-template/"&gt;uri-template&lt;/a&gt;, &lt;a href="http://code.google.com/p/cl-closure-template/"&gt;cl-closure-template&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www-sop.inria.fr/indes/scheme2js/"&gt;Scheme2JS&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://lists.common-lisp.net/pipermail/parenscript-devel/2009-November/000641.html"&gt;Parenscript mailing list thread on multiple value return&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://blogs.bl0rg.net/netzstaub/2005/03/14/parenscript/"&gt;Manuel Odendahl's original Parenscript announcement&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://github.com/3b/slime-proxy"&gt;slime-proxy&lt;/a&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/5728814948530385321-7713321117787543613?l=carcaddar.blogspot.com" alt="" /&gt;&lt;/div&gt;</description>
	
	<pubDate>Thu, 19 Jan 2012 00:06:00 GMT</pubDate>
</item>

<item>
	<title>Paul Khuong: Migration and Synopsis</title>
	<guid isPermaLink="true">http://www.pvk.ca/Blog/2012/01/18/migration-and-synopsis/</guid>
	<link>http://www.pvk.ca/Blog/2012/01/18/migration-and-synopsis/</link>
	
	<description>&lt;p&gt;This blog has been going for five years.  Back then, it seemed like
the only widely-used static blog generators were
&lt;a href="http://www.blosxom.com/"&gt;Blosxom&lt;/a&gt; or
&lt;a href="http://pyblosxom.bluesock.org/"&gt;pyBlosxom&lt;/a&gt;.  They weren&amp;#8217;t that hard
to set up, but getting everything &lt;em&gt;right&lt;/em&gt; rather than good enough is a
lot of work.  Latex and MathML support was also very weak, so I wound
up using a (insane) one-off hack with
&lt;a href="http://tug.org/tex4ht/"&gt;tex4ht&lt;/a&gt;.  I feel like
&lt;a href="http://octopress.org/"&gt;Octopress&lt;/a&gt; and
&lt;a href="http://www.mathjax.org/"&gt;MathJax&lt;/a&gt; now do everything I need out of the
box, better than anything I could design by myself.&lt;/p&gt;

&lt;p&gt;The permalinks from the old blog are still around, but not the rss
feeds or the date-based links.&lt;/p&gt;

&lt;p&gt;I figure this is a good opportunity to make sure the (marginally
useful) permalinks are available somewhere else than via google.&lt;/p&gt;

&lt;h2&gt;Lisp-related posts&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/accumulating_data_in_vectors.html"&gt;Another way to accumulate data in vectors&lt;/a&gt;
describes a copying-free extendable vector.  The advantage over the
usual geometric growth with copy is that the performance with respect
to the number of elements added is much smoother.  Runtimes are then
more easily predictable, and sometimes improved (e.g. right when a
copy would be needed).  It&amp;#8217;s also more amenable to a lock-free
adaptation, while preserving O(1) operation complexity (assuming that
&lt;code&gt;integer-length&lt;/code&gt; on machine integers is constant time), as shown in
&lt;a href="http://www2.research.att.com/~bs/lock-free-vector.pdf"&gt;Dechev et al&amp;#8217;s &amp;#8220;Lock-free Dynamically Resizable Arrays&amp;#8221;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/CommonCold/"&gt;Common Cold&lt;/a&gt; is a really old
hack to get serialisable closures in SBCL, with serialisable
continuations built on top of that.  Nowadays, I&amp;#8217;d do the closure part
differently, without any macro or change to the source.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/concurrency_with_mvars.html"&gt;Concurrency with MVars&lt;/a&gt;
has short and simple(istic) code for
&lt;a href="http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Concurrent-MVar.html"&gt;mvars&lt;/a&gt;,
and uses it to implement same-fringe with threads.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/constraint-sets.html"&gt;Constraint sets in SBCL: preliminary exploration&lt;/a&gt;
summarises some statistics on how constraint sets (internal SBCL data
structures) are used by SBCL&amp;#8217;s compiler.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/flow_sensitive_analysis_in_sbcl.html"&gt;SBCL&amp;#8217;s flow sensitive analysis pass&lt;/a&gt;
explores what operations on constraint sets actually mean.  This,
along with the stats from the previous post, guided a rewrite, not of
constraint sets, but of the analysis pass that uses them.  The
frequency of slow operations or bad usage patterns is reduced enough
to take care of most (all?) performance regression associated with
the original switch to bit-vector-based constraint sets, without
penalising the common case.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/finalizing_foreign_pointers_just_late_enough.html"&gt;Finalizing foreign pointers just late enough&lt;/a&gt;
is a short reminder that attaching finalizers to system area pointers
isn&amp;#8217;t a good idea: SAPs are randomly unboxed and consed back, like
numbers.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/hacking_SSE_intrinsics-part_1.html"&gt;Hacking SSE Intrinsics in SBCL (part 1)&lt;/a&gt;
walks through an SBCL branch that adds support for SSE operations.
Alexander Gavrilov has kept a fork on life support
&lt;a href="https://github.com/angavrilov/sbcl-old"&gt;on github&lt;/a&gt;.  There&amp;#8217;s still no
part 2, in which the branch is polished enough to merge it in the
mainline.&lt;/p&gt;

&lt;p&gt;In the meantime,
&lt;a href="http://pvk.ca/Blog/Lisp/SSE_complexes.html"&gt;Complex float improvements for sbcl 1.0.30/x86-64&lt;/a&gt;
built upon the original work on SSE intrinsics to implement operations
on &lt;code&gt;(complex single-float)&lt;/code&gt; and &lt;code&gt;(complex double-float)&lt;/code&gt; with SIMD
code on x86-64.  That sped up most complex arithmetic operations by
100%.  That work also came with support for references to unboxed
constants on x86oids; this significantly improved floating point
performance as well, for both real and complex values.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/modular-struct-initialisation.html"&gt;Initialising structure objects modularly&lt;/a&gt;
is a solution to a problem that I hit, trying to implement non-trivial
initialisation for structures, while allowing inheritance.  Tobias
Rittweiler points out that the protocol is very similar to a common
CLOS pattern where, instead of functions that allocate objects, class
designators are passed.  It also looks a bit like the way Factor
libraries seem to do struct initialisation, but with actual
initialisation instead of assignment (which matters for read-only
slots).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/persistent_dictionary.html"&gt;An Impure Persistent Dictionary&lt;/a&gt;
is an example of a technique I find really useful to implement
persistent versions of side-effectful data structures.  Henry Baker
has a &lt;a href="http://home.pipeline.com/~hbaker1/ShallowArrays.html"&gt;paper&lt;/a&gt;
that shows how shallow binding can be used to implement persistent
arrays on top of functional arrays, with constant-time overhead for
operations on the latest version.  It&amp;#8217;s a really nice generalisation
of trailing in backtracking searches.  Here, I use it to get
persistent hash tables in only a couple dozen lines of code.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/Pipes/"&gt;Pipes&lt;/a&gt; is an early attempt to develop
a DSL for stream processing, like an 80%
&lt;a href="http://series.sourceforge.net/"&gt;SERIES&lt;/a&gt;.  I&amp;#8217;ve refocused my efforts
on &lt;a href="http://pvk.ca/Blog/Lisp/Xecto/"&gt;Xecto&lt;/a&gt;, which only handles
vectors, rather than potentially unbounded streams.  The advantage is
that Xecto looks like it has the potential to be simpler while
achieving near-peak performance to me; the main downside is that
vectors don&amp;#8217;t allow us to represent control flow as data via lazy
evaluation&amp;#8230; and I&amp;#8217;m not sure that&amp;#8217;s such a bad thing.&lt;/p&gt;

&lt;p&gt;The post on
&lt;a href="http://pvk.ca/Blog/Lisp/string_case_bis.html"&gt;string-case&lt;/a&gt; is an
overview of how I structured a CL macro to dispatch that compares with
&lt;code&gt;string=&lt;/code&gt; instead of &lt;code&gt;eql&lt;/code&gt;.  If I were to do this again, I&amp;#8217;d probably
try and improve &lt;code&gt;string=&lt;/code&gt;; I later tested an SSE comparison routine,
and it ended up being, in a lot of cases, faster and simpler (with a
linear search) than the search tree generated by &lt;code&gt;string-case&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pvk.ca/Blog/Lisp/type_lower_bound.html"&gt;The type-lower-bound branch&lt;/a&gt;
describes early work on a branch that provides a way to shut the
compiler up about certain failed type-directed optimisations.  A lot
of the output from SBCL&amp;#8217;s compiler amounts to reports of optimisations
that couldn&amp;#8217;t be performed (e.g. converting multiplication by a
constant power of two to a shift), and why (e.g. the variant argument
isn&amp;#8217;t known to be small enough).  Sometimes, there&amp;#8217;s nothing we can do
about it: we can&amp;#8217;t show the compiler that the argument is small enough
because we know that it will sometimes be too large!  Yet, CL&amp;#8217;s type
system (like most) does not let us express that information.
Programmers are expected to provide upper bounds on the best static
type of values (e.g. we can specify that a value is always a &lt;code&gt;fixnum&lt;/code&gt;,
although it may really only be integers between 0 and 1023).  We would
like a way to specify lower bounds as well: &amp;#8220;I know that this will
take arbitrary &lt;code&gt;fixnum&lt;/code&gt; values.&amp;#8221;  Once we have that, the compiler can
skip reporting optimisations that we know can&amp;#8217;t be performed (as
opposed to those we don&amp;#8217;t know whether they can be performed).&lt;/p&gt;

&lt;p&gt;Finally,
&lt;a href="http://pvk.ca/Blog/Lisp/yet_another_way_to_fake_continuations.html"&gt;Yet another way to fake continuations&lt;/a&gt;
sketches a simple but somewhat inefficient way to implement
continuations for pure programs.  It may be useful for IO-heavy
applications (web programming), or in certain cases similar to
backtracking search, but in which most of the work is performed
outside of backtracking (e.g. during constraint propagation).&lt;/p&gt;

&lt;h2&gt;General low-level programming issues&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.pvk.ca/Blog/LowLevel/SWAR-some-zerop.html"&gt;SWAR implementation of (some #&amp;#8217;zerop &amp;#8230;)&lt;/a&gt;
sketches how we can use SIMD-within-a-register techniques to have fast
search for patterns of sub-word size.  A degenerate case is when we
look for 0 or 1 in bit vectors; in these case, it&amp;#8217;s clear how we can
test whole words at a time.  The idea can be extended to testing
vectors of 2, 4, 8 (or any size) -bit elements.  I haven&amp;#8217;t found time
to move this in SBCL&amp;#8217;s runtime library (yet), but it would probably
be a neat and feasible first project.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pvk.ca/Blog/LowLevel/VM_tricks_safepoints.html"&gt;Revisiting VM tricks for safepoints&lt;/a&gt;
explores the performance impact of switching from instrumented
pseudo-atomic code sequences to safepoints.  The bottom line is that
it&amp;#8217;s noise.  However, some members of the russian Lisp mafia have used
it as inspiration, and have managed to implement seemingly solid
&lt;a href="https://github.com/akovalenko/sbcl-win32-threads/wiki"&gt;threaded SBCL on Windows&lt;/a&gt;!
It&amp;#8217;s still a third-party fork for now, but some committers are working
on merging it with the mainline.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pvk.ca/Blog/LowLevel/fast-integer-division.html"&gt;Fast Constant Integer Division&lt;/a&gt;
has some stuff on integer division by constants.  It&amp;#8217;s mostly
superseded by Lutz Euler&amp;#8217;s work to implement the same algorithm as
GCC.  There are some interesting identities that can be used to
improve on that algorithm a tiny bit and, more interestingly, to
implement truncated multiplication by arbitrary fractions.  I only
stumbled upon those a long time after I wrote the post; I&amp;#8217;ll try and
come back to this topic in the coming months.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pvk.ca/Blog/LowLevel/more_to_locality_than_cache.html"&gt;There&amp;#8217;s more to locality than caches&lt;/a&gt;
tracks my attempts to understand why a data structure designed to be
cache-efficient did not perform as well as expected.  It turns out
that cache lines aren&amp;#8217;t exactly read atomically (so reading two
adjacent addresses may be significantly slower than only one), and
that sometimes L2 matters less than TLB.  The latter point was an
important lesson for me.  TLBs are used to accelerate the translation
of virtual addresses to physical; &lt;em&gt;every&lt;/em&gt; memory access must be
translated.  TLBs are usually fully associative (behave like
content-addressed memory or hash tables, basically), but with a small
fixed size, on the order of 512 pages for the slower level.  With
normal (on x86oids) 4KB pages, that&amp;#8217;s only enough for 2 MB of data!
Even worse: a cache miss results in a single access to main memory,
which is equivalent to ~60-100 cycles at most; a TLB miss, however,
results in a lookup in a 4 level page table on x86-64, which often
takes on the order of 2-300 cycles.  Luckily, there are workarounds,
like using 2 MB pages.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pvk.ca/Blog/LowLevel/napa-fft2-implementation-notes.html"&gt;Napa-FFT(2) implementation notes&lt;/a&gt;
is where I try to make the code I wrote for a Fast Fourier transform
understandable, especially &lt;em&gt;why&lt;/em&gt; it does what it does.  Napa-FFT and
Napa-FFT2 are vastly faster than Bordeaux-FFT (and than all other CL
FFT codes I know, on SBCL), but it&amp;#8217;s still around 20-50% slower than
the usual benchmark, FFTW.  Napa-FFT3 is coming, and it&amp;#8217;s a completely
different approach which manages to be within a couple percent points
of FFTW, and is faster on some operations.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pvk.ca/Blog/LowLevel/software-reciprocal.html"&gt;0x7FDE623822FC16E6 : a magic constant for double float reciprocal&lt;/a&gt;
is a surprisingly popular post.  I was trying to approximate
reciprocals as fast as possible for a mathematical optimization
method.  The usual way to do that is to use a hardware-provided
approximation and then improve it with a couple iterations of Newton&amp;#8217;s
method.  The post shows how we can instead use the way floats are laid
out in memory to provide a surprisingly accurate guess with an integer
subtraction.  I actually think the interesting part was that it made
for a practical use case for the golden section search&amp;#8230;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pvk.ca/Blog/LowLevel/some-notes-on-warren.html"&gt;Some notes on Warren&lt;/a&gt;
has a couple notes about stuff in Warren&amp;#8217;s book
&lt;a href="http://www.hackersdelight.org/"&gt;Hacker&amp;#8217;s Delight&lt;/a&gt;.  The sign
extension bit probably deserves more attention; it seems like someone
on #lisp asks how they can sign-extend unsigned integers at least once
a month.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pvk.ca/Blog/LowLevel/two-neat-tricks.html"&gt;Two variations on old themes&lt;/a&gt;
has some stuff on Linux&amp;#8217;s ticket spinaphores, and is the beginning of
my looking into Robin Hood hashing with linear probing for
cache-friendly hash tables.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pvk.ca/Blog/numerical_experiments_in_hashing.html"&gt;Interlude: Numerical experiments in hashing&lt;/a&gt;
covers a first stab at designing a hash table that exploits cache
memory.  2-left hashing looks interesting, but its performance was
worse than expected, for various reasons, mostly related to the fact
that caches can be surprisingly complicated.  Two years later,
&lt;a href="http://www.pvk.ca/Blog/more_numerical_experiments_in_hashing.html"&gt;More numerical experiments in hashing: a conclusion&lt;/a&gt;
revisits the question, and settles on Robin Hood hashing with linear
probing.  It&amp;#8217;s a tiny tweak to normal open addressing (insertions can
bump previously-inserted items farther from their insertion point),
but it suffices to greatly improve the worst and average probing
length, while preserving the nice practical characteristics of linear
probing.  I&amp;#8217;ve also started some work on implementing SBCL&amp;#8217;s hash
table this way, but there are practical issues with weak hash
functions, GC and mutations.&lt;/p&gt;

&lt;h2&gt;Miscellaneous stuff&lt;/h2&gt;

&lt;p&gt;In
&lt;a href="http://www.pvk.ca/Blog/Coding/deadline-vs-timeout.html"&gt;Specify absolute deadlines, not relative timeouts&lt;/a&gt;
and
&lt;a href="http://www.pvk.ca/Blog/Coding/deadline-vs-timeout-part-2.html"&gt;the sequel&lt;/a&gt;,
I argue that we should have interfaces that allow users to specify an
absolute timeout, with respect to a monotonic clock.  Timeouts are
convenient, but don&amp;#8217;t compose well: how do we implement a timeout
version of an operation that sequences two calls to functions that
only offer timeouts as well?  Any solution will be full of race
conditions.  PHK disagrees; I&amp;#8217;m not sure if all of his complaints can
be addressed by using a monotonic clock.&lt;/p&gt;

&lt;p&gt;Finally,
&lt;a href="http://www.pvk.ca/Blog/Implementation/SSA_in_practices.html"&gt;Space-complexity of SSA in practices&lt;/a&gt;
has some early thoughts on how Static single assignment scales for
typical functional programs.  It&amp;#8217;s fairly clear that many compilers
for functional languages have inefficient (wrt to compiler
performance) internal representations; however, it&amp;#8217;s not as clear that
the industry standard, SSA, would fare much better.&lt;/p&gt;</description>
	
	<pubDate>Wed, 18 Jan 2012 23:56:00 GMT</pubDate>
</item>


</channel>
</rss>

