<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="http://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:lhealy</id>
  <title>Liam Healy</title>
  <subtitle>Liam Healy</subtitle>
  <author>
    <name>Liam Healy</name>
  </author>
  <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/"/>
  <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom"/>
  <updated>2008-05-03T23:42:39Z</updated>
  <lj:journal username="lhealy" type="personal"/>
  <link rel="service.feed" type="application/x.atom+xml" href="http://lhealy.livejournal.com/data/atom" title="Liam Healy"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:10615</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/10615.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=10615"/>
    <title>SBCL in Debian testing (lenny)</title>
    <published>2008-05-03T23:42:39Z</published>
    <updated>2008-05-03T23:42:39Z</updated>
    <category term="lisp"/>
    <category term="debian"/>
    <content type="html">Recently I noticed that SBCL in Debian testing is quite old; it is currently at 0.9.16 and evidently blocked there:&lt;br /&gt;&lt;pre&gt;
=== sbcl:
= Missing build(s) on alpha,sparc
 This might need manual action from your side.
 See http://buildd.debian.org/pkg.cgi?pkg=sbcl
= No migration to testing for 585 days.
 See &amp;lt;http://release.debian.org/migration/testing.pl?package=sbcl&amp;gt;
&lt;/pre&gt;&lt;br /&gt;I have tried to &lt;a href="http://lists.alioth.debian.org/pipermail/pkg-common-lisp-devel/2008-April/000553.html"&gt;stir the pot&lt;/a&gt;, and there has been some progress.  This version of testing will release as lenny in the fall, and it would be a shame if it released with such an old version of SBCL.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:10463</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/10463.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=10463"/>
    <title>Cairo for Lisp</title>
    <published>2008-03-22T13:22:03Z</published>
    <updated>2008-03-22T21:47:40Z</updated>
    <category term="lisp"/>
    <category term="graphics"/>
    <content type="html">&lt;p&gt;I have been looking into using &lt;a href="http://cairographics.org/"&gt;Cairo&lt;/a&gt; for various 2D drawing needs.  A key advantage is the availability of a variety of output formats, including both screen and hardcopy.  One potential application is traditional x-y scientific/engineering plots.  Although there are many options for doing that, even using Lisp, I have a Lisp package I adapted many years ago for this purpose that now lacks a good back end for output.  My thought is that Cairo would be good for that, as it is a standardized library, widely available, with many modern output formats.  I also have other 2D output that I do from Lisp, which I now do with a thin postscript definition layer that I wrote.  Switching to Cairo would give me some more flexibility.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I did some research and found that there were &lt;i&gt;three&lt;/i&gt; sets of bindings for Cairo:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;cl-cairo&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://common-lisp.net/project/cl-cairo2/"&gt;cl-cairo2&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.cliki.net/cffi-cairo"&gt;cffi-cairo&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;The first, cl-cairo, despite being linked from the cairographics web page, appeared to be dead.  I found the author, Lars Nostdal, on #lisp who said the project was no longer active, so with his permission I modified the &lt;a href="http://cairographics.org/bindings/"&gt;Cairo bindings page&lt;/a&gt; to mention cl-cairo2 and cffi-cairo and remove cl-cairo.  cl-cario2, from Tamás K Papp, seems more active, but I had trouble getting it to run; I've &lt;a href="http://common-lisp.net/pipermail/cl-cairo2-devel/2008-March/000015.html"&gt;posted my problems&lt;/a&gt; and am awaiting a response.  Finally, I tried cffi-cairo from chriss.  It did not compile, but it was easy to fix the problem: the CFFI interface has changed, defctype no longer has a :translate-p argument. With a slight modification, the example &lt;br /&gt;&lt;code&gt;(run-snippet-png '(:clip :clip-image))&lt;/code&gt; ran and produces PNG files that looked correct.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;It looks like I'll be using cffi-cairo.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:10022</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/10022.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=10022"/>
    <title>Never a NaN or Inf</title>
    <published>2008-03-08T20:12:34Z</published>
    <updated>2008-03-11T02:06:48Z</updated>
    <category term="floating point"/>
    <category term="lisp"/>
    <category term="fortran"/>
    <category term="c"/>
    <content type="html">&lt;p&gt;In very few cases is it acceptable to me that a floating-point calculation would produce NaN or Inf; it almost always means that there is an error somewhere in my program.  Following the principle that it is best to detect an error as soon as possible, I would like to know immediately whenever either of these is created, by trapping the exception and signaling an error.  Depending on the language and implementation, this doesn't always happen by default. Here are some different languages and compilers, and how to set to make this happen:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Lisp: &lt;a href="http://www.sbcl.org/"&gt;SBCL&lt;/a&gt;:  &lt;code&gt;(sb-int:set-floating-point-modes :traps '(:invalid :divide-by-zero :overflow)) and &lt;br /&gt;&lt;/code&gt;&lt;a href="http://www.cons.org/cmucl/"&gt;CMUCL&lt;/a&gt;:  &lt;code&gt;(&lt;a href="http://common-lisp.net/project/cmucl/doc/cmu-user/extensions.html#@funs12"&gt;ext:set-floating-point-modes&lt;/a&gt; :traps '(:invalid :divide-by-zero :overflow))&lt;/code&gt;.&lt;br /&gt;Also &lt;a href="http://common-lisp.net/project/gsll/"&gt;GSLL&lt;/a&gt; provides &lt;code&gt;#'set-floating-point-modes&lt;/code&gt;.&lt;br /&gt;&lt;li&gt;Fortran: for &lt;a href="http://gcc.gnu.org/onlinedocs/gcc-4.2.3/gfortran/"&gt;gfortran&lt;/a&gt;, use the compiler flag &lt;a href="http://gcc.gnu.org/onlinedocs/gcc-4.2.3/gfortran/Debugging-Options.html#Debugging-Options"&gt;&lt;code&gt;-ffpe-trap=invalid,zero,overflow&lt;/a&gt;.&lt;br /&gt;&lt;li&gt;C/C++: use &lt;br /&gt;&lt;pre&gt;
#include &amp;lt;fenv.h&amp;gt;
trapfpe () {
  &lt;a href="http://www.gnu.org/software/libc/manual/html_node/Control-Functions.html"&gt;feenableexcept&lt;/a&gt;(&lt;a href="http://www.gnu.org/software/libc/manual/html_node/Status-bit-operations.html#Status-bit-operations"&gt;FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW&lt;/a&gt;);
}
&lt;/pre&gt;&lt;br /&gt;In C, this will need to be included: &lt;code&gt;void trapfpe();&lt;/code&gt; &lt;br /&gt;In C++, this will need to be included (also works for C):&lt;br /&gt;&lt;pre&gt;
#ifndef _TRAPFPE_H_
#define _TRAPFPE_H_

#include &amp;lt;sys/cdefs.h&amp;gt;

__BEGIN_DECLS
void trapfpe(void);
__END_DECLS

#endif /* _TRAPFPE_H_ */
&lt;/pre&gt;&lt;br /&gt;and then in either, include &lt;code&gt;trapfpe();&lt;/code&gt; at the beginning.  This should be portable to C99 compilers/libc but I've used only gcc and glibc.  Also, &lt;a href="http://www.gnu.org/software/gsl/"&gt;GSL&lt;/a&gt; has &lt;a href="http://www.gnu.org/software/gsl/manual/html_node/Setting-up-your-IEEE-environment.html"&gt;&lt;code&gt;gsl_ieee_env_setup&lt;/code&gt;&lt;/a&gt;.&lt;br /&gt;&lt;/ul&gt;&lt;/code&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:9795</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/9795.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=9795"/>
    <title>SBCL, libc6, and GCC</title>
    <published>2008-03-05T14:14:23Z</published>
    <updated>2008-03-05T14:14:23Z</updated>
    <category term="lisp"/>
    <category term="debian"/>
    <content type="html">&lt;p&gt;&lt;br /&gt;For those that don't follow the mailing list, &lt;a href="http://www.sbcl.org/"&gt;SBCL&lt;/a&gt; on &lt;a href="http://www.debian.org/"&gt;Debian&lt;/a&gt; is unusable in &lt;a href="http://www.debian.org/releases/unstable/"&gt;unstable&lt;/a&gt;.  SBCL did not change, but Debian upgraded &lt;a href="http://packages.debian.org/sid/libc6"&gt;libc6&lt;/a&gt; to 2.7-9.  This causes SBCL to spin at 100% usage, or simply to hang, while starting up.  The only relevant change to libc6 is that it is now compiled with GCC 4.3 instead of 4.2; the libc6 maintainer has confirmed that backing out this change and recompiling libc6 with GCC 4.2 allows SBCL to work.  It is still unclear where the problem(s) is/are; but the experts have narrowed it down further.  Follow the developments on the &lt;a href="http://bugs.debian.org/469058"&gt;Debian bug report&lt;/a&gt;; even if you don't use Debian, presumably this combination of software is a problem.  In the meantime, if you are a sid user, don't upgrade!  Though apparently some people have experienced the problem as a random failure, my experience is that it's 100% reproduceible.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Software is complicated.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:9716</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/9716.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=9716"/>
    <title>GNU Scientific Library for Lisp</title>
    <published>2008-02-24T23:40:55Z</published>
    <updated>2008-02-25T02:41:57Z</updated>
    <category term="lisp"/>
    <category term="gsl"/>
    <content type="html">The &lt;a href="http://www.gnu.org/software/gsl/"&gt;GNU Scientific Library&lt;/a&gt; is a library of applied mathemetics commonly used in science and engineering.  I have written &lt;a href="http://common-lisp.net/project/gsll/"&gt;GNU Scientific Library for Lisp (GSLL)&lt;/a&gt;, a fairly complete interface to this library from Common Lisp.  My intent is that the interface be as Lisp-natural as possible.  Though this will be useful for those of us that do scientific programming in Lisp, even those who aren't Lisp programmers might use this library as a desk-calculator interface to GSL.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:9325</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/9325.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=9325"/>
    <title>Comparison of floating point numbers in Common Lisp</title>
    <published>2008-01-26T19:22:10Z</published>
    <updated>2008-01-26T19:22:10Z</updated>
    <category term="floating point"/>
    <category term="lisp"/>
    <content type="html">&lt;p&gt;
   Floating point numbers are a computer representation of the real
   numbers.  Unlike the real numbers, there are a finite
   number of them.  So there is a smallest and largest floating point
   number, and all others have a predecessor and successor.
   &lt;p&gt;
   Because different compilers and platforms can reorder a calculation
   and optimize in a way that is approximated differently and so do
   not necessarily produce the same floating point number, it is
   difficult to compare two floating point numbers and conclude that
   they represent the same result.  For the purposes of regression (or
   unit) testing, we would like to do exactly this.  Bruce Dawson
   addressed this problem in "&lt;a href="http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm"&gt;Comparing
   Floating Point Numbers&lt;/a&gt;."  He makes the point that the best way
   to do this correctly is to interpret each floating point number as
   an integer.  By taking advantage of the &lt;a href="http://en.wikipedia.org/wiki/IEEE_floating-point_standard"&gt;IEEE
   754&lt;/a&gt; standard for representation of floating point numbers, we
   can construct a function that maps the floating point numbers to
   the integers.  The genius of the standard's inventor &lt;a href="http://http.cs.berkeley.edu/~wkahan/"&gt;W. Kahan&lt;/a&gt; is that a
   mapping derived from the standard, call it i(x), satisfies three
   properties:&lt;/p&gt;
   &lt;ul&gt;
   &lt;li&gt;If two floats a&amp;lt;b, then i(a)&amp;lt;i(b),
    &lt;li&gt;if two floats are adjacent and a&amp;lt;b, then i(b)=i(a)+1,&lt;/li&gt;
    &lt;li&gt;and finally i(0.0)=0.&lt;/li&gt;
   &lt;/ul&gt;
&lt;p&gt;
   Dawson provides some clever C constructs to read a floating point
   number as an integer, and instruction on how to prevent the
   compiler from complaining about your trickery in doing so.  Common
   Lisp instead provides us with
   functions with which we can properly construct our own integers.
   As a side benefit, we don't care what the &lt;i&gt;actual&lt;/i&gt;
   representation of the floating point number is; we will build our
   own IEEE-like representation.  We don't exactly want the full
   IEEE754 word though; we leave off the most significant bit, which is a sign
   bit, and instead make the sign of the integer agree with the
   sign of the float.&lt;/p&gt;
   &lt;p&gt;
What we end up with is an &lt;i&gt;enumeration of the floats&lt;/i&gt;.
   That is, for every single precision float, there is one integer in
   the range 
   [-2139095039, 2139095039], and vice versa, with the exception that
   both positive and negative zero (allowed by the standard) map to
   zero.  Likewise, there is a one-to-one mapping of the
    double precision floats to
   [-9218868437227405311,9218868437227405311].  Floats with
   special values (positive and negative infinity, and &lt;a href="http://en.wikipedia.org/wiki/NaN"&gt;NaN&lt;/a&gt;) that are required
   by the standard do not have integer values.
   &lt;p&gt;
   I have written &lt;a href="http://common-lisp.net/~lhealy/numerical/floating-point.lisp"&gt;the
   following functions&lt;/a&gt; in Common 
   Lisp: 
   &lt;ul&gt;
   &lt;li&gt;&lt;code&gt;float-as-integer&lt;/code&gt; which is the function i(x);&lt;/li&gt;
   &lt;li&gt;&lt;code&gt;integer-as-float&lt;/code&gt; which is the inverse function
   (this isn't necessary but can be useful) and
   also returns the rational form of the float;&lt;/li&gt;
   &lt;li&gt;&lt;code&gt;decode-IEEE754&lt;/code&gt; (used by other functions) that
   returns five values: 
   significand, exponent, sign, bits in significand, bits in
   exponent, all as integers;&lt;/li&gt;
   &lt;li&gt;&lt;code&gt;format-IEEE754-bits&lt;/code&gt; which prints out the
   binary form of the IEEE word, separated into the three parts
   (this isn't necessary but is nice for comparing with bit
   expansions shown in references like the Wikipedia page).&lt;/li&gt;
   &lt;/ul&gt;
   &lt;p&gt;
  Here are some interesting floats:
   &lt;pre&gt;
(float-as-integer most-negative-single-float)
-2139095039
(float-as-integer least-negative-single-float)
-1
(float-as-integer -0.0f0)
0
(float-as-integer 0.0f0)
0
(float-as-integer least-positive-single-float)
1
(float-as-integer (- 1.0f0 single-float-negative-epsilon))
1065353215
(float-as-integer 1.0f0)
1065353216
(float-as-integer (+ 1.0f0 single-float-epsilon))
1065353217
(float-as-integer most-positive-single-float)
2139095039
&lt;/pre&gt;
   &lt;p&gt;
   A regression test would record not the floating point number, but
   the integer produced by &lt;code&gt;float-as-integer&lt;/code&gt;.  Since
   integers can be unambiguously formatted to and read from a text
   file in a unique way, a subsequent recomputation would provide a
   clear indication of how close the floats are.  Of course, we must
   decide how much error we're going to allow, because a correct
   calculation may produce slightly different integers.  As an added
   bonus, these functions can be used to identify (in languages other
   than Lisp) when a positive single float has been interpreted as a
   double float.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:9056</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/9056.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=9056"/>
    <title>Multiprocessing lisp evaluations</title>
    <published>2008-01-22T23:01:15Z</published>
    <updated>2008-01-22T23:01:15Z</updated>
    <category term="lisp"/>
    <content type="html">I sometimes need to evaluate the same form with different parameters repeatedly.  Such as&lt;br /&gt;&lt;pre&gt;
(job 1)
(job 2)
(job 3)
...
&lt;/pre&gt;&lt;br /&gt;When these are time consuming, I'd like to take advantage of the two processors I have in my computer.  As the jobs are independent of each other (no communication), I only need to maintain a job queue, have each processor pick off the front of the queue, and then place the results in an accessible place before getting the next job.  Since &lt;a href="http://www.sbcl.org/"&gt;SBCL&lt;/a&gt; has &lt;a href="http://www.sbcl.org/manual/Threading.html#Threading"&gt;threads&lt;/a&gt;, at least for Linux on x86 and amd64, I should be able to use this mechanism to build the job queue.  Following &lt;a href="http://books.google.com/books?id=MgcJAAAACAAJ"&gt;Rochkind&lt;/a&gt; Section 5.17, I have written the following:&lt;br /&gt;&lt;pre&gt;
(defparameter *job-lock* (sb-thread:make-mutex :name "job lock"))
(defparameter *results* (list nil))
(defvar *end-of-jobs* (make-symbol "EOJ"))
(defvar *jobs* nil)

(defun worker (job)
  (let ((my-job nil)
	(more-jobs t))
    (loop while more-jobs
       do
       (sb-thread:with-mutex (*job-lock*)
	 (setf more-jobs (or *jobs*))
	 (setf my-job (when more-jobs (pop *jobs*))))
       (when my-job			; there is a job to be done
	 (if (eq my-job *end-of-jobs*)
	     (setf more-jobs nil)
	     (let ((my-results (apply job my-job))) ; call the job outside the mutex
	       (sb-thread:with-mutex (*job-lock*)   ; save results
		 (push my-results *results*))))))))

(defun run-tasks (job dataset number-of-workers)
  "The job is a function that takes one non-null argument.
   The dataset is a list of arglist sets for the job.
   The number-of-workers is the number of workers desired, 
   presumably the number of processors available."
  (setf *jobs* (make-list number-of-workers :initial-element *end-of-jobs*)
	*results* (list nil))
  (dolist (ds dataset) (push ds *jobs*))
  (let ((threads (list nil)))
    (loop repeat number-of-workers
       do (push (sb-thread:make-thread (lambda () (worker job))) threads))
    (dolist (thread (butlast threads)) (sb-thread:join-thread thread))
    (butlast *results*)))
&lt;/pre&gt;&lt;br /&gt;Try this example:&lt;br /&gt;&lt;pre&gt;
(defun job (x) (list x (+ (loop for i from 1 to 2000000 sum (let ((p (* i x))) (1- (expt p (/ p))))))))
(run-tasks #'job '((1) (2) (3) (4) (5) (6) (7) (8) (9) (10)) 2)
((1 105.73587) (2 58.11023) (3 41.245914) (4 31.676012) (5 26.053244)
 (6 22.305136) (7 19.607342) (8 17.642727) (9 15.433696) (10 14.060191))
&lt;/pre&gt;&lt;br /&gt;Unfortunately, after I coded this up and tried it on my actual function, I found that that function was not thread safe, due to use of a foreign library that wasn't thread safe.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:8840</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/8840.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=8840"/>
    <title>lhealy @ 2008-01-05T12:45:00</title>
    <published>2008-01-05T17:51:48Z</published>
    <updated>2008-01-05T20:17:52Z</updated>
    <category term="olpc"/>
    <category term="im"/>
    <category term="pidgin"/>
    <content type="html">I have my new OLPC XO-1 now, from the "Give one get one program".  My intended use is mainly for updates from the road while on bike tours.&lt;br /&gt;&lt;br /&gt;One thing I'd like is instant messaging.  The "Chat Activity" works to other XOs but evidently not to anyone else.  &lt;a href="http://olpcnews.com/forum/index.php?topic=198.0"&gt;Pidgin and Finch&lt;/a&gt; have been ported, so I tried Finch, being text-based and therefore presumably simpler.  It works, but unfortunately it is based on ncurses.  Evidently, few if any of the curses controls work on th XO, so I can't even expand the "window" to full screen.  It would be nice if there were a plain text (no pseudo-windowing, no curses, etc.) IM client, perhaps one based on libpurple?&lt;br /&gt;&lt;br /&gt;Update: I found &lt;a href="http://naim.n.ml.org/about"&gt;NAIM&lt;/a&gt; which is full screen and does not try to emulate windowing, but has an odd choice of colors - the typein area is white letters on a white background, which makes it hard to see.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:8495</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/8495.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=8495"/>
    <title>Profiling in SLIME</title>
    <published>2007-11-06T23:57:06Z</published>
    <updated>2007-11-06T23:57:06Z</updated>
    <category term="lisp"/>
    <content type="html">This is about the easiest profiling I've seen in any language.  In&lt;br /&gt;fact, I think it's the only time I been able to make significant&lt;br /&gt;improvements based on the report.&lt;br /&gt;&lt;pre&gt;M-x slime-toggle-profile-fdefinition&lt;/pre&gt; on all the functions you want to&lt;br /&gt;profile, &lt;pre&gt;M-x slime-profile-reset&lt;/pre&gt; to clear any existing data, and&lt;br /&gt;&lt;pre&gt;M-x slime-profile-report&lt;/pre&gt; to see the report after running.&lt;br /&gt;I did it on one of my functions which was taking 700+ seconds to run.&lt;br /&gt;I immediately saw that I was doing an unnecessary computation, which&lt;br /&gt;when removed resulted in a 90 second run.  Some more profiling and&lt;br /&gt;other work yielded an end result of 2.5 seconds.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:8432</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/8432.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=8432"/>
    <title>DoD authentication in Iceweasel/Icedove</title>
    <published>2007-10-25T17:21:58Z</published>
    <updated>2007-10-26T12:57:15Z</updated>
    <category term="debian"/>
    <content type="html">Common DoD authentication with certificates and the &lt;a href="http://en.wikipedia.org/wiki/Common_Access_Card"&gt;Common Access Card&lt;/a&gt; (CAC) is possible in Debian for Iceweasel (Firefox) and Icedove (Thunderbird).  It can be reduced to the following:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Install the &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/3182"&gt;DoD Configuration&lt;/a&gt; add-on in Iceweasel by clicking on "Install Now" button.&lt;br /&gt;&lt;li&gt;Save that xpi file from Iceweasel by clicking right on the button. Install the file in Icedove: Tools -&amp;gt; Add-ons -&amp;gt; Install.&lt;br /&gt;&lt;li&gt;Test from web by visiting &lt;a href="http://www.navy.mil"&gt;http://www.navy.mil&lt;/a&gt;; the URL should be green.  You do not need your CAC.&lt;br /&gt;&lt;li&gt;Load packages in Debian:&lt;br /&gt;&lt;pre&gt;
sudo aptitude install libpcsclite1 pcsc-tools libccid coolkey
&lt;/pre&gt;&lt;br /&gt;This will enable the CAC reader in Debian unstable; I don't know if the versions of previous Debian releases will work.  Note that not all CAC readers are supported; see the &lt;a href="http://packages.debian.org/sid/libccid"&gt;list&lt;/a&gt;.  In particular, the ActivCard 2.0 USB, which is very common, is &lt;a href="http://bugs.debian.org/428016"&gt;&lt;i&gt;not&lt;/i&gt; supported&lt;/a&gt;. &lt;br /&gt;&lt;li&gt;With your CAC inserted, visit &lt;a href="http://infosec.navy.mil"&gt;http://infosec.navy.mil&lt;/a&gt;.  You will be prompted for your PIN, and you should be able to select your certificate.  To see the certificate information that the server has, visit the &lt;a href="https://infosec.navy.mil/certtest/certificateHandler"&gt;PKI Cert test page&lt;/a&gt;.&lt;br /&gt;&lt;li&gt;You can sign/encrypt email by using the S/MIME button, and set up defaults for every email with Edit -&amp;gt; Account Settings -&amp;gt; Security. Note that OpenPGP security is completely separate from CAC security, and the icons that display in messages and the composition area shouldn't be confused.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;That should do it.  References: &lt;a href="http://www7320.nrlssc.navy.mil/pubs/2006/CommonAccessCardLinux.pdf"&gt;Van Alstyne&lt;/a&gt;, &lt;a href="http://pkg-coolkey.alioth.debian.org/"&gt;CoolKey package&lt;/a&gt;.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:8093</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/8093.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=8093"/>
    <title>Extension functions in sqlite3, again</title>
    <published>2007-09-29T19:54:27Z</published>
    <updated>2007-09-29T19:54:27Z</updated>
    <category term="lisp"/>
    <category term="sqlite"/>
    <content type="html">I mentioned before that I cleaned up and posted mathematical and string extension functions for SQLite3.  Some things have changed in the interim, which necessitated going through a few revisions.  So now &lt;a href="http://sqlite.org/contrib/download/extension-functions.c?get=22"&gt;the new version&lt;/a&gt; is available which makes compilation and use easier.  For one thing, the SQLite source is no longer required to compile it.  Second, it uses the standard sqlite3_load_extension interface, which should make it easier to use.  The interface through CL using CLSQL is now &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
(in-package :sqlite3)

;;; Add mathematical and string functions to SQL queries using
;;; libsqlitefunctions from
;;; http://www.sqlite.org/contrib/download/extension-functions.c?get=22

(def-sqlite3-function
    "sqlite3_enable_load_extension"
    ((db sqlite3-db) (onoff :int))
 :returning :int)

(def-sqlite3-function
    "sqlite3_load_extension"
    ((db sqlite3-db)
     (filename :cstring)
     (entrypoint :int)
     (errmsg :int))
  :returning :int)

(eval-when  (:compile-toplevel :load-toplevel :execute)
  (export 'enable-sqlite3-extension-functions))

(defun enable-sqlite3-extension-functions (database)
  "Set up the SQLite3 mathematical extension functions.  This
   must be called every time the database is connected
   before any extension function is used."
  (let ((db-ptr (clsql-sqlite3::sqlite3-db database)))
    (sqlite3-enable-load-extension db-ptr 1)
    (unless (zerop
	     (sqlite3-load-extension db-ptr "libsqlitefunctions.so" 0 0))
      (error "Can't load libsqlitefunctions.so."))))
&lt;/pre&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:7837</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/7837.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=7837"/>
    <title>cl-mcclim out of date in Debian unstable</title>
    <published>2007-09-07T16:04:04Z</published>
    <updated>2007-09-07T16:04:04Z</updated>
    <category term="lisp"/>
    <category term="debian"/>
    <content type="html">People are talking about the hot new mcclim (0.9.5).  But unstable has 0.9.2; experimental only has 0.9.4 and it has not migrated to unstable in the six months it's been there because, supposedly, the etch freeze &lt;a href="http://packages.qa.debian.org/c/cl-mcclim.html"&gt;http://packages.qa.debian.org/c/cl-mcclim.html&lt;/a&gt;.  But etch has long since been released; why the continued logjam?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:7623</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/7623.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=7623"/>
    <title>GMAT on Debian amd64</title>
    <published>2007-09-02T17:42:58Z</published>
    <updated>2007-09-02T17:42:58Z</updated>
    <category term="space"/>
    <category term="debian"/>
    <content type="html">NASA has recently made available its &lt;a href="http://gmat.gsfc.nasa.gov/index.html"&gt;General Mission Analysis Tool (GMAT)&lt;a&gt;, a space trajectory and mission analysis system, under an open source license.  The precompiled version relies on WxWidgets 2.8, which aren't yet available in Debian (though there are &lt;a href="http://www.wxwidgets.org/downloads/"&gt;debs available&lt;/a&gt;) and is for i386.  So I have tried to compile under etch/amd64 using WxWidgets 2.6.  The src/README file explains very well how to set options, but not how to compile, so here's what I've figured out.&lt;br /&gt;&lt;br /&gt;sudo aptitude install libwxgtk2.6-dev libwxbase2.6-dev wx2.6-headers &lt;br /&gt;sudo aptitude install libdevil-dev libdevil1c2&lt;br /&gt;In src/topLevelBuildFiles/linux/BuildEnv.mk, remove local/ from the path:&lt;br /&gt;  WXCPPFLAGS = `/usr/bin/wx-config --cppflags`&lt;br /&gt;  WXLINKFLAGS = `/usr/bin/wx-config --libs --gl-libs --static=no`&lt;br /&gt;Make source code changes in src/base/forcemodel/ForceModel.cpp, line 1129 add "long"&lt;br /&gt;            std::sprintf(sataddr, "%x", (unsigned long)sat);&lt;br /&gt;Change to the src directory, and make links&lt;br /&gt;  ln -sf topLevelBuildFiles/linux/MakeGmat.eclipse topLevelBuildFiles/linux/BuildEnv.mk .&lt;br /&gt;Then make&lt;br /&gt;  make -f MakeGmat.eclipse&lt;br /&gt;&lt;br /&gt;Unfortunately, the compilation ends in error.&lt;/a&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:7193</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/7193.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=7193"/>
    <title>DRAKMA</title>
    <published>2007-05-16T17:56:19Z</published>
    <updated>2007-05-16T17:56:19Z</updated>
    <category term="lisp"/>
    <content type="html">Yesterday's blog mentioned trouble I'm having with cl-curl, my own package.  A comment pointed me to &lt;a href="http://weitz.de/drakma/"&gt;DRAKMA&lt;/a&gt;, yet another Edi Weitz bequest to the lisp world.  It is a native common lisp http client that handles the particular web site I am scraping data from, complete with password and cookies.  It was very simple to rewrite my access functions to use DRAKMA, and it is able to retrieve all the data I wanted, no memory fault like cl-curl.  So I will update the cl-curl project page to recommend DRAKMA.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;It was a little unclear how to install DRAKMA; here is my condensed summary, on Debian:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;sudo aptitude install cl-chunga cl-puri cl-flexi-streams&lt;br /&gt;&lt;li&gt;wget &lt;a href="http://common-lisp.net/project/usocket/releases/usocket-0.3.2.tar.gz"&gt;http://common-lisp.net/project/usocket/releases/usocket-0.3.2.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;li&gt;wget &lt;a href="http://common-lisp.net/project/cl-plus-ssl/download/cl+ssl-2007-03-10.tar.gz"&gt;http://common-lisp.net/project/cl-plus-ssl/download/cl+ssl-2007-03-10.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;li&gt;wget &lt;a href="http://weitz.de/files/drakma.tar.gz"&gt;http://weitz.de/files/drakma.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;li&gt;tar zxvf usocket-0.3.2.tar.gz&lt;br /&gt;&lt;li&gt;tar zxvf cl+ssl-2007-03-10.tar.gz&lt;br /&gt;&lt;li&gt;tar zxvf drakma.tar.gz&lt;br /&gt;&lt;li&gt;clc-register-user-package usocket-0.3.2/usocket.asd&lt;br /&gt;&lt;li&gt;clc-register-user-package cl+ssl-2007-03-10/cl+ssl.asd&lt;br /&gt;&lt;li&gt;clc-register-user-package drakma-0.7.0/drakma.asd&lt;br /&gt;&lt;li&gt;,l drakma (in slime)&lt;br /&gt;&lt;/ol&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:7134</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/7134.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=7134"/>
    <title>Parsing HTML and memory fault from cl-curl</title>
    <published>2007-05-15T14:46:29Z</published>
    <updated>2007-05-15T14:46:29Z</updated>
    <category term="lisp"/>
    <content type="html">I've had need to parse HTML in lisp from time to time.  The latest reason is some very specific and uncomplicated HTML that I scrape for some satellite data off a published database.  A search online turns up &lt;a href="http://common-lisp.net/project/xmls/"&gt;XMLS&lt;/a&gt; as a likely candidate for this task.  I have used it successfully in the past, but recently I find it won't parse its own example and its own supplied HTML documentation, to say nothing of the real HTML I want it to parse.  It either returns NIL (meaning an error in parsing the correct HTML), or only the first line of HTML. There is a thread on comp.lang.lisp about how to parse HTML, and many people recommend &lt;a href="http://www.cliki.net/CL-HTML-Parse"&gt;cl-html-parse&lt;/a&gt;.  I was dissuaded at first because of the wiki comments implying that it had been superseded by pxmlutils whose web page in turn implies that it had been superseded by... XMLS!  But cl-html-parse works just fine on the web pages I need to scrape.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;So, success.  But then, I am grabbing the web page with &lt;a href="http://common-lisp.net/project/cl-curl/"&gt;cl-curl&lt;/a&gt; which works most of the time, but for a particular query gives "memory fault," I think because there is a lot of data.  And the author/maintainer of cl-curl is... me! D'Oh.  It would be nice to have cl-curl using CFFI instead of UFFI, maybe based on the pedagogical development given in the &lt;a href="http://common-lisp.net/project/cffi/manual/html_node/Tutorial.html#Tutorial"&gt;CFFI tutorial&lt;/a&gt;.  My hope is at least it would solve this problem.  Any interest/volunteers/motivators?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:6731</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/6731.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=6731"/>
    <title>Math and string extension functions for SQLite</title>
    <published>2007-04-22T23:05:17Z</published>
    <updated>2008-01-22T22:40:59Z</updated>
    <category term="sqlite"/>
    <content type="html">I have posted my port of Mikey C's extension functions for sqlite,&lt;br /&gt;&lt;a href="http://sqlite.org/contrib/download/extension-functions.tgz?get=17"&gt;http://sqlite.org/contrib/download/extension-functions.tgz?get=17&lt;/a&gt;&lt;br /&gt;but a more thorough list of functions would be as follows:&lt;br /&gt;&lt;br /&gt;Math:&lt;br /&gt;acos, asin, atan, atn2, atan2, cosh, asinh, atanh, degrees,&lt;br /&gt;radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp,&lt;br /&gt;log, log10, power, sign, sqrt, square, ceil, floor, pi&lt;br /&gt;&lt;br /&gt;String:&lt;br /&gt;difference, replicate, charindex (2 or 3 arguments),&lt;br /&gt;leftstr, rightstr, ltrim, rtrim, trim, replace,&lt;br /&gt;reverse, proper, padl, padr, padc, strfilter&lt;br /&gt;&lt;br /&gt;Aggregate:&lt;br /&gt;stdev, variance, mode, median, lower_quartile, upper_quartile</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:6466</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/6466.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=6466"/>
    <title>Rebuilding the sqlite3 library with extensions in Debian</title>
    <published>2007-04-11T19:25:52Z</published>
    <updated>2007-04-11T19:25:52Z</updated>
    <category term="debian"/>
    <category term="sqlite"/>
    <content type="html">The new version of the library libsqlite3.so in Debian needs to be rebuilt in order that extension functions can be used, because apparently &lt;a href="http://www.mail-archive.com/sqlite-users%40sqlite.org/msg23784.html"&gt;it's hard to get autoconf to learn where dlopen is located&lt;/a&gt;.  This will fix the problem:&lt;br /&gt;&lt;pre&gt;
 sudo aptitude install fakeroot dpkg-dev build-essential
 cd /tmp
 apt-get source libsqlite3-0
 sudo apt-get build-dep libsqlite3-0
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Comment out in &lt;code&gt;/tmp/sqlite3-3.3.14/Makefile.in&lt;/code&gt;:&lt;br /&gt;&lt;pre&gt;
 #TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Build and install:&lt;br /&gt;&lt;pre&gt;
 cd /tmp/sqlite3-3.3.14
 dpkg-buildpackage -rfakeroot -uc -us
 dpkg -i /tmp/libsqlite3-0_3.3.14-1_amd64.deb
&lt;/pre&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:6306</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/6306.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=6306"/>
    <title>SQLite math and string functions simplified</title>
    <published>2007-03-30T14:08:21Z</published>
    <updated>2007-03-30T16:32:30Z</updated>
    <category term="lisp"/>
    <category term="sqlite"/>
    <content type="html">Thanks to Mikey C, there are now a number of math and string functions available in &lt;a href="http://sqlite.org"&gt;SQLite&lt;/a&gt; SQL queries.  I blogged this before, but now I have simplified and cleaned up his code, and &lt;a href="http://sqlite.org/contrib/download/extension-functions.tgz?get=17"&gt;made it available&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The functions are: Math: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi. String: replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim, replace, reverse, proper, padl, padr, padc, strfilter.&lt;br /&gt;&lt;br /&gt;For &lt;a href="http://clsql.b9.com/"&gt;CLSQL&lt;/a&gt; users, the Lisp portion of the instructions in my &lt;a href="http://lhealy.livejournal.com/2007/03/20/"&gt;previous post&lt;/a&gt; remain the same.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:5983</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/5983.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=5983"/>
    <title>Math extension functions in SQLite3 using CLSQL</title>
    <published>2007-03-21T02:30:31Z</published>
    <updated>2007-03-23T02:36:25Z</updated>
    <category term="lisp"/>
    <category term="sqlite"/>
    <content type="html">&lt;p&gt;Inconveniently, nature has made the &lt;a href="http://en.wikipedia.org/wiki/Semi-major_axis"&gt;semimajor axis&lt;/a&gt; of an orbit proportional to the -2/3 power of the &lt;a href="http://en.wikipedia.org/wiki/Mean%20motion"&gt;mean motion&lt;/a&gt;, so when retrieving element sets from an SQL database, it is very useful to have a POWER function, as Oracle does.  Since I have now moved to &lt;a href="http://sqlite.org/"&gt;SQLite3&lt;/a&gt;, this function is no longer available.  The topic of adding mathematical functions like power comes up repeatedly every few weeks on the SQLite mailing list.  Unhelpfully, someone always replies "it's easy" with no further information.  It is not easy.  Fortunately, Mikey C &lt;a href="http://www.mail-archive.com/sqlite-users%40sqlite.org/msg21791.html"&gt;offered his C extension functions&lt;a&gt; &lt;br /&gt;which include most common math functions --- not just power, but trigonometric functions, logarithm, etc.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Here is my procedure for using these functions:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Download Mickey C's &lt;a href="http://www.nabble.com/file/6303/SQLite.zip"&gt;source zip&lt;/a&gt;&lt;br /&gt;&lt;li&gt;Unzip it, and optionally move the needed files btree.h, config.h, func_ext.c, hash.h, map.c, map.h, opcodes.h, os.h, pager.h, parse.h, sqliteInt.h, vdbe.h, vdbeInt.h into a separate directory&lt;br /&gt;&lt;li&gt;Compile&lt;br /&gt;&lt;pre&gt;
gcc -DHAVE_ISBLANK -DHAVE_LOG10 -DHAVE_COSH -DHAVE_SINH -DHAVE_TANH \
 -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH \
 -fPIC func_ext.c map.c -shared -o libsqlitefunctions.so
&lt;/pre&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;Now these functions can be used through &lt;a href="http://clsql.b9.com/"&gt;CLSQL&lt;/a&gt;.&lt;br /&gt;&lt;pre&gt;
(in-package :sqlite3)

(def-sqlite3-function
    "sqlite3_enable_load_extension"
    ((db sqlite3-db) (onoff :int))
 :returning :int)

(uffi:load-foreign-library 
 (uffi:find-foreign-library "libsqlitefunctions" #p"/path/to/library/")
 :module "sqlitefunctions"
 :supporting-libraries '()
 :force-load t)

(def-sqlite3-function
    "sqlite3RegisterExtraFunctions"
    ((db sqlite3-db))
 :returning :void)

(eval-when  (:compile-toplevel :load-toplevel :execute)
  (export 'enable-sqlite3-extension-functions))

(defun enable-sqlite3-extension-functions (database)
  "Set up the SQLite3 mathematical extension functions.  This
   must be called every time the database is connected
   before any extension function is used."
  (let ((db-ptr (clsql-sqlite3::sqlite3-db database)))
    (sqlite3-enable-load-extension db-ptr 1)
    (sqlite3registerextrafunctions db-ptr)))
&lt;/pre&gt;&lt;br /&gt;After the database is connected, &lt;code&gt;(enable-sqlite3-extension-functions)&lt;/code&gt; gets the ball rolling.  Not just the mathematical extension functions, but there are string functions as well.  And good old POWER:&lt;br /&gt;&lt;pre&gt;
(clsql:query 
    "SELECT (POWER((398600.4415 /
    POWER((7.27220521664304e-5*MEAN_MOTION), 2.0)), 0.3333333333333333)
    * (1.0 - ECCENTRICITY)) - 6378.1363 from nscels where catdate = '2007-03-16 06:16:48'
     AND satnum = 24937"
   :database *nscels-database*)
&lt;/pre&gt;&lt;br /&gt;(Yes, I know that a query like this is easily computed in Lisp with #'expt.  My real application is a WHERE clause that constrains perigee altitude between certain values.)&lt;/a&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:5789</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/5789.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=5789"/>
    <title>Conditionalizing minor system dependencies</title>
    <published>2007-01-23T16:07:18Z</published>
    <updated>2007-01-23T16:07:18Z</updated>
    <category term="lisp"/>
    <content type="html">If a system could make use of another but the usage is incidental and you don't want to break the loading of the first if the second is unavailable, it would be nicer to skip over it or provide an alternative. I have used an idiom like this:&lt;br /&gt;&lt;pre&gt;
(remove string *sf-name-mapping*
	  :key #'rest
	  :test-not
	  (if (find-package :ppcre)
	      (symbol-function (intern "ALL-MATCHES" :ppcre))
	      #'string-equal))
&lt;/pre&gt;&lt;br /&gt;in a function, which says to use ppcre:all-matches if cl-ppcre is loaded, otherwise use CL's string-equal.  But this is clumsy and limited in applicability.  What I would like is something like #+ and #- for packages, like #+(package ppcre) which would only see the form following if that package was loaded.  I don't think this is possible in portable CL, but I'm wondering if it's possible some other way.  This might be done with &lt;a href="http://common-lisp.net/project/cl-containers/asdf-system-connections/"&gt;asdf-system-connections&lt;/a&gt;, but it seems clumsy for the one-form case.  The advantage is that the dependent code will be loaded whenever the secondary system is loaded; with a compiler conditionalization it can only happen at compile time.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:5485</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/5485.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=5485"/>
    <title>Debian on the ThinkPad T60</title>
    <published>2007-01-17T03:51:30Z</published>
    <updated>2007-01-17T03:51:30Z</updated>
    <category term="debian"/>
    <content type="html">&lt;p&gt;&lt;br /&gt;Two weeks ago I purchased a ThinkPad T60 (87445BU) with Intel Core2 Duo (2GHz), Mobility Radeon X1400 (128MB), 1.5 GB RAM, 120 GB, DVD burner.  I wanted to add Linux but also keep Windows XP.  The first thing was to &lt;a http="http://www.thinkwiki.org/wiki/Ordering_Recovery_CDs"&gt;make plastic disks&lt;/a&gt; (1DVD + 1CD) out of the "Rescue &amp; Recovery" partition supplied on the hard disk.  Interestingly, no one says which disk to put in first -- even the ThinkPad prompt is simply "insert the disk" (it turns out, it's CD first, then DVD).  The first question on linux installation to answer was: Debian or Ubuntu?  I had pondered that for a while without coming to a conclusion, but that question was answered for me.  I tried to install both Ubuntu 6.10 and Debian Etch (testing), and both failed to install.  Debian stopped with a message "ACPI: Found ECDT" and no further information.  Trying "installgui acpi=off" allowed it to go further, but then Debian wouldn't recognize either the wired or wireless Atheros network hardware.  The lack of recognition of the wired network controller was simply because I didn't have a cable plugged in at the time; once plugged in, it recognized it fine.  However, further in the installation procedure, the "Select and Install Software" step ended with "Installation step failed" with no further explanation.  This happened repeatably.  Worse, Windows would not boot, I would just get "error loading operating system".  Fortunately, the recovery partition worked to restore the factory-installed state.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Meanwhile, Ubuntu would install (with acpi=off) but would simply end with an X screen and nothing on it.  Both the Debian and ubuntu that I used were amd64; people who reported success online seemed to be doing i386 installs exclusively.  I want back to Debian and installed using "expert acpi=off floppy=thinkpad" which installed fine.  I asked to not install GRUB to the MBR because I wanted to be able to use the recovery partition which supposedly you can't do if you install GRUB on the MBR.  Instead, I installed it on (hd0,1) which is the Linux partition.  I expected I would need to configure the windows bootloader to see that partition; instead, the computer boots right into GRUB and everything is available from the menu, including the recovery partition.   Even the blue "ThinkVantage" key works.  I went on to install applications from Debian.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;A quick summary of how well various hardware is supported:&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://madwifi.org/wiki/UserDocs/Distro/Debian"&gt;Wireless&lt;/a&gt;: The madwifi looks like a good package; unfortunately, I have a new wireless chip which is &lt;a href="http://madwifi.org/ticket/1001"&gt;not supported yet&lt;/a&gt;.  The only choice remaining was the usual ndiswrapper and Windows driver; this however is not an option because they are 32 bit only.  So for now I'm using a cable.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;ATI Graphics: aptitude install fglrx-control fglrx-driver fglrx-kernel-src&lt;br /&gt;and a little work (see /usr/share/doc/fglrx-kernel-src/README.Debian.gz) and it is working fine at the full 1680x1050 resolution. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;ACPI: does work really, perhaps not during installation; I set acpi=on in the grub/menu.lst, and it works.  &lt;br /&gt;I even added the &lt;a href="http://ibm-acpi.sourceforge.net/"&gt;IBM specific&lt;/a&gt; functions, and they worked just fine, including telling me the temperature of the GPU runs about 51C, whicle the battery is at a cool 29C.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;And some things I would like to have working but haven't figured out yet:&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.suspend2.net/HOWTO"&gt;suspend&lt;/a&gt;, hibernate, etc.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html#id292205"&gt;32-bit chroot&lt;/a&gt; mostly to use movie codecs available only for 32 bits.  It seems that schroot is an important hassle-saver, but the only documentation available appears to be the man pages, which are not too useful as a HOWTO.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.thinkwiki.org/wiki/How_to_protect_the_harddisk_through_APS"&gt;Airbag&lt;/a&gt; to protect the hard disk if the computer falls.  Looks like it needs a kernel patch.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;I like &lt;a href="http://www.thinkwiki.org/"&gt;ThinkWiki&lt;/a&gt;, it has much useful information for puttin Linux on ThinkPads.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:5345</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/5345.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=5345"/>
    <title>OpenMCL for Debian/amd64</title>
    <published>2006-12-01T18:50:26Z</published>
    <updated>2006-12-01T18:50:26Z</updated>
    <category term="lisp"/>
    <category term="debian"/>
    <content type="html">I have heard a lot of good things about OpenMCL over the years, so I was pleased to see &lt;a href="http://groups.google.com/group/comp.lang.lisp/msg/906e4eaa1b22c55d"&gt;the announcement&lt;/a&gt; that it is available for Debian/amd64 and gave it a try.  This was an easy (Debian-integrated) install and OpenMCL started and did basic things from the shell.  However, I got snagged on running SLIME:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Welcome to OpenMCL Version 1.1-pre-061110 (LinuxX8664)!&lt;br /&gt;? ;Loading #P"/usr2/people/healy/emacs/external/slime/swank-loader.lisp"...&lt;br /&gt;;Compiling "/usr2/people/healy/emacs/external/slime/swank-backend.lisp"...&lt;br /&gt;;Loading #P"/usr2/people/healy/.slime/fasl/2006-11-15/openmcl-1.1-unix-x86-64/swank-backend.lx64fsl"...&lt;br /&gt;;Compiling "/usr2/people/healy/emacs/external/slime/nregex.lisp"...&lt;br /&gt;;Loading #P"/usr2/people/healy/.slime/fasl/2006-11-15/openmcl-1.1-unix-x86-64/nregex.lx64fsl"...&lt;br /&gt;;Compiling "/usr2/people/healy/emacs/external/slime/metering.lisp"...&lt;br /&gt;;Loading #P"/usr2/people/healy/.slime/fasl/2006-11-15/openmcl-1.1-unix-x86-64/metering.lx64fsl"...&lt;br /&gt;;Compiling "/usr2/people/healy/emacs/external/slime/swank-openmcl.lisp"...&lt;br /&gt;; Warning: Interface file #P"ccl:x86-headers64;libc;functions.cdb" does not exist.&lt;br /&gt;; While executing: CCL::CDB-OPEN, in process listener(2).&lt;br /&gt;Read error between positions 10394 and 10509 in /usr2/people/healy/emacs/external/slime/swank-openmcl.lisp.&lt;br /&gt;;; Error while loading: /usr2/people/healy/.slime/fasl/2006-11-15/openmcl-1.1-unix-x86-64/swank-openmcl.lx64fsl&lt;br /&gt;;;   Condition: Foreign function not found: X86-LINUX64::|tmpnam|&lt;br /&gt;;; Aborting.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:5004</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/5004.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=5004"/>
    <title>Feed for cl.net new projects</title>
    <published>2006-12-01T14:51:02Z</published>
    <updated>2006-12-01T14:51:02Z</updated>
    <category term="lisp"/>
    <content type="html">There is now a feed for new projects on common-lisp.net, &lt;a href="http://common-lisp.net/recent-projects.xml"&gt;http://common-lisp.net/recent-projects.xml&lt;/a&gt;.  Since I stay up to date in the world largely through a feed reader, this is very helpful to me for finding out about new projects in CL.  Thanks Erik!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:4777</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/4777.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=4777"/>
    <title>Firefox cookies</title>
    <published>2006-12-01T02:34:17Z</published>
    <updated>2006-12-01T02:34:17Z</updated>
    <category term="firefox"/>
    <content type="html">There are three features I would like in a firefox/iceweasel plugin.  I have firefox ask before allowing cookies, and in practice only allow them to be set if I know of a good reason to allow them.  However, it sometimes happens that I later would like to allow a site that is blocked.  This involves the tedious process of going to preferences, cookies, exceptions, then scrolling through the list to find the site and removing, then retrying the page.  It would be nice to have a button that I could press that would show the block/allow status for the current site and allowing it to be changed.  The second thing I would like is for the block/allow to be on a coarser level than the full domain name.  If you put New Scientist on your Google Reader, you find that every single article gets a different domain name, but they always end in img.pheedo.com.  It would be nice to block/allow by trailing part of domain.  In conjunction with this, it would be nice if the list of domains could be sorted by something other than the first part of the domain.   Maybe the second to last part would be more meaningful.&lt;br /&gt;&lt;br /&gt;If I knew anything at all about writing firefox extensions, I might try one of these.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:lhealy:4388</id>
    <link rel="alternate" type="text/html" href="http://lhealy.livejournal.com/4388.html"/>
    <link rel="self" type="text/xml" href="http://lhealy.livejournal.com/data/atom/?itemid=4388"/>
    <title>Lisp local in Washington DC</title>
    <published>2006-11-27T23:08:49Z</published>
    <updated>2006-11-27T23:08:49Z</updated>
    <category term="lisp"/>
    <content type="html">The &lt;a href="http://www.lisperati.com/fringedc.html"&gt;FringeDC&lt;/a&gt; meeting last evening was interesting.  Conrad Barski (the organizer) started with an introduction to Lisp (some attendees were new to lisp) then talked about SPELs (or macros as most of us know them), with some simple applications.  He then moved on to continuations in Scheme.  Though it's the clearest overview of continuations I've heard, I still don't really understand them.  Since I pretty much stick to Common Lisp, it's an academic point anyway.&lt;br /&gt;&lt;br /&gt;The next formal meeting will be in March, on Haskell.  In between, in January, there is an informal meeting (no presentation).</content>
  </entry>
</feed>
