opening it up with Common Lisp

Favorite weblogs

Lisp Related

Bill Clementson

Finding Lisp

Lemonodor

Lispmeister.com

Planet Lisp

Politics

Orcinus

Talking Points Memo

This Modern World

Working for Change

Other home

Polliblog

Recent Readings

Book review: Darwinia
Reviewed: Friday, August 11, 2006

Summer reading: Spin
Reviewed: Saturday, August 5, 2006

Runner
Reviewed: Tuesday, July 18, 2006

the Omnivoire's Delimma
Reviewed: Wednesday, July 12, 2006

the Golem's Eye
Reviewed: Wednesday, May 31, 2006





tinderbox
 width=

RDF Triples in XML
Sunday, August 20, 2006

(After all, where else would you put them?).

Even after everything is in RDF, you still need to find someplace to put it and a way to write it down. Big disks answers the first question but the second has turned out to be surprisingly hard. Since XML has become the one (markup language) to rule them all, it was no surprise that people turned to it for the answers. Unfortunately, dealing with everything has a way of pulling in competing constituencies and those pesky subgroups tend to pull things into a muddle. This left RDF/XML of several diverse forms each very successful but each with its own problems. This paper presents another way to look at stuff that, as far as I know, has gone on to become quite successful.


IT Conversations
Sunday, August 20, 2006

  • Tara Lemmey talks about US security in the age of "terror". If these ideas are actually implemented, then things might become better. My guess, however, is that we'll just have more technology without thought scares.
  • Ray Lane talks about software and stuff stream of consciousness style at Software 2006. His stream is moderately interesting.
  • Elias Torres talks about the Semantic Web (RDF, OIL, SPARQL, oh my!) with Phil Windley. Torres does a good job explaining why we care though I can't help but hear shades of the "AI will solve everything" from the early 80's whenever I hear about the Semantic Web.

more "real" C++ macros via template metaprogramming
Saturday, August 19, 2006

If it didn't end up being so ugly, it would be cute.

Although this technique might seem like just a cute C++ trick, it becomes powerful when combined with normal C++ code. In this hybrid approach, source code contains two programs: the normal C++ run-time program, and a template metaprogram which runs at compile time. Template metaprograms can generate useful code when interpreted by the compiler, such as a massively inlined algorithm -- that is, an implementation of an algorithm which works for a specific input size, and has its loops unrolled. This results in large speed increases for many applications.

This is from a longer article by Todd Veldhuizen referenced by Scott Meyers (it's on the web somewhere but I seem to have misplaced it ).

Someone should create a language that lets you do this without having to jump through so many hoops. It could work per taking source code as inputs and writing out new source code with the whole power of the language behind the transformations. A language like that would blow C++ out of the water in terms of popularity. What's that. Oh, sorry. I went off my meds again.


SPAM on the lam? Not for me!
Saturday, August 19, 2006

It used to be that most of my SPAM went into junk. Lately, however, a great deal of stuff that looks as if it should be easy to categorize is ending up in my inbox. Grrrr.

I'm guessing that I should try retraining my SPAM filter (in OS X's Apple Mail) or switch to something like Michael's Tsai's SpamSieve. I used SpamSieve once before and liked it -- but why pay when Apple Mail seemed to be doing as good (or at least nearly as good) of a job? Is anyone else experiencing this?


Feedback: good and bad
Friday, August 18, 2006

It's ironic I received both high praise and an indictment for my Lisp software on the same day! Both, however, were deserved. Well, I know I deserve the indictment and I'm pretty sure that the praise is justified too. First, I heard that CL-Markdown's new extensions mechanism

I was able to complete a project today, just in time, and leave for seven days of vacation tomorrow. This wouldn't have been possible in that form without markdown extensions...

That cheered me up. Later in the day, however, I heard that:

... most of the web pages for your various lisp packages need to be updated. You don't list nearly all of the required dependencies. ... I'm so annoyed from having to go through the discovery process that I'll let you discover which pages are inadequate.

Which is quite true. I suppose it would be sort of OK if I didn't list any dependencies but only listing some of them really opens the door for frustration. Besides, it's easy to pull all of this stuff and include it in the web pages automatically.

Things to do:

  • Switch from lml2 to CL-Markdown for my web site
  • Add CL-Markdown extensions to include the dependencies automatically
  • Improve the Enterprise Lisp system pages so that they list this stuff automatically too
  • Keep on keeping on.

Thanks for both the kind words and the less kind ones. I want Lisp to succeed and that's only going to happen if the barriers to entry become ever lower.


RIFE
Friday, August 18, 2006

I just heard about RIFE which sounds like RAILS only it's Java, etc... The nice thing is that Lispers could start working on LIFE which has gotta be good, right? The linked interview has an interesting comment differentiating Rails from RIFE:

Some people criticize RIFE for not being like Ruby on Rails, where you can just start coding and have something up and running.

...

Why? Because we've been bitten so many times by the maintainability issue. We think that declaring certain things beforehand makes your application easier to maintain—for instance, it forces you to think of how state is being managed in your application.


Update: CL-Markdown again
Monday, August 14, 2006

Thanks for Frank Schorr for noticing that CL-Markdown sometimes failed to produce output. Actually if it failed once, it never stopped failing but when it succeeded, it never failed. It was a file compilation order dependency problem that didn't occur in my usual development environment. I'd been thinking that having a system compile an ASDF system in every order allowed by the dependencies would be a good way to catch certain bugs... it would have caught this one (assuming that a lot of additional infrastructure was in place <smile>).

When, on when, will someone kick me in the butt so that I can get back to Enterprise Lisp? New files are up on Common-Lisp.net.


the Human Condition
Sunday, August 13, 2006

I like conditions. I like them a lot. I like to use them to describe bad program states instead of strings. (e.g., (assert (ok-p state) nil 'it-is-not-ok-condition :state state) instead of (assert (ok-p state) nil "It is not ok")). I like them because you can easily test whether or not they happened programmatically and because using them helps to centralize error messages -- and thus gives me hope that I can make them consistent. There is a catch though: define-condition is a prolix form. Thus Metatilities has long had defcondition to make writing them a bit easier and yesterday I wrote a sibling macro (with the same name) to handle my most common case. The macro is simplicity itself:

(defmacro defcondition (name (&rest super-conditions) 
			slot-specs format &body args)
  (flet ((massage-slot (slot-spec)
	   (cond ((atom slot-spec)
		  `(,slot-spec 
		    :initarg ,(read-from-string (format nil ":~a" slot-spec))))
		 (t
		  slot-spec)))
	 (massage-format-arg (arg)
	   (cond ((atom arg)
		  `(slot-value condition ',arg)) 
		 (t
		  arg))))
    `(progn
       (export '(,name))
       (define-condition ,name ,super-conditions
	 ,(mapcar #'massage-slot slot-specs)
	 (:report (lambda (condition stream)
		    (format stream ,format 
			    ,@(mapcar #'massage-format-arg args))))))))
  

and this lets us write

(define-condition record-number-too-large-error
    (invalid-record-number-error)
  ((record-count :initarg :record-count))
  (:report 
   (lambda (condition stream)
     (format stream 
	     "Record number ~a is too large for this store. Store size is ~a."
	     (slot-value condition 'record-number)
	     (slot-value condition 'record-count)))))

as

(defcondition record-number-too-large-error
    (invalid-record-number-error)
    (record-count)
    "Record number ~a is too large for this store. Store size is ~a."
  record-number record-count)

(the record-number slot is inherited). It's not much but its enough to make writing simple condition like this almost as easy as writing an error message as string. Programming environments are (in part) about reducing impedance and about making it easy to do the right thing.


Book review: Darwinia
Friday, August 11, 2006

I very much enjoyed Robert Charles Wilson's Spin and I was looking forward to reading Darwinia. I'm glad I read them in the order I did because I thought Spin was superb and Darwinia both trite and silly. The characters are well drawn and relationships matter but the central premise -- that earth (and the rest of the universe) is essentially a library book come to life and is rewriting itself because of the attack of computer viruses on steroids; that everything we know is composed of a vast cosmological battle between sentience and these viruses... well, it's an interesting idea.

Darwinia feels as if it could have been great but it isn't. It feels tacked together from several weaker ideas and grand notions and never quite evolves beyond itself. Oh well, you can't always write a masterpiece.


Update: CL-Markdown
Tuesday, August 8, 2006

I've corrected another few bugs in CL-Markdown and improved the extensions a bit.

  • Fixed error in the processing of multiple bracketed things (e.g., [a][b] and [c][d]).
  • Improved table of contents processing.

It actually works pretty well (I suppose I shouldn't be surprised! Smile)


:explain that :box, will you?
Tuesday, August 8, 2006

One of Common Lisp's darker arts is optimizing functions. It's a beautiful idea: don't worry (too much) about performance until you've found the critical sections of your code; then tell the compiler what you'd like and, voila, faster code. Since compilers differ, however, and since you're never quite sure what incantation is going to convince Lisp to do "the right thing" (*), you're often left flipping declarations around like hot potatoes.

Enter Allegro Common Lisp, version 8.0 I've been working lately (for money even!) in ACL and one of the wonderful new features is that you can ask the compiler to tell you what it thinks and what it wants. I've wanted this ability for a long time (I even talked about it at ILC 200? in NYC). Let the programming environment notice that such and such a function is suboptimal and tell me that if I scratch it's back (with a little more information), then it can scratch mine (with a little more performance). ACL's explain feature isn't quite that, but it's a great step in that direction.

(*) I.e., what you want it to. Joke.


Cellular signposts
Tuesday, August 8, 2006

I suffer from psoriasis (and it's not just a heartbreak!). One of the many interesting questions about this disease is why this little bit of skin is undergoing massive immune mediated wonkiness (MIMW) and this bit of skin next to it thinks that everything is normal. This article (which I found via the American Scientist) gives part of an explanation. Cool.


Perception, reality, etc.
Tuesday, August 8, 2006

Java, Python, Ruby guru Mark Watson points out that he feels more productive using LaTeX rather than Word and this reminds me of the whole "is incremental spell checking really a good thing" debate (that I've had with myself annually since 2003; don't be too surprised if you haven't heard about it; my ex-agent failed to get the big network contracts he promised. Which reminds me, isn't stream of consciousness interesting. I suppose it depends on the consciousness... <smile>).

At question is what work style and tools help humans find maximum productivity and creativity. Is is better for a writer to work with pencil and paper -- forced to produce marks on paper at a rate slower than thought -- or with a word processor that highlights spelling, grammar, and logical inconsistencies (I made that last one up) on the fly? Is it better for a programmer to submit batch jobs to a mainframe or have background processes constantly checking the source for problems? The truth is probably a muddy thing. My opinion, however, is that the best (in terms of productivity, creativity, and flow) is highly context dependent and is often at odds with what feels psychologically most productive.

We need time to think; we need (metaphorical) quiet to get into the flow. A tool that shouts "spelling error" with every typo is providing more distraction that help. Yet it feels good to make those red squiggles disappear -- "We're making progress!" -- it feels good to play with fonts and shift the format. A computer is a far different beast that Heidegger's hammer: it can be at hand in many ways simultaneously. It's up to us to ensure that the tools we use are optimizing the important tasks, not the trivial ones.


Summer reading: Spin
Saturday, August 5, 2006

I'm sure many of my readers are saying to themselves (quietly so as not to attract attention to themselves) "It's summer, why isn't Gary reading?". Well say no more, squire, say no more. I have been reading, I've just been keeping quiet about it.

Spin is a wonderful book by the novelist Robert Charles Wilson. Normally, I worry about people with multiple first names -- seems to me that it must leave them confused on some deep, deep level. Of course, I used to think that the group Tony Orlando and Dawn was composed of three people named "Tony," "Orlando," and "Dawn"... it made sense to me. Enough about my neuroses, however, let's talk about the book.

Spin is science fiction in the best sense -- interesting science (yes) and interesting fiction (of course) but the heart of the book is the characters; not the plot nor the gizmos. The "spin" is an event caused by forces unknown for reasons unknown that leaves the earth wrapped in a shell. The stars and moon are no longer visible and satellite communication is impossible. The sun, however, still appears to rise and give warmth. Life goes on. Eventually, it's discovered that time on earth is moving more slowly than that of the universe outside the shell; much more slowly. Weeks on earth correspond to millennia. This means that the sun will consume its supply of hydrogen fuel, enter senescence and grow to consume the earth in less than a century. But why wrap the earth at all? Who is doing this? Is it the end of the world? Is it the rapture?

The book tracks the responses of three friends and the rest of the world to these questions. Wilson writes elegantly and eloquently; beautiful and at times heart rending phrases enliven the interplay of plot and character. In the end, science matters less than people and the hardest gap to cross is not the one between the stars but the one between self and other and, sometimes even less permeable, that between self and self.

Highly recommended for enjoyable science, wonderful writing and beautiful story.


Functional programming fun from Joel
Tuesday, August 1, 2006

Joel Spolsky writes well. He writes like a fish swims. Though not as glib as Paul Graham he still leaves an earnest yet unctuous film around the eyeballs and a bit of a grin around the mouth. In any case, he provides a great lead in for why MapReduce is way cool.


CL-Markdown extensions - first steps
Tuesday, August 1, 2006

I've made a little time to push on the CL-Markdown extension mechanism I wrote about a week or two ago. I've added a few new glitches but the change was less painful that I thought it might be (CL-Markdown swings far towards the organic and messy side of the code I write!)

In any case, the text below (written in Markdown format and parsed by CL-Markdown) describes how to write and use CL-Markdown extensions. The output isn't perfect (there are some glitches with quotations marks in code blocks for one thing), but it's pretty darn good if you ask me... (I know, biased, biased, biased... just like that SCLM). Let me know what you think!

CL-Markdown extensions

CL-Markdown aims to mirror the syntax of John Gruber's Markdown language (and it's getting there slowly!).

the Syntax

CL-Markdown uses { and } as new syntax markers. A single pair of curly braces wraps a function call whereas a double pair denotes a sort of wiki-like link. A function calls looks like:

\{function-name [function-argument]*\}

a wiki-like-link looks like

\{\{ syntax as yet to be determined \}\}

Function calls: { and }

Calling extension functions requires three things:

  1. writing (or finding) the extension that you want
  2. telling CL-Markdown that you want to use the extension
  3. writing your Markdown text with calls to the extension

The last part is the easiest; all you need to do is open a curly brace, type the name of extension function, type in the arguments (separated by spaces) and type a closing curly brace. For example:

"{now}" will generate the text "12:23".

The second step is necessary because CL-Markdown won't recognize functions as functions unless you tell it to up front. After all, you wouldn't want to allow people to execute arbitrary code; it might be a security risk (smile). Because CL-Markdown operates in two stages, there are two times when functions can be called: during parsing and during rendering. Functions active during these stages are keep in the special variables *render-active-functions* and *parse-active-functions*.

An example maight make this clearer. First, we'll call Markdown without specifying any functions:

? (markdown "Today is {today}. It is {now}." 
  :format :html :stream t)
<P>
Today is 
; Warning: Inactive or undefined CL-Markdown function TODAY
; While executing: #
<STANDARD-METHOD RENDER-SPAN-TO-HTML ((EQL EVAL) T)>
. It is 
; Warning: Inactive or undefined CL-Markdown function NOW
; While executing: #
<STANDARD-METHOD RENDER-SPAN-TO-HTML ((EQL EVAL) T)>
. 
</P>

As you can see, the functions weren't ones that Cl-Markdown was ready to recognize, so we got warnings and no text was generated. If we tell CL-Markdown that today and now should be treated as functions, then we see a far prettier picture:

? (let ((*render-active-functions* 
         (append '(today now) *render-active-functions*)))
    (markdown "Today is {today}. It is {now}." 
        :format :html :stream t))
<P>
Today is 1 August 2006. It is 11:36. 
</P>

By now, we've seen how to include function calls in CL-Markdown documents and how to generate those documents with CL-Markdown. The final piece of the puzzle is actually writing the extensions.

Writing Cl-Markdown extensions

There are several ways to write Cl-Markdown extensions. The easiest is one is to write functions active during rendering that return the text that you wish to be included in the document. For example:

(defun today (phase arguments result)
  (declare (ignore phase arguments result))
  (format-date "%e %B %Y" (get-universal-time)))

The format-date command is part of metatilities; it returns a string of the date using the C library inspired date format. This string is placed in the document whereever the function call ({today}) is found.

Alternately, one can use the *output-stream* variable to insert more complicated text. This would look like:

(defun now (phase arguments result)
  (declare (ignore phase arguments result))
  (format *output-stream* "~a" 
    (format-date "%H:%M" (get-universal-time)))
  nil)

(Note that now returns nil so that the date isn't inserted twice!).

The other alternative is to use your function calls to alter the structure of the CL-Markdown document and then let Markdown deal with some or all of the rest. The anchor extension provides an example of this:

(defun anchor (phase &rest args)
  (ecase phase
    (:parse
     (let ((name (caar args))
           (title (cadar args)))
       (setf (item-at (link-info *current-document*) name)
             (make-instance 'link-info
               :id name :url (format nil "#~a" name) 
               :title (or title "")))))
    (:render (let ((name (caar args)))
               (format nil "
<a name='~a' id='~a'>
</a>
"
                       name name)))))

Anchor makes it easier to insert anchors into your document and to link to those anchors from elsewhere. It is active during both parsing and rendering. During the parsing phase, it uses it's arguments to determine the name and title of the link and places this into the current document's link information table. During rendering, it outputs the HTML needed to mark the link.

An even more complex example is the table-of-contents extension:

(defun table-of-contents (phase &rest args)
  (bind ((arg1 (ignore-errors
                (read-from-string (string-upcase 
                                   (first args)))))
         (arg2 (ignore-errors
                (parse-integer (second args))))
         (depth (and arg1 (eq arg1 :depth) arg2)))
    (ecase phase 
      (:parse
       (push (lambda (document)
               (add-anchors document :depth depth))
             (item-at-1 (properties *current-document*)
                        :cleanup-functions))
       nil) 
      (:render
       (bind ((headers (collect-elements
                        (chunks *current-document*)
                        :filter
                        (lambda (x) (header-p x :depth depth)))))
         (when headers
           (format *output-stream*
                   "
<div class='table-of-contents'>
")
           (iterate-elements
            headers
            (lambda (header)
              (bind (((index level text)
                      (item-at-1 (properties header) :anchor)))
                (format *output-stream* "
<a href='#~a' title='~a'>
"
                        (make-ref index level text)
                        (or text ""))
                (render-to-html header)
                (format *output-stream* "
</a>
"))))
           (format *output-stream* "
</div>
")))))))

Because we can't generate a table of contents until the entire document has been parsed, the table-of-contents extension adds a function to the cleanup-functions of the current document. Cleanup functions are called when parsing is complete. The add-anchors functions adds additional chunks to the document before each header (down to some fixed depth). These anchors can then be used by the rendering phase of the table-of-contents extension to link the headers to the sections in the document.


Update: ASDF-Binary-Locations
Tuesday, August 1, 2006

ASDF-Binary-Locations now has another way to customize output locations thanks to Erik Enge. Erik's patch recognizes that sometimes you want to specify output location based on who is currently using the machine. Thus we have the new variable: *include-per-user-information*.

When *centralize-lisp-binaries* is true this variable controls whether or not to customize the output directory based on the current user. It can be nil, t or a string. If it is nil (the default), then no additional information will be added to the output directory. If it is t, then the user's name (as taken from the return value of #'user-homedir-pathname) will be included into the centralized path (just before the lisp-implementation directory). Finally, if *include-per-user-information* is a string, then this string will be included in the output-directory.

Enjoy.


Links to things I thought were cool
Sunday, July 30, 2006

After all, isn't that what the web is all about?

  • This could be the start of something really great: "In simplest terms, a way to fund high-quality, original reporting, in any medium, through donations to a non-profit called NewAssignment.Net."

  • I'm not sure if this is a good use, but it's better than nothing... "One of [Alex Dragulescu's] more notable projects involved creating what he calls Spam Plants. He wrote algorithms that analyzed various text and data points of junk e-mail to produce "organic" images of plantlike structures that spontaneously grew based on incoming spam."

  • Search is almost always interesting: here is a roundup of several "new" ideas

Some CL-Markdown design questions for public review
Tuesday, July 18, 2006

I've been using Peter Seibel's Markup (see also here for a fork by Cyrus Harmon) lately for a project. If you've seen LaTeX then Markup will be familiar. The nicest thing about it is that Peter has made it really easy to extend the language with your own commands. It's also very well integrated with Lisp and with Peter's other tools. On the other hand, it's not Markdown. This means that Markup documents tend to look like documents with Markup and that there is no convenient round trip from Markup to HTML and back again. Now I'd like to be able to say that CL-Markdown provided Markdown's extremely readable syntax with Markup's cool customization but I can't. At least, not yet. Here then, are my thoughts on the matter. Please let me know if anything resonates positively or, perhaps even more importantly, negatively with you.

First, what do I want to support?

  • I'd like an easy to way to associate properties with a document and to use those properties later,
  • I'd like to add some Wiki-link syntax to make using Markdown in a Wiki a bit more natural,
  • I'd like to add simple customization so that one can define commands in Lisp and invoke those commands at well known points during document parsing and production, and
  • I'd like the syntax to seem natural so that it doesn't get too much in the way of normal writing and reading.

Second, what do I propose:

  • I'm intending to make #\{ and #\} special characters (you can always escape them if you need to use them for more pedestrian purposes). Stuff between a pair of curly braces will be treated as a Lisp function invocation where the first word denotes the function and the rest of the words denotes arguments. Here are some examples.

    • {table-of-contents} - add a table of contents (based on H1, H2, and so forth headings). If you only want to go down to H3, then use {table-of-contents :depth 3}.

    • {set-property document-name "general"} - sets a property. In this case, document-name would be a well defined property that controls the name of the output file. You can use {property name} to retreive already set properties.

    • {function document-system} - used to output documentation for the function named 'document-system (cf. Tinaa)

    All of these examples presuppose that I (or someone) has written commands to accept and process them. I think that this mechanism handles about 90% of what I want. The only missing bit is Wiki-links.

  • For Wiki-links, I'm thinking of using double brackets. E.g. {{Another page}} would like to "Another%20Page". But one also wants to be able to specify different text and I think something like {{Another page} different text} would do fine. The syntax starts to get a bit overloaded but I think that even {{Another Page} different text :title This leads to another page :class funky-link} would be fine.

I'm not sure when I'll get to this... Soon, I hope but let me know (gwking@metabang.com) when you see something I've missing. Thanks.


Runner
Tuesday, July 18, 2006

William C. Dietz's Runner is decent science fiction: decent plot, decent characters, decent technology, decent writing. Everything about the book was, well, decent. If it sounds as if I'm damning with faint praise it's because I am. This was a book I finished only because it's the sort of book I can read very fast. There was nothing particularly bad about it but also nothing particularly good. The characters were mostly believable but there was nothing organic about the. The writing was passable but surely not memorable (no phrase savoring here, move along). The plot was a standard "make a journey and pick up allies and enemies and learn things about yourself on the way" and the science was neither deeply explored nor central to the plot. Maybe you'll love it, but there are better books out there to read.


Update: trivial-shell
Monday, July 17, 2006

Trivial Shell now works with CMUCL. Thanks to Satyaki for the patch.


Logo Wiki / Code Wiki
Friday, July 14, 2006

(Via Paolo Amoroso) The Logo Wiki is a great example of a code wiki. It needs some better version control of the code (in case of mistakes and typos) and I'm not sure how it deals with spam, etc. Still, it's fun and it makes it really easy to get a feel for Logo itself -- it helps that one of Logo's was (is?) teaching programming and that the interface is primarily a turtle carrying a pen!

Paolo Amoroso mentions that a Lisp variant would be even cooler and he's right in a way. I'm not sure that the examples would be as fun though.


the Omnivoire's Delimma
Wednesday, July 12, 2006

Dreams of innocence are just that; they usually depend on a denial of reality that can be its own form of hubris.

I'll try to avoid the obvious food puns but Michael Pollan's the Omnivore's Dilemma is a rich dessert of elegant verbal treats, sweetened with thoughts both philosophical and political.

(Quoting local food advocate Joel Salitin) "It's all connected. This farm is more like an organism than a machine, and like any organism it has its proper scale. A mouse is the size of a mouse for a good reason, and a mouse that was the size of an elephant wouldn't do very well."

Pollan's four meals (the industrial, the agrarian, the organic and the gathered) clearly delineate some of our possible relationships with food; what's more, it's clear that the most common relationships are the worst for us and the health of our shared biosphere.

Our food system depends on consumers' not knowing much about it beyond the price disclosed by the checkout scanner. Cheapness and ignorance are mutually reinforcing. And it's a short way from not knowing who's at the other end of your food chain to not caring--to the carelessness of both producers and consumers.

This lack of knowledge -- and indeed the (apparent) strong desire of the powers that be to deny knowledge, crush and impede the Freedom of Information Act, pretend that processed food is just like its real counterparts, distract us with (wonder) bread and circuses, and with fear -- is what worries me. I believe that people will do the right thing (most of the time, by and large) if they know what that thing is and if it's not too hard to do it and if doing it is visible and engenders positive feedback loops. Mass industrial capitalism does not support a human economy of scale.

Regardless of that, however, this is a great book and I enjoyed every minute of my reading!


Update: ASDF-Binary-Locations
Wednesday, July 12, 2006

Thanks to Joshua Moody, ASDF-Binary-Locations now knows something about 64-bit Allegro Common Lisp.


Update: CL-Markdown
Wednesday, July 12, 2006

I've made several small tweaks to CL-Markdown in an effort to bring it a bit closer to its Perl cousin. In particular:

  • I finally began to add to support for escaped characters (e.g., you can now say \*hello\* to output *hello*).
  • Corrected a few edge cases and missing bits of support for links
  • Many some very small improvements in the handling of Markdown coding with code blocks (it's not complete, but every step is a step).

As usual, CL-Markdown has a host of dependencies. You may want to try System-check to see what needs to be updated.


Mark Watson on Global Warming
Saturday, July 8, 2006

Lisp and Java consultant Mark Watson on global warming:

BTW, the solution to global warming (or at least improve the situation) is simple: increase the tax on the use of carbon based fuels while decreasing sales and income taxes. Make it economically viable to create new technologies and industries that reduce our energy and environmental damage "foot prints".

He's right. But America is addicted to oil, air conditioning and cheap corn so we know it won't happen.


Another step towards ASDF system understanding
Thursday, July 6, 2006

As usual, progress is slower than desired or expected and my reach seems to ever exceed my grasp (I think it has something to do with the anatomy of my hand...). Nonetheless, there are now some spiffy system dependency graphs up at enterpriselisp.com. Not surprisingly, CL-PPCRE's is one of the most complex. In case it's not clear (and it probably isn't!), you can navigate between systems by clicking on the graph vertexes. Also, the graphics are all SVG so you'll need a browser that knows how to speak it. More web phun is in the pipeline.


ASDF turns 100
Wednesday, July 5, 2006

I just had the honor of checking in the 100th revision of ASDF. Cool!

The newest feature is the addition of load-preferences and preference-file-for-system/operation. These generic functions can be specialized on the system and the operation.

The out of the box behavior of load-preferences is to do nothing except in the case of a load-op or a load-source-op. For either of those operations, load-preferences calls preference-file-for-system/operation to get a pathname. If the pathname returned exists, load-preferences loads it.

By default, preference-file-for-system/operation returns ~/.asdf/<name-of-system>.lisp. It's been said that an example is worth a 5.19 pictures so here are my preferences for asdf-binary-locations (in /users/gwking/.asdf/asdf-binary-locations.lisp):

(in-package asdf)
(setf *default-toplevel-directory*
      "/users/gwking/temporary/fasls/")
(setf *centralize-lisp-binaries* t)
;; force SBCL things to stay in SBCL
(setf *source-to-target-mappings*
      '(("/usr/local/lib/sbcl/" nil)
        ("/usr/local/lib/sbcl0.9.9" nil)
        ("/usr/local/lib/sbcl0.9.7" nil)))

These put all of my compiled files into sub-directories of ~/temporary/fasls (except for SBCL stuff which stay where they are expected).

The nice thing about this is that the preferences are loaded after the system whose preferences are being set is loaded. This is nice because it's hard to set preferences for a system that doesn't exist yet (because, for example, the home package of the variables you'd like to set isn't there).

(Thanks to the CCLAN and especially Christophe Rhodes who provided valuable feedback! Any remaining errors are probably the fault of either the Bush or the Clinton administrations. Or both of them together).


Those wacky biologists...
Tuesday, July 4, 2006

A team from the University of Ulm in Germany and the University of Zurich set a band of Saharan desert ants out questing for food. They eliminated direction as a factor by sending the ants through a long, straight tunnel. Once the ants reached the food, the scientists gathered them up and made some amendments to their legs: Some of the ants were fitted with stilts, while others had their appendages partially amputated.

Actually, I think that they had a great idea! Calling it "counting", however, reads more into the data than is available. Many animals are known to count accurately and to keep track of things like rate, etc. (Charles Gallistel's book is a wonderful read if you're interested in learning much, much, more!) but just because a human would solve a problem using solution X doesn't mean that an animal uses X too (even if we can't think of any other method to use than X...).


Updated: trivial shell
Monday, July 3, 2006

I fixed a typo in trivial-shell (sb!ext instead of sb-ext... go figure).


July Fourth in America
Monday, July 3, 2006

With apologies in advance for the politics... Howard Zinn says it for me:

On this July 4, we would do well to renounce nationalism and all its symbols: its flags, its pledges of allegiance, its anthems, its insistence in song that God must single out America to be blessed.

There's probably a bad joke here about Lisp being marginalized and America becoming increasingly marginalized -- or something -- but I don't want to think that hard.

... nationalism is given a special virulence when it is said to be blessed by Providence. Today we have a president, invading two countries in four years, who announced on the campaign trail last year that God speaks through him.

We need to refute the idea that our nation is different from, morally superior to, the other imperial powers of world history.

We need to assert our allegiance to the human race, and not to any one nation.

Transparency. Openness. Aim for the heights. Think the best of people. Do good and be nice.

keep peace.


Updated: CL-Graph
Saturday, July 1, 2006

Thanks to Attila Lendvai for some new patches to CL-Graph. He improved the GraphViz support and added some &allow-other-keys to avoid some warnings. I also just added the #'delete-all-edges generic function.


Two papers on Racer
Thursday, June 29, 2006

The semantic web is one of those great ideas that hasn't quite jelled. Eventually, the infrastructure, specifications and plans that are welling up out of the web's interstices are going to come together into something beautiful and strange. One of the droplets slouching towards us is Racer: a reasoner that takes all the little factoids expressed in RDF, DAML+OIL, OWL and so forth and derives consequences. These two papers (Racer: A Core Inference Engine for the Semantic Web and Racer: An OWL Reasoning Agent for the Semantic Web) share much of the same text so I'm describing them together. They provide a very high level overview of the various languages used to express semantic web knowledge (the acronym salad I listed above) and how Racer can use them to explore consistency, sub-classing (and other relationships), role filling and so forth. The papers describe several actual systems (e.g., RICE: Racer Interactive Client Environment, OilEd, and DIG). Neither paper is particularly useful in terms of giving compelling examples of how the semantic web is going to make our lives better (they give features not solutions) but they're a start.


#+Ignore is fine, #+(or) is bliss
Thursday, June 29, 2006

Although Common Lisp has a multiline-comment facility (that even handles nesting), many Lispers tend to use the #+ / #- reader macros to temporarily remove chunks of code from the view of the evaluator (note that these do not remove the code from the view of the reader, an issue which often leads to confusion the first time you can't load code that you think is 'commented' out — which is why it's important to remember that #+/#+ is not a commenting facility even though you may be using it like one...). The reason for this in my case is simple: laziness. I'd rather do something in one place than in two and it's easier to place (and remove) #+ignore in front of a form rather than wrapping the form in #| and |#. Frankly, I think that this sort of laziness is part of the human condition. If we really want most people to do the right thing most of the time, then we need to make it easy and convenient to do the right thing (e.g., recycle, carpool, keeping documentation up to date, and so on).

Using the reader macro to hide code isn't a bad practice as practices go (it's certainly healthier than coding in C or C++ <smile>) but lurking in the back of every coder's mind is that horrible question: "What if," they say to themselves in the still hours of the night, "What if someone pushes :ignore onto the *features* list?" (or :no, :later, :old, :new, :nil, :never, :not-yet, ...)? Well, I was looking at some of Peter Seibel's code recently and found a very nice way to have my cake even after eating it. There is form that is guaranteed to return nil regardless of what is on *features*? That form is #+(or) and it's a very nice thing indeed.


Microsoft is sharing code
Tuesday, June 27, 2006

I think that it will be interesting to see how this functions. Microsoft certainly has the resources to make it a useful code garden but I'm not sure if the political will is really there (shared source isn't open source). Coincidentally enough, one of the features I'd like to support at Enterprise Lisp is the ability to share Lisp code easily and with structure. The CLiki and Lisp Paste supply a good base but I think that a bit more infrastructure could make a bit difference in usability and utility.


Updates; E8EL is live
Tuesday, June 27, 2006

Thanks to the Tech Co-op, Enterprise Lisp is live and on-line in what I hope will be it's permanent home. System-check has been updated to version 0.1.6 to accommodate the new home.


Pretty wonderful (if you ask me...)
Saturday, June 24, 2006

Little brown dress:

I am making one small, personal attempt to confront consumerism by refusing to change my dress for 365 days.

I heard the artist interviewed last night on WAMC. I think it's great!


Ain't soccer grand
Saturday, June 24, 2006

Dynamic, fluid, a constant reinterpretation of tactics and strategy... like Life, like Lisp.


Sparklines + AJAX = nice
Thursday, June 22, 2006

Sparklines are little graphs that run in-line with your text. I believe that Edward Tufte invented them and I know that he talks about them in his upcoming book, Beautiful Evidence. Several folks have written code to create them (I think that there is even a Lisp implementation out there somewhere for CL-PDF?). Joe Gregorio has a nice Python AJAX web application if you want to play with them yourself.


How come Skype and Apple's Address Book don't play nice?
Thursday, June 22, 2006

Skype stores it's own contact data. How 1990s.


Common Lisp and RSS
Thursday, June 22, 2006

I've just started to start to work on an RSS feed for the Enterprise Lisp System Checker. The thing is, I can't find any Lisp libraries that make generating RSS feeds as easy as I think it should be (Kevin Rosenberg's CL-RSS is still available but seems unmaintained and only generates and parses RSS 0.92 feeds). So, in typical lisp hacker fashion, I wondered if I should first write a simple RSS library; something that can parse and generate RSS 0.92, RSS 1.0, RSS 2.0 and Atom feeds. If I did, there are two obvious designs: a object based one and a language based one. In the former, there would be classes for feeds and items and the usual things would happen to create, parse and generate feeds. In the later, RSS feeds would like like an XML template language (e.g., LML2, YACLML, and so forth).

The language approach would be conceptually simple but provides no useful abstractions (and no help in parsing). I think that templates make sense for a language like HTML because HTML content can be just about anything. RSS, on the other hand, always looks like a channel description and a list of items. The template just doesn't help that much. So on to objects and classes and such...


System Checker
Friday, June 16, 2006

The Enterprise Lisp system's checker has reached a stable point and I'm also happy with system-check. Unless I hear otherwise, the next steps will be (in no particular order):

  • Adding a Checker System status report - is it running, how many requests has it received, etc. Aside from helping me to know what things need focus, this information should be helpful to library writers and developers: what implementations are being used? How often are libraries changing, and so forth.
  • Adding an explain mode to system-check. Currently, update can tell you which of your libraries are out of date but I think that it might be helpful to see exactly which files have changed.
  • Creating an RSS feed to track which libraries are being updated. It might be nice to allow Lispers to register and customize the feed but I don't think I'll worry about that for a bit yet.

Once these features are stable (and once I've moved operations to a stable system), then I'll get back to ASDF-Install-tester / ASDF-Status and begin integrating them into Enterprise Lisp.


more various updates
Friday, June 16, 2006

ASDF-Binary-locations now knows about 64-bit OpenMCL (thanks to Joshua Moody for the heads up and the patch).

I've been having some troubles keeping the system currently hosting Enterprise Lisp up and running (those darn kids <smile>). I'm also ready to move over onto a virtual Xen thing run by the nice folks at GrokThis.

I've also improved the systems report slightly so that it is clearer what the systems checker found amiss. There are now five kinds of errors:

  • System not available - the tarball the CLiki points to is a 404
  • System file error - the tarball couldn't be digested for some other reason
  • Signature not available - the GPG signature file is a 404
  • Signature file error - the signature file made the checker unhappy for some other reason
  • Extraction Error - Something went amiss (obviously, this category needs to be broken out)

Note that signature problems can be restarted around (especially if you have the latest ASDF-Install) so it is possible to have a valid system and a valid signature even if the system status is not OK.


various updates
Thursday, June 15, 2006

  • CL-HTML-Parse - now happy for Allegro modern Lisp
  • CL-Graph - fixed bug in find-edge-between-vertexes that caused an infinite loop when both vertexes were not in the graph (Thanks to Joshua Moody)
  • CL-Containers - fixed bug in item-at-1 for alist-containers
  • ASDF-Binary-locations - now uses the file ~/.asdf/asdf-binary-locations.lisp to read preferences. This occurs after the code has been loaded and makes setting things like *source-to-target-mappings* a bit cleaner (IMHO). The pathname is created using:
(merge-pathnames
 (make-pathname :name "asdf-binary-locations"
                :type "lisp"
                :directory '(:relative ".asdf"))
 (truename (user-homedir-pathname)))

More why? (not Y)
Wednesday, June 14, 2006

I've received some follow-up on my "Why isn't Lisp da bomb for web development" post from last week. Since the CLiki isn't the place to talk about this kind of thing, I've made a little wiki at Infogami for it: lispandwebdev. Without going into details, the nub of the problem may be that Lispers are busy writing great stuff for the few whereas the Ruby on Rails folks et. al. are catering to the plebeian masses. I don't want to get sucked into language wars or anything like "my language is better than your language" or even the wistful "if only they could see it, then they would understand that Lisp is the way"... I also don't want to disparage the existing Lisp frameworks like BNKR, Lisp on Lines, UCW, the others I've forgotten and so forth. At issue, I think, is the sort of vitriol that leads to disasters like this (also noted by Stefan Scholl). This is happening very publically on Reddit and many people will have their prejudices created or confirmed that Lispers are arrogant smug weenies.

I find this almost unbearably sad.


ASDF-Install 0.5.5
Wednesday, June 14, 2006

Version 0.5.5 of ASDF-Install is ASDF-Installable and also available in the usual Darcs and tarball formats. This version starts to rationalize some of the where to look for system files registry management (i.e., there is now a function asdf-install:add-registry-location). It also adds a new restart so that packages can be installed even if there is no GPG signature file available (e.g., trivial-gray-streams).

See the change log for all the gory details)


two quick notes
Friday, June 9, 2006

I bumped up ASDF-Install to 0.5.4. The changes are very minor and serve only to make processing putative future keyword arguments a bit more consistent.

I also found a bug in system-check. At one point I had remembered to wrap my HTTP POST request in a with-standard-io-syntax but then I ran into some confusion with SBCL and I think pretty printing... To be honest, I never figured it out (slinks away with shame faced admission of guilt...). In any case, without the with-standard-io-syntax, it was quite possible for your personal print settings to muck things up badly (e.g., I have *print-length* set to 10 and the server didn't know what to do with an ellipsis). So, if you have already downloaded system-check, you might want to do so again. If you haven't, why, then, you should -- how is that supposed to be punctuated anyway? It makes sense in a conversation but I'm not sure how to write it... Anyway, please do check out system-check and let me know how to make it suit your needs.


Why?
Friday, June 9, 2006

Joel Reymont is leaning toward Ruby on Rails over Lisp for web application development and I don't get it. Joel is very smart and on top of things and I figure that he's right: Lisp just isn't there yet when it comes to building web applications quickly and easily unless you want to make it half your own private research project.

But Why? Lisp is good. Lisp excels at Domain Specific Languages. Lisp has the REPL for goodness sake. It can't just be that there are many Lisp dialects / implementations and that it's a bit hard to get, say, a socket library that works on all of them... can it? I mean, the MediaWiki runs on PHP (I think) and everything I've seen or heard about PHP is "...ick...". So why does the MediaWiki have all the loving goodness and we have the CLiki? (This isn't to diss the CLiki by the way, it's cool; I like it but as wikis go there isn't much there and nothing much has happened to it for ages.)

So bloggers on Planet Lisp, start your engines please... I'd like several essays from people who know the skinny on web dev and Lisp. Is Joel wrong? Is there a missing secret ingredient? what does Lisp need to come from behind in the web application development language race? After all, Ruby was a dark horse until Rails came along. The best essay gets a prize (to be announced later once I think of something).


That was fast
Friday, June 9, 2006

I bought a new hard drive for my laptop yesterday afternoon (the 8th) from PBParts.com. They promised that the drive would ship sometime before the 13th which seemed fine to me.

Guess what arrived today via FedEx. That's right, I've got the little thing already. It's always good to lower expectations but I'm very impressed.

It looks like a hardware kind of night tonight.


ASDF Checker report
Thursday, June 8, 2006

Here's the first ASDF Checker Summary report from Enterprise Lisp. The checker process runs daily and checks all of the known ASDF installable systems to see if they seem to work (i.e., that they download, have GPG signatures, that their system files seem to make sense and so on). The data from checker will be grist for tester once I finish refactoring ASDF-Install-tester to create it.

There is much room for improvement in the report (and feedback is welcome!). The last three columns show the system's status, whether we have a valid system file and whether or not we were able to create a system signature. The current system column isn't too useful; I need to spend a bit of time looking at the data and creating informative codes... A valid system is one whose system definition the checker could load -- it currently conveys no more information than whether or not the system has a status of error. Finally, the system signature is a list of the direct files of the systems and their universal times. Here are two examples:

? (dsc:system-signature 'moptilities)
(("moptilities.asd" . 3345750061) 
 ("dev:moptilities.lisp" . 3356703878))
? (dsc:system-signature 'anaphora)
(("anaphora.asd" . 3287421247)
 ("packages.lisp" . 3287421247)
 ("early.lisp" . 3287421247)
 ("symbolic.lisp" . 3287421247)
 ("anaphora.lisp" . 3287421247))
? 

These signatures are part of defsystem-compatibility. Checker needs to take more pains than it yet does to ensure that features and such don't influence signature computation. That's another one of the seemingly endless list of next steps!


On average I'm in the middle of a hot bed of Lisp activity
Wednesday, June 7, 2006

Unfortunately, the distribution is highly bimodal . My LinkedIn network shows that I have lots of connections in San Francisco and in England and Europe. Oh well, Lisp is catching on and eventually there is bound to more activity here. I wish that America had real high speed rail so that I could easily zoop down to NYC and get more involved with LispNYC.

If wishes were fishes... we'd all cast nets.


announce: system-check (beta)
Tuesday, June 6, 2006

Enterprise Lisp has been rumbling and grumbling slowly to life around me. Today I'm announcing the first beta of System-check, an asdf-upgrade like facility, that will eventually integrate with an improved ASDF-Install-tester and other cool things. The idea behind system-check is that it's easier to centralize the testing of Lisp libraries that it is to get all of the library developers to agree on versioning schemes and the like. Therefore Enterprise Lisp will regularly check on all ASDF installable systems and

  • make sure the system can be downloaded,
  • make sure that the GPG signature can be retrieved,
  • make sure that the signature file is valid,
  • make sure that the tar archive can be decompressed and
  • that the archive contains a valid system definition
  • that can be properly loaded into a lisp system

This will be coupled with an improved and distributed ASDF-Install-tester that can go on to make sure that systems actually do install on a variety of Lisps and environments.

System-Check is the client that you can run to see if your systems are up to date. Here is an example session (in OpenMCL). First, we load system-check. It displays instructions when it finishes loading:

? (asdf:oos 'asdf:load-op 'system-check)
; loading system definition from user-home:darcs;asdf-systems;system-check.asd.newest into #<Package "ASDF0">


----------------------------------------------------------------------
;; System-check helps keep your ASDF-Installable systems up to date 
;; by communicating with enterpriselisp.com via HTTP. Enterprise Lisp 
;; checks ASDF-Installable systems regularly to make sure that they 
;; work properly and install correctly.  
;; 
;; System-check has three main entry 
;; 
;; 1. update - checks all of your ASDF-Installed systems against the 
;; most recent available version and lets you select which ones to 
;; 
;; 2. gather - performs the same check as update but returns the 
;; results as a 
;; 
;; 3. check-system - performs a check on a single 
;; 
;; More information can be found in the documentation or at 
;; 
;; System-check can look for systems in several different 
;; 
;; * installed-systems (used by default) - returns a list of systems 
;; that seem to have been ASDF installed (see its documentation for 
;; 
;; * installable-systems - returns a list of all of the available 
;; systems (using 
;; 
;; Both of these functions take the keyword argument 
;; :only-asdf-installable?. If this is true, then System-check will 
;; query the CLiki to see if the system is ASDF installable.  
;; 

We cut to the chase and call the update function.

? (system-check:update)
Searching for systems.
; loading system definition from /Users/gwking/.asdf-install-dir/systems/cl-difflib.asd into #<Package "ASDF1">
; registering #<SYSTEM :CL-DIFFLIB #x84E1786> as CL-DIFFLIB
; loading system definition from /Users/gwking/.asdf-install-dir/systems/uffi.asd into #<Package "ASDF1">
; registering #<SYSTEM UFFI #x8514DE6> as UFFI

Checking 59 systems...........................................................

Results
============================================================
  4    we-are-latest  (local system has more recent changes than the remote)
------------------------------------------------------------
  xmls                          mk-defsystem                  
  cl-prevalence                 cl-html-diff                  


  6     both-changed  (system has modifications locally and remotely)
------------------------------------------------------------
  system-check                  metatilities                  
  lml2                          defsystem-compatibility       
  cl-graph                      cl-containers                 


  8            error  (the server was unable to check the system)
------------------------------------------------------------
  split-sequence                net-telent-date               
  ironclad                      clx                           
  cl-store                      asdf-install                  
  asdf-binary-locations         arnesi                        


 11      need-update  (remote system has changes)
------------------------------------------------------------
  trivial-http                  tinaa                         
  moptilities                   metacopy                      
  metabang-bind                 lift                          
  cl-variates                   cl-mathstats                  
  cl-html-parse                 asdf-system-connections       
  araneida                      


 30               ok  (local system is up to date)
------------------------------------------------------------
  xlunit                        wilbur-ext                    
  uffi                          trivial-configuration-parser  
  s-xml-rpc                     s-xml                         
  s-utils                       s-sysdeps                     
  s-http-server                 s-http-client                 
  s-base64                      rt                            
  puri                          md5                           
  lw-compat                     kmrcl                         
  html-encode                   diff                          
  contextl                      clsql                         
  closer-mop                    cl-utilities                  
  cl-fad                        cl-dot                        
  cl-difflib                    cl-base64                     
  cl-ajax                       cffi                          
  asdf-upgrade                  anaphora                      


Now that we've seen the report, we're asked what we want to update and ASDF-Install takes away the show.

We'll now ask which kinds of systems you want to update. 
You will be able to confirm before the update process 
begins.

11 systems need to be updated. Do you want to update them? (y or n)  y

Marking these systems for update: araneida, asdf-system-connections, cl-html-parse, cl-mathstats, cl-variates, lift, metabang-bind, metacopy, moptilities, tinaa, trivial-http.

6 systems are changed locally and remotely. Do you want to update them? (y or n)  n


Updating 11 systems
Install where?
0) System-wide install: 
   System in /Users/gwking/.asdf-install-dir/systems/site-systems/
   Files in /Users/gwking/.asdf-install-dir/systems/site/ 
1) Personal installation: 
   System in /Users/gwking/.asdf-install-dir/systems/
   Files in /Users/gwking/.asdf-install-dir/site/ 
2) Abort installation.
 --> 1
;;; ASDF-INSTALL: Downloading 531636 bytes from http://common-lisp.net/project/araneida/release/araneida-latest.tar.gz to araneida.asdf-install-tmp ...


"gpg: Signature made Fri Dec  2 12:55:13 2005 EST using DSA key ID 5E55AFEB" 
"[GNUPG:] ERRSIG 19876FCE5E55AFEB 17 2 00 1133546113 9" 
"[GNUPG:] NO_PUBKEY 19876FCE5E55AFEB" 
"gpg: Can't check signature: public key not found" 
> Error in process listener(1): No key found for key id 0x#1=(19876FCE5E55AFEB 17 2 00 1133546113 9). Try some command like 
>                                 gpg  --recv-keys 0x#1#
> While executing: #<Anonymous Function #x8426CE6>
> Type :POP to abort.
Type :? for other options.
1 > :r
0. Return to break level 1.
1. #<RESTART ABORT-BREAK #x2947FE>
2. Don't check GPG signature for this package
3. Retry GPG check (e.g., after downloading the key)
4. Return to toplevel.
5. #<RESTART ABORT-BREAK #x294CBE>
6. Reset this process
7. Kill this process
1 > (:c 2)
Invoking restart: Don't check GPG signature for this package
;;; ASDF-INSTALL: Installing araneida.asdf-install-tmp in /Users/gwking/.asdf-install-dir/site/, /Users/gwking/.asdf-install-dir/systems/
araneida-version-0.90.1/
;;; and so on...

We can also check the status of a single system. I'll turn on the verbose mode so that you can see what gets passed back and forth.

? (system-check:check-system 'anaphora :verbose? t)
Signature: (:SYSTEM :ANAPHORA :SIGNATURE (("anaphora.asd" . 3287421247)
 ("packages.lisp" . 3287421247) ("early.lisp" . 3287421247) ("symbolic.lisp" . 3287421247) 
("anaphora.lisp" . 3287421247)) 
:FEATURES (:KMR-MOP :CLX-ANSI-COMMON-LISP :ARANEIDA-THREADS :CL-FAD :CLOSER-MOP :ASDF-INSTALL :ASDF :GWKING :PRIMARY-CLASSES :CCL :CCL-2 
:CCL-3 :CCL-4 :CORAL :COMMON-LISP :MCL :OPENMCL :ANSI-CL :PROCESSES :UNIX :OPENMCL-NATIVE-THREADS :OPENMCL-PARTIAL-MOP 
:MCL-COMMON-MOP-SUBSET :OPENMCL-MOP-2 :POWERPC :PPC-TARGET :PPC-CLOS :PPC32-TARGET 
:PPC32-HOST :DARWINPPC-TARGET :DARWINPPC-HOST :DARWIN 
:POWEROPEN-TARGET :32-BIT-TARGET :32-BIT-HOST :BIG-ENDIAN-TARGET 
:BIG-ENDIAN-HOST :OPENMCL-PRIVATE-HASH-TABLES) 
:IMPLEMENTATION "openmcl-1.0-darwin-powerpc" 
:VERSION "0.1" 
:PATHNAME-SEPARATOR "/")
  Response: 200
  Headers: ((:DATE . "Wed, 07 Jun 2006 16:24:23 GMT") (:SERVER . "Apache/1.3.33 (Darwin) mod_lisp/2.43") 
(:SIGNATURE-RESULT . "NIL") (:POSTED-CONTENT . "(:SYSTEM :ANAPHORA :SIGNATURE ((\"anaphora.asd\" . 3287421247) (\"packages.lisp\" . 3287421247) (\"early.lisp\" . 3287421247) (\"symbolic.lisp\" . 3287421247) (\"anaphora.lisp\" . 3287421247)) :FEATURES (:KMR-MOP :CLX-ANSI-COMMON-LISP :ARANEIDA-THREADS :CL-FAD :CLOSER-MOP :ASDF-INSTALL :ASDF :GWKING :PRIMARY-CLASSES :CCL :CCL-2 :CCL-3 :CCL-4 :CORAL :COMMON-LISP :MCL :OPENMCL :ANSI-CL :PROCESSES :UNIX :OPENMCL-NATIVE-THREADS :OPENMCL-PARTIAL-MOP :MCL-COMMON-MOP-SUBSET :OPENMCL-MOP-2 :POWERPC :PPC-TARGET :PPC-CLOS :PPC32-TARGET :PPC32-HOST :DARWINPPC-TARGET :DARWINPPC-HOST :DARWIN :POWEROPEN-TARGET :32-BIT-TARGET :32-BIT-HOST :BIG-ENDIAN-TARGET :BIG-ENDIAN-HOST :OPENMCL-PRIVATE-HASH-TABLES) :IMPLEMENTATION \"openmcl-1.0-darwin-powerpc\" :VERSION \"0.1\" :PATHNAME-SEPARATOR \"/\")") 
(:CONTENT-LENGTH . "772") (:REMOTE-IP-ADDR . "155.212.227.170") (:REMOTE-IP-PORT . "30528") (:SCRIPT-FILENAME . "/Library/WebServer/Documents/compare.lsp") (:SERVER-IP-ADDR . "10.0.1.2") (:SERVER-IP-PORT . "80") (:SERVER-PROTOCOL . "HTTP/1.0") (:METHOD . "POST") 
(:URL . "http://metabang.gotdns.com/compare.lsp") (:SERVER-ID . "metabang") (:SERVER-BASEVERSION . "Apache/1.3.28") (:MODLISP-VERSION . "2.43") (:HOST . "metabang.gotdns.com") (:USER-AGENT . "simple HTTP for Common Lisp")
 (:CONNECTION . "close") (:CONTENT-TYPE . "x-www-form-urlencoded"))
:OK
?

System-check and the Enterprise Lisp system checker are both in beta at the moment. I've tested on several lisps but expect that problems and edge cases remain. Please let me know if you try system-check and it fails. I'm also working on some improvements to ASDF-Install so that it can behave more reasonably when installing multiple systems and with improving the back and forth between the client and the server. Enterprise Lisp is all about making Lisp easier for everyone, so please let me know if anything seems awry.


announce: simple-http
Tuesday, June 6, 2006

The world didn't need another HTTP library. Unfortunately, I did. Thus is born Simple-HTTP. It builds on the base of Trivial-HTTP and adds things like HTTP Head, HTTP download and HTTP-resolve. Eventually, it will be pulling in some useful bits and pieces from Lemonodor and Lisp Paste (e.g., here and here). Those that know should tell me what else would be worth adding. Enjoy.


announce: improved CL-Markdown
Monday, June 5, 2006

These changes aren't nearly as cool as ABL's but CL-Markdown has taken another few small steps forward toward Markdown compliance. The latest code tweaks the block structure processing and improves paragraph recognition logic. This means that its output looks more like that produced with the real markdown.


announce: improved asdf-binary-locations
Monday, June 5, 2006

Thanks to a patch from Peter Seibel and several good ideas and hints from Robert Goldman, ASDF-Binary-Locations has some changes and improvements. The most significant change is that the variable *system-configuration-paths* has been renamed to source-to-target-mappings* because the latter name is, IMHO, much, much better than the former. There are also two new variables to control behavior and the innards have been rewritten with generic functions so that you can have fine control over where exactly things go at both the system, the operation and the component level.

The three control variables are:

  • *centralize-lisp-binaries* - If true, compiled lisp files without an explicit mapping (see *source-to-target-mappings*) will be placed in subdirectories of *default-toplevel-directory*. If false, then compiled lisp files without an explicitly mapping will be placed in subdirectories of their sources.
  • *default-toplevel-directory* - If *centralize-lisp-binaries* is true, then compiled lisp files without an explicit mapping \(see *source-to-target-mappings*\) will be placed in subdirectories of *default-toplevel-directory*.
  • *source-to-target-mappings* - The *source-to-target-mappings* variable specifies mappings from source to target. If the target is nil, then it means to not map the source to anything. I.e., to leave it as is. This has the effect of turning off ASDF-Binary-Locations for the given source directory.

Note that if you've already set *system-configuration-paths* (e.g., in you lisp startup file), then ASDF-Binary-Locations will warn you about the change and automagically set *source-to-target-mappings* to whatever value you gave *system-configuration-paths*.

Also note that the finer control mentioned about has not been extensively tested (i.e., it really hasn't been tested at all) yet but will be once I finish the test suite. Won't that be sweet!

Please let me know if your milage varies.


more identity theft on the way...
Sunday, June 4, 2006

The names and credit-card numbers of 243,000 Hotels.com customers were on a laptop computer stolen from an employee of accounting firm Ernst & Young, according to sources familiar with the matter.

is it standard practice to provide auditors with names and credit care numbers? Why would they need that information? Why aren't they given anonymized data? If "The security and confidentiality of our client information is of critical importance to Ernst & Young", then why don't they do more to take it seriously?


the Golem's Eye
Wednesday, May 31, 2006

Book two of the Bartimaeus trilogy finds the magician Nicholas and the Djinn Bartimaeus once again embroiled in the scheming power politics of an Europe where magic rules. Hidden forces further devious plots: the resistance returns and is betrayed from within; a Golem is destroying the city; betrayal and duplicity abound. In short, it's a lot of fun and worth the enjoyable read. Yes, it is a book for young adults (hey, I'm only 42 (and that, as I suddenly recall, is the answer to everything)) but you'll probably enjoy it too.


the Amulet of Samarkand
Wednesday, May 31, 2006

One of the pleasures of having kids is that you can read kids book without feeling that you're too old to be reading them. The Amulet of Samarkand is very much a kids book but its a good one and it comes with interstitial themes worthy of adults. The book tells the tale of an earth where magic works thanks to the ability of some humans to summon spirits of all kinds. It is part one of the three part Bartimaeus trilogy (the eponymous name comes from that of the main narrator, a djinn of remarkable ability (including much sarcasm and wit). Amulet follows a complex plot with a young hero/anti-hero, many magicians of dubious intent, political scheming and many levels, a anti-magical resistance and enough twists to confuse an adder. It is all painted with a broad brush full of vim, verve and vitality. Buried under all this enjoyable fluff, however, are the messages that power is often neither to be trusted, nor desired; that the beneficence of a government is often inversely proportional to how loudly it congratulates itself; and that (to quote Bruce Cockburn) "when you get down to the bottom, loves the only thing that matters."


It's probably because I'm tired
Tuesday, May 30, 2006

and it's unlikely you really want to know. Nonetheless, here is my response to the iDon't marketing campaign of sandisk

Yes. We are all individuals. But good taste means buying high quality, extremely usable music players that work circles around the competition. This "oh so hip" concealed ad of yours is tacky, tasteless and offensive. iDo iListen to my iPod. iDon't listen, buy or even want to see a sandisk knock off. Get a grip. Get a life. If you want to sell music players, make a good one and stop insulting success.

ok, no more venting until at least tomorrow... (hmm, that gives me 7-minutes).


CLSQL and me: I feel so Microsoft Access ugly
Tuesday, May 30, 2006

I did a bunch of database stuff back when SQL 92 was exciting. I used early PC database systems like dBase IV, Foxpro, Borland's Paradox, and Microsoft's Access. Since auto-increment columns hadn't reached down to those trenches, I ended up doing the old "keep track of the maximum key in a separate key table yourself" trick. Not fun, but effective -- well, it works.

Today, I was messing with CLSQL (connecting to SQLite) and felt stymied trying to correctly get my primary keys to work. In the hopes that a wiser soul will feel my pain, here is what I did.

(def-view-class primary-key-mixin ()
  ((id :db-kind :base :type integer
       :db-constraints (:primary-key)
       :reader id :initarg :id)
   (table-name :db-kind :virtual 
	       :reader table-name
	       :initarg :table-name)))

(defmethod initialize-instance :after ((instance primary-key-mixin) &key)
  (unless (and (slot-boundp instance 'id) (id instance))
    (setf (slot-value instance 'id) (find-next-id (table-name instance)))))
					
(def-view-class sample-table (primary-key-mixin)
  ((name :db-kind :base :type (varchar 40)
	 :db-constraints (:unique :not-null)
	 :accessor name :initarg :name))
  (:default-initargs
      :table-name "managed-system"))

(def-view-class primary-key ()
  ((table-name :db-kind :base 
	       :db-constraints :primary-key
	       :type (string 20)
	       :accessor table-name
	       :initarg :table-name)
   (max-key :db-kind :base :type integer
	    :accessor max-key
	    :initarg :max-key
	    :initform 0)))

(defun recreate-tables (&key really?)
  (unless really?
    (cerror "Yes, really!" "Do you really want to trash the tables and start fresh?"))
  (clsql:drop-table [primary-key] :if-does-not-exist :ignore)
  (create-view-from-class 'primary-key)
  (clsql:drop-table [sample-table] :if-does-not-exist :ignore)
  (create-view-from-class 'sample-table)
  )

(defun find-next-id (table-name)
  (with-transaction nil
    (bind ((exists?
	    (select [max-key] 
		    :from [primary-key]
		    :where [= [table-name] table-name]
		    :flatp t))
           (next-key (if exists? (1+ (first exists?)) 0)))
      (if exists?
        (update-records [primary-key]
			:av-pairs `(([max-key] ,next-key))
			:where [= [table-name] table-name])
        (insert-records
         :into [primary-key]
         :av-pairs `(([table-name] ,table-name) ([max-key] ,next-key))))
      (values next-key))))

This defines two view-classes (and the recreate-tables function makes tables out them). The primary-key table keeps track of the highest key assigned so far; the primary-key-mixin uses it to assign keys as necessary. Since instances can be created and not added to the database, it's quite likely that we'll have gaps but that's not a big deal. This let's me execute code like:

? (setf *s* (make-instance 'sample-table :name "Gary"))
#<MANAGED-SYSTEM #x88C5F8E>
? (update-records-from-instance *s*)
; no value
? (setf *s* (make-instance 'sample-table :name "Wendy"))
#<MANAGED-SYSTEM #x88C5F9A>
? (update-records-from-instance *s*)
; no value
? (select [*] :from [managed-system])
(("cl-containers" 0) ("moptilities" 1))
("NAME" "ID")

Which, while not really exciting, is at least moderately painless. Aside from the fact that doing all of this key management myself strikes me as unbearably last decade (not to mention error prone and probably non-union), I figure that there must be a better way.

Any suggestions?


asdf:test-op redux
Tuesday, May 30, 2006

I wrote about asdf:test-op a bit ago and have since modified many of my opinions as to the way to do it. Yesterday, I noticed that Greg Pfeil had come to exactly my new conclusions back in late March (I read planet lisp quasi-religiously but missed this somehow). The chief changes are to move most everything to the system definition (not the test system definition) so that

(asdf:oos 'asdf:test-op 'my-system)

will test my-system (makes sense!). The only bit Greg leaves out is

(defmethod operation-done-p 
           ((o test-op)
            (c (eql (find-system 'moptilities))))
  (values nil))

Which keeps ASDF thinking that your test operation hasn't been done. (As we all know, testing is never done). Thanks Greg.


Comments?
Sunday, May 28, 2006

I've been meaning (and hoping) to write my own simple comment engine for the last upteen months. Today, I broke down and signed up with Haloscan. I'm not sure how customizable it can be or how I'll like it but I'm willing to see what happens.


Daring fireball
Sunday, May 28, 2006

I like John Gruber.

Can anyone explain how this seven-tiered edition plan is good for anyone other than the managers within Microsoft's bureaucracy? Microsoft is turning into a company that values management decisions that increase complexity over design decisions that increase clarity.

I love simplicity. I don't want to fight with my machine or with my inner mustard chooser. Too often, too much is not more than enough, it's too damn much.


Bellwether
Sunday, May 28, 2006

When I mentioned fads last week, Bill Clementson was kind enough to recommend me two books: bellwether by Connie Willis and Pattern Recognition by William Gibson. I've read quite a bit of Gibson's work over the years -- dark, but interesting -- but had never even heard of Willis. After reading bellwether, I'm very happy to have finally been introduced.

Willis is a delightful writer whose characters speak with the sort of ironic detachment of the modern person and yet still remain fully human and approachable (in this, she reminds me of Walker Percy). Her subject in bellwether, appropriately enough, is fads and trends and why it is that they ebb and flow across the human condition subject to a tidal pull all their own. The book offers an answer (though I don't think Willis believes it completely): that genius arises out of chaos, as a sort of self-organized criticality that forms because anything else would cause total system collapse; and that trends are both part of this self-organization and also the result of human bellwethers who are "a little faster, a little more greedy". Bellwethers lead without leading (though not in the Taoist sense <smile>) and move at least partly to their own deep beat... pulling at least some of the rest of us in their wake.

Regardless of its sociological value, however, this book is a wonderful read. Highly recommended.


Slurp
Saturday, May 27, 2006

Slurping up files is one of Perl's strengths and I've always assumed that Lisp could not do as well. I was wrong. This slurping in Lisp page demonstrates how at least some Lisps can do Perl one better. I found it via Stefan School's blog. Go Lisp, go!


brief note on CL-Graph
Friday, May 26, 2006

Someone rightly mentioned to me that CL-Graph doesn't have much in the way of a high level overview. Tinaa documentation isn't bad for seeing the trees but it doesn't make the forest any easier to navigate. Here, then is a very brief snapshot of CL-Graph from on high:

Structurally, a graph is a container-uses-nodes-mixin. This means that the things you put in the container are wrapped up in some other structure (a node). Examples of containers that use nodes are graph-container, binary-search-tree, heap-container. Examples of containers without nodes are list-container, array-container, basic-queue and so forth. In practice, this means that when you add a thing to a graph, the thing gets wrapped up in a vertex structure. When you do a find-vertex, you get back the vertex structure (not the element you added). For example:

? (add-vertex *graph* 23)
#<23>
:new        ; tells you that this was a new vertex
? (find-vertex *graph* 23)
#<23>     ; the vertex
? (describe *)
#<23>
Class: #<STANDARD-CLASS GRAPH-CONTAINER-VERTEX>
Wrapper: #<CCL::CLASS-WRAPPER GRAPH-CONTAINER-VERTEX #x8686356>
Instance slots
ELEMENT: 23
DEPTH-LEVEL: 0
VERTEX-ID: 0
TAG: NIL
GRAPH: #<GRAPH-CONTAINER [1,0] #x8E0EBD6>
COLOR: NIL
RANK: NIL
PREVIOUS-NODE: NIL
NEXT-NODE: NIL
DISCOVERY-TIME: -1
FINISH-TIME: -1
VERTEX-EDGES: #<VECTOR-CONTAINER 0 #x8E0B3EE>
; No value
? (element (find-vertex *graph* 23)) => 23
23

The main functions for creating and querying graphs are add-vertex / find-vertex / delete-vertex and add-edge-between-vertexes / find-edge-between-vertexes and delete-edge-between-vertexes. Once you have a graph or a vertex, you can map a function over its elements / edges using iterate-elements or iterate-edges. If you want to actually map over the vertexes, you can use iterate-nodes. There are also lots of iteration / collection functions for dealing with the children and parents of vertexes in directed graphs.

Quite a lot of CL-Graph is bound up with different ways of querying, collecting and iterating over the graph structures. It also has some simple graph algorithms (mostly of the summary sort like clustering coefficient, vertex degree, etc.) and it has decent export to DOT and integration with GraphViz. It's main claim to fame is that it does a good deal of bookkeeping to keep track of vertexes and edges so that you can concentrate on using the graph to do your stuff.


Notes on a Lisp Library Management
Thursday, May 25, 2006

I'm continuing to muddle through various ideas for Enterprise Lisp. One thing I think that the Lisp community needs is better library management. This means:

  • System definition
  • New System installation
  • System maintenance

ASDF (and MK-Defsystem and a few other defsystems) serve the system definition role admirably. My own defsystem-compatibiliy aims to make it easier to use multiple defsystems simultaneously (*). ASDF-Install does a great job grabbing new systems. The missing piece is system maintenance: making sure you have the latest of every and that it all works together. What follows is my proposal for improving the situation.

Desiderata

  • System maintainers want to do a good job but managing version numbers is difficult, time consuming and often goes undone.
  • System consumers just want things to work
  • If the process that handles system maintenance runs on the client, then you add another layer of things that must be maintained. Therefore, put as much computation on the server. (**)

The view from above

The system maintainer consists of the following processes:

  • Checker - monitor known systems for changes. When changes occur, generate tickets for Tester.
  • Tester - Test system installation (similar to ASDF-Install-Tester). Note that Tester is distributed across different machine architectures and Lisps.
  • Reporter - Use the results from Checker and Tester to produce pretty pictures, update RSS feeds, send text messages, generate press releases, call out the national guard, etc.
  • Clients (that's us!) - communicate with Webber to see if systems need to be updated
  • Webber - Communicate with clients (generally ASDF-Install) to determine if systems need to be updated.

Questions and Answers

This is the section where careful readers get to catch my errors and e-mail me as to how to make things better... So pay attention.

Q: What do you mean by known systems? A: Initially, Checker will work with ASDF-Installable systems. The main point of this, however, is to let Checker know where a system is to be found so there is no reason that other systems could not be registered for the service.

Q: How does checker know when a system has changed? A: Checker does two periodic checks on known systems. First, it compares the :last-modified date of an HTTP head request. If the last-modified date of the systems tarball is greater than the date Checker saw before, then the system may have changed. Secondly, Checker uses the system definition to build a system signature: a list of system files and file-write dates. Checker can compare the signature it has with the new signature to see if files have been added or removed and to see if file dates have changed. Note that occasional false positives are OK.

Q: What about *features*? Won't they mess with this signature you're talking about? A: Yes, features are a problem. For the curious, there are 52 systems on the Cliki that contain features in their system defs (out of about 250). These systems contain 40 different features. Most of them are operating system or Lisp implementation related. A few are more specialized. I propose to get around the features problem by using a custom reader to grab every file in a system definition.

Conclusion

The system described above is being actively developed and I hope to have something beta-testable sometime this work (oh, oh, that sounds like a promise. I have to stop writing now and get back to coding). Please let me hear from you if I've missed something obvious or subtle.


(*) To be fair, defsystem-compatibility (DSC) currently only supports ASDF and EKSL's system definer: Generic Load Utilities. However, only time and lack of clamor prevents DSC from working with others.

(**) Yes, this gives a central point of failure but web server and hardware is up to the task.


On the evolution of libraries
Wednesday, May 24, 2006

Lately, I've been pondering on the problems of library evolution. At one extreme of library creation is the put-it-all-in-here. At the other is the carve-nature-at-its-joints and have lots of dependencies. Philosophically, I tend towards the latter because shared code sucks (do it once, do it right) but it leaves one with an icky library management problem.

Then there's the issue of what to do with patches and additions? If a maintainer exists, patches and additions can pass through them. If there isn't a maintainer or if they find the changes don't fit with their vision of the library, then what happens? One can create a fork -- but that adds another library that may have issues working with the pre-fork version and it raises the code duplication issue in spades. One can also create another library that depends on the original... now we just have the yet-another-library problem.

It's interesting that we're culturally willing to create websites as wikis and are finding ways to deal with the problems of attribution and controversy. What would happen if we had a code wiki where everyone could edit everything. It's a scary thought because it takes so little to make code fail and because a little code can do a lot of damage very quickly (the software fault travels around the world before the patch gets out of bed or something...). Rambling on, this makes me think of the difference between syntax and semantics: word wikis work pretty well because they use language to pass around semantic knowledge and humans are remarkably good at dealing with faults. Code webs deal only in syntax and computers are almost unbearably brittle. The magic of computing, as my PhD advisor liked to say, is that it performs semantic transformations using only syntax. The problem is that the semantics all comes from the programmer. So what sort of infrastructures would make a code wiki possible?


Ora Lassila on the semantic web
Tuesday, May 23, 2006

Ora Lassila, a research fellow at Nokia, gave an interesting sounding talk (pdf) last week to the W3C advisory committee (I wasn't there, I'm just name dropping - smirk). His slides have include these provocative bullets:

  • Any specific problem (typically) has a specific solution that does not require Semantic Web technologies
  • Question: Why then is the Semantic Web so attractive? Answer: For future-proofing.

I think that this sounds about right and is part of the reason for the general attractiveness of XML and Lisp : code is data is code. When we need to, we can grovel over our source easily and do cool stuff.


Social Phenomenom (er, Phenomenon)
Tuesday, May 23, 2006

I've been looking at Ruby quite recently while working on Montezuma with John Wiseman on a port of Ferret (which is a ruby port of the java Lucene text indexing engine). I don't see anything particularly special about Ruby; overall, it seems like another reinvention of the wheel with more syntax with which to be confused! That said, all these "scripting plus" languages do fit a niche that Lisp has not been able to play in because Lisp has too much baggage (in my holy opinion) and because Lisp qua Lisp is missing the batteries like sockets, web services, etc...

What I find most interesting, however, is the social phenomenon: why and how did Ruby and Python make it to the big time? Why did Harry Potter become such a hit? Ruby, Python and Harry are all good but none of them seem, to me, markedly better than their competitors... Who researches this kind of stuff? Are there papers out there that claim to explain what is going on? Tipping Point? Wisdom of Crowds. Where is Malcom Gladwell when you need him?


the Problem with Threads
Tuesday, May 23, 2006

Someone mentioned Edward A. Lee's The Problems with Threads paper over at Lambda the Ultimate and I just finished reading it. The argument is simple: people live in a concurrent world so concurrent programming shouldn't be all that hard. But concurrent programming with threads is very hard so what's the problem? The problem is that threads are strongly non-deterministic and programmers (and languages and frameworks) must make great efforts to recreate determinism. It would be better, thinks Lee, to keep everything as deterministic as possible and only add non-determinism when necessary. I.e., we need better abstractions (perhaps built on top of threads).

Lee goes on to mention many of the alternatives and suggests that they have not taken deep roots in part because they are not necessary (yet -- there just aren't enough massively parallel non-trivial systems in use), because sequential programming is at the heart of all mainstream languages (and most non-mainstream ones too), and because it's hard to do multi-language programming (tool support, etc). The message, he says, is clear: "we should not [aim to] replace existing languages." He suggest coordination languages as a different extension mechanism (think Aspects and weavers) but even those have a hard time taking root because "language wars are religious wars and few of these religions are polytheistic" (I love that quote). He cites work with graphical notations and draws the parallel to UML's ability to abstract above specific language syntax and allow multi-languge use. There is, he hopes, hope.

This is a very readable paper with great examples and stories about had hard (thread based) parallelism can be and is. I don't know if his answers are correct (but who am I to know?! <smile>) but I strongly agree that we do need better models of computation and better languages to support those models. This should, perhaps, give Lispers hope. After all, what language to you know that is better positioned to support malleable syntax and coordination language experimentation?


Apologies: it was my fault, not CL-Markdown's
Tuesday, May 23, 2006

I meant &lt;pre&gt;. Depressing.


CL-Markdown update
Monday, May 22, 2006

I've removed CL-Markdown's dependency on LML2 (though CL-Markdown-Test still uses it to generate the comparison reports). I've also fixed several small tickets. The most important one probably being the correct handling of line breaks with <pre>s sections. I also changed the signature of the markdown form. The new one looks like:

Convert source into a markdown document object and optionally render it to stream using format. Source can be either a string or a pathname or a stream. Stream is like the stream argument in format; it can be a pathname or t (short for *standard-output*) or nil (which will place the output into a string). Format can be :html or :none. In the latter case, no output will be generated.

The markdown command returns (as multiple values) the generated document object and any return value from the rendering (e.g., the string produced when the stream is nil).

I hope that's clear. It makes it easy to go from strings or files to strings or files in any supported format (i.e., in HTML ).

There is still some distance to go before the basics are complete but things are starting to look pretty good.


Proving once again that I can do math, but not arithmatic...
Thursday, May 18, 2006

Michael Price wins the prize for quickly informing me that the version number of ASDF-Install on the website was 0.5.1, rather than the 0.5.2 that I had claimed. This should now be fixed. I should also mention that ASDF-Install has a new mailing list all to itself. See asdf-install-devel for details.

Finally, I'm in the process of bringing the tutorial back up to date.


ASDF-Install update
Thursday, May 18, 2006

The version now on Common-Lisp.net has been radically restructured and also has several patches and improvements. The restructuring just pulls various related forms out of installer.lisp and into their own homes. Mostly, this was to help me organize and maintain it. The improvements include:

  • More restarts involving the GPG key verification process so that, for example, you can switch to another process, retrieve a key and then try again.
  • ASDF-Install now prints its version string when it is first loaded (it's at 0.5.2).
  • I've tried to simplify the #+ / #- madness. There is still a ways to go for this to be complete.
  • Note that ASDF-Install now only installs the packages you request and their required dependencies. Earlier versions would install the package associated with every system definition that it downloaded.
  • There is a new keyword argument for the install command. If you specify :propagate t, then install will try to get the latest version of every package required during the installation. If propagate is nil (the default and previous behavior), then ASDF will only download the requested package and any that you do not yet have. It will not download any packages that you have already installed. Note that ASDF-Install still isn't doing any useful version checking, but being able to ask for everything fresh seems like a useful stopgap measure.

Please let me know if anything goes astray.


Software status update
Thursday, May 18, 2006

  • CL-Markdown : now works with SBCL, OpenMCL, and Allegro (alisp only at this point). Please post tickets to the Trac.
  • Trivial-Shell now exists (with thanks to Kevin Rosenberg and Alexander Repenning. Current interface is very trivial, some more stuff coming soonish.
  • ASDF-Install has moved to Common-Lisp.net. The version there has been restructured and has several improvements. It has a Trac too.

Doing it like we've always done
Sunday, May 14, 2006

A nice essay on the dangers of resting on our mental laurels

In the practice of security we have accumulated a number of "rules of thumb" that many people accept without careful consideration. Some of these get included in policies, and thus may get propagated to environments they were not meant to address. It is also the case that as technology changes, the underlying (and unstated) assumptions underlying these bits of conventional wisdom also change. The result is a stale policy that may no longer be effective…or possibly even dangerous.

...

This is DESPITE the fact that any reasonable analysis shows that a monthly password change has little or no end impact on improving security! It is a "best practice" based on experience 30 years ago with non-networked mainframes in a DoD environment — hardly a match for today's systems, especially in academia!


Enterprise Lisp Wiki
Saturday, May 13, 2006

I just created a simple wiki for Enterprise Lisp on Infogami (yes, they are the same people that did Reddit. So. <smile>). You'll need to join in order to edit. Let me know if that's a problem for you. I'm happy to post changes and ideas from other people if they send me an e-mail.


Drew McDermott and anti-literacy
Saturday, May 13, 2006

Drew McDermott has a nice essay on the benefits and difficulties of literate programming. The bit that resonates with me the most is this paragraph:

During program development, I tend to build a partial solution to a problem, then realize it's wrong and discard it or turn it inside out. It's very hard to force yourself to write a bunch of prose during this process; not only is the writing mostly wasted, it slows down your thought processes.

except that I find this happening to me about three-quarters of the time that I try test-first development. I don't know exactly what I'm doing (cf. Paul Graham's wonderful introduction to On Lisp or ANSI Standard Lisp (I can't remember which one)) and writing tests often turns out to be silly. Perhaps I'm just not getting out or can't rid myself of other bad habits or perhaps test first isn't something that makes sense all of the time.


On Selfish Memes: Culture as complex adaptive system
Saturday, May 13, 2006

This is a paper (pdf) that hits all the buzzwords hard and then hits them some more. We've got evolution, complex adaptive systems, power laws, dynamical systems, fitness landscapes, memes, phemes, and all the rest. The goal is to use memetics (which sounds way too muchlike dianetics to make me comfortable!) to explain culture and society. The chief problem is that (in the papers own words)

culture is multi-layer in hierarchies of description object, parts constituting the higher level of description non-linearly and so on. The important note we have from works on conventional cultural analysis is that culture is developed in the ways of how cultural units influence each other.

...

As a tool of cultural analysis, we can see by now that meme is a representation of diffused cultural unit. It is shown that meme concerns diffusion of the perceived; that is why memetics are close to the discussion about epidemiology of rumors (Lynch, 1998). If a meme pass through someone's brain by the process of perception, there is a process of interpretation and adoption before it goes to the next diffusion. However, the interpretation and adoption is frequent giving different output to be diffused. This is what we can see from our analysis and the above computational experiment and become the micro-properties of memetic process.

(The writing style -- loosely speaking -- doesn't help)

The level of abstraction hides some much philosophical sleight of hand and wooly thinking that no amount of formalism, charts and graphs can save us.

... meme is the cultural unit that imitated as an abstraction and neurally-stored in the brain. Since it is an abstraction, we are not allowed to assume meme as smallest information unit in cultural evolution in general, but it is the smallest information we use on explaining any cultural evolution. Thus, meme can be a very small part of cultural objects (e.g.: note of music, the way use of shoe) and even the big part of culture (e.g.: nationalism, religion). In other words, meme is a matter of analytical tool on explaining culture and its dissemination, propagation, and in general, evolutionary process.

This is one of the oldest self-inflicted tricks in the book of bad simulation: insert that which is to be proved into the foundations of the simulation and be astonished when the simulation acts that way (note that I'm not suggesting bad faith on the practitioner of the paper -- it's just that natural stupidity is something that must be fought against constantly.

In closing, I should mention that this paper is one of the references for a United States Army SBIR Request for Proposal. The RFP is reasonable enough but if this paper is supposed to be guidence... I'm more frightened than ever.


If voting machines were houses
Friday, May 12, 2006

Nice imagery:

"In the other ones, we've been arguing about the security of the locks on the front door," Jones said. "Now we find that there's no back door. This is the kind of thing where if the states don't get out in front of the hackers, there's a real threat."

Free, fair, and trusted elections...


More on in-package
Friday, May 12, 2006

Zach Beane adds his two dollars with a very interesting and technically astute post on in-package.


Earthquake Weather
Friday, May 12, 2006

Tim Powers has a quirky imagination that loves to connect the un-connectable and distort the usual interpretation of reality. I read the Anubis Gate several years ago and loved it. For some reason, I didn't pick up any other Power's books until last week. Earthquake Weather mixes science, the occult and several thousand plot twists into a tale of the Fisher King, Dionysus, Psychiatry, Multiple Personality Disorder, Ghosts and love. It's not a book for the faint hearted; you'll have to stay awake to follow the contortions and add in an extra helping of suspended disbelief. It's also not a book that will leave you thinking you better understand the universe or yourself. It is, however, a playful romp though the imagination and a heck of a lot of fun.


Graphing your relations with Address Book, OpenMCL and CL-Graph
Friday, May 12, 2006

Apple's Address book provides a convenient system wide repository for contact information. Recent versions include the ability to connect contacts together by relations. For example:

  • the Father of Gary King is Stephen King (true but not the novelist)
  • the Assistant of Jane Smith is John Doe
  • the Spouse of Wendy Delaney is Gary King

One thing that Address book doesn't provide is a way of viewing these relationships. Today's task: build an application that reads the Address book database and produces a graph showing the relations.

My first thought was to do this entirely in Apple's Object Oriented Cocoa framework. It is, after all, the easiest and most supported way to work with Apple's code. A few things, however, stood in my way: Cocoa is a big framework and I'm still learning it; I'm not aware of any Cocoa graph manipulation library that is comparable to CL-Graph; and I'm not aware of any Cocoa graph layout mechanisms comparable to GraphViz. So my second thought was to dig up some old e-mails (and here) between Richard Cook and Gary Byers on the OpenMCL mailing list and use OpenMCL and its ObjectiveC Bridge. I also looked at Richard's code for his Address Book / Google Maps mashup (look towards the bottom of the page).

Step 1 : create the interface database that lets OpenMCL talk to the Address book framework.

Step 2: use the Address book interface and Lisp to build the graph and make a DOT file of it that GraphViz will like

Step 3: use GraphViz to make an image. Voila!

Now to go over the steps in a bit more detail.

Creating an Interface Database

The OpenMCL documentation (with special thanks to Dan Knapp) is very helpful and thorough. First one use FFIGEN to read the ObjectiveC framework and create FFI files and then one use the parse-standard-ffi-files in Lisp to create the CDB databases that OpenMCL likes. As long as you don't create the FFI files in one of your OpenMCL Lisp repositories and then try to create the CDBs in a different repository -- yes, I did that and it took me a long time to figure out why things weren't working! The error message was cryptic but it was a head banger once I figured it out. I did find that I needed to go through the AddressBook headers file by hand and do each one individually (but that may be due to user error on my part). My populate script is available if you're interested in seeing it.

Using the Address book from OpenMCL

Once again, most of the work had been done for me. I used the webkit example as a template along with advice from old e-mails on the OpenMCL mailing list. The final result is available. Once this file is in place (in the OpenMCL examples folder), all you need to do is (require 'addressbook).

The great thing about the ObjectiveC bridge in OpenMCL is that one can use Cocoa classes almost as easily as you can in ObjectiveC and XCode itself. Even better, you can develop interactively without that nasty edit/compile/run cycle. (Compilers have gotten faster but it's still an appreciable delay). Rather than go over the details here, I'll let the code do the talking.

Use GraphViz to layout the graph

and here it is:

(You'll probably want to see it in its own window because of the scaling). Here is that DOT file that created this. Even this little sample shows a bunch of problems

  • The relations don't have to be in the Address Book -- which, I suppose, is a good thing -- so it's easy to have inconsistencies
  • Similarly, adding a relation from A to B doesn't create the back relation from B to A
  • Finally, the fact that it's not all that easy to add relations in the Address book means that not many get added (at least, that's true in my case).

By the way, if anyone knows how to tell GraphViz not to draw the edges and labels on top of one another, I'd appreciate it if they would tell me!

(Note that I found and fixed a minor display bug in CL-Graph while working on this example. If you want the edge labels to appear, you'll need to update).


In which we learn more about in-package
Thursday, May 11, 2006

Back when I was learning Lisp, I typed (in-package :foo) or (in-package "FOO"). Then one day my mentor told me that in-package was a macro so just typing (in-package foo) was fine. Was he right?

If he was talking only about the Listener, then I’d say that he was. If, on the other hand, he had been talking about using the bare version of in-package in files that are compiled, he was not. Yesterday, a #lisp discussion revealed to me the error of my ways (or, at least, one error). It is correct that in-package is a macro and that the Lisp package machinery will find the correct package and place you in that package when it encounters (in-package foo). At issue is what the “foo” signifies and that depends on the current state of your Lisp when the in-package is reached. If you are in package bar then “foo” will signify bar::foo ; if you are in package goo then “foo” will signify goo:foo. If the symbol “foo” is not yet interned in the current package, then Lisp will create it and intern it there. All of this sounds reasonable enough so aside from namespace pollution, what is the problem?

Suppose you working on a system with multiple packages. Suppose that you are in package foo and working on a file named “qurp.lisp” in package bar and that the natural order of these packages is that package foo does not exist when this “qurp” is loaded into a fresh Lisp. Now imagine what happens if you recompile the system… well, “qurp” has been modified so it will get recompiled. The Lisp compiler will look at the (in-package bar) that occurs on the first line of the file and see (in-package foo::bar). Remember that foo is the current package and remember that all seems because the package foo exists. Everything, in fact, seems to go swimmingly.

But it hasn’t.

Because when you quit and restart Lisp and try to re-load that system on which you were working, Lisp will try to reload “qurp.fasl” and encounter the symbol foo::bar but the package foo will not have been defined yet (remember, qurp gets loaded before foo is defined) and you’ll get an error and (if you were me) wonder why that happens…

If you’ve followed me, then you’ll now know why it happens and what to do about it: the solution is never to quit Lisp. Ever. Actually, the solution is to always preface the package names in your in-packages with either a “:” or (better yet) a “#:”. The first form puts the package name into the keyword package and that is guaranteed to be available. The second refers to the symbol in no package at all (speaking slightly loosely) and will also never get you into trouble.

I hope that’s clear. I’d say more but I’ve got about 30 more systems on which I need to run this script:

find . -name "*.lisp" \ -and -not -path "*/asdf-systems/*" \ -and -not -path "*/_darcs/*" \ -and -not -path "*/tags/*" \ -exec perl -pi \ -e "s/\(in-package\s+([^:#\"][^)\"]*)/(in-package #:\1/gi" {} \; \ -exec perl -pi \ -e "s/\(in-package\s+\"([^\"]+)\"/(in-package #:\1/gi" {} \; \ -print

Smile!


Why don't apple mail messages have proxy icons
Wednesday, May 10, 2006

Including those little icons in the windows title bars would make organizing mailboxes a little easier...


Enterprise Lisp notes
Tuesday, May 9, 2006

Here are some of the problems I’d like to help fix with enterpriselisp.com:

  • It’s hard to know which libraries work on which Lisps
  • It’s hard to keep libraries up to date
  • It’s hard to deal with multiple library dependencies
  • It’s hard to know library provenance and quality

My plan for Enterprise Lisp is to make it a higher powered ASDF Install Tester and to integrate it with ASDF-Install so that projects like ASDF-Upgrade can be made more robust without requiring extra steps and hoops of library developers.

As I said before, Enterprise Lisp can't succeed with love (well, I didn't actually say that but I was thinking it. Honest) and lots of ideas. Lets collaborate.


W3C HTML Validation bookmarklet
Tuesday, May 9, 2006

This is hardly anything but I find it useful so it's likely that others will too.

Graphic version: (*)

Text version: Validate

To use either of these, just drag and drop the bookmark to your bookmark bar. Then when you want to validate a web page you're viewing, click the bookmark you created. I've tried this in Safari and FireFox but it should work in any modern browser.

(*) If you use this a lot you should probably copy to the image to your own site...)

(**) And don't try it on this page because it's not valid. hrmf. (!)


CL-Markdown trac setup
Tuesday, May 9, 2006

I have a trac setup now for CL-Markdown. Intrepid beta testers should be able to submit tickets.


CL-Markdown is alive
Tuesday, May 9, 2006

CL-Markdown arrives at Common-Lisp.net (though this reporter has to admit that it is slightly drunk and slurring its speech). Aside from remaining glitches, CL-Markdown's biggest weakness is probably the number of other systems on which it depends (see the documentation if you don't believe me!). Part of this is due to laziness on my part: I generate HTML by first creating LML code and then using Kevin Rosenberg's very nifty LML2 package. I've been developing CL-Markdown with MCL (yes, it still exists... though probably not for much longer. Sigh.) and OpenMCL under OS X. I'll test things out with other Lisps soon. If you like (or dislike) CL-Markdown, then please enjoy, kvetch, criticize, and send me job offers (smile).


More bad news for United States Computer Science
Monday, May 8, 2006

Industry support for research drops:

Industrial funding for R&D in science and engineering (S&E) fields at universities and colleges dropped 2.6% in FY2004, to $2.1 billion. This was the third year in a row that industry funding declined, having dropped 1.1% in 2003 and 1.5% in 2002. According to the NSF InfoBrief, "the industrial sector is the first source of academic R&D funding to show a multiyear decline since the survey began, in FY 1953.


Ironic
Monday, May 8, 2006

Why Arial is everywhere

When Microsoft made TrueType the standard font format for Windows 3.1, they opted to go with Arial rather than Helvetica, probably because it was cheaper and they knew most people wouldn't know (or even care about) the difference. Apple also standardized on TrueType at the same time, but went with Helvetica, not Arial, and paid Linotype's license fee. Of course, Windows 3.1 was a big hit. Thus, Arial is now everywhere, a side effect of Windows' success, born out of the desire to avoid paying license fees.

Funny that a company so obsessed with license fees managed to weasel out of paying this one...


Montezuma
Sunday, May 7, 2006

John Wiseman has been assiduously porting Ferret (Lucene ported to Ruby) to Common Lisp. The project is Montezuma. On Friday, he pasted this tantalizing tidbit.

I've been helping out a little porting some of the search code and it's exciting seeing it actually running on useful data. I think Montezuma is going to be big! Maybe we'll get our revenge. That makes no sense but the silly part of me was unable to resist.


CL-Markdown comparisons
Sunday, May 7, 2006

I've put up some web pages comparing the output between CL-Markdown and Markdown. The results aren't beautiful but most of the differences are at the level of glitches in my regular expressions so I'm pretty happy. As I mentioned before, I'm still not sure if my implementation strategy was a good one or not (and it's hard to be sure because most of my work occurred in the interstices of my life -- not the most effective development strategy) but I think I'm relatively happy with the results. I'll know for sure once I see how hard it is to fix the final glitches and how easy it is to add some more advanced (non-markdown) features.

I'll be setting up the web site, etc. soon. In the meantime, Markdown addicts can look at the Markdown wiki or at Levi Pearson's Common Lisp code.


CL-Markdown stumbles forward
Wednesday, May 3, 2006

I received two e-mails asking about CL-Markdown's status over the weekend. Aside from the Interactive Markdown Dingus (live site), I haven't done anything Markdown related since January. It's one of the many projects I want to finish but can't always find much time on which to work...

That said, I brushed off the code on Monday and tried to remember what my plans had been. I known that I started by looking at the Perl and Python sources but soon decided that it all seemed easier that that (famous last words, I know). I went with the following plan:

  • Read in the paragraphs of text while doing basic encoding (i.e., it is a header? Is it part of a list, etc.). This gives us a list of chunks.
  • Iterate over the chunks and handle various span related bits and pieces (i.e., looking for emphasis, links and the link).
  • Output the list with a spiffy recursive function that knows when to add depth to the tree being constructed.

The first two steps of this went quite well (though there is the added complication of stripping off the starts of lines depending on the current context. I.e., If we in a blockquote already, then we to pull off the initial '>'). The last step turned out to be surprisingly hard for me to quite grok and was the main reason development came to a halt in January.

Things still seemed harder than they should have -- I must not quite understand the problem! -- this time around, but after some thrashing, I developed the function I wanted and much is mostly well. I'm still not sure if my original theory (start and list and create the tree later was flawed or if I'm just being stupid about the list to tree conversion... Sometimes it's hard to tell.)

There are still a few features completely unimplemented (e.g., special character escaping) and lots and lots of glitches. I wrote a program that compares the output of regular markdown and CL-Markdown using John Wiseman's CL-HTML-Diff. I'll get some good and bad examples up later tonight.

I'll also be throwing the code up to Common-Lisp.net in the near future so that everyone can find ways to break it!


Bye bye (dumb) blackbird
Tuesday, May 2, 2006

(I've not read the study and think that you have to take these things with a big lump of rock salt, but)

Mankind can chalk up another lesson in humility: We're not the only species that can learn grammar.

...

But nine of [the] 11 starlings learned to spot [clauses] at least 90 percent of the time, identifying the utterances by pecking buttons in exchange for a food reward. This shows that there's no "single magic bullet" separating humans from animals, said UCSD cognitive scientist Jeffrey Elman, who was not involved in Gentner's study.

Cool!


No surprise
Sunday, April 30, 2006

Science Panel Report Says Physics in U.S. Faces Crisis

Why am I not surprised...


Science, Smience
Friday, April 28, 2006

It's political. it's local. It's depressing. It makes me furious.

As the Talking Heads said: facts don't do what I want them to. It should be my country's theme song.


Quick Review: Critters 3.0
Thursday, April 27, 2006

Critters is a music generation program that seems to combine really interesting ideas with a non-so-great implementation. The idea is to evolve the music you like using genetic algorithms. It supports OS X's Audio Units, and has more options that you can shake a ... I'm not a musician or even an audiophile (though I often like what I hear) and the program's wasn't obvious enough for me to figure out easily -- gotta lower those barriers to entry! -- so I can't give much of an evaluation of the finished results. Still, I really like the idea of combining computers for generation and human input / guidance for testing and quality. Perhaps the next version will hit the sweet spot.


One Mystery Solved! Steel Bank Studio
Wednesday, April 26, 2006

Thanks to the magical self correcting web, I now remember that I was looking for Steel Bank studio! I think I would have found it if I hadn't been completely thrown off by the hair trimmer.


Lisp testing
Wednesday, April 26, 2006

Lispers who know know that there are a lot of testing frameworks out there. They spring up like weeds! I was going to continue with this metaphor but having decided that it wouldn't bear fruit. Sorry. I hate bad puns. really.

In any case, Liam Healy mentions that he recently found lisp-unit and I thought I should mention the CL-Gardener's Test frameworks comparison page (though doing so will show that it hasn't changed since February... I've been busy!). Perhaps this inspire others to look at these frameworks and help extend the report.


Google Page Creator
Wednesday, April 26, 2006

I just spent five minutes looking at Google Page Creator today. Though it is very cool; I wouldn't want to use it for real work; too much clicking and (minimal) waiting. Still, look what I made. Tee hee.


RFID Essentials
Wednesday, April 26, 2006

RFID Essentials by Bill Glover and Himanshu Bhatt provides a high-level yet technically detailed overview of where Radio Frequency Identification (RFID) has been, is, and is going. I can't say that I enjoyed reading it but it covers a great deal of ground on both the technical (how does it work? how can you use it?), the business (what standards exist? how are companies using now?) and the computational (what are the algorithms? about what should you be concerned?) in a painless manner. If you need to know about RFID and want a book that lays it all out from soup to nuts and beginning to end, I don't know if you'll find a better one.


SBCL Professional - humor
Wednesday, April 26, 2006

I was trying to recall the SBCL project (google search) that was planning on packaging everything up nicely with support, etc. I didn't find that but I did find an interesting Lisp powered hair trimmer. Cool.


enterprise lisp
Monday, April 24, 2006

Roberta, the dual G4 that runs metabang.gotdns.com had a minor conniption earlier today and, in a testament to the credo of Computer Scientists everywhere, I decided that the easiest way to move forward was to delete a bunch of stuff and re-install. The stuff included lots of Common Lisp libraries and ASDF-Install made it pretty easy to get everything going again... Except that it should have been much easier.

Like most lispers, I've wanted Lisp to become more popular and have been frustrated as other languages have gotten the buzz. I've also wanted to see Lisp improve (sound familiar). Libraries help. Tools like ASDF-Install or Peter Seibel's Lisp in a box help. Open Source efforts like SBCL or OpenMCL help. Maybe we need a new language (though we've tried that too).

Certainly Lisp (and Common Lisp) are seeing a resurgence in activity and love. How do we turn that into community and turn that into productivity? I don't know (and I often doubt that I have time to figure it out!) but I'm sure openness, participation, authenticity and trust are key. Today, I purchased the domain enterpriselisp.com (think big <smile>). My plan is to start taking small steps towards building and creating a platform for Common Lisp community -- now I'm in deep: I've said it and said it publicly.

First, what this isn't: it isn't the CLiki and it isn't ALU and it isn't the CL Directory and it isn't Common-Lisp.net. Those are all useful and important and shouldn't go away. I'm hoping to model enterpriselisp.com on something like SpikeSource: a site where libraries will get tested and integrated and supported. I have a bunch of vague noodling written on the back of napkins for how I think it will get put together. Soon (probably in the geological sense), I'll start to add details. Feedback and ideas are welcome.


Wearing Lisp
Sunday, April 23, 2006

LispVan got to hear Norman Jaffe talk about Wearable Intelligent Systems and all I got was reminded of the Extended Mind. That's probably not a great T-shirt slogan but it sounded like a great meeting and it is a great book.


Speaking of Daring Fireball: it's the Interactive Dingus
Sunday, April 23, 2006

John Gruber's Markdown Dingus is the top Google search result (try it for yourself). It provides a nice overview of Markdown syntax and lets you experiment with it. Unfortunately, it's so Web 1.0.

I decided to improve matters by writing a little "finger exercise" using Araneida and Javascript. Araneida doesn't actually do anything more than shell out to the markdown Perl script but that will have to do until I get back to CL-Markdown (and since CL-Markdown isn't in any of my critical paths, that may have to wait a while...).

The Interactive Dingus is being served from a dynamically maintained IP (using DynDNS) so I can't promise high availability. I'm also a bit of a CSS hack so I'm afraid that although the pages work great in OmniWeb and Safari, they don't format very well in FireFox. There are several other minor annoyances (e.g., the system doesn't notice cut and paste) but it's good enough for a 1.0 Web 2.0 applet. Comments and corrections are very welcome.


Congratulations and Best Wishes to John Gruber
Sunday, April 23, 2006

John has cut himself free to express himself. Awesome.


On being reminded that I'm stupid -- again
Friday, April 21, 2006

Maybe it's actually the joy of flagellation that keeps us coming back for more... I'm working on a simple Araneida-backed AJAXy thing for fun -- just a programming finger exercise really -- and spent a good 20-minutes wondering why things weren't working at all before I realized that I was loading the HTML file in my browser (i.e., file:/// ...) instead of retrieving it from the server (http:// ...). Oh boy!


What makes programming so fun?
Friday, April 21, 2006

My wife sometimes -- often! -- complains about the amount of time I spend staring and typing on my Powerbook. "What is it?" she wonders, "that makes that thing so interesting?" I wish I knew.

Why is it that some humans get "it"? Why do only some of us find this frustrating business of hacking form out of recalcitrant bits an endeavor that almost always leaves us wanting more? I don't think it's just a power urge (look, I control the virtual universe inside my computer) or basic misanthropy (heck, I like people!).


I was away, now I'm back
Friday, April 21, 2006

This week is school vacation week in Massachusetts and my youngest son and I just spent three days in Vermont. The weather was wonderful and we had a great time. Because we stayed in a cheap hotel, I was off the net the entire time. Weird!


Proposed :system-applicable-p
Monday, April 17, 2006

I'd like to propose using a property of ASDF systems to designate which Lisps and platforms a given system is supposed to work under. I'm thinking of using :system-applicable-p (but I'm open to better names). This property would be for use only by ASDF-Install-Tester / ASDF-Status and would help improve the utility of the results page. Adding it would, of course, be entirely voluntary and it's absence would not alter the running of regular ASDF-Installs or ASDF operations. Thoughts? (man, I gotta get me some comments).


Confluence
Sunday, April 16, 2006

I just heard about SpikeSource (listening to another Jonathan Schwartz interview). It's a company making money by integrating Open Source projects into a tested, quality assured "stack" and selling the service.

I also came across Mark Samuel Miller's dissertation on E:

When separately written programs are composed so that they may cooperate, they may instead destructively interfere in unanticipated ways. These hazards limit the scale and functionality of the software systems we can successfully compose. This dissertation presents a framework for enabling those interactions between components needed for the cooperation we intend, while minimizing the hazards of destructive interference.

and I've been working on ASDF-Status and thinking a lot about the mixed blessing of choice in libraries and of dependencies between libraries.

It's all part of the cosmic unconscious...


Updated ASDF-Status update
Sunday, April 16, 2006

Having received some feedback and added a dash or two of my own thoughts, I want to revisit my previous post about ASDF-Status. ASDF-Status is a tool to help library developers know when and where (and perhaps why) their system is failing and a tool to help lispers know what systems are out there for their platform. Many library developers don't intend their libraries to function on all platforms -- the hassle factor may be too high or the tool may be Lisp implementation specific. Currently, there is no agreed upon syntax for a system to say "I only work on Windows Vista running Lisp Works 2000" (or whatever) so ASDF-Install-Tester (and ASDF-Status) blithely tries everything everywhere.

What's more, systems can fail to install in a large, though finite, number of ways and ASDF-Status provides a very coarse description of what works and what doesn't. A putative future version may improve on this (thereby greatly improving its utility). The heart of the problem is that a system may fail to install under ASDF-Install-Tester for the most trivial of reasons (perhaps a bit of interaction was required... or perhaps a given Lisp runs by default with very stringent compiler checks...). That same system may install happily or, at least, easily for some lisper in the wild.

All that being said, I think ASDF-Status is a useful tool (if nothing else, those 404s should give someone pause!) but needs to be taken with a very large crystal of salt.


ASDF-Status update
Sunday, April 16, 2006

I've re-run ASDF-Status on 3 versions of Allegro, two versions of OpenMCL, one version of SBCL and CLISP (all on OS X). There are 18 new systems

but the overall results are still pretty poor across the board. OpenMCL (version 1.0) does the best with 152 successful installs (out of 242). It is followed closely by Allegro 7.0 and 8.0 and then SBCL 0.9.9. Allegro in Modern mode scores the worst with only 92 successful installs (this isn't surprising and since 'regular' Allegro does so well, correcting these systems is probably just a matter of fixing the case of a couple of symbols.)

Every time I look at ASDF-Status's output, I get about a 1000-ideas of ways that it could be better and more informative. Perhaps I'll actually get around to improving things before I start running it again. I also want to throw in another plug for the Tinaa produced documentation. I hope to add some graphs and improve the display of internal and external symbols next. Other ideas are welcome.


Leadership and followership
Sunday, April 16, 2006

When I read the following in Authentic Business I slapped my head and said "of course".

The fundamental weakness of hierarchical leadership is followership. The stronger a hierarchical leader is, the greater the weakness they create in others. By taking responsibility for something, you take it away from someone else, and a person without responsibility reverts to childhood neediness. The conditioning of our society is to follow and, faced with a strong hierarchical leader, most of us will settle back and let them take responsibility for us.

I think that this is important and often unrecognized both in society and in business. I also think that this is one of the many reasons that Open Source and Agile methods are so effective. They are empowering.


Maps
Sunday, April 16, 2006

Michael Gastner and Mark Newman have produced a new method (pdf) for creating density equalizing maps (remember these) using diffusion. Their method is "conceptually simple and produces useful, elegant, and easily readable maps. Their paper has been put to work by the University of Sheffield's WorldMapper site. There are some cool maps.

I'm not sure how expensive the math is (I haven't read the paper yet) but this could be a cool interactive demonstration project.


Jonathan Schwartz at OS Con 2005
Saturday, April 15, 2006

I just listened to Jonathan Schwartz being interviewed at OS Con 2005. There was what sounded to me like some initial hostility but Schwartz held his own and did a remarkable job. My favorite bit occurs towards the end when the interviewer is asking about why someone would use Open Office rather than some other office productivity package. Schwartz asks the interviewer if he'd ever used Open Office and the interviewer replies:

Yes and I found it to be somewhat slow and buggy and I think that people would rather pay for software that is ... slow and buggy in different ways.

Everyone started laughing!


ASDF-Status, meet Tinaa. Tinaa, meet ASDF-Status
Friday, April 14, 2006

I doctored up ASDF-Install-Tester so that it runs Tinaa on every system it tests. If nothing else, it gives my computer something to do and I now have 83-Megabytes of remarkably redundant HTML! Aren't computers wonderful?! (It's only about 24-Megabytes of physical size but it takes up 83-Megabytes of disk... damn wasted partial blocks).

More seriously speaking, I see this as a way to help bullet-proof Tinaa and test out new ideas for presenting overviews of systems. One thing that is immediately clear is that there needs to be a better way to combine multiple Tinaa runs into a single whole -- there's just no good reason to re-document the same sub-system every time it is used. I think that CL-PPCRE is wonderful, but that doesn't mean that I want to see it documented 14-times! One side effect of improving this sort of "global" documentation is that it may make it more clear how to carve nature at the joints and find some of the bits that could be put together into libraries that everyone could agree on (as I said, I remain an idealist!).

(By the way, if you'd rather not have your stuff documented in this fashion, please let me know. Also, several systems don't appear because of some current bugs in ASDF-Install-Tester. I'll update this as things improve).


Lisp and life as of 14 April 2006
Friday, April 14, 2006

I've been hacking on a variety of small projects the last few days both in code and in my life. I'm looking for the big strike but have to settle for slow progress. I just keep reminding myself that "if it was as easy as I'd like it to be, it would have already been done!". In any case, and just for the sake of documentation, here's a partial list of progress (not all of which has been committed):

  • Added an :equality-test option to LIFT testsuites. This lets you specify the default test to use in calls to ensure-same.
  • Improved Tinaa in various small ways
  • Updated ASDF-Install-Tester to handle Allegro's "modern" [sic] mode and begun running tests (on Allegro 7.0, Allegro 8.0, CLISP, OpenMCL (both 1.0 and the latest from the CVS repository), SBCL 0.9.9 and SBCL 0.9.11). All of this is on OS X.
  • Plugging away on learning Ruby so as to do what I can to help with Montezuma.

I've also been reading a wonderful book by Neil Crofts entitled Authentic Business. I'm currently self employed and want to be doing something that makes the world a better place (still idealistic after all these years) that also lets me feed my family. I'm hoping that some of the ideas in Crofts' book will help inspire me. More on it later after dinner!


a funny thing happened on the way to copying my address book
Wednesday, April 12, 2006

I wanted to copy all of my Address Book data from my PowerBook to my wife's eMac (no fancy, smancy synchronization for me!). No problem, I made a backup of the data from my Address Book and copied the (6.3-megabyte! what is in this thing) file to the eMac. I then fired up Address Book on the eMac and selected "Revert to backup." The computer said "beep" but no new addresses appeared. I tried it a few more times on the theory that if once doesn't work, try again. No joy. I then dragged the backup file from Path Finder to the Address Book. I got the dialog about importing but I didn't get any addresses. Since the UI had failed me, I quit Address Book, opened the backup file (it was a bundle) and copied the contents to ~/Library/Application Support/Address Book. Then I restarted Address Book and bada boom, bada bing, there were the addresses.

So why didn't the backup/restore thing work? What if I didn't know what I was doing (some of the time!)? Would the backup I made have restored on my machine (is it machine specific? Seems pretty wacky to me and potentially pretty bad.


metacopy loses a dependency
Tuesday, April 11, 2006

I've removed metacopy's dependency on metatilities-base. Metatilities is sad, but kids have to grow up and leave the nest someday. I also added a test system and some simple tests.


Tinaa and ASDF-Systems
Monday, April 10, 2006

Tinaa can now make a passable shot at documenting ASDF systems. Heretofore, Tinaa placed the root part (i.e., the thing you asked to be documented) at the top-level and placed everything else under it. Now, however, Tinaa treats all of the name holders (an ill defined concept that means a part that maintains the names of other parts. In practice, these are systems and packages) similarly and places each of them at the same level in the hierarchy. It then creates a single table of contents page that points to each of them. There are many other minor improvements in both styling and output to be found as well so please have a look at this sample of Tinaa applied to Tinaa and let me know what you think.

By the way, thanks go to Todd Mokros and Cyrus Harmon for some great Tinaa patches and bug reports.


Speaking of ASDF Status... color redeux
Sunday, April 9, 2006

Back when I first put up ASDF-Status, I had some troubles with choosing colors that provided good contrast for color blind viewers. I spent a little time trying to sort things out but never felt happy with the results. Today, I came across Graybit - "an online accessibility testing tool designed to visually convert a full-color web page into a grayscale rendition. Cool.


ASDF Status desiderata
Friday, April 7, 2006

I've been slowly moving back towards ASDF-Install-tester and ASDF-Status. Part of the reason they've been slow to improve (aside from my being too busy by half) is that I'm dissatisfied with their putative architecture. I'd like this pair to be tools for the ASDF-Install portion of the Lisp community and there are too many kludges and half-assed solutions in the current implementations for that to happen. Here are some of the things I think would be good.

  • Better data management - save lots and lots of data every time AIT runs. Use this to track historical trends.
  • Don't keep checking a dead horse - don't test a system unless it (or one of the systems on which it depends) has changed. This might tie in with ASDF-Upgrade.
  • Better communication - provide RSS feeds of everything, selected sub-systems, selected Lisps, etc. Let system authors sign up to receive alerts if a test fails.
  • Share the load intelligently - AIT should be provide an assembly line mechanism whereby it can dole out tasks to computers that are donating CPUs for testing. Tests don't take that long to run so that is more about testing on many platforms rather than worrying about CPU overload.
  • Let system authors ping AIT to start tests immediately (this is more a wishlist item since it ought to be possible for system authors to setup AIT on their own boxes but anything that adds a barrier to entry is a bad-thing).
  • Do more than just install. Many systems have a test-op. Use it if its there and report the results. The the compiler output to help system authors find out what went wrong where.

I'm sure that there are more thoughts out there in the community (let me know). I think that there are even other ideas I've had that are already lost in the ever-deepening flow of synapses and memories from my skull.

The short sharp shock is that I'm intending to smush SQLite into ASDF-Status and integrate ASDF-Install-Tester with a lisp based web server (probably Araneida). This makes for a much bigger project (but also a much more interesting one). I'll keep the inquiring world informed!


First NASA, now NOAA
Friday, April 7, 2006

I say whoa. Science is about free expression not politics. Of course, everything is political.


My graphics rock
Friday, April 7, 2006

As in, I have the graphics skills of a rock. That said, here's a badge for Allegro Common Lisp. (Please) feel free to improve it (once you stop laughing -- !)


Grapher Server
Wednesday, April 5, 2006

Franz asked me to try my hand at tying together AllegroServe and GraphViz. I decided, perhaps foolishly, that this would be a good time to figure out how to use javascript and step onto that AJAX bandwagon. Thanks to Franz's AllegroServe and Common Lisp, that turned out to be a very enjoyable ride.

The result is Grapher Server: an AJAX web application that uses CL-Graph to provide two interactive examples of graphing fun. The first lets you experiment with several random graph generation algorithms and the second provides an interactive class browser.

The application is being served from an older G4 running on my home network and using the Dynamic DNS service to resolve the metabang.gotdns.com. Sometimes, the update daemon running on my computer gets confused and hands DynDNS the wrong IP; sometimes my kids shut the computer down <whoopts, sorry dad>. All that is to say that this may not be the most reliable of servers but it will have to do until I switch to a hosting provider that can handle Lisp! I'm told that Franz hopes to get this up on their servers at some point <cool> and I'll certainly let everyone know if that happens.

I also intend the release the code I used and do some more explaining but I'm not sure when I'll get to that. In the meantime, enjoy.


Tinaa likes SBCL more
Wednesday, April 5, 2006

Thanks to Cyrus Harmon and some messing about with logical / physical pathnames, Tinaa is now much happier with SBCL.

Cyrus also made it clear that Tinaa suffers from (at least) two other problems:

  • A description of how exactly to use the thing is conspicuously missing from the documentation
  • There are a lot of dependencies on other libraries.

The first is easy to remedy: just do (document-system <system-kind> <system-name> <destination-root>) at a Listener. The system-kind can be 'package or 'asdf-system or whatever (though asdf-system isn't very well supported yet) and the name is the name of the system (!). I'll add that to the web site and readme at some point (soon, I hope).

Dependencies are a more difficult issue, especially when many of them are in flux. ASDF-Upgrade, ASDF-Install, etc are all helpful but they don't feel like they are quite enough.

No new ideas here today from me though: I've got other things to do.


Another good use of simulation...
Tuesday, April 4, 2006

Bird Flu! Sounds like a fun project.


Tinaa doesn't like SBCL much
Tuesday, April 4, 2006

I now have SBCL 0.9.11 running (yeah!) and hope to look into some Tinaa issues. Here are the problems that it has with SBCL:

  • Class documentation is missing slot lists
  • The contents link is missing from all part pages
  • The TINAA:CANNOT-MAKE-PART condition is missing its documentation
  • Links to style sheets often point to one wrong level of the hierarchy
  • (part-symbol-name part) sometimes returns lists (which makes Tinaa mad)

Once I finish these, I'm intending to go back to documenting ASDF-Systems more nicely.


Earthquake!!!
Tuesday, April 4, 2006

From American Scientist:

Computers Provide a New Look at a 100-Year-Old Disaster

A diverse team of geophysicists and mathematicians announced a computer simulation of the great earthquake that rocked San Francisco in 1906, an effort that they hope will inform precautions for future earthquakes in the area.

"The is the most comprehensive and up-to-date picture of how the ground shook nearly 100 years ago," said Mary Lou Zoback, coordinator of the U.S. Geological Survey's earthquake hazards team.

The new simulation took two years to create, using supercomputer time at Stanford, UC Berkeley, the Lawrence Livermore National Laboratory and URS Corp., a Pasadena engineering firm.

Research geophysicist Brad Aagaard said the speed of the 1906 quake was "phenomenal," traveling 300 miles along the San Andreas Fault at up to 13,000 mph. Much of the city was destroyed within 4 seconds. "I'd be under the nearest table the second I felt the first shudder," he said.

Among other sources, Aagaard said his team used data from scientists who began studying the 1906 quake just three days after it struck. A full video of the new simulation will presented next month at a joint conference sponsored by the Earthquake Engineering Research Institute, the Seismological Society of America and the California Office of Emergency Services.

There is even a video.


Stop It!
Monday, April 3, 2006

For them's that care, there is also a new version of my Stop It! widget out. The biggest improvements is better graphics but there are also the required number of bugs fixes and tweaks.


Tinaa update, etc
Saturday, April 1, 2006

I've updated all the various metabang packages I support. Most of the patches are minor bug fixes, etc. Tinaa, on the other hand, saw a few actual improvements. The most exciting of which is that it now runs on SBCL (0.9.10 or higher). Thanks go to Todd Mokros for helping to find some of the final necessary touches. That said, Tinaa still doesn't quite behave as it should on SBCL. I'm going to be looking into that as soon as I finish getting 0.9.11 running on my PowerBook..


Rate-It!
Saturday, April 1, 2006

Version 1.1 of Rate-It!, my OS X / iTunes music ratings widget is out. Prettier, less buggy, sucks less!


Time Present, Time Past
Friday, March 31, 2006

This memoir by Bill Bradley is a thoughtful and thought provoking piece of work. I listened to the book on tape (sadly, it was the abridged version) read by Bradley himself. His reading is workmanlike but what he is saying is anything but. Hearing him go over the problems we faced as a country in 1997 (all of which have only gotten worse) and carefully explaining the sort of honesty and integrity that would be needed to solve them is both heartening and horrific. Heartening because there are people who get it: who understand how things are interrelated and know that nothing is easy. Horrific because they are too few and because thoughts like these -- thoughts that require work, sacrifice, and change -- are hard to hear and harder still to heed. Highly recommended.


Yes another sign of my growing control of the entire world
Friday, March 31, 2006

<smile>

I'm not actually a megalomanic. Really!


Ducks yesterday, frogs today
Friday, March 31, 2006

I live in Amherst MA and there is a small vernal pond behind my house. Every year, there comes a day when what was silent bursts with sounds and life: the frogs have woken and and want to play and have babies. It's wonderful.


Javascript / DOM / browser silliness
Thursday, March 30, 2006

I've been working on a small project for Franz using AJAX and other happy buzzwords. my goal is to place the application on one of my home computers (metabang.gotdns.com -- a site that isn't particularly complete or maintained but I can use it as a Lisp server...). The application serves up HTML pages with images and imagemaps. When you click on various parts of the image, some AJAX happens to replace the current image and map.. It's pretty nice and everything worked fine in my browser of choice (OmniWeb -- love those tabs and workspaces!) but Firefox and Safari didn't quite click. In Safari, every other image served would work. In Firefox, only the first image served was happy. Here's the Javascript code that updates the imagemap:

if (placeholder) {
	   var mapString = getXMLDatum(root, "map");
	   if ( mapString && mapString.length > 0) {
			   placeholder.innerHTML = mapString;
	   } else {
			   placeholder.innerHTML = "";
	   }
}

Not much to change there but on a whim, I pulled the "set to empty string code out of the else":

if (placeholder) {
	   var mapString = getXMLDatum(root, "map");
	   placeholder.innerHTML = "";
	   if ( mapString && mapString.length > 0) {
		placeholder.innerHTML = mapString;
	   }
}

Believe or not, this change was enough to convince Safari to work on every image map. (and If anyone knows why, I'd like to hear about it). Firefox, however, could not be mollified so easily. I used the built in DOM inspector tool and it turned out that the map area information was being modified. So, I reasoned, it must be that the image wasn't noticing... The code to update the image was the simple:

if (imageEntity && baseName) {
	imageEntity.src = "./temporary/" + baseName + 
	".jpg?time=" + now.getTime();
}

I changed this to:

if (imageEntity && baseName) {
	imageEntity.setAttribute("usemap", "");
	imageEntity.src = "./temporary/" + baseName + 
	  ".jpg?time=" + now.getTime();
	imageEntity.setAttribute("usemap", "#G");
}

This did the trick (which, I assume, is a rather odd reference to the game of bridge?). If you ask me, neither of these things should have be necessary (and weren't, after all, for OmniWeb which, if I recall correctly, uses the same WebKit rendering image as Safari so... end the sentence and go figure.)

The moral of the story is the usual one: "software sucks".


He's not talking about Lisp, but still
Wednesday, March 29, 2006

Jonathan Rentzsch talking about WebObjects on its tenth birthday:

You need to weigh the pleasure of knowing the Better Way versus the pain of Not Being Able To Use It.


Processing
Wednesday, March 29, 2006

Processing looks interesting. Has anyone explored it? I've downloaded the demo but haven't had a chance to do anything with it yet.


Nice UI touch
Wednesday, March 29, 2006

Who says text can't have a UI (*)? I was looking a bit more closely at Brian Mastenbrook's colorize package and noticed this little gem:

(when (> (- (get-universal-time) *last-warn-time*) 10)
  (format *trace-output* 
          "Warning: could not find hyperspec map file. ~
           Adjust the path at the top of clhs-lookup.lisp ~
           to get links to the HyperSpec.~%")
  (setf *last-warn-time* (get-universal-time)))

Only giving the warning once every 10-seconds is a nice touch.

(*) Frankly, I've never heard anyone say that but it sounds provocative, so what the heck!


Bind bound
Saturday, March 25, 2006

A month or two ago I changed bind's name from metabang.bind to metabang-bind (because I happen to like logical pathnames (*) and logical pathnames don't happen to like #\.s in a component... and SBCL is a stickler for that kind of thing). In the process, I failed to change some of the references and I didn't think to just use a symbolic link... so some people have been getting out of date code.

Thankfully, someone was kind enough to tell me that bind wasn't working so that I was able to figure out the error of my ways.

(*) At least in the unrealized ideal...


DOM Scripting
Friday, March 24, 2006

Jeremy Keith's book on DOM Scripting (whose title eludes me...) is a great read for people who want to better understand how to put the three legged stool of content (HTML), style (CSS) and action (Javascript) to good use in the modern web. It has good examples, not too much fluff and a clear writing style that makes it easy to get through. My only two complaints are the overabundance of screen shots that don't add much of anything to the text and the tendency to repeat bits of code snippets and advice. I have a feeling that both of these are considered de rigeur in the modern age of instant learning (I've often wondered if a series themed X for smart people would sell or not?).

I hadn't done any real stuff since about 8-years ago (ouch, I am getting old) so this was a wonderful reintroduction to the possibilities. I recommend it.


Announcing: metacopy
Thursday, March 23, 2006

Metacopy is a Common Lisp deep/shallow copy tool. It lets you specify how to treat the slots of a given class (shallowly set them or deeply copy them) using the defcopy-methods macro. You can them copies of objects using the copy-thing method. Documentation, Darcs repository, tarballs, CLiki page and ASDF-Installability are where you'd expect them to be. (Thanks to common-lisp.net for continuing to be a great place to use.)

Metacopy uses ASDF-System-Connections to attach itself happily to CL-Variates, Cl-Graph and CL-Containers. This means that if you load one of these systems and then load metacopy (or the other way around), then the random-number-generators, graphs and containers will all be copyable without further ado.


Mercator: A Scalable, Extensible Web Crawler
Wednesday, March 22, 2006

Even though 1999 was a long time, this paper on building a web crawler seems like a nice introduction to the problem. The authors limn the various challenges in building any crawler and the additional ones that come from building one that can handle the ever growing World Wide Web. They also describe many of the extensions that needed to add to Java in order to support the very large data structures required. There is even mention of bloom filters.

All in all, a nice ride for the train or bus and one that leaves me wondering "why not do this in Lisp?" Would it scale as well? Would it be easier to build? Maintain? Extend? I'd like to think so...


More mlist[backspace]p madness
Tuesday, March 21, 2006

I think I've actually finished converting my code to use mlisp (though I thought that before). Most of the conversion is painless but there were a few all uppercase keywords scattered around and :keyword doesn't eq :KEYWORD (by default in mlisp). I also don't quite understand the best way to handle find-symbol in an case independent fashion. If I just find-symbol on a string, it will only find it in mlisp if I lowercase it and it will only find it on other lisps if I uppercase it... I could wrap things in some readtable case stuff but that seems hackish to me.


a personal grumble
Tuesday, March 21, 2006

A week ago, I released Lock-It!, a simple widget that locks an OS X computer by switching to the login window (it just calls the CGSession application). Today, I find that someone else released the equivalent widget. That's OK. It's more than likely a coincidence and certainly wasn't all that novel an idea. The thing that irks me is that Apple decided to make their widget the "featured" widget. How does that work?! (Their widget also looks nicer and they have a prettier website... grrrrr).


plist weirdness (from my perspective)
Tuesday, March 21, 2006

I use a variable in my widget's property files to turn debugging on and off (where debugging means writing to the console or not). This morning I spent a few minutes writing a script so that I could turn debugging on and off from the command line without having to open Apple's property list editor. The script (which uses Apple's defaults command) works just fine but it doesn't alter the behavior of the widgets. To summarize:

  • If I modify the plist file with Apple's property editor application, then the widget's behavior changes
  • If I modify the plist file with defaults (from the command line), then the widget behavior doesn't change (though the date/time of the plist file does change).

My guess is that the Dashboard environment isn't reading the changed property unless I modify it with the property list editor... but I'm not sure how either to verify this or get it to do my bidding (the goal of all programmers... absolute power <smile>)


another ASDF-Patch (20 March 2006)
Monday, March 20, 2006

I'm slowly catching up on the ASDF Patches I've been sent. Today, the patch consists of the following:

  • Updating download-files-to-package handle changes in Allegro's reader macro behavior (Thanks to Robert Goldman)
  • Fixed a typo (ckeck -> check) (thanks to Robert Goldman)
  • ASDF-install now saves trusted UIDs in a file (thanks to Robert Goldman)
  • ASDF-install now only loads the packages you ask for instead of every package that gets downloaded.

The last bullet point is a change in ASDF-Install's behavior. It fixes a bug where ASDF-Install tries to load every single system file that happens to be downloaded regardless of whether or not you asked for those systems to be installed.

Here is the diff.


ASDF-Install patch (17 March 2006)
Friday, March 17, 2006

Though I've been the official ASDF-Install maintainer for the last several months, I've done precious little maintaining. Thank Goodness that Edi Weitz handed me the project in such good shape!

Today, I'm going to be committing my first patch. It allows ASDF-Install to work properly with Allegro's "modern" Lisp. Here is the diff in case you're curious.

There have been several other patches submitted and a few more home grown ones that need to get into the trunk. That should happen very soon.


Keeping me honest
Friday, March 17, 2006

Christophe Rhodes sent me an e-mail to correctly chide me for several misstatements in my recent "modern" Lisp post. Lisp has always been case sensitive; it just usually transforms case to upper so that it doesn't feel that way. I knew this but I was being lazy in my writing. He also takes umbrage at the term "modern" and, to be honest, I've never liked it either. Having a Lisp that talks more easily to other languages is a good thing but that doesn't make it necessarily better or more new. Thanks for keeping me honest, Christophe!


Confused Quick review: Paparazzi!
Thursday, March 16, 2006

Paparazzi! lets you create images of web pages. I guess that that's cool but I don't think I really get it. Why would i want to create an image of a web page? Why not print to PDF? Why is this a popular application? What do people find so useful? What am I missing?


Good error message: Kudos to Franz
Thursday, March 16, 2006

All the Lisps I know of warn you if you refer an unbound lexical variable. Allegro goes one better and looks in other packages:

Warning: Free reference to undeclared variable *random-generator* assumed special. This symbol may have been intended: cl-variates:*random-generator*.

All we need is a button that lets me add the package reference or import the symbol or whatever and Bob would be our uncle (which is a very weird but enjoyable saying!).


Being modern
Thursday, March 16, 2006

I've been working on a very small project for Franz (more on this something next week when I have time to write). Today, I've been buffing my code so that it compiles and runs happily in Modern Common Lisp (i.e., the case sensitive kind). I'm actually against case sensitivity in programming languages and file systems (I want case to be recognized and remembered but not used in lookups or in sorting) but think that Franz's argument that case sensitivity helps interface to other languages is a pretty hard one with which to argue.

In any case, the code conversion has been mostly pain-free. Two of my habits will have to change:

  • I like to use all uppercase strings in my defpackages and
  • I like to use all uppercase symbols in my #+ and #- reader macros

and I've had to muck with some old code (mostly in CL-Mathstats) that used mixed case and erratic case (i.e., some of the variables were named in upper case and then referred to in lower case <ugh>) in some of the variable names. There are a few other things but nothing too serious.


That language isn't a parrot
Thursday, March 16, 2006

Lisp is making a comeback! It's sexy, books about it are award winning and even though Zach Beane uses the word dead in close connection with it (hence the parrot reference <smile>), Lisp is a language that met it's maker a long time, spun metacircular and keeps on coming! Congratulations to Peter Seibel and the Lisp community!


Expression engine...
Wednesday, March 15, 2006

I heard about ExpressionEngine via one of ITC podcasts of BlogHer 2005. Today, I took a look. My only comment so far is that they made it harder than necessary to download and evaluate their product. I don't mind having to register (much) and I understand that they (the nameless "they") have an interest in knowing who is interested but ... why make me:

  • navigate to the download link only to be told I have to register
  • get me to register so that I get an e-mail which I can use to activate my account (I have an account! I just wanted to download something; why do I need an account?!)
  • return to the site, navigate back to the download link and be told that I must first login in order to download
  • login and be returned to the main page so that I
  • have to navigate back to the download page again.

That's too much. Now I have a bad taste about the site and their product and it just wasn't necessary. Place the download links in the e-mail; log me in when I activate my account, whatever but please, don't waste my time.


The paradox of choice
Tuesday, March 14, 2006

Harper's index:

A Dutch study found that 50 percent of the products returned to stores for malfunctions actually work fine but are just too complicated to use.

Barry Schwartz at PC Forum:

"People like a lot of stuff in their stuff. But after using products with mulitple features, preferences switch to simpler models," he said. The problem is that people don't seem to know this about themselves, "They want capability but get satisfaction out of usability—at the moment there is a tradeoff between the two."


One of the most important lessons in debugging anything
Monday, March 13, 2006

(At least, it is in my opinion). From Will Shipley:

What's the next step? Check your assumptions. Never say, "Well, I did blank, I know I did blank, blank is done, and that's the blank story!" Look at the actual code that does blank, and make DAMN SURE it really blanks.


Color
Monday, March 13, 2006

I just finished looking at a very interesting "introduction to color" presentation by James C. King from Adobe. The one I have is from 1998 but the concepts haven't changed much in the last 8-years (gosh, time flies). The presentation focuses on how human eyes see color and the invention of the CIE color scales. It was pretty interesting.

One other thing to note is that he relies heavily on annotations and OS X's preview sucks with annotations: there is no way (that I found) to look at them without clicking (and resizing!) each one.


Allegro non-crashing crash reports
Friday, March 10, 2006

I've been using Allegro 8.0 on OS X 10.4.5 with EMACS and SLIME and having a great time. I've also been using the console to print debugging messages while working on widgets. It was with surprise that I started noticing messages about "alisp" crashing since, as far as I could tell, Allegro wasn't doing anything of the sort. I wonder if this is like the SBCL non-crashing crashes that John Wiseman noticed a little bit ago. Here is what a crash report looks like.

Update: Franz says that this is a known OS X problem (see this tech note for details). They hope to have a work around for Allegro at some point and are going to be adding a new FAQ about it. Hooray for good technical support!


Giving a tinker's cuss for the struggling artist
Wednesday, March 8, 2006

I've been spending some of my time recently working on wriggling widgets. Javascript has its quirks (so does Lisp!) but it's not too bad. The real problem for me is that my drawing skills are pretty darn primitive. It's fun seeing what some of the more skilled widget crafters have put together but I can only envy them, not emulate. The trouble is that I've quite a few widget ideas that go above and beyond the basic box that I can manage (OmniGraffle is my friend!). If anyone with artistic skills is interested in collaborating with me (or knows of someone I could contact), please drop me a line.


Beating an adjustable horse
Wednesday, March 8, 2006

I hear from various sources that CLISP and LispWorks both behave as Allegro does (here and here) with respect to delete and express adjustability. I confess to not having thought about it (*) but I can't quite see where the efficiency comes from in having vectors potentially lose their (express) adjustability during a delete. I would have thought that the (naive?) method of swapping the items to be deleted with the items at the end and then shrinking the size would be the fastest general method. And this method, it would seem, wouldn't alter any other vector properties. I guess this is just another question to add to my list.

(*) Saying "I haven't thought about it" is an intellectual's cover when he (or she) is worried that they are about to step in it!


I can adjust
Wednesday, March 8, 2006

Zach Beane helped to clarify my surprises with delete a bit via e-mail (thanks). One issue was my fuzzy recollection of the differences and connections between simple array, fill pointers and adjustability. Another is the issue of expressly adjustable versus actual adjustability. The hyperspec says that simple-array is:

The type of an array that is not displaced to another array, has no fill pointer, and is not expressly adjustable is a subtype of type simple-array. The concept of a simple array exists to allow the implementation to use a specialized representation and to allow the user to declare that certain values will always be simple arrays.

When you delete from a vector, the array you get back may not be expressly adjustable anymore -- you can still call adjust-array on it but this may cause a copy to occur in order to do the adjustment. (Which, in my opinion, is sort of like claiming that everyone can fly as long as you don't care how hard they hit the ground when they land...).

My issue was (and is) that I was using delete multiple times and didn't expect it to alter the actual adjustability of my vectors. This seems like a rough edge in the standard that should be improved in the Common Lisp 2007 standard.

(In case anyone is wondering why this just cropped for me it's because I'm a long time Macintosh Common Lisp user and all of MCL's arrays are adjustable. SBCL has non-expressly adjustable arrays but the vector returned when you delete from an expressly adjustable array remains adjustable. So it wasn't until I started running code in Allegro that I ran into this corner. Live and learn (and complain [smile]).


not a del.icio.us followup
Wednesday, March 8, 2006

I received a bunch of great responses to my del.icio.us query. Thanks! Unfortunately, I seem to be in a state of constant frenzy and haven't had a chance to think them through. Stay tuned for exciting (and possibly wrong-headed) conclusions!


Probably not what they meant department
Tuesday, March 7, 2006

From American Scientist's weekly science in the news e-mail.

The robin is the favorite food source of the Culex pipiens mosquito, which carries West Nile.

If this is true, I would be really worried about those mosquitos.


Unpleasant delete surprise...
Monday, March 6, 2006

I was tracking down a problem in CL-Graph's random graph generation code that only seemed to be happening in Allegro. Here's the story.

It was a dark and stormy night. Somewhere, a dog howled. The Common List container library includes several classes that stand in for their Common Lisp counterparts (it also does a good job of providing methods so that regular Lisp data structures behave properly with the container library's methods but that's a different story). One of these is the vector-container. CL-Graph uses vector-containers to hold an array of edges attached to each vertex. When an edge is deleted, something very like the following gets executed:

(setf vector-edges (make-array 1 :initial-contents '(1)
         :adjustable t :fill-pointer t))
(setf vector-edges (delete 1 vector-edges :count 1))

The trick is that under Allegro, the vector returned by delete may no longer be adjustable. At first, I thought that this had to be an error. However, the Hyperspec says that

... If sequence is a vector, the result [of delete] might or might not be simple, ...

which, if I'm reading it correctly, means that Allegro is within the letter of the law. On the other hand, this also seems like a dumb thing. What if I want to delete something else? What if I want to adjust the array later? Why is Lisp like this (probably for efficiency and because this is what some vendor had already done before the standard writing got underway...).

More to the point, what do I do now? Do I make two calls to subseq (ugh?); do i swap the element to be deleted with the last element and then shrink the array (not hard but it irritates me that i have to think about this...). Is there some other technique I'm overlooking (I hope so even if it does make me look silly!)


How do you del.icio.us?
Sunday, March 5, 2006

I've been using del.icio.us for a while now, have about 500 bookmarks and a lot of tags. I generally use Cocoalicious rather than visiting the del.icio.us site because it's faster and prettier. Perhaps because of this, I rarely use any of the social parts of del.icio.us. It's just a big bag of my tags and bookmarks that I use for research or to store stuff to read for the putative rainy when I might have time to read... I'm curious, do other people use the social aspects (other people's tags, related tags, etc)? How do they use them? How do you use them?

My weblog is commentless (because, well, just because) but e-mailing me is only a click away! Thanks.


Quartz Composer
Saturday, March 4, 2006

I just finished a tech note on Apple's Quartz Composer environment and played around with it for a few minutes. I'm not technically competent (graphically speaking) to fully evaluate it, but from a beginner's perspective, it is a sweet piece of work. The tools is a visual IDE which is still pretty unusual. As the tech note says:

The first thing you'll notice about Quartz Composer is that it isn't like most development tools. Instead of writing pages worth of code to directly manipulate the various graphics APIs on the system, you work visually with processing units called patches. These patches are connected into a composition. As you work with a composition, adding patches and connecting them, you can visually see the results in a viewer window. Each and every change you make is immediately reflected in the viewer—no compilation required. This results in a development experience like no other.

(Actually, it results in a development environment like Lisp but I won't blame Apple for not giving our great language some advertising. )

The environment is in the same drag-and-drop-and-change-parameters-in-dialog-boxes style that Interface Builder uses. Unlike IB, however, QC makes it easier to see your connections and provides layering (sub-compositions). I wish that you had the option to seamlessly switch between the visual representation and a text based on (code, data, code is data, data is code...). Borland's Delphi had something like that eons ago and it was really wonderful to be able to use either mode interchangeably. It seems as if the building blocks of QC would make a nice little Domain Specific Language and that having such a language and being able to easily use it to create new building blocks would be a win-win-win.

If you have a Macintosh, I think you owe it to yourself to spend a few minutes checking this tool out. I think it brings a range of expression to the rest of us similar to that which Desktop Publishing and Spreadsheets brought so many years ago.


Getting Real
Friday, March 3, 2006

37Signals has written a book. It's on the web (as PDF, no dead trees).

Getting Real details the business, design, programming, and marketing principles of 37signals. The book is packed with keep-it-simple insights, contrarian points of view, and unconventional approaches to software design. This is not a technical book or a design tutorial, it's a book of ideas.

There are even several free chapters! Sounds like XP + heavy prototyping + great people. 37Signals makes nice stuff and they appear to have fun doing it. That sounds good to me.


We care about silly book titles
Friday, March 3, 2006

Such as People Who Don't Know They're Dead: How They Attach Themselves to Unsuspecting Bystanders and What to Do About It

And this is why it's completely indisputable that our way of life is just plain better...

As Dave Barry says, I'm not making this stuff up.


Funny because it's so true!
Wednesday, March 1, 2006

iPod versus MS iPod!


Seashore (not seaside...)
Tuesday, February 28, 2006

We may be running out of names...

I just came across Seashore, a Cocoa based GIMP. I've never used the GIMP myself partly because it required messing with X windows on the Mac (not that that is hard but it is one more thing). Seashore may change that.


swamped...
Monday, February 27, 2006

therefore... few posts. But you could guess that already, couldn't you?


Harry Potter and the Half Blood Prince
Monday, February 27, 2006

Though it's not great literature, J. K. Rowling has produced another enjoyable page turner in Harry Potter and the Half Blood Prince. That said, the book doesn't do much to resolve anything in Harry's odd world. The bad folk are up to increasing amounts of no good, the ones in charge are increasingly inept and Harry and his friends are increasingly beset by the tumultuous tides of youthful hormones. It's all fun stuff and if you like Harry Potter you'll like this too. (I know I sound as if I'm damning with faint praise; I suppose that's because I've always thought the Harry Potter books to be overly hyped. They are good fun, but they are not great. As Kafka said "Do we need books that make us happy? No! We need books like ice picks to break the frozen seas within us." Of course, Kafka was a bit batty so maybe we should just ignore him and go back to our Tivos and iPods.).


Another 15-minutes
Thursday, February 23, 2006

My Stop It! widget is now up on Apple's website. At least I can use it to time my 15-minutes of fame <smile>.


That's so weak
Tuesday, February 21, 2006

Bruno Haible has a nice write up on weak references.


Broken windows and leaky abstractions
Tuesday, February 21, 2006

Daniel Jalkut delves into the details of Apple's UI implementation and uncovers some interesting leaky abstractions in the process. Part of the problems he finds stem from their being multiple ways to access functionality and multiple levels that don't necessarily stand upon one another in nice layers. If I had the energy, I'd try to express this in terms of building useful DSLs that compose nicely (a very hard problem in general). Unfortunately, I don't so I won't.


Stop-It!
Tuesday, February 21, 2006

Not too long ago, I had the need to time myself so I went looking for a decent OS X timer application. There are a lot of them out there but none of them seemed simple enough or clean enough to make me happy. Since I was already interested in honing my DOM Scripting skills, I thought I'd try to hack a widget of my own. It didn't take long to make something that I could use but, fool that I am, I wanted to make it decent enough to offer to the general OS X using public. That took quite a bit longer than I wanted -- the old 80/20 applies as usual -- but I am pretty happy with the result.

Therefore, and without further adieux, I introduce: Stop-It! an OS X countdown timer for the rest of us.

When you're looking to time something, you don't want to fiddle around and you don't want a countdown timer that gets in the way. Stop It!'s clean, unobtrusive interface lets you start counting down with the fewest possible keystrokes and clicks.

If you're interested, you can download it or learn more from its webpage.


And I thought I had style...
Tuesday, February 21, 2006

SBCL does a nice job of noticing all sorts of little (and not so little) gotchas in your code:

; compilation unit finished

; caught 234 STYLE-WARNING conditions

; printed 52 notes

Time to start (!) mucking out the stalls.


Free the sounds
Friday, February 17, 2006

The Free Sound project is cool.


ILC @ Vancouver?
Monday, February 13, 2006

Bill Clementson proposes Vancouver as a great venue for a lisp / scheme conference. I'm all for it!


Rethinking Public Key Infrastructures and Digital Certificates: Building in Privacy
Saturday, February 11, 2006

Rethinking Public Key Infrastructures is one of those books with a first chapter that lures you in with the false sense of security that you will understand this book and then whacks you on the head in chapter two with dozens of definitions and theorems. I have to confess that I didn't make it past chapter two (though I really wanted to) because there is some complex and beautiful stuff happening here and I just don't have the time right now to assimilate it.

The key point of Brands work is that PKI and RSA are nice but not sufficient. At issue are these three truths:

  • persistence - any data we put out there will stay out there
  • loss of control - any data out there can be used for anything
  • linkability - any data out there can be linked

PKI/RSA gives us identity management but do not separate authentication from identification. Brands frameworks are built on top of PKI/RSA but allow for certifications that act like cash, subway tokens or stamps. Rather than putting trust in Certificate Authorities, it is the certificate holders that decide what to reveal and to whom to reveal it.

This is important work and a very important topic. If you interested, you should probably subscribe to Bruce Schneier's web log as he does a great job following both academic, industry and government happenings.


Ah, libraries
Friday, February 10, 2006

I was just about yet another person's struggles to find existing code that would solve their problem:

We started by looking at what kind of X libraries already existed that might prove useful for our own goals. This research brought up many different existing X-related projects. Some of the more useful ones we discovered were:

  • Long List...

At this point we decided it would better suit our goals to implement our own X solution. For the A and B libraries, we had to distribute multiple files from different authors, which didn't fulfill our simplicity objective. And each library had extra functionality that we didn't need, and especially with library C, that functionality seemed to unnecessarily impact performance. All of the libraries that we looked at seemed to have performance problems.

Sounds familiar, doesn't it.

The catch is that the language is Java and the topic is graph manipulation and display. Yes, Lisp has "library" problems, but once you step off the well trod paths, every language does.

Maybe Lisp has more problems because people can do so much in it and because people have been focusing on really hard problems so that some of the easy stuff (like sockets) has seen short shrift. This isn't to excuse anything; it's just to point out that all of the computer stuff is harder that it first appears and library development is very hard.


metabang software update
Thursday, February 9, 2006

Crazy times in the big city (ok, I live in a little town but that just doesn't sound catchy and you would have probably already stopped reading!).

  • I originally wrote bind in MCL and it was willing to let things like (destructuring-bind (a nil) (foo) ...) go blithely by. OpenMCL no longer likes that construct so I've had to be a little more creative. The point of constructs like this is to avoid having to add (declare (ignore foo)). It's handy.
  • A friendly patch to CL-Graph from Levente Meszaros adds more flexibility to its graph->dot facilities by including several new sub-classes and the infrastructure to make it count. I'll write up an example real soon now.
  • Tinaa has seen several good improvements including: much nicer style sheets, a permuted symbol index, lots of bug fixes, the start of ASDF package documentation and more. Oh, it now also emits a list of the things that don't yet have documentation.
  • CL-Graph (as mentioned) is better documented
  • I have several patches to ASDF-Install that are in the testing / waiting for me to make time for them stage, Soon, i promise, soon.
  • Everything else has been moving slowly along (as have I <smile>).

Keep those cards and letters coming!


Ignoring errors
Wednesday, February 8, 2006

Sometimes it's nice to be able to ignore-errors but it can be a tricky business when you forget that that is what you're doing! I just spent the last hour tracking down what appeared to be a bizarre bug. A function I was called kept aborting out early and returning nil? To compound the problem, i was doing some error handling within the function and its callers so I kept spelunking around in the wrong place. Finally, I managed the isolate the problem by splitting the errant function into littler and littler pieces until it had to succumb.

The real problem: I had an around method that was wrapping an ignore-errors around the call-next-method. I'm sure it had been a good idea once upon a time (though it's more likely that it was just expedient). Sigh.


Egg timers
Tuesday, February 7, 2006

I've been checking out some different simple timer programs under OS X. Here are some notes:

  • Yolk Dashboard widget: cute and semi-functional but way too many clicks required to set a timer up. Let's see: one keyboard to invoke Dashboard, one mouse acquire click (on a very small target) to get to settings, another mouse acquire and click on a text entry box (nothing is focused by default), some numbers to type, another click to close the settings and another click to start the timer! Ack. Worse yet, if you want to time something for 74 minutes, you must enter 1 in the hour field and 14 in the minutes field -- Yolk won't do the math for you.
  • Minuteur - This is a crazily full featured timer that everything from a pretty GUI to a full screen mode. The down side is that it starts the Finder up whenever it runs; since I'm a Path Finder junkie, this is a bad thing.
  • Deja Time Out - This isn't a timer program but it is pretty neat if you want something to remind you to relax your shoulders, stretch your back and look around to smell the roses. I haven't decided yet whether breaking my work flow like this is a Good Thing or not but if I decide yes, this is the program I'll use.
  • Pester - A very simple but competent alarm program. Probably the one closest to what I was looking for when I started looking though now that I've found it I'd think I'd like a bit more of GUI. Sheesh, some people are never satisfied.

Nice spam
Tuesday, February 7, 2006

I like this

Security Advisory: When you log in to your PayPal account, be sure to open up a new web browser (e.g. Internet Explorer or Netscape) and type in the PayPal URL (https://www.paypal.com/us/) to make sure you are on a secure PayPal page.

Of course the link didn't really point to PayPal.


humor (of a sort)
Monday, February 6, 2006

I'm a losey speler. I can generally tell when a word is spelled incorrectly but that doesn't help me figure out what correction is required.

In any case, I was writing a comment about some of my code's inadequacies and "inadequacies" didn't look right. I checked in my Dashboard dictionary but it wasn't found -- go figure -- so I googled it.

I was right about the spelling but the funny thing is the number one search result... I guess it's not a surprise. Sigh. As Nietzsche said, we're human, all too human.


Check that photoshop before you shop those photos
Monday, February 6, 2006

TMC has a decent article on science journals trying to stay on top of fraud by checking all the photos they get in Photoshop.

The same advances that have given consumers inexpensive digital cameras -- and software to easily copy, crop, or alter an image with a few clicks -- have also proven a temptation for unscrupulous researchers. Federal science fraud investigations involving questionable images have grown from 2.5 percent of the cases in 1989-90 to 40.4 percent in 2003-04, according to the federal Office of Research Integrity, which investigates scientific misconduct.


Physical-pathname-directory-separator
Monday, February 6, 2006

I couldn't immediately think of an existing way to determine the physical pathname directory separator in Lisp so I wrote this:

(defun physical-pathname-directory-separator ()
  (let* ((directory-1 "foo")
         (directory-2 "bar")
         (pn (namestring
              (translate-logical-pathname
               (make-pathname
                :host nil
                :directory `(:absolute ,directory-1 ,directory-2)
                :name nil
                :type nil))))
         (foo-pos (search directory-1 pn :test #'char-equal))
         (bar-pos (search directory-2 pn :test #'char-equal)))
    (subseq pn (+ foo-pos (length directory-1)) bar-pos)))

This works on my Mac under Digitool's MCL, SBCL, CLISP and Allegro. I still don't have a Windows box to test upon but maybe some happy reader can contribute! Alternatively, some unhappy reader can tell me the 100-ways in which the code above is wrong <smile>.

(BTW, I assume in the code that the delimiter could be a string with length greater than one. It's probably always going to be a single character which would make my life slightly more easy... Does anyone know of a file system that uses multi-character delimiters between directories? How about something that would disallow such a scheme?).

Update: Peter Seibel reminds me that I should probably be using #'char-equal, instead of #string-equal in my calls to search. Also, I have reports of success under SBCL and Windows 2000. I'll take that as a success.


LispVan Allegro Cache Presentation
Monday, February 6, 2006

I finally got around to watching Bill Clementson's LispVan presentation on AllegroCache. It's quite fun but I have to wonder what the reasoning behind the following choices was:

  • The use of 'defclass*" to define persistent classes (why no t something like defpersistent-class). The * form for defclass is already in semi-common use as a defclass that makes definitions less verbose by abbreviating all that :initform, :initarg, :accessor, :reader, etc. stuff
  • The macro to iterate over objects in a persistent store is doclass. Why not doobjects? I guess that's a picky thing but when I see doclass I think I'm going to be iterating over, well, classes.

Kvetching aside, AllegroCache looks to be a sweet and powerful product. I hope that Franz realy does work on making it accessible to more Lispers by including it in their non-professional versions and by working to make it run outside of Allegro.


Design irony
Monday, February 6, 2006

I came across DSpace today while looking at CL-Semantic. DSpace includes this spiffy diagram made by a company called Dynamic Diagrams. They have a newsletter. Overall, Dynamic Diagrams seems like a cool company with some good ideas but I personally find their newsletter format very traditional and both non-dynamic and non-diagrammatic. It just looks like a bunch of words to read and I already have more than enough of that.


Interesting Hack for MCL on Dual Processor Macs
Monday, February 6, 2006

My friend Joshua related the following hack to get Digitool's MCL to use both processors on a dual processor machine. Running two different images under the same user account doesn't seem to be enough. Both MCLs share a single processor and each gets about 45% of that CPU. To convince MCL to use both processors, you can:

  • Open an MCL image in user A's account and start an image
  • Hot swap to user B's account
  • Open another MCL image and start up another image.
  • Hot swap to user C's account
  • Log out of user C.
  • Now A and B's processes are running in the background.

After this incantation, user A's MCL stays around 100% (95% - 106%) and user B's MCL maxes out around 55% - but that's with top running so I'd say it probably maxes out around 65% or so.

Oh the things we do for power.


One, two, many
Sunday, February 5, 2006

I'm pretty tired tonight, so I can only hope I'm coherent!

One of my personal design-issue favorites is the switch between things that are zero/one and things that can be two and things that are many. I've been pushing Tinaa a tiny bit lately because I want to document all the software I'm trying to corral. Tinaa started out with a very simple model:

  • the thing you want to document is a part
  • parts have sub-parts of different kinds (some of which get documented separately)
  • each part with documentation gets a page to itself (plus various summary pages)

One restriction was that a given part only had only set of sub-parts of any given kind. For example, a class has method sub-parts and slot sub-parts. The first iteration of Tinaa also displayed class sub-classes but the restriction meant that I could not display both sub-classes and super-classes (or direct and non-direct methods or direct and non-direct slots and so on). Changing this wasn't all that hard but it was a switch from one to many, it took more work than I thought it should have -- more redesign that I had hoped.

The next Tinaa restriction to go will be the one that links parts up with a single page describing them. These need to go because it restricts how I want to describe packages; currently, you can ask Tinaa to build you documentation for either the internal symbols or the external symbols but what I think you really want (most of the time) is to document everything but include two tables of contents: an external one and an everything one.

This is another one to many change so we already know that there will be a new level of indirection (we move from a pointer to a thing to a pointer to a list that has pointers to things). It's an interesting switch because it occurs often (and often remains surprising though perhaps it shouldn't) and yet we don't just start with these extra layers of indirection because we often don't need them... Writing this out is making me wonder if there is room for some simple language constructs here... That, however, will need to wait until tomorrow.


We're all better than we think
Friday, February 3, 2006

Brian Mastenbrook points out that most code isn't nearly as bad or as unmaintainable as the original author thinks.

They feel the code is not ready for public distribution because it's not good enough. No code is, once it's subjected to real users and their requirements. The adaptability of the codebase is what matters.

and also mentions that good testing and interactive debugging facilities make maintenance much more feasible -- the break loop is such a win!

I try to leave my ego at the door (which isn't easy because I sometimes have the self esteem of a gnat and my ego seems like the only thing keeping me upright!) because it's easy to make mistakes (and if you're not making them, you're probably not doing anything very interesting or challenging for yourself).

I think it's important to remind ourselves that we're more than what we do, to breath, to laugh and to enjoy life and Lisp.

(I'm also going to congratulate myself in advance for remembering to flick the switch that stops the brackets from getting quoted before I post this and notice -- or worse, have someone else notice -- that I screwed up... again!)


CL-Graph has much more documentation
Thursday, February 2, 2006

One small step for Tinaa and one small step for CL-Graph. Tinaa also has a purtier CSS style sheet and several small improvements.


A (small) shout out to the SBCL developers
Monday, January 30, 2006

The SBCL downloads page just got a little bit better: it shows the version you'll be getting when you click. That's a little thing but it makes it easier to see what you're doing and I'm all for it! (Though I think shrinking the font a tab would be a Good-Thing).


On having a cold
Saturday, January 28, 2006

I have a typical New England winter cold... and have spent the day snuffling and petting my cats. Aside from the sniffles, sneezing, and lack of physical energy, however, I feel pretty well and have taken the time to try and catch up on my organization, etc.

The big achievement of the day is that I've moved my various websites to an (almost) table-less design. This is supposed to be a good thing so I guess I feel good about it. The only thing I'm confused about is that I have two DIVs, one of which is supposed to take up 14% of the width and the other is supposed to take up 80%. When the page gets a bit narrow, however, the layout engine (in Safari, Firefox and Omniweb (my favorite -- just look at those cool tabs)) is placing the DIVs so that they are on top of one another rather than always next to each other... I'm not sure what the scoop is there but it's table-less so it's good <smile>.

I've also started to look at some of the recent patches I've been sent for ASDF-Install. I'm still testing things but you can find out how to check out the latest unstable version via Darcs if you're interested.


The ever illogical logical pathnames
Friday, January 27, 2006

Back when I was first putting some of the metabang software on-line, I ran into problems with SBCL complaining about #\.s in my path names. I figured it was my bad since I generally use MCL and MCL is pretty lax about things like this... So I converted some of my periods to dashes and ran off.

Yesterday, however, I was looking at Peter Seibel's Markup code and SBCL again complained about the periods in "com.gigamonkeys.markup". I was surprised that others hadn't noticed this but then Peter quickly pointed out that the problem was due to the path names having become logical somewhere along the way and why was that (book authors seem to know the standards, it's very irritating!). Of course, it was my bad again because I was pushing logical path names onto my asdf:*central-registry*. Once I converted to physical path names, happiness reigned.

Is this, however, a good thing?

It's certainly surprising and probably unnecessary. Like or loathe them, Logical Path names are part of Lisp and some percentage of folks are going to use them -- I personally think that they are kind of cute and cuddly. It would be easy to have ASDF ensure that any logical path names it was handed got transformed into physical ones. This would, it seems, paper over the problem and I don't think it has any down side... (of course, I'm currently considering renaming unCLog to "my bad" so it's likely that my milage my vary...).

Thoughts? (Aside from when I'm going to get a real weblog that has comment and such) are always welcome.


Not announcing: CL-Markdown
Tuesday, January 24, 2006

I'm not announcing CL-Markdown because there's no there there. I did, however, get a few questions about it after I mentioned it earlier so here's some why and wherefore.

There are already many markup languages (here and here come to mind) and lots of HTML generators. Markdown is John Gruber's text-to-HTML conversion tool for web writers.

The overriding design goal for Markdown's formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown's syntax is the format of plain text email.

I like what Gruber has done in terms of making a "language" primarily for writing and reading that can also be converted to HTML. It's also nice that it's a "standard" (of sorts) and that there are tools that let you go from HTML back to it. I've been meaning to write a CL-Markdown for quite a while now and since I currently have many other more pressing things to do, i thought that now was a good time to start hacking at it -- ok, so that wasn't completely sane. Whatever.

I started looking at both the Perl and Python source and then decided I didn't understand Perl or Python well enough to translate easily and that the problem didn't seem that hard... (famous last words, right!). So what I do now is read in lines of input and chunk them into what is (roughly) the correct block structure. Then I go back over the blocks and handle the spans. My current output is a "document"; document is a list of chunks; a chunk is a list of lines and a line is a list of strings and conses representing markup. Chunks have types and levels (e.g., bullet, level 1 or blockquote, level 3). I'm currently rethinking this approach some because putting the linear structure back into its tree form is being more a pain that I expected... I also want to use Peter Seibel's HTML and PDF backends...

I'm probably going to have to let discretion be the better part of valour and drop the project for a week or two in order to finish some real work. Still, I'm pretty happy with how quickly it seems to be coming togehter...


Too busy
Tuesday, January 24, 2006

I've been busy with my putative day job and have been spending spare moments looking at test frameworks and mucking out a CL-Markdown. More work on ASDF-Install-Tester will appear eventually.


Lisp is sin...
Tuesday, January 24, 2006

I only skimmed lisp is sin when it first appeared. There are some interesting threads in the responses to it on Lambda the Ultimate. They include some notes on:

  • original versus maintenance code
  • languages for smart people versus languages for all people
  • the use and abuse of macros

It's big and it's prime
Tuesday, January 24, 2006

What's 9,152,052 decimal digits (big link) long and prime all over? The 43rd Mersenne prime.


Lots of minor metabang software changes...
Friday, January 20, 2006

I've updated lots of bits and pieces of my metabang.com open software. I'm not as organized at Pascal Costanza (who also just released lots of very nice sounding changes to the Closer to MOP project) so I can't easily summarize everything I've done. Here are a few high-lights; if you're curious, you can find details on each projects change log page.

  • ASDF-Binary-locations: Improved documentation

  • CL-Containers: Integrating cl-variates and cl-containers using ASDF-system-connections; lots of minor package symbol issues. Also added file file-iterators to system and improved hash-table compatibility.

    Fixed incorrect calls to add-parameter->dynamic-class (need to get my test suite running again!)

    Changed first-item and last-item to first-element and last-element (but kept first-item and last-item around for now). Also made first-item and last-item setfable.

  • CL-Graph: various random graph algorithms

  • CL-Variates: used ASDF-System-Connections to play better wtih CL-Graph (random graphs) and CL-Containers (sampling)

  • defsystem-compatibility: added hack for GBBOpen's mini-module system (not loaded automatically though)

  • LIFT: Added *lift-equality-test* to make ensure-same more flexible; improved printing control with :print-follow

    Started some work comparing different tools (look in the compare directory)

  • Metatilities: added (samep string string) method that uses string-equal

    the :export-p option wasn't doing anything in defcondition; now it is

    Added ccl: in several places b/c we can no longer rely on having used the CCL package.

    Package symbol magic (?!) to support cl-variates, cl-containers and cl-graph living happily together.

  • Moptilities: Added ignore-errors/ to remove-methods and remove-methods-if

    Added dry-run? to remove-methods and remove-methods-if

    Minor webpage fixes

    Added initial test system; test directory and tests

  • Tinaa: mostly reorganization; also switched to using my own copy-file routine because I wanted more flexibility and better agreement with with-open-file's keyword arguments (one less thing to remember).


The Frappr Lisp is growing
Friday, January 20, 2006

There are now 133-members (as of 20 Jan 2006). My humble state has four (though I'm currently the only one on the western end). I keep hoping to see Lispers that are close by.


Lisp echo chamber
Thursday, January 19, 2006

I hate to take part in the Lisp echo chamber, but Bill Clementson has an excellent point:

But ... the use of Lisp allowed them to develop products that pushed them to the front of the pack. They were subsequently bought out; however, the fact that their Lisp tools were subsequently discarded does not throw a negative shadow on Lisp. Lisp got them to where they needed to be to succeed - definitely a quality that entrepreneurs want in a programming language!

Now I've gotta go and get me some of that entrepreneur stuff everyone keeps talking about!


Path Finder 4 at last!
Wednesday, January 18, 2006

It's not spatial but it is very special. Path Finder 4 is released at last. It's much faster, has lots of interesting new features and well worth exploring.


Interesting logo
Tuesday, January 17, 2006

I liked Brian Mastenbrook's URL of brian.mastenbrook.net so I looked at gary.king.net. It's taken and the logo is a Kiwi (bird) with a crown. Go figure. Maybe I should grab gary.king.org while there is still time!


Switching hosts...
Tuesday, January 17, 2006

I'm in the process of moving from Westnic to A2 hosting. Westnic has met most of my needs (which, admittedly, are slight!) but doesn't have ssh. This has made updating my site and my weblogs a bit more byzantine than necessary. A2 has ssh! Hello rsync!! In theory, there should be no disruptions. In practice? I don't know.


ASDF and test systems or How I spent my Sunday afternoon
Saturday, January 14, 2006

(update: you should probably see this updated note)

I've been noodling around setting up tests for my ASDF systems. I'm using LIFT because that's my unit testing framework. here is an example system definition:

(defsystem moptilities-test
  :components ((:module "test"
                        :components ((:file "tests"))))
  :in-order-to ((test-op (load-op moptilities-test)))
  :depends-on (moptilities lift))

The only unusual part of the definition is the :in-order-to. It's a normal ASDF clause that can be read as "in order to perform test-op, first perform load-op on moptilities-test." ASDF already knows things like "in order to load, first compile" so that's why this clause isn't used all that often.

This definition seems OK but where do we run the tests? I've seen some systems write a custom perform method, as in:

(defmethod perform ((operation test-op)
                    (c (eql (find-system 'moptilities-test))))
  (describe
   (funcall (intern "RUN-TESTS" "LIFT") 
            :suite
            (intern "TEST-MOPTILITIES" "TEST-MOPTILITIES"))))

This does the trick but has to use that ugly funcall/intern thing. Worse yet, the perform method is only called the first time that one runs a test-op . An alternative to the funcall/intern bit is to put the call to run-tests in the tests.lisp file but this doesn't fix the one-time nature of perform. Generally speaking, we want ASDF to only do things once.. otherwise, we'd spend half of our lives recompiling code that hasn't changed. Testing, however, is a horse of a different color.

If we don't want to touch ASDF source code, we could add the following to our system definition file:

(defmethod asdf::traverse :around 
           ((operation test-op)
            (c (eql (find-system 'moptilities-test))))
  (let ((result (call-next-method))
        (perform-op (cons operation c)))
    (unless (find perform-op result :test #'equal)
      (setf result (append result (list perform-op))))
    (values result)))

Traverse is called by operate in order to figure out what needs to be done. Our :around method tells traverse to return what it usually would but also ensures that there is a call to perform the test-op on the system. We guard the append with the unless to make sure that we don't run the tests twice. Now that I had a solution, I looked a bit to find one that wasn't sure a hammer -- besides, it's bad form to mess with unexported methods!

At first, I tried messing with the times that ASDF records for when operations are performed. I thought that telling ASDF that test-ops were performed at time zero would suffice. This, however, was a dead end because ASDF also need to be told that the operation hasn't been done using the operation-done-p method. Thus, a simpler method for getting what I want is:

;; just my system
(defmethod operation-done-p 
           ((o test-op)
            (c (eql (find-system 'moptilities-test))))
  (values nil))
;; all test systems
(defmethod operation-done-p ((o test-op) (c system))
  (values nil))

This can either be just on my test-system (the first form) or on all test-systems (the second). My guess is that the latter is a good idea but there are probably other ways of getting tests set up so it is probably better to keep things local. My final system file (minus comments, package definitions and such) looks like:

(defsystem moptilities-test
  :components ((:module "test"
                        :components ((:file "tests"))))
  :in-order-to ((test-op (load-op moptilities-test)))
  :perform (test-op :after (op c)
                    (describe
                     (funcall 
                      (intern "RUN-TESTS" "LIFT") 
                      :suite (intern 
                              "TEST-MOPTILITIES"
                              "TEST-MOPTILITIES"))))
  :depends-on (moptilities lift))

(defmethod operation-done-p 
           ((o test-op)
            (c (eql (find-system 'moptilities-test))))
  (values nil))

and that's a pretty happy ending.


clisp append problem work around
Saturday, January 14, 2006

I heard from the CLISP mailing list that you can use :buffered nil to work around the append problem I mentioned a few days ago. I'm sure that there will be a complete fix soon but this is good enough for me and ASDF-Install-Tester.


Cool pictures of a hot volcano
Saturday, January 14, 2006

Augustine is erupting.


Problems appending in clisp
Wednesday, January 11, 2006

Before my recent hardware conniptions, I was tring to get ASDF-Install-Tester to run in clisp on OS X (or perhaps on clisp in OS X... under OS X?!). Unfortunately, I ran into some pretty bizarre behavior trying to append to existing files. Here is a test case on the off chance that someone reading this is also running the Darwin Ports version of clisp 2.37 under OS X.

When I run the following code in my version of clisp (complete version details here)

(in-package common-lisp-user)

(let ((working (user-homedir-pathname)))
  (with-open-file (s (make-pathname
                      :name "talk"
                      :type "tome"
                      :defaults working)
                     :if-exists :append
                     :if-does-not-exist :create
                     :direction :output)
    (format s "~%Hello"))

  (with-open-file (s (make-pathname
                      :name "talk"
                      :type "tome"
                      :defaults working)
                     :if-exists :append
                     :if-does-not-exist :create
                     :direction :output)
    (format s "~%Goodbye")))

The file created looks like this (using od -c)

[billy-pilgrim:~] gwking% od -c talk.tome
0000000   \0  \0  \0  \0  \0  \0  \n   G   o   o   d   b   y   e
0000016

And thanks just not right. My best guess is that someone figured removing all the ones from the first part of the file would make seeking to end much faster (kind of like removing all the hurdles from a race course...). <smile>


Maintaining ASDF-Install
Wednesday, January 11, 2006

I just added some CLiki pages to track ASDF-Install bugs and enhancement requests. If you've got an idea or a gripe, let your fingers flow...


Hardware...
Wednesday, January 11, 2006

My aging Apple Powerbook took the new of the new Intell MacBook badly and decided to make me spend the day mucking with fsck, Firewire drive mode, DiskWarrior and other fun stuff.

What irritates me about this sort of thing is that many -- if not most -- of the lessons learned become useless almost as quickly as they are learned. It's a little like getting a new roof on your house. You spend a lot of money and you have a new roof?! Yes, you need the roof but, at the end of the day, there just isn't anything exciting about it.

Now, back to work.


On being stupid in public
Tuesday, January 10, 2006

As several people have already pointed out, I was being silly and letting the surface similarity between constantly's implicit definition and the lambda form confuse me. In the expression with constantly, the *a* is evaluated so that the function constantly can be called. Constantly, in other words, never sees *a*, it just sees 1.

Man, yesterday Bill Clementson talks me up (thanks by the way); today, I stick me foot in my mouth. It didn't even taste good. Oh well. Them's the blogging breaks.


Something to worry about (but not much)
Tuesday, January 10, 2006

(Update, don't read this. I make a minor fool of myself and now I feel embarrassed).

What does:

(let* ((*a* 1)
       (f (lambda (&rest args)
              (declare (ignore args)) *a*)))
  (print (funcall f))
  (let ((*a* 3))
    (print (funcall f)))
  (values))

print? If you guessed "1, then 3" then you were correct. How about:

(let* ((*a* 1)
       (f (constantly *a*)))
  (print (funcall f))
  (let ((*a* 3))
    (print (funcall f)))
  (values))

If you guessed "1, then 3" then you disagree with every Lisp I've asked. I've tried this with and without optimizations and assume that the compilers are being clever with the constantly (even though CLTL2 says that constantly can be defined as:

(defun constantly (object)
   #'(lambda (&rest arguments) object))

I don't know the standard backwards and forwards well enough to say that one answer is better than another. Does anyone else know chapter and verse?


Now that's fast: Hyperdrive, here we come!
Tuesday, January 10, 2006

From Science in the News

All Hail Hyperdrive: New-Old Idea Attracts Publicity, Top-Secret Attention

Obscure German physicist Burkhard Heim theorized ways to reconcile quantum mechanics with Einstein's general theory of relativity. In the early 1950s, Heim started to rework Einstein's equations [and] wound up with a theory of six dimensions, where gravity and electromagnetism are linked, allowing the conversion of energy from a gravitational to an electromagnetic state and back again.

... [One consequence is] the idea of the hyperdrive engine ... It could zip a spacecraft and humans aboard it out to Mars in just three hours. The craft could presumably eat up in 80 days the 11 light-years that exist between Earth and a distant star. That certainly sounds like science fiction, so stay tuned. Even testing is a long way off...

Wow!


Change Logs
Monday, January 9, 2006

I've modified my website builded (based on LML2) to include Darcs change logs. Here is the one from CL-Containers. It's not as nice as having actual version numbers on my ASDF packages, but it's a start.


I feel almost famous
Monday, January 9, 2006

Bill Clementson speaks kindly about ASDF-Install-Tester and ASDF-Status. I'm honored. On the down side <smile>, I now feel compelled to finish automating the dependencies graphs!


I hope orange is still the new black
Monday, January 9, 2006

... because I just redid all of my common-lisp.net web pages and orange figures prominently.

Not to worry, though because I'm grokking the style thing and can change all easily the next time around.

I'm pretty happy with CSS (not that I heard anyone asking for me opinion <smile>); those web standards folks did a pretty nice job and most of the browsers seem to be getting it too!

Next time (which I hope will be a while from now; web-tweaking takes too damn much time) I'll try to figure out tableless design.


At last - Services that are a service
Monday, January 9, 2006

I think that Apple's integrated Services menu is a great idea. Unfortunately, it's marred by a horrible implementation choice: the user isn't in charge of which services appear. My services menu is about a page long and is full of those little disclosure triangles that can be so annoying to navigate. I have dozens of choices on the menu that I know I'll never use (where did the Convert Chinese Text service come from even!?). Can I remove them? Well, yes. If I want to go and edit dozens of property files hidden in packages all over my hard drive. Frankly, it's never been worth the bother and so it became one those daily annoyances I thought I'd left behind in the windows world.

I'd been intending to write an application that fix this: scan the hard drive for services, let you edit which ones appeared in the menu, modify the property lists and save backups so that you could easily restore things. Lack of both time and Cocoa skills made this one of those ever receding propositions so it was with great joy that I found that Peter Maurer had created Service Scrubber. Peter writes great software for OS X. I use Witch and Textpander every day.

Thanks Peter.


ASDF-Install-Tester becomes AIT
Friday, January 6, 2006

ASDF-Install-Tester takes too long to type so its official name on Common-Lisp.net is AIT. AIT now has mailing lists (developer and announce) and I've added some pages to the CLiki to help it self organize, record bugs and wishes and explain how it's supposed to work.

ASDF-Status has also seen progress. There are now results from SBCL on X86 Linux (thanks to Humberto Ortiz Zuazaga) although I've lost Pascal Bourguignon clisp results -- two steps forward, one step back! Perhaps ore interestingly, I've broken down the results by author to make it easier to figure how whats happening.


Education again
Thursday, January 5, 2006

Dana Blankenhorn (now that sounds like a hard name with which to survive middle school!) opines on the question of education:

But it reminded me that both open source and closed source disciplines have a common problem. That problem is education, recruiting new blood into programming, and training it up so it becomes useful.

CS used to be popular because you could make lots of money on the internets. That bottom-up push is gone and there doesn't seem to be much top-encouragement in elementary, middle or even high-schools.

Places like the Python Bibliotecha may help but I think more leadership is needed.


Not so dangerous
Thursday, January 5, 2006

Dave Pollard correctly blasts this year's Edge answers as being more boring and naive than dangerous:

I was stunned by the blandness of the responses and the utter disconnectedness of respondents from the critical issues of our world today. From the social scientists, who are overwhelmingly from the so-called 'cognitive sciences', we get navel-gazing speculations on consciousness that are neither dangerous nor useful. From the technologists we get technophilia, muddle-headed blather about technology as religion and as the saver of the universe, dangerous only its naivety. From the real scientists we get shopworn retreads about the compatibility or incompatibility of science and religion. From philosophers we get starry-eyed dreaming about a new political order, a world where people suddenly stop behaving the way they do and start behaving responsibly. What planet do these people live on?

and he follows up with 10 ideas he finds dangerous. Good stuff.


Making pathnames, part two
Monday, January 2, 2006

I received several pathname creation strategies in the mail, all using merge-pathnames. Thanks to Andreas Fuchs, Zach Beane and Peter Seibel for their insights. The basic idiom is:

(defparameter *output-directory*
  (merge-pathnames
   (make-pathname
    :directory '(:relative "output")) *working-directory*)) 

Or, if CL-FAD is available:

(merge-pathnames (pathname-as-directory "output") *working-directory*)

This is nicer than my solution because it makes both Lisp and the programmer do less work. Three cheers for the Lisp community.


Making pathnames
Monday, January 2, 2006

I usually make path names by doing things like this:

(defparameter *output-directory* 
  (make-pathname :directory `(,@(pathname-directory *working-directory*)
                              "output")
                 :defaults *working-directory*))

Though it always feels more verbose than ought to be necessary. Hmmm, what I'd like to say is? What? (make-subdirectory-pathname *working-directory* "output")?

It's probably safe to assume that all file systems have a folder hierarchy? I suppose that might be false on embedded systems though. Thoughts?


Dojo guiding principles
Monday, January 2, 2006

I found these while reading about the JavaScript environment Dojo. They seem like damn good ideas to me. The first two are easy for me, the third much harder...

Reduce barriers to adoption.

Simply put, do not give users reasons not to choose your code. This affects everything from design to licensing to packaging.

Simple first, fast later

Make it simple to use first, make it fast when it's appropriate. Simple here means simple for users, not for us. ...

Bend to the constraints of your environment

Do not bludgeon a problem to death with code. If the environment can do most of something, let it. Fill in as necessary, but do not re-invent. Make the path smooth for users, but do not introduce your own idioms where they aren't required.

I think that the third is harder because of the usual "not invented here" syndrome that seems to effect many Lispers.


My new years projects
Sunday, January 1, 2006

Practically speaking, making them public may produce more pressure for performance:

  • As far as I know the CLiki is unmaintained. I'd like to take over the job.
  • Improve and automate ASDF-Install-Tester / ASDF-Status
  • Improve my personal infrastructure for development and testing
  • Get Round up (or something similar) running on Common-Lisp.net
  • Improve documentation and support for CL-Containers, Cl-Graph, and all the rest of that happy family.

That should keep me busy for a few months!


Interesting weblog on systems thinking and global warfare
Sunday, January 1, 2006

Global Guerrillas.


Why you have to try it
Sunday, January 1, 2006

Computer Scientist Eugene Wallingford links to an article from Michigan State University about quantum physics and the value of experiments. I'm often astonished at wrong my initial designs turn out to be as I start to sketch them in code (and I'm pretty sure I'm not alone). Humans are generally terrible at understanding the consequences of their actions and intentions. That's why bottom-up, interactive, test-driven, coders-are-designers, Lisp-like programming is the way to go whenever you're not sure exactly what you're doing and is usually still the way to go when you do.

BTW, Happy New Year.


The Curious Incident of the Dog in the Night-Time
Saturday, December 31, 2005

Like the Speed of Dark, the Curious Incident of the Dog in the Night-Time is told by an autistic. The dog-book, however, takes place today, in our world. Its protagonist, the fifteen year old Christopher Boone, is much more limited in his understanding of others but no less sympathetic and no less courageous.

We all navigate a world of things seen and unseen at whose import we can but guess. We all tend to think we know what is going on most of the time (as the old adage says, we attribute our failures to others and our successes to ourselves) and I'd guess we're all wrong more often than we know. Reading this book reminds us of how much we have learned to ignore, of how much goes on that makes no sense, of how human, all too human, we all are.

The book is funny, sad and deeply moving.


Woken Furies
Friday, December 30, 2005

In Woken Furies, Richard Morgan adds another nail to his dystopic Takeshi Kovacs universe. Though it ends with a ray of hope -- and perhaps a bit too much deus ex machina -- this is by far the darkest novel yet. Kovacs spends much of it far from his envoy calm on a raging vendetta each step of which seems to only pull him further from equilibrium. Like Morgan's social conscience, the science fiction and writing remain excellent. Recommended.


Good news for OpenMCL on Intel
Friday, December 30, 2005

Bryan O'Conner has good news for OpenMCL users worried about the up and coming Intell-igization of OS X. Thanks Bryan.


Somewhat pointless fun: ASDF-Install dependencies
Tuesday, December 27, 2005

I realized sometime yesterday that ASDF-Install-Tester was collecting all of the information I needed to build a ASDF systems dependency graph. Here is a portion of it:

The whole thing includes only the systems that I was actually able to download but it still provides a good representation sample of the ASDF-Installable package universe. FWIW, here is the code I used to make the dot file that I gave to GraphViz.

(in-package asdf-status)

(defparameter *mcl-systems*
  (remove-if
   #'atom
   (mapcar 
    (lambda (f)
      (with-open-file (in f)
        (handler-case
          (aprog1 
            (read in nil nil)
            (when (atom it)
              (warn "Parse error: ~A" f)))
          (error () (warn "Read error: ~A" f)))))
    (directory (make-pathname
                :name :wild
                :type "ait"
                :directory `(,@(pathname-directory *input-directory*)
                             "openmcl"
                             :wild-inferiors)
                :defaults *input-directory*)))))

(defparameter *dependent-systems*
  (remove-if 
   (lambda (system-info)
     (null (getf system-info :depends-on))) *mcl-systems*))

First, we read in all the system information that ASDF-Install-Tester saved in little AIT files. I just grab the OpenMCL files and filter out anything that doesn't look correct (because of ASDF-Install-Tester bugs, I suspect) and anything that has no dependencies.

(defmethod coerce-system-name ((name string))
  (string-downcase name))

(defmethod coerce-system-name ((name symbol))
  (coerce-system-name (symbol-name name)))
                              
(defparameter *systems-graph*
  (let ((g (cl-graph:make-graph 
            'cl-graph:graph-container :vertex-test #'equal)))
    (iterate-elements *dependent-systems*
     (lambda (system-info)
       (let ((system (coerce-system-name 
                      (getf system-info :install))))
         (cl-graph:add-vertex g system)
         (iterate-elements
          (getf system-info :depends-on)
          (lambda (other)
            (cl-graph:add-edge-between-vertexes
             g (coerce-system-name other) system
             :edge-type :directed))))))
    g))

#+Export
(cl-graph:graph->dot *systems-graph* 
  "user-home:docs;foo.dot"
 :vertex-labeler
 (lambda (v s) (princ (element v) s))
 :vertex-formatter
 (lambda (v s) 
   (format s "URL=\"http://www.cliki.net/~(~A~)\""
           (element v))))

Then we can build the graph and output to a dot format.


CLisp (or is that clisp)
Monday, December 26, 2005

ASDF-Install-Tester / ASDF-Status update:

  • There are now results for CLisp (thanks to Pascal Bourguignon).
  • Improved SBCL results thanks to Christophe Rhodes pointing out that I was getting ASDF-Install errors for things that come included with the distribution.
  • More packages included because I've added dependencies on cl-html-parse and trivial-http and used them to download the latest list from the CLiki.
  • The colors I'm using are even more horrid. I need to get a better scheme and make sure that things are OK for the color blind.

It's still a clunky monkey but one small step for an giraffe and so on.


Education
Sunday, December 25, 2005

The story is about the lack of women in American Computer Science programs.

The US economy is expected to add 1.5 million computer- and information-related jobs by 2012, while this country will have only half that many qualified graduates, according to one analysis of federal data. Meanwhile, the subject is becoming increasingly intertwined with fields ranging from homeland security to linguistics to biology and medicine.

As an American, I find that pretty scary. Maybe if we can get everyone to use Lisp, Scheme, ML, etc, then productivity will rise enough that we'll need less programmers and IT people. Maybe not.

I wonder what the situation is like in Europe.


Network effects multiply
Saturday, December 24, 2005

Dylan Evans wonders if we might be coming to a big crunch. Given over-exploitation, over-population, general stupidity among governments, powers and people, and the end of cheap oil... I wonder how it can be avoided.

We now return to our regular Holiday bonhomie.


On Plug-ins and Extensible Architectures
Saturday, December 24, 2005

As I've been looking at ASDF-Install and Lisp libraries, I've been wondering how to get it to all hang together withing every one handing separately (thanks to Ben Franklin for that one!).Dorian Birsan provides an overview of the Eclipse plug-in architecture which is new and improved:

In the new pure plug-in architectures, everything is a plug-in. The role of the hosting application is reduced to a runtime engine for running plug-ins, with no inherent end-user functionality. Without a directive hosting application, what is left is a universe of federated plug-ins, all playing by the rules of engagement defined by the framework and/or by the plug-ins themselves.

He does a nice job limning the pros (flexibility, customization, framework-based) and cons (security, installation nightmares, version inconsistencies) of plug-in systems and concludes that Eclipse has done many things correctly and that much work remains to be done. Decent reading for the winter.

Not knowing anything about it, I wonder how Fink, Debian, Linux and all that manage things... Next stop: google.


Another day, another few improvements
Saturday, December 24, 2005

ASDF-Install-tester now works with Allegro and, drum roll please, SBCL. The Allegro 'problem' had nothing to do with Allegro and everything to do with the difference between rm -r and rm -rf. SBCL, on the other hand, took some doing. ASDF-Install-Tester didn't like running with the version of ASDF-Install bundled with SBCL and SBCL didn't like the cross platform version of ASDF-Install. A few (very minor) patches fixed the later but then I ran into other troubles with trying to share the same version of ASDF-Install amongst my three Lisps (FASL incompatibilities). ASDF-Binary -Locations fixed some of these issues but there is still room for improvement.

On other fronts, I've improved the generated HTML of the status pages somewhat and corrected the missing error output (thanks to Christophe Rhodes for noticing that one!) but not the encoding problem John Wiseman noticed -- soon).

The next step is, I think, to write better documentation and ask for help! I don't have a Windows box or a Linux one and I'd like to include these in the chart. If anyone wants to volunteer some time, please let me know!


Frapper makes me sad
Friday, December 23, 2005

I just joined Frapper so that I could add myself to the Lisp map. When I first logged in, however, Frapper told me that:

You have no friends

I was so heart-broken that I had to write this blog entry instead.


ASDF-Install-tester under Allegro 7.0 (OS X)
Thursday, December 22, 2005

Check out the ASDF-Status page to see (partial) results for Allegro 7.0 on OS X. As people over in CL-Gardeners have pointed out, different Lisps behave, well, differently. I'm not sure why the results for Allegro are partial. The test for cl-package-aliases under Allegro runs fine but then Allegro doesn't appear to quit.

Today's mini-project is thus: timeouts (and maybe SBCL).


Word, Microsoft, Clueless
Wednesday, December 21, 2005

I just lost whatever respect I had for Bill Buxton:

Because Microsoft is such a large company, our perception is dominated by what we see in the core products like Office and Word, and we forget that much of the Macintosh experience is based on those products. Make sure we remember that.

Anyone who thinks Word on the Macintosh is an example of good user interface or somehow elevates the Macintosh to higher levels (as opposed to people's blood pressure) needs to get out more. Look at Pages, look at Nisus Express. Look at Keynote compared to PowerPoint. Microsoft Word is the most horribly designed product I've ever used.


Pretty web site (?) - ASDF-Status
Wednesday, December 21, 2005

I've borrowed some code from Peter Seibel and used LML2 to write a bunch of data munging / HTML generating code in the services of producing a slightly extended version of John Wiseman's ASDF Install status:

Aside from showing off my less than stellar HTML and CSS chops. This site provides an picture of where I'd like to see ASDF-Install-Tester go. What I'd really like to do is integrate some HTTP Posting into the tester so that each test can be accumulated (compare with XBench). This would make it really easy to see the status of each project evolve over time.

I should mention SBCL's platform support page and Bill Clementson's weblog as source of inspiration and CSS magical incantations!

(update: thanks to the thousand eyes of #lisp for catching my all too common typos!).


ASDF-Install-tester progress?
Tuesday, December 20, 2005

ASDF-Install-tester is now nominally cross-implementation. The trouble is that SBCL still uses it's own brand of ASDF-Install and my code doesn't like it. I tried using the ported version of ASDF-Install but SBCL doesn't like that. Things do seem to work under Allegro (version 7.0) but I need to tweak a bit before things are completely happy. Finally, the whole thing has a tendency to hang for reasons I haven't been able to fathom. I know how to deal with timeouts in OpenMCL but need to learn about how to invoke them in SBCL, Allegro, etc.

Actually trying to deal with all this cross platform stuff gives me a greater sympathy for people that complain about Lisp. Doing things like deleting directories or handling timeouts shouldn't -- it seems to me -- require me to start downloading libraries, etc.


A Brief Political Digression
Tuesday, December 20, 2005

If the Lispmeister can do it, then so can I. American is supposed to be a government of Laws. Let's keep it that way.


ASDF-Binary-Locations
Tuesday, December 20, 2005

I liked the code so much, I stole it.

I've taken Björn Lindberg's code and code from SLIME, put them together and added a little bit of love to create yet another ASDF Extension: ASDF-Binary-Locations (ABL for short). It makes it even easier to put your binaries where you want them.


Beginner's mind
Tuesday, December 20, 2005

L'affaire Reddit points out the importance of maintaining beginner's mind. As we learn a new environment, we also learn what to avoid: what steps not to take, what things not to do, what events not to expect. Over time, this learning finds into the background and we no longer notice the rough edges because we no longer encounter them. For us, it's as if they are not there.

The great thing about Reddit and about the new energy bubbling up around Lisp (or should I say sprouting?) is all of the new energy and attention being paid to Lisp's many rough edges. If we're really lucky and try hard, we may come out at the end of the day with a Lisp language and community that won't make this scenario so common.


Not on the list but ... ASDF binary locations
Monday, December 19, 2005

An ASDF FAQ is "why can't I specify the location of the binaries?". The main reason for this is that this is a job for the site to specify, not the system definer. Though that answer is right on the money, it leaves unsatisfied the question of what to do if you are the site!

Thanks to Google, we can find a good answer in mere moments. Thanks to the CLiki, we can stick that answer where it might be slightly easier to find. I figure that even if everyone else remembers this code, it'll still help me when I forget again how to do this!


What's next?
Monday, December 19, 2005

In spite of the fact that I've read Getting Things Done 9-million times, my personal organizational systems never quite seem up to snuff. Actually, they usually don't even seem up to dish gathering under the bed. In an effort at group think or maybe confession (!), here are some of the tasks I want to tackle next.

  • Add web-output to ASDF-Install-Tester so that it's easy to create nice tables showing every system on every platform and its status
  • Work with ASDF-Install versioning and the never quite completed asdf-install:update command.
  • Improve Tinaa with lots and lots of love
  • Complete a report on Common-Lisp library status (inspired by Paul Dietz).
  • A million other things.

I've also got a closed source project under way that needs attention, several proposals to write and --gasp -- real work to complete.


Another wack at ASDF-System-connections
Monday, December 19, 2005

I've updated ASDF-System-Connections and think I may finally have gotten it right!? I'm feeling able as thick as molasses -- is that too cliche to say now? -- but after far too many attempts and minor edits, ASDF-Install-tester loads all of my systems happily. You know what they say: "If ASDF-Install-tester is happy, I'm happy."


Another wack at ASDF-Install-tester
Monday, December 19, 2005

I just put a bit more polish to ASDF-Install-tester. The most important change is that instead of mucking with one of your ASDF-Install directories, it does all its work in a temporary directory that you specify. I use ~/temporary but there are probably better default choices. I've also done a bit of work to reduce the dependencies on OpenMCL. I'll probably finish that bit over the next week or so. Finally, I give it its own page and altered its CLiki page to point at that.


Moptilities is now Closer to the MOP
Saturday, December 17, 2005

As I mentioned earlier this week, I've been rebuilding moptilities on top of Closer to MOP. I've finished now and also made Pascal Costanza's projects ASDF-Installable (see here, here and here). The only difficulty was that Pascal used strings instead of symbols in his ASDF system definitions and ASDF-Install doesn't like that (even though it's valid from ASDF's stand point)!

I've sent Pascal Darcs patches and the amazing Edi Weitz has already patched ASDF-Install. Once Pascal apples the patches, I'll rebuild the ASDF files... If you do run into problems, you can install lw-compat first (via (asdf-install:install 'lw-compat). Once that is there, the other packages should install fine (thanks to Kevin Reid for pointing this out).

Now I need to sit back and decide what the next step is...


Tinaa for Allegro
Saturday, December 17, 2005

I just finished getting my trial version of Allegro 7.0 to properly load and run Tinaa (which is decent test of metatilities, moptilities, and cl-containers too). It's not perfect -- there are several implementation specific things I need to track down -- but it is another step towards world domination.

Next up, SBCL.


Darcs and ASDF-Install
Friday, December 16, 2005

I use Darcs for version control and ASDF / ASDF-Install for Lisp system definitions. Since I have a bunch of packages I maintain, I've been working to automate things as much as I can. I figured I'd document what I do in the hopes that people can help me improve the process or copy it or whatever <smile>. I run under OS X and my Unix skills are mediocre so YMMV. To keep my ASDF systems up to date, I use two shell scripts. The first is make-all-asdf-systems

#!/bin/sh
make-1-asdf-package "asdf-system-connections" "asdf-system-connections"
make-1-asdf-package "asdf-install-tester"     "asdf-install-tester"
# and so on..

As you can see, it just calls make-1-asdf-system for each of the systems I worry about.

#!/bin/sh
### to do
# More error checking

### Command arguments
# Argument #1 is the source
# Argument #2 is optional. If not supplied, the basename of the target is
#  used as the project root on common-lisp.net. If supplied, it is used
#  as the 'root' on common-lisp.net in cl-containers...

tempDir="$HOME/temporary"

if [ -z "$1" ]; then 
	echo "Must specify source"
	exit 1
else
	if [ -z `basename $1` ]; then
		source="$1"
	else
		source=`basename $1`
	fi
	if [ `dirname $1` = "." ]; then
		sourceDir="$HOME/darcs"
	else
		sourceDir=`dirname $1`
	fi
fi

if [ -z "$2" ]; then
	target=$source
	tarPath="gking@common-lisp.net:/project/$target/public_html"
else
	target=$2
	tarPath="gking@common-lisp.net:/project/cl-containers/public_html/$target"
fi

PASSWORD=`cat ~/.ssh/goomber`
SOFTWARE="${source}_latest"
#SOFTWARE="$source_$VERSION"
echo "Making $SOFTWARE"

pushd . > /dev/null
cd $tempDir

# Cleanup existing stuff (this script leaves some of it behind just in case...)
if [ -f $source ]; then
	rm -r $source
fi
if [ -f $SOFTWARE.tar.gz ]; then
	rm $SOFTWARE.tar.gz
fi
if [ -f $SOFTWARE.tar.gz.asc ]; then
	rm $SOFTWARE.tar.gz.asc
fi

# make new one
darcs get $sourceDir/$source
rm -r $source/_darcs
if [ -f $source/version ]; then
	VERSION=`cat $source/version`
	echo $VERSION
fi
tar -cf $SOFTWARE.tar $source
gzip $SOFTWARE.tar
echo $PASSWORD | gpg --batch --passphrase-fd 0 -b -a $SOFTWARE.tar.gz
rm -r $tempDir/$source


rsync \
	--archive \
	--rsh=ssh \
	--compress \
	-v \
	$SOFTWARE.tar.* \
	$tarPath
popd

That's more like it!

Most of my systems are in ~/darcs but I working with a few that are elsewhere. The first bit of the script differentiates these two cases and fills in source and sourceDir. The next bit worries about whether the project had it's own place to live on common-lisp.net or if it lives under cl-containers (for lack of a better place). This lets me fill in target and tarPath.

So that I can automate this, I store my password in ~/.ssh/goomber and suck that in with cat. I'm planning on doing some fine and replace Perl magic to keep versions up to date but I don't do that yet. Once all the shell variables are set, we do a bit of cleanup and then it's time to get to work.

Working consists of a Darcs get to grab the latest code, removing the Darcs information (stored in _darcs), tarring it up, and rsync'ing it to common-lisp.net. The trickiest part for me was figuring out how to get gpg to work with manual intervention. I also use SSH-Agent so that I don't need to log into common-lisp.net when I rsync.

So there it is. Nothing too fancy but it serves my needs so far.


2004 Timeline
Thursday, December 15, 2005

I just noticed Zach Beane's 2004 Lisp timeline. It's very cool to see all the activity in my favorite language. I wonder what 2005 will look like in retrospective.


Moptilities face lift / body transplate
Thursday, December 15, 2005

I've just posted the new documentation for moptilities now that I'm almost done rebuilding it on top of Closer to Lisp. Since I had to rework things in any case, I took the opportunity to change names and munge everything six ways from Sunday (is that Saturday?). I never liked all my stupid "mopu-" this and "mopu-" that in any case and it was fun cleaning it up.

The next steps before I put the new code up are to write some tests (using LIFT) and getting Closer to MOP ASDF installable.


ASDF-Install, or not
Wednesday, December 14, 2005

ASDF-Install may not be perfect, but John Wiseman rocks!

Making ASDF-Install better is why I wrote asdf-install-tester. It's very beta, currently only runs under OpenMCL (and probably only under my setup) but I think it has legs.

FWIW, one of the next things on my lisp list (say that 10 times fast) is to automate the asdf-install-tester some more and include output to the Web. If I set things up in a safe sandbox, I ought to be able to get a daily update of what projects build and which ones don't. I think that that would be handy.


Closer, closer
Wednesday, December 14, 2005

Pascal Costanza recommends the obvious of dispatching on class instead of standard-class to fix the recursion I ran into last night. My silly.


I wish I could get someone to pay me for inane comments
Tuesday, December 13, 2005

According to a new BusinessWeek column Apple may be holding back the music business.

Um, I thought that Apple (practically) created the on-line music business qua business.

I figure using "qua" in a post will give me more cachet and bring in extra bucks. I've heard that added bits of French can do the same thing, n'est pas?


Closer to MOP / Moptilities conundrum
Tuesday, December 13, 2005

I've started to rewrite moptilities with Closer to MOP as a firmer foundation and I've run into a conundrum. Here is the definition of class-precedence (that's not a great name but please ignore that for now <smile>). It is equivalent to the MOP function class-precedence-list but for convenience's sake you can pass it an object or a symbol naming a class.

(defgeneric class-precedence (class) 
  (:method ((class standard-class))
           (finalize-class-if-necessary class)
           (class-precedence-list class))
  (:method ((class symbol))
           (class-precedence (find-class class)))
  (:method ((class standard-object))
           (class-precedence (class-of class))))

Note that the moptilities package now uses closer-common-lisp rather than common-lisp and all of the various MOP packages from difference implementations. This means that the standard-class symbol in the above definition is c2mop:standard-class. If I call #'class-precedence with a symbol, it calls find-class which returns an instance of <lisp>:standard-class (not c2mop:standard-class). The recursive call then matches on the standard-object method -- not, as you'd naively expect, the standard-class method -- and we end up in an endless recursive loop.

Here's my first thought at fixing things:

(defgeneric class-precedence (class) 
  (:method ((class standard-class))
           (%class-precedence class))
  (:method ((class symbol))
           (%class-precedence (find-class class)))
  (:method ((class standard-object))
           (%class-precedence (class-of class))))

(defun %class-precedence (class)
  (finalize-class-if-necessary class) 
  (class-precedence-list class))

this prevents the recursion but now calling with a symbol causes a recursive call with a standard-class (which still ends up running the standard-object code) and this calls %class-precedence with the (class-of class) which is a standard-class and that isn't what I wanted.

Maybe there some easy way around this that doesn't involve a bunch of #+'ing but I'm not seeing it. Any hints the cosmic unconscious wants to send my way are welcome.


Aibo keeps growing up
Tuesday, December 13, 2005

Honda's Asimo (not Sony's) is at version two (with video)


Microsoft Monad (MSH) under the hood
Tuesday, December 13, 2005

Ryan Paul wrote an extensive overview of Microsoft's forthcoming new Windows shell for Ars Technica back in October. I finally got around to reading it this afternoon. In short, it looks as Microsoft may have a winner here.

It's interesting to see the different strategies each camp (Microsoft, Apple, Linux as a whole) is taking. I'm not knowledgeable enough to say anything about Linux but Apple's Automator and Microsoft's Monad are heading in very different directions: Apple is adding a thin veneer to existing functionality whereas MS is redoing the whole shell thing with objects taking the place of text.

Both techniques are important for making computers easier to use but I hope that Monad's ideas get grabbed by the other camps; it really looks like good stuff.


Why automate?
Tuesday, December 13, 2005

Because you're maintaining your good automation habits, and your good refactoring habits. And you're gaining experience with your automation environment. Next time I write an elisp function I'll be better prepared to deal with Emacs's regular expression syntax (and the myriad other little details I wrestled with during that hour.)

From a 2004 post on saving time by wasting it by Steve Yegge. It's a bit verbose but contains some good stuff nonetheless.


Will IVR drive remixable UI?
Tuesday, December 13, 2005

Jon Udell asks if Interactive Voice Response (IVR) will drive voice/data integration and remixable user interfaces:

[the demo] highlighted the notion of composable and remixable user interfaces. Instead of sharing your whole desktop, or a complete application window, you could share something as specific as an account-editing form. Why? More privacy for you, less clutter for the agent trying to help you.

That sounds improbable when you survey the fragmented GUI landscape: AJAX, Flash, .NET, Java. But common patterns do exist, and in each of these niches you can find one or more XML vocabularies to describe them: XUL, MXML, XAML, and others. Maybe it's a pipe dream to imagine a unifying standard in this space, but it's one that I can't ignore. So it was heartening to see that the W3C has taken up the cause.

Sounds hard: getting what you want without getting what you don't is tough. It also sounds very cool.


Where are the other 99 parts?
Tuesday, December 13, 2005

John Wiseman answers important questions while leaving open the greatest mystery of all: where are the other 99 parts in that patent diagram?!


Tinaa and KMRCL
Tuesday, December 13, 2005

As an example, I've added Tinaa documentation for Kevin Rosenberg's KMRCL most excellent utility collection. I'm thinking about automating things so that I can build Tinaa documentation for every ASDF-Installable library out there. After all, someone has to use up all that free space on common-lisp.net.


About that last post
Monday, December 12, 2005

I just realized that I had not actually recorded the Darcs patch before building new ASDF files to fix the problem I mentioned in ASDF-System-Connections. Man, I can sure be brain dead.

On another note, I just fixed an old Tinaa bug that prevented it from playing nicely with symbols that had a #\* or #\/ in them. I also realized that Tinaa was assuming that the logical host "tinaa:" was present. I fixed this and, in the process, pulled some defsystem-compatibility code into metatilities.


Metabang Infinite software loading bug fixed
Sunday, December 11, 2005

I finally managed to figure out the infinite loop problem in loading certain metabang systems. I believe that it is now fixed (and on the web, ASDF-Installable, etc.). The problem was in the asdf-system-connections extension. I had defined system-loaded-p as

(defun system-loaded-p (system-name)
  (let ((load-op (make-instance 'load-op))
        (system (find-system system-name nil)))
	(and system
	     (operation-done-p load-op system)
	     (null (traverse load-op system)))))

because I was under the impression that asdf::traverse was side-effect free. That was the wrong impression. A better definition of system-loaded-p is:

(defun system-loaded-p (system-name)
  (let ((load-op (make-instance 'load-op))
        (system (find-system system-name nil)))
    (handler-case 
	(and system 
	     (operation-done-p load-op system)
	     (null (traverse load-op system)))
      (error () 
	;; just treat any error as 'not loaded' for now...
	nil))))

My next goal is to redo moptilities on top of Closer to MOP.


Small services
Thursday, December 8, 2005

Dan Moniz announces Small Services.

Small services are small, independently published and maintained "services" available via people's websites, with a limited scope and minimal amount of needed formality to be automatically useful to simple programs, as well as humans.

Beautiful. Let a thousand flowers bloom!


Google ads
Thursday, December 8, 2005

I've finally joined the band wagon and added Google ads to unCLog. I'm sure I'll be able to quit my day job any day now.

Hmmm, or maybe Google thinks that I should change my day job!

Mr. Rooter! Fix clogged pipes! I guess I should have thought about that before I named my blog. They got it right later on most of the other pages:

Functional programming, OS X. Much better.


Broken Angels
Tuesday, December 6, 2005

Richard Morgan's sequel to Altered Carbon finds Takeshi Kovacs fighting treachery of many sorts in a world corrupted by by power, government and money. Aside from the advanced technology -- both human and remnants left behind by the mysteriously vanished Martians -- it's an existence much like ours. Broken Angels is as gripping as Altered Carbon and its plot is dense and compelling. I found it a bit muddier in places but still a wonderful page turner. I'm looking forward to reading Woken Furies.


ASDF-Install tester
Tuesday, December 6, 2005

ASDF-Install-tester automates the process of checking whether or not your ASDF-installable systems actually install under ASDF. To use it:

  • Use ASDF-Install to install ASDF-Install-tester.
  • Modify the file definitions.lisp to specify:
  • which systems should be tested (in the variable *systems-to-test*),
  • which systems should be removed before each test (in the variable *systems-to-remove-each-time*),
  • Your local ASDF install directory (in *local-asdf-install-directory*),
  • A working directory (in *working-directory*).
  • Start a lisp and ASDF load 'asdf-system-connections (see note below)
  • Finally, evaluate (asdf-install-tester::main)

As of today, this only works under OpenMCL but porting to other Lisps should be pretty easy. See the CLiki page for more details and links to get a tarball or access the Darcs repository.


File system magic
Friday, December 2, 2005

If I open a file in Apple's preview application, go and change the files name and then go back to Preview, the application manages to figure out the new file name and display it. Even better, if I open the file and then move it and change the name, Preview still updates correctly. If I rm the file (not just move it to Trash), Preview keeps the name as it was but it is "smart" enough to not add the file to the list of recently open items. The change only happens when Preview activates so it's either not using some sort of kevents queue or it is and is just waiting until it thinks it should actually do the work. Getting the fileschanged utility to run under OS X seems to be beyond my poor Unix porting skills). Does anyone know how Preview does this or how to get fileschanged working? If so, please let me know...

Update (3 Dec 2005)

Based on several e-mails and another search of the olde web, I realize that my initial kqueue/kevent thoughts are probably correct. The last time I searched for this stuff, I found the fileschanged project (and couldn't get it to work under OS X) but I didn't find these Apple pages (here and here). Now I have another itch to scratch! This search for knowledge and understanding is fun and exasperating.


Apologies to Tinderbox...
Thursday, December 1, 2005

Yesterday, I complained about Tinderbox's HTML entity encoding (I didn't think it was handling ampersands correctly). Today, Mark Bernstein, the creator of Tinderbox, wrote me and showed me an excellent solution. How about that for great support!

Previously, I used encode( ^text(this)) to spit out the <description> of my feed items. The ^text and ^encode are Tinderbox specific commands that get the text of the current note and encode the markup in it, respectively. My contention was that ^encode wasn't working properly because it didn't convert '&'s into &. Mark suggests using: <![CDATA[ ^text^ ]]> instead to tell RSS readers that the contents are just data and shouldn't be parsed.

Mark also points out that the description was initially intended to be just text, not markup and that this has led to a lot of slips betwixt cup and lip.

So, Thanks Mark, Thanks Tinderbox and boo hiss on all this encoding and double encoding confusion.

(additional apologies ... I had some problem's with this entry correctly encoding the caret symbols that Tinderbox uses in its markup and control language!)


Damn HTML entity encodings
Wednesday, November 30, 2005

Picking up where John Wiseman left off a long time ago...

I use Tinderbox to write my blogs. It's far from perfect but is quite customizable and works well enough that I haven't wanted to take the time to switch to something better. On the other hand, whenever I post a link that has embedded ampersands, my RSS becomes invalid. Sucky.


Patch for ASDF-Install
Wednesday, November 30, 2005

I'm not sure who is maintaining asdf-install but the following patch improves the error message when GPG isn't installed or isn't found when verify-gpg-signature/string calls make-stream-from-gpg-command to do its stuff.

If anyone knows of a better place to post this, please let me know.

The patch just adds a condition and a check that the putative call to GPG returned something that looks like it came from GPG <smile>.

196a197,202
> (define-condition shell-error (error)
>   ()
>   (:report (lambda (c s)
>              (declare (ignore c))
>              (format s "Call to GPG failed. Perhaps GPG is not 
> installed or not in the path."))))
> 
401a408,412
>     
>     ;; test that command returned something 
>     (when (null tags)
>       (error 'shell-error))
>

Spreadsheet's uber alles
Tuesday, November 29, 2005

Avi Bryant and company are working on Dabble which aims to provide incremental development for the rest of us using the metaphor of the spread sheet. Meanwhile, Dan Bricklin has just released wikiCalc 0.1 which is for:

for creating and maintaining web pages that include data [that] is more than just unformatted prose, such as schedules, lists, and tables. It combines some of the ease of authoring and multi-person editability of a wiki with the familiar formatting and data organizing metaphor of a spreadsheet.

Must be something in the water.


the MPAA takes security seriously
Monday, November 28, 2005

... the line was moving slowly because they were asking customers to raise their arms so that they could be electronically frisked with a metal detector, and women's purses were being searched by uniformed security guards.

This was at a screening for Derailed in Toronto, Canada. I had the feeling that Canada was a bit more sensible but I guess capitalism is one of those cross border things. The story only gets worse, read it in full at David Farber's interesting people archives.


Altered Carbon
Monday, November 28, 2005

Markus Fix recommended Altered Carbon ages and ages ago (ok, it was really less than two years but that's a decade in internet time <grin>) but it didn't reach the top of my stack until last week. What a wonderful book! Interesting science fiction, great plot, fine characterization; it was a treat to read.

The only thing for me not to like was Morgan's dubious philosophical premise that we can store minds and swap them from one body to another. I'm strongly of the opinion that embodiment has far more importance than the Western tradition allows (see, for example, here). But all fiction requires some suspension of disbelief and Altered Carbon is well worth the effort. Besides, the issues Morgan raises regarding identity, person-hood, and psychology using body swapping as the mechanism make for excellent dream time fodder. Highly recommended.


Microsoft marketing speak - insulting, funny
Sunday, November 27, 2005

Open Source Dorks.


Surprise: Enrollment drops when laws make it hard to enroll
Sunday, November 27, 2005

From the Computing Research Associates bulletin:

The number of international students enrolled in Computer and Information Sciences (CIS) at all degree levels in the United States fell 32.5 percent between 2003/04 and 2004/05, according to the Institute of International Education's Open Doors 2005 report. Foreign students enrolled in CIS numbered 57,739 in 2003/04 and 38,966 in 2004/05.

And lest you think it's an across the board sort of thing:

Among all fields, foreign enrollments declined 1.3 percent. Between 2002/03 and 2003/04, foreign enrollments declined 2.4 percent. Previous to this, foreign enrollments experienced decades of significant growth.

Diversity is strength and that's especially true in science, research, and any other creative endeavor. We've made it significantly more difficult for foreigners to come here and go to school (or even visit). It's a dumb thing.


A digression on error messages
Saturday, November 26, 2005

I was at the library today and a frantic woman asked if I could help her try to burn some files from her floppy drive to a CD on one of the libraries computers. I'm not sure why she picked me; perhaps I looks really proficient at catalog searching?! In any case, I futzed around a while and kept getting messages like "incorrect function" (when trying to view drive F:, er. the CD) and something like "The copy has failed. Please try another CD or give up and go home." Man, windows is

just

so

bad.

To round things out, I came across this wonderful Windows screen shot tonight via 43 folders. Nice.


Beyond Modularity
Saturday, November 26, 2005

A blast from the past (August, 1999!) review of Annette Karmiloff-Smith's wonderful Beyond Modularity:

Karmiloff-Smith proposes to view cognition and development as a series of Representational Redescriptions that occur across cognitive domains/modules and across developmental phases. Her view of mind is flexible and varied. She believes in a process of modularization (contra Fodor who claims that the modules are innately specified and not subject to change) and in a process of multiple domain specific phases (contra Piaget who claimed that development proceeds in domain general stages where the entire system changes at once from one stage to the next).

Representational Redescription (RR) is a model of how implicit procedural knowledge is encoded and re-encoded into more and more explicit forms until it finally becomes declarative. For example, when one learns to play a song at the piano, one first must play the piece as a whole. With time and practice, one becomes able to play parts of the piece without having the start each time at the beginning. Finally, one may be able to improvise with the piece and work with its parts in their own right. This movement from implicit "programmed" procedural knowledge to explicit declarative knowledge is re-enacted across domains and modules in multiple time scales and levels of detail.

The RR framework explains the ubiquitous U-shaped mastery curve: performance at a skill rises to a high level, then drops and then rises again. The RR framework explains this by saying that the initial mastery is due to an implicit understanding of the problem domain. Development continues after mastery is achieved, however, as redescription attempts to bring understanding to the implicit behaviors. The initial redescriptions often fail to properly distill the correct essence of the procedures and therefore produce less adequate performance. As redescription continues, a correct declarative model of the task is achieved and mastery returns.

Beyond Modularity is divided into an introduction; five chapters that discuss RR and development as it relates to Language, Physics, Mathematics, Psychology and Notation / Drawing; and two final chapters that discuss the more theoretical aspects of Karmiloff-Smith's work. Each chapter provides excellent reviews of relatively recent research into child development viewed through the lens of her RR framework. As an example, chapter 3: The Child as Physicist discuses an experiment in which 4-9-year olds were asked to balance blocks on a narrow support. Some blocks were normal, others had a weight glued to one end and still others had a weight hidden inside them. The 4- and 8-year-olds both perform well at the task regardless of the kind of block. 6-year-olds, however, continually attempt to balance the block at its midpoint, regardless of the kind of block that they are balancing. A more careful analysis of the children's behavior shows that 4-year-olds balance by proprioception alone whereas the 8-year-olds correctly classify each block-type and have an explicit understanding of how the weight affects the balance. 6-year-olds, however, have a model of balance that appears to be based entirely on length and their failure to balance the other blocks is viewed as anomalous data that can be rejected. Interestingly, the same 6-year-olds can easily use the very same blocks to build a house. It appears that there failure to balance only occurs when they are calling upon their explicit knowledge of balancing.

Beyond Modularity presents a flexible, engaging and non-dogmatic view of the development of mind. The RR framework appears to fit well with many of the observed behaviors of children and adults as they master new domains. That being said, the RR model remains silent as to how and why redescription actually occurs. What motivates redescription? Why are humans theoreticians and not just inductivists? How does the magic that turns implicit procedures into explicit theories function? Unless these questions can be answered, RR is an interesting implicit story of cognition that needs to undergo its own redescription into explicit form before it can be useful for actually building intelligent systems or truely understanding natural ones.


Don't search the whitehouse?
Saturday, November 26, 2005

This appears to be their robots.txt file. It looks like everything is disallowed?!


A tiny bit of del.icio.us / cl-graph fun
Friday, November 25, 2005

I've been using del.icio.us for a while now and like it. So far, most of my usage has been entirely personal; I use it as a bookmark repository and don't explore other people's tags or posts. The main reason for this is that I already have way too much to read and do and finding stuff to add to my lists doesn't look as if it's going to become a problem any time soon!

I do, however, have strong interests in folksonomy, ontology, and networking and I've wanted to try some simple visualizations of my data. This turns out to be a natural enough reason to let me write a brief tutorial of CL-Graph and CL-Containers. I used the del.icio.us API to get an XML file of all of my posts. I then used the XMLS package to parse the XML into this:

("posts" (("user" "gwking") ("update" "2005-11-21T15:26:00Z"))

("post"

(("time" "2005-11-21T15:25:47Z") ("tag" "yoga health exercise amherst")

("hash" "9aad47baf972813c8202b43a56e95a61")

("description" "Yoga Center Amherst, Massachusetts")

("href" "http://www.yogacenteramherst.com/")))

("post"

(("time" "2005-11-21T13:30:18Z") ("tag" "kids soccer sports")

("hash" "7d2e120f77e7129753b53a9ab74f1763")

("description" "Home - Allsport Soccer Arena - Northampton, Massachusetts")

("href" "http://northamptonsoccer.com/site/")))

...)

Next, I created a class to hold the information about a post (this is probably better done as a structure but I tend to use objects unless I really care about space and time). The defclass* macro is part of Metatilities and mainly exists to save typing all those :initforms and :readers and whatnot.

(defclass* delicious-post ()
  ((post-time nil ia :initarg :time)
   (tags nil ia :initarg :tag)
   (hash nil ia)
   (extended nil ia)
   (description nil ia)
   (post-href nil ia :initarg :href)))
(defun determine-tag-counts (delicious-post-file)
  "Returns a list of tags and their counts from a delicious-post-file."
  (bind ((posts (xmls::parse delicious-post-file))
         (tags (collect-elements 
                ;; the first two elements of posts aren't tags
                (cddr posts)
                :transform
                (lambda (post-info)
                  (let ((tags (find "tag" (second post-info) 
                                    :test #'string-equal
                                    :key #'first)))
                    (when tags 
                      (tokenize-string (second tags) :delimiter #\ )))))))
    (element-counts 
     (flatten tags)
     :test #'equal)))

The next bit o' code reads in the XML file and aggregates all the tags. The funny bits are bind, collect-elements, tokenize-string, flatten and element-counts. Collect-elements is sort of like mapcar but it works for any kind of container both Common Lisp ones like lists, vectors and hash-tables and CL-Container ones like red-black-trees, heaps, and stacks. Element-Counts is another CL-Container's method. It returns an associative list of each unique element (where uniqueness depends on the test) and the number of times it appears.

If I try determine-tag-counts on my posts, I get:

(("techology" 1) ("christmas" 1) ("parallelism" 1) ("mail-and-print" 1) ("alternative-energy" 1) ("review" 2) ("blog-this" 2) ("autism" 2) ("neurology" 1) ("alf" 1) ...)

But I probably really want to see the results sorted. If we change the call to element-counts by adding :sort #'> :sort-on :counts, then we'll get:

(("to-read" 134) ("book-to-read" 66) ("software-development" 24) ("computer-science" 20) ("software" 19) ("programming" 15) ("science" 9) ("been-read" 9) ("social-software" 9) ("unix" 9) ...)

Oh dear. Looks like I'm behind on my reading...

Visualizing Tag interconnections

Neither tags nor posts sit by themselves. If I made a graph with a vertex for each post and another one for each tag and then added a link between each post and its tags, I'd end up with a bipartite graph. To simplify, I could then project the bipartite graph down onto only its tags (or posts) to create a new graph whose vertexes were all tags (or posts) and where two tags (or posts, etc) were linked when they both share a post in the original graph. Here's how it would look in CL-Graph.

(defun create-bipartite-tag/post-graph (delicious-post-file)
  "Creates a bipartite graph of tags, posts and the links between them from 
a delicious post file."
  (bind ((posts (parse-delicious-posts delicious-post-file))
         (g (cl-graph:make-graph 'cl-graph:graph-container)))
    (iterate-elements 
     posts
     (lambda (post)
       (iterate-elements 
        (tags post)
        (lambda (tag)
          (cl-graph:add-edge-between-vertexes g post tag)))))
    g))

Create-bipartite-tag/post-graph parses the XML as before and then makes a graph to hold on to them. Make-graph is a synonym for make-instance and here we make a graph-container (which is more or less a graph represented by an adjacency list but we don't have to worry about that). Iterate-elements is mapc as collect-elements was to mapcar. We use it to call add-edge-between-vertexes for each post and tag.

Now that we have the bipartite graph, we can use project-bipartite-graph to get one the unipartite projection on tags and then call graph->dot to see what it looks like:

(cl-graph:graph->dot
 (cl-graph:project-bipartite-graph 
  (cl-graph:make-graph 'cl-graph:graph-container 
                       :default-edge-class 'cl-graph:weighted-edge)
  full-graph
  'keyword
  (compose 'type-of 'element))
 "user-home:temporary;all-tags.dot"
 :vertex-labeler 
 (lambda (vertex stream)
   (format stream "~(~A~)" (symbol-name (element vertex))))
 :edge-formatter
 (lambda (edge stream)
   (format stream "weight=~D" (cl-graph:weight edge))))

The project-bipartite-graph method takes as input graph to be created (either a symbol naming the class or an existing (presumably empty!) graph), the graph to project (full-graph in the example code), a value specifying which vertexes to project and a function that will be applied to each vertex in the original graph. In this case, I use the function built by composing #'element and #'type-of. When called on a vertex, this will return the type of whatever is contained in the vertex. The way I built the graph, this will be a keyword for tags and a delicious-post for posts.

Graph->dot has lots of parameters that can be used to control the output. Here, I use the vertex-labeler and the edge-formatter to specify a little bit of fanciness.

(Update 2005-11-28) As I learned to my chagrin, the output is huge (5.2 Megabyte). If you'd like to see it, you can click to open full size in another window.

That, however, is a bit of a mess (even enlarged). I'd really like to focus in on one or two tags and see what that looks like. I'll use make-filtered-graph to see only the tags that are linked to "lisp":

(cl-graph:graph->dot
 (cl-graph:make-filtered-graph
  (cl-graph:project-bipartite-graph 
   (cl-graph:make-graph 'cl-graph:graph-container 
                        :default-edge-class 'cl-graph:weighted-edge)
   (create-bipartite-tag/post-graph #P"user-home:temporary;all-posts.xml")
   'keyword
   (compose 'type-of 'element))
  (lambda (v)
    (search "lisp" (symbol-name (element v)) :test #'string-equal))
  :complete-closure-with-links
  1)
 "user-home:temporary;lisp-tags-20051125.dot"
 :vertex-labeler (lambda (vertex stream)
                   (format stream "~(~A~)" (symbol-name (element vertex))))
 :edge-formatter (lambda (edge stream)
                   (format stream "weight=~D" (cl-graph:weight edge))))

(click to open full size in it's own window)

That's more like it. The make-filtered-graph method takes a graph, a vertex filter, a completion style and a depth. In this case, we select the single vertex labeled "lisp" and go out to a depth of one. Then we include all of the links.

I've only touched on a few of the methods in CL-Containers and CL-Graph but I hope I've wet your appetites for more.


Beautiful Lisp logos from Manfred Spiller
Wednesday, November 23, 2005

Sweet!

Via Edi Weitz via Bill Clementson.


Lisp Girl clothing looks great on everyone
Tuesday, November 22, 2005

Marcus Fix of Lispmeister fame has a wonderful new selection of Lisp Girl attire.


Announcing CL-Graph and other stuff
Friday, November 18, 2005

CL-Graph now compiles under SBCL and OpenMCL (under OS X 10.4). There is a Darcs repository, a CLiki page, it's ASDF-Installable, you can grab a tar ball (or is that tarball?) and there is even a bit of documentation. Wonders never cease.

CL-Graph is a Common-Lisp library for manipulating graphs. It's ported from stuff I wrote for my old job and now released under the MIT License. Because my needs were somewhat peripatetic, the coverage of the library is, well, odd. It does provide a good starting point and I'm hoping that the CL community can help build it into a very awesome tool.


Something funny in Macdom
Tuesday, November 15, 2005

I finally got around to reading Neal Stephenson's In the beginning was the command line. You can choose to download the rest in either:

The funny thing is that the "PC Zip" format works great on OS X but the "Mac Stuff it" one gives me this warning:

We live in strange times indeed.


ASDF System Connections
Monday, November 14, 2005

I used a home grown defsystem (EKSL's Generic Load Utilities) at my previous job but have been slowly moving towards ASDF over the last few months. Mostly, the differences are syntactic and it's a matter of mucking from one form to the other -- I know, I know, I should have written a program to do this but...

ASDF is, however, missing one feature that I had only recently added to GLU: the ability to automatically load other systems when they become relevant. An example or two might be in order.

Example #1: Metatilities is my basic tool set and bind is a handy thing. Metatilities and bind are separate tools and can be downloaded and used individually. However, when I have both metatilities and bind loaded, I'd like bind to be available in the metatilities package.

Example #2: Cl-Containers is a container library. CL-Variates is a set of portable Common Lisp random number generation routines. These are separate tools but when both are available, I want to use the routines in CL-Variates to select random elements from my containers.

Currently, I can accomplish both of these tasks by defining additional systems and loading them as needed. No real trouble but it's a hassle. I'd rather be able to express this and have my system definition tool take care of the rest. Thus: asdf-system-connections. It adds a new macro that's almost but not quite the same as defsystem. The addition is a :requires clause that lists the systems upon which this connection depends...

Here is a simple example from metabang.bind's system definition:

(asdf:defsystem-connection bind-and-metatilities
       :requires (metabang.bind metatilities-base)
       :perform (load-op :after (op c)
                         (use-package (find-package "METABANG.BIND") 
                                      (find-package "METATILITIES"))))

The requires clause specifies the other systems that must be loaded before this connection will be activated. The rest of the system definition regular ASDF. ASDF-System-connections will be loaded as soon as the systems their require are all loaded and they will only be loaded once. Before loading a system that uses a system connection, you should load ASDF-System-Connections in the usual manner:

(asdf:oos 'asdf:load-op 'asdf-system-connections)

ASDF-System-connections is brand new and relatively untested. It is available via darcs, ASDF-Install and direct download. Please let me know if anything goes awry.


Technical and Social Features of Categorisation Schemes
Monday, November 14, 2005

Paul Dourish has done interesting things in Computer Support Collaborative Work (CSCW) and other areas too. This technical report offers the thesis that humans and computers don't get along because the usual programming models are neat and the real world is irredeemably scruffy. In particular, the usual Smalltalk like message-passing model of most object-oriented languages fails to talk the different roles that objects can play based on the current situation (note that multi-methods provide some amelioration to this). Dourish talks about predicate classes -- think of #'eql methods with eql replaced by any predicate! -- and subject oriented programming as attempts to make categorization more context based (and I'd be remiss if I didn't give Pascal Costanza a big shout out for ContextL). This is just a note, so Dourish doesn't go into any details but I think that he absolutely correct in saying that computers don't help nearly as much as it seems they should and that part of the reason for this is that the tools we have don't let us express the messiness inherent in our concepts.


Magic Kingdom for Sale: Sold
Sunday, November 13, 2005

Terry Brooks pens a cute, quirky and forgettable book about a jaded lawyer who buys a real magical kingdom, becomes king and saves the day. It's fun but I wouldn't want to live there.


This Perfect Day
Sunday, November 13, 2005

Charles Petzold mentioned this book in an interesting essay about Visual Studio. It reminded me of a short story I read a long time ago so I got This Perfect Day out from the library and read it. It's very readable but mostly predictable. There are some decent plot twists but they don't remain surprising after the fact the way some do.


Richard Cook hacks Google, the OS X address book and more
Thursday, November 10, 2005

Richard Cook (of I need closure(s)) has a great demo using OpenMCL of mashing Google Maps, the OS X Address Book, and OnTok. It's cool, accessing Cocoa in OpenMCL looks really easy.


SICP video lectures for the iPod
Saturday, November 5, 2005

Not only is this way cool but it also gives me a much better excuse to buy one of these beauties! The Structure and Interpretation of Computer Programs is the book that rekindled my interest in programming, computer science and graduate school. It's truly a astounding piece of work.


Emergence of a small world from local interactions: modeling acquaintance networks
Thursday, November 3, 2005

Returning to the "how do you generate a random network" theme, we have this ditty by Davidsen, Ebel and Bornholdt. Rather than growing a network (as in Holme's and Kim's work), they start with a network of some fixed size and add transactions. The model is based on the idea that you meet many of your friends via other friends. Thus, they begin with a graph of size N and a bunch of links. At each step, one vertex is picked at random and two of its neighbors are "introduced" to one another. If the vertex picked has less than two neighbors, it adds a link to some other random vertex. Finally, with probability p a randomly chosen vertex is removed from the graph (together with its edges) and replaced by a new vertex with only one (randomly chosen) link.

When these steps are iterated, the behavior of the graph in its steady state will depend on p. If p is close to one, then the "death" process will equal the linking process and the graph will be very Poissonian (i.e., the vertex degree distribution will be Poisson). If p is small, however, then the introductions will outweigh the deaths and the graph will have scale-free (power-law) degree distribution. It will also have high clustering coefficient and short path lengths. Thus, this simple model produces graphs small world graphs whose degree distribution can be tuned (using p) between scale-free and exponential. Pretty neat.


the Small-world phenomenon: an algorithmic perspective
Thursday, November 3, 2005

This paper has been on my reading list for the last several years and I finally got to it yesterday. When Kleinberg wrote it, everyone and their cousin had been gabbing on about the "Small World" phenomenon and "six degrees of separation". But it was Kleinberg who had the genius to realize that Milgrim's original experiment provided two insights:

  • That short chains of acquaintances seem to connect us all and
  • That people are able to navigate along those chains!

Kleinberg then goes on to generalize the Watts-Strogatz ring model to grids of arbitrary dimension. This provides a more realistic notion of space (and therefore distance). In Kleinberg's model, each vertex is linked to all of its local neighbors (those within a distance of q) and then has q additional links added to more distant vertexes. The kicker is that the probability that a vertex u has a link added to a vertex v will be inversely proportional (to some power r) to the distant between u and v. Different values of r provide different distributions. For example, if r is 0, we'll get the uniform distribution (which is essentially the Watts-Strogatz model). Furthermore, the larger r becomes, the more centralized the links will be.

Kleinberg then goes on to show that navigation is only possible when r is equal to the dimension of the underlying grid. E.g., in a 2-dimensional world, navigation is only possible (in general) when r is 2. What's more, the navigation strategy is simple: at each step, choose the neighbor that is closest to the target. It's a gorgeous little paper: a beautiful result beautifully presented.


Handy OS X Command Line tweak
Thursday, November 3, 2005

I use the T shell (tshell? my gawd, I don't even know how to spell it. How embarrassing.) and adding set complete=enhance makes navigating the OS X command line much easier. As far as I know, all it does is make completion case-insensitive. It's a treat! There were lots of other useful tips here too.


Sony going phoney
Thursday, November 3, 2005

In a clever effort designed to sell more iPods and increase the popularity of Apple's iTunes Music store, Sony corporation decides to install spyware on its customer's PCs. Brilliant. Steal the product and have no troubles. Buy the product and get screwed. Sony is very clever. Um. not.


the Speed of Dark
Wednesday, November 2, 2005

The Speed of Dark is a work of profound and wonderful science fiction. Like the best of its genre, it plays with the possible in order to question the actual. Elizabeth Moon paints a near-future world where Autism can be corrected before birth. The book follows a group of the last generation of autists (the ones born before the cure existed) and one of them, Lou Arrendale, in particular. You can read the plot summaries and other reviews over at Amazon so I won't do that here. I will say that Moon does a marvelous job raising issues of identity, disability, and personal growth. Even better, she doesn't try to answer them. That's up to each of us.


Toothpaste Rant
Wednesday, November 2, 2005

<ranting>

How many kinds of toothpaste do we need? How many do we want? How many is too many?

I feel cheated that I must wade through more than a dozen varieties of a single brand to try and find one that I think my son might like -- there's a sampler for Bob's sake... and 8 different kinds for whitening alone. What a waste of my time; what a waste of resources.

</ranting>

A very cool illusion
Tuesday, November 1, 2005

This is a wonderful visual illusion: dots change color and disappear. Who says what you see is what you get.


Growing scale-free networks with tunable clustering
Tuesday, November 1, 2005

This is yet another network generation paper. As you may recall, the Barabasi-Albert model provides scale-free distributions of the vertex degree (i.e., it's a power law: a few vertexes have a huge number of edges, lots of vertexes have many edges and bazillions of vertexes have just a few edges) and the Watts Strogatz model gives high clustering coefficients (friends of my friends are also often friends) but neither gives both.

Here, Holme and Kim start with the Barabasi-Albert model and add a new triad-formingstep. This makes sense: if you the want the final graph to have more triples, then ensure that more triples are added during graph generation! The exciting thing is that not only do you get the triples (and therefore a tunable clustering coefficient) but you still get the power-law degree distribution.

The analysis in this paper is relatively light-weight but I actually enjoyed that (I'm a computer scientist (heh, heh), not a statistical physicist). It takes a nice idea, elaborates it, shows that it works and wraps it up. Nice.


Steal These Buttons
Tuesday, November 1, 2005

I found Steal These Buttons via Richard Newman's holygoat weblog. It's almost like a new language.


Fire Logic
Tuesday, November 1, 2005

Fire Logic is an odd combination of fantasy, tarot, psychology, military and cultural maneuverings and free love. I found the plot compelling, the writing skillful and the dramatic tensions gripping and exciting. I was left quizzical, however, but the number of sexual liaisons -- I'm probably just an old fuddy-duddy, but many of them seemed to have little to do with moving forward the plot or developing the characters. Oh well, I still enjoyed the book and look forward to the sequel.


Announcing Tinaa (again..., for the first time)
Monday, October 31, 2005

After more than an year collecting dust, tinaa has finally arrived at common-lisp.net. Tinaa is a simple yet extensible documentation system that relies on Lisp introspection to do all the dirty work. The plus side is that many aspects of tinaa documentation can never get out of sync with what's real. Darcs repositories for tinaa will be posted as soon as I can figure out how to get it all to work smoothly.


Meta-point and LaTeX
Monday, October 31, 2005

I really wish I could meta-point when I'm working in LaTeX. Sometimes I just want to know how something was done by looking at the source-code, not at the manuals.


Blue Gene even faster
Monday, October 31, 2005

What Blue Gene is now able to do every second, any person in the world with a handheld calculator would take decades to accomplish.

But why would anyone want to?! Who writes this stufF?

Now, the race is on to reach a petaflop i.e. 1,000 trillion calculations per second, a milestone, which could change the way we look at science, engineering and business, and more importantly, will have IBM and its government partners at loggerheads with Japan, in a bid to reach the target. (emphasis mine)

The business aspects of IBM and Japan are more important than changing the way we look at science, etc. I don't think so. I also don't think that a bald assertion that going a lot faster is going to change the way we look at things is worth much.


Weighted evolving networks: coupling topology and weights dynamics
Monday, October 31, 2005

This letter examines a new model of network growth where both the edge and node weights can vary dynamically as the network evolves. It is an interesting extension of models like that of Barabasi and Albert where the structure changes but the characteristics of the nodes and edges, once added, are fixed. The model uses the vertex's strength (the sum of the edge weights radiating out from a vertex). At each time step, a new vertex is added and attached to m other vertexes where the probability of attachment is proportional to the existing vertex's strength. Then the pre-existing edge weights are altered via a multiplier delta applied to the existing weight proportional to the vertex's strength. If the multiplier is greater than one, then all the edges get stronger; if less than one, then they get weaker. More complex models can be had if the multiplier itself is allowed to vary with time or the local environment. The authors go on to show that this model leads to the usual power law dynamics with exponents in the usual ranges where the exponent can be derived from the value of the multiplier. It's a nice little piece: a good idea developed quickly with interesting results. Aside from wishing I'd written it, what more could I ask for? <smile>


Boycott JPEG?! I never knew
Friday, October 28, 2005

The JPEG standard is the subject of a patent dispute by alleged JPEG patent holder Forgent. This is asinine and far worse than Unisys's silly GIF dispute. I don't understand how a joint standard can be patented by anyone. Rather than boycotting JPEG, I think we should boycott Forgent. Grrr. They disgust me.


Raampant Google Speeculation
Thursday, October 27, 2005

What have these people been drinking? Google crushing eBay? Google making SQL irrelevant? A GoogleSQL with embedded ads (what does that mean, even?!). Google Base or Baseless speeculation.


the Extended Mind
Wednesday, October 26, 2005

A review from the grab-bag of the past...

Through analogy and thought examples, The Extended Mind argues that our cognition, our beliefs, and our self all partake of the world to some degree; that none of these things are trapped within our skull and skin. Clark and Chalmers propose an active externalism "based on the active role of the environment in driving cognitive processes". Note that this is not claiming that cognitive processes take place in the world--they obviously take place in the brain--but it is claiming that these processes are strongly coupled to the external world and social milieu (especially through language).

Quotes I like:

"Within the lifetime of an organism, too, individual learning may have molded the brain in ways that actively anticipate the continued presence of those ubiquitous and reliable cognitive extensions that surrounded us as we learned to perform various tasks." (cf. Frank Keil's talk on how little we really know in spite of our optimism.)

"Without language, we might be much more akin to discrete Cartesian "inner" minds, in which high-level cognition, at least, relies largely on internal resources. But the advent of language has allowed us to spread this burden into the world. Language, thus construed, is not a mirror of our inner states but a complement to them." [down with mentalese!].

All in all, this is a very entertaining paper whose thesis seems less shocking every year. In a world of continuous partial attention, GTD, and more devices than at which you can shake ten sticks, the idea that our selves are not all in ours head makes perfect sense.

Some References I think look interesting...

the Physics of Super Heros
Wednesday, October 26, 2005

James Kakalios is a funny writer and the Physics of Super Heros is a funny book. It also introduces quite a bit of physics in an informal yet rigorous style that surely keeps his brighter students entertained and learning. The premise of the book is to see whether or not what super heros do makes sense if you grant them one fantastic and impossible power. For example, suppose that Superman were really strong, could he jump over buildings? How strong would he have to be? Suppose the Flash had super speed? Would this really let him run up buildings or zoom across the water? I have to confess that I mostly skimmed the book looking for the funny bits (physics is so 25-years ago for me <smile>) but if I ever want to relearn some of the basics, this may be the place I go.


Finders, keepers? The present and future perfect in support of personal information management
Friday, October 21, 2005

First Monday is a vibrant peer-reviewed electronic journal that focuses on the Internet the interactions and it engenders between humans and technology. This paper by William Jones (co-director of the Keeping Found Things Found project along with Harry Bruce) examines information overload as a signal detection task. For each "piece" of information we come across, we must decide whether or not to keep it or toss it. Two kinds of mistakes are possible: we can keep things that we shouldn't have or we can toss things we should have kept. Personal Information Management is all about reducing the costs of these mistakes.

The obvious costs of a keeping mistake (i.e., of keeping something you never use) are going down: storage is cheaper every year, computers are faster, etc. But those physical constraints are bounded by our human ones. As Herbert Simon said:

What information consumes is rather obvious: it consumes the attention of its recipients. Hence, a wealth of information creates a poverty of attention and a need to allocate that attention efficiently among the overabundance of information sources that might consume it.

(and remember, this was in 1971. He didn't even have a cell phone or instant messaging!). In particular, the more stuff we keep, the more difficult it may be to find what we really need right now and we may even forget that we ever had it -- out of sight, out of mind.

Alternately, if the costs of a losing mistake were zero, then we could keep nothing. This only works if we can also find what we want again as easily as we could have it we had kept it. It also requires that the information "out there" doesn't degrade or disappear. Secondly, the information out there may be hard to find -- my categories aren't shared by the rest of creation so my search strategies may fail. Lastly, it is impossible to find things I forget to look for! Keeping nothing overlooks the fact that what we keep provides reminders of our tasks and projects.

Given that we can reduce costs of keeping and losing mistakes but not remove them, what strategies can we adopt going forward? More and better tools are part of the answer but also part of the problem: each tool tends to create new information federations all of which must be maintained. Keeping things simple is clearly a good idea as is teaching organizational skills to young, old and in between. The problems here are mirrored in the tensions between folksonomies and ontologies: ontologies (can) provide clean classifications amenable to logic but require up front development and have difficulties adapting to a rapidly changing world. Folksonomies (or even persononomies -- now there's a word!) are inexpensive, bottom-up and flexible but may be harder to share and harder to use for automation and reasoning.

This paper, and the work it references, are fascinating and important. Everyone talks about continuous partial attention and information management, but it's time someone started doing something about it!


Science and Math and Amerika
Friday, October 21, 2005

The U.S. is falling behind... The most damning fact:

In 2001 U.S. industry spent more on tort litigation than on research and development.

That would be funny if it wasn't sad and maddening. Of course, America has a great record of foreseeing disasters before they arrive and preparing for them (cf. August 6th briefing of 2001, Katrina hurricane of 2005, Global Warming, Sputnik, and so on and so on).


Funny stuff from 43folders
Thursday, October 20, 2005

A pod cast from Merlin Mann. Funny.


Social Bookmarking Tools (I)
Wednesday, October 19, 2005

This paper from the electronic journal D-Lib provides a nice introduction to many of the tools in the burgeoning field of social bookmarking. It covers both their popular (and here and here) and more scholarly forms. The authors describe the history of linking and bookmarks and the growing architecture of participation (for more on this, see Tim O'Reilly's wonderful essay on Web 2.0) in Amazon, Slashdot, craigslist and so forth. They go on to describe how Connotea combines folksonomy with more traditional ontology-tagging like Dublin-Core. The hope, as always, is that we can find ways to combine the structure and meta-reasoning of ontologies with the vibrancy and liveness of collective tagging without also failing under the weight of spam and exploitation. It's an experiment whose end is still uncertain... The paper closes with a nice review of several tools (many of which I had never heard of).

I didn't find much intellectual high-protein substance in this paper but it's excellent as an overview and links to huge amounts of really cool stuff. Seriously.


Great notes on the software many love to hate
Wednesday, October 19, 2005

Yes, that's software is Microsoft Word -- the worst software ever:

Microsoft Word is a beast. Word is an evolved creation, the bastard offspring of marketing, some original thoughts on how to create a word processor, and generations of Ziff-Davis (PC Magazine) induced rapid mutation to fit someone's distorted checklist. It is to software as the Irish Elk was to mammals. It is an inherently incurable mass of contradictory impulses, which are fully evident in Word's formatting model. It is the single most miserable piece of software that I absolutely must use.


Wow "Big Brother" becomes warm and fuzzy
Wednesday, October 19, 2005

From Symantec marketing material via Ars Technica:

We're providing Big Brother in a box, if you like, to just keep a gentle eye on people. And if people deviate from their normal patterns, we can flag that.

George Orwell is probably rolling in his grave. I especially like that "gentle eye" bit.


Favorite paper title of the year
Monday, October 17, 2005

I have no idea whether or not the paper (PDF) is any good, but "The Study of Delusion in Multiagent Systems" is a great title!


More AppleScript woes
Monday, October 17, 2005

I downloaded a whole bunch of PowerPoint presentations from the IASW 2005 conference (International Something Semantic Web) web site. I wanted to convert them to PDF so that I could import them into DEVONThink -- an awesome application! I think, "Hey, I'll use Automator". But... PowerPoint isn't scriptable and Keynote doesn't have any actions for exporting. "OK," I think, "I'll just write an Applescript." Iterating through the files is no problem; opening them in Keynote is no problem; but saving as PDF. Ah, as Shakespeare said, "there's the rub". Keynote has a save command (as does every application that implements the Standard scripting suite) and the save command has an as argument to specify "the file type in which to save the data". Trying something like

save myDoc as "PDF" in myFile

however, still saved the file as in Keynote format...

So there I was, opening and saving the files by hand... sigh. Computer automation has a long way to go. If anyone knows how to do this in AppleScript, please let me know!


Dan Solove plays at security
Saturday, October 15, 2005

Via Bruce Schneier. Very funny.


slow motion wave in OS X
Friday, October 14, 2005

Hey! I just learned that if you hold down the shift key when you invoke them, many of OS X's cool interface effects happen in sloooow mooootion. Very cool. Very fun.


Dashboard lack of dash
Friday, October 14, 2005

I'm getting to like dashboard but can't understand why I have to wait and watch my widgets refresh for 5-seconds when I haven't used it for a while (only after startup? after sleeping? I don't know). This strikes me as a big usability problem. How much processor power would it take to keep the application refreshed in the background...


Joel sets priorities
Friday, October 14, 2005

Joel is bit prolix this month. The quick summary is:

  • Don't do stuff for just one person
  • Don't do stuff now just you know you'll have to do it someday
  • Do get a group together to collect ideas, tag them for cost, benefit and difficulty and prioritize them collectively by voting.

There are some nice ideas on the mechanics of priority settings at the end of the essay; otherwise, there is not as much there there as usual.


Unimaginably Quick Review: Cognatrix
Wednesday, October 12, 2005

Cognatrix looks like a very interesting program for building your own personal thesari. I'm not sure why I'd want to do that but if I ever do, I'll know where to turn.


Shells
Tuesday, October 11, 2005

Though I've never tried it, I've always loved the idea of using Scheme as my Unix shell. Olin Shivers has a 1994 paper that describes it beautifully. Today I came across a 2001 article from Linux Magazine (of all places). It's not that exciting but does offer some good examples. I downloaded the Scheme Shell source but the configure / make magic didn't work for me under OS X. because of lots of incompatible implicit declarations. There is a Fink distribution but I'm not sure I want to go there. If anyone has successfully built the Scheme Schell under OS X, I'd like to hear about it.


the Opal Deception
Friday, October 7, 2005

Eoin Colfer writes exciting books with intricate plots, clever characters and a free wheeling love of futuristic science and mythical creatures. The Artemis Fowl series explores the convoluted doings of elf Holly Short, centaur Foaly, dwarf Mulch Diggums, evil boy genius Artemis Fowl, his bodyguard Butler. Don't be taken in by the punny names; the books may be written for young adults but I like them too. That said, this fourth book lacks much of the freshness of the previous three. It's hard not to start to get derivative when you have to repeat yourself and I'm hoping that Colfer moves back to some of his other ideas like the Supernaturalist.


Tinaa is not an acronym
Friday, October 7, 2005

Tinaa is a Common Lisp documentation system I did some work on a year or two ago and then left stranded. I've brushed it off a little bit so that I could use it to document CL-Containers, metatilities and moptilities. Unlike some other documentation systems that trundle over the source, Tinaa relies on Lisp's introspection to build up its picture of a system. One thing it makes evident is that I have a lot of documentation to write! Oh well, at least many of the names are semi-self-explanatory.


Quick Review: CSSEdit
Friday, October 7, 2005

CSSEdit is... wait, you'll never guess. Let's have a drum roll please... Yes, it's a CSS editor for OS X.

I'm very far from a CSS maven and when I must muck with it, I spend about 85 percent of my time looking up options and fiddling with parameters to see what it is they do. CSSEdit looks to speed up the process by providing a complete UI for all of the CSS parameters and a live HTML preview. This means that you don't need to look anything up; you just fiddle and see what happens! If you know what you're doing, however, you can easily switch to the source editor and type away. I was impressed with its general ease of use and speed. The only thing missing is a nice hierarchical view of how the different styles inter-relate (or maybe I just couldn't find it). Xyle Scope has that but the CSS editor in CSSEdit seems more usable. If CSS is part of your life, then this might be a good way to spend $25.


cl-containers moves towards reality
Thursday, October 6, 2005

I've decided to get cl-containers out without worrying about ASDF. This means I should be able to stick what's needed up on the web site by the end of this week (oh, oh, I've almost made a commitment). This includes:

  • cl-containers
  • metatilities (everyone needs their own set of matching utilities)
  • moptilities (everyone needs their own MOP layer too)
  • generic-load-utilities

Most of this will be released using the MIT license although some of the code comes from long ago and far away and has it's own (quite unrestrictive) license. Once I've released, lots of good stuff will remain to do (asdf, testing, making sure it's platform compliant, etc). As always, stay tuned.


The fork is irrelevant
Thursday, October 6, 2005

One of my favorite movies is I hear the mermaids singing:

Gabrielle: It's an external transformation [of subject].

Clive: Internal.

Gabrielle: External, look at the lemon.

Clive: What about the fork?

Gabrielle: Oh, the fork is irrelevant!

Clive: Yes, you're right, the lemon does it.

Ah, modern art.


Lisp meets XP
Tuesday, October 4, 2005

Lisp meets XP in Australia. The results are extremely successful.


Quick Review: Avenir
Tuesday, October 4, 2005

Avenir is a writer's tool for those who want to write without futzing with the formatting, worrying about Word, or tangling with a too basic text editor. Its claim to fame is the addition of top level structure (e.g., you can structure a single document into multiple chapters) and excellent support of notes and annotations. All too often when I write, I find I need to keep a second document open to record notes, jottings, random ideas and to-dos. Avenir solves this problem both by giving you a place to record notes about each part of your document (and each character in your novel) and by supporting annotations on any part of your writing.

Pros

  • Full screen writing mode -- no distractions
  • Annotations, and extra places for notes
  • Document structuring

Cons

  • The UI is a big "clunky": I lost some work because I couldn't figure out to get out of full screen mode. When you click add, you still have to click again (or hit enter) before you can type, and the full screen mode is too wide. I shouldn't have to turn my head so much while typing.
  • You can't make annotations of annotations, not can the same piece of text have multiple annotations
  • The outlining is weak. It seems there is only a single level.

That said, Avenir looks like a step in the right direction and is probably a much better tool for general writing than Word. It's a good deal for $20.


(Year old) Interview with the inventor of darcs
Tuesday, October 4, 2005

David Roundy has done a lot for version control and Haskell with his invention and implementation of darcs. I've been playing around with it recently while trying to get cl-containers off the ground. It's very cool.


Damn, why didn't I do this earlier!
Tuesday, October 4, 2005

The inimitable Bruce Schneier points to this new NSA patent (6,947,978):

Method for geolocating logical network addresses

Abstract: Method for geolocating logical network addresses on electronically switched dynamic communications networks, such as the Internet, using the time latency of communications to and from the logical network address to determine its location.

I was writing code to (try to) do this a month ago using latencies from the Network Time Servers. Of course, I didn't finish the project so I guess they deserve the patent more than I do . It's a good idea but I don't understand patents enough to understand why it should be patentable.


Towards the Next Generation of Enterprise Search Technology
Sunday, October 2, 2005

This is the lead off paper for the IBM journal's special issue on their Unstructured Information Management Architecture (UIMA). As such, it's pretty bland. UIMA hopes to bring Natural Language Processing (NLP) and other smarts to search so that web pages are no longer seen as a big bag of words. IBM is big on this and their Alphaworks site is even releasing Java source code to help. I think that adding semantics to the web is vital and that the tools from artificial intelligence are going to be necessary to make it happen. UIMA is a step in the right direction. If you don't believe me, see what Jon Udell had to say!


User Tailorable systems: Pressing the Issues with Buttons
Sunday, October 2, 2005

Proving that a bad pun doesn't completely ruin the chance for publication is only part of what makes this a fun read. The authors tackle the steep slopes between what they can workers, tailors and programmers by introducing some simple customization technologies and working on the culture that will use them. That culture matters is so obvious that almost all technologists ignore it completely -- which explains why so many technologies fail. Most people using computers don't understand (and don't want to understand them), don't know what is easy and what is hard and feel lucky to get through their days without losing their work (I have no evidence for this but still think it's true!). Many people that know something about customization do it badly or are stymied by problems that they feel should be simple. Finally, many people that know how to use computers have forgotten what it was like when they didn't and don't know how to explain their knowledge usefully.

The buttons discussed in this paper were UI widgets that could be tailored in both the usual graphical ways (shape, color, position, etc) and in their behavior (by scripts or programs). (In part) Because this was done on a Lisp Machine, working buttons could be emailed and embedded in documents. This let users organize their buttons, tailor their buttons and share their work. Furthermore, a new position (the handyman) was created to mediate between the workers and the tinkers and programmers. Because the buttons were cultural artifacts that could be cloned (they used a prototype system instead of an inheritance system), experimentation was simple and the buttons were quickly accepted. Because the learning slope was more relaxed and because the buttons were useful, people used them and learned about them and more further up the slopes. Here is a list that shows the steps along the learning curve:

  • move around the screen
  • receive in e-mail
  • situated creation
  • copying
  • changing appearance
  • editing parameters
  • modifying Lisp
  • Using building blocks
  • Lisp programming

It's easy to see why so many people could be brought away from the flat plains and towards the hills!


Friday Bat Blogging
Friday, September 30, 2005

Oh oh, looks like the evil Spell Binder has changed the "C" to a "B". I hope Letterman can save the day.


Toolglass and Magic Lenses: the See-through Interface
Friday, September 30, 2005

Another old (1993) paper that illustrates the current lack of imagination in computer interfaces. I really like OS X and Spotlight is cool but having tools that really exploit the power of modern computers would be nice. Maybe someone could make a set of magic lenses that use Core Image to do very cool things... The trouble (?) is that the model has to be open so that lenses external to the application can perform their magic.

The paper introduces two handed manipulations where the non-dominant hand does coarse positioning and the dominant hand does fine manipulation. Lenses and semi-transparent tools that can do everything from magnifying to altering the visual presentation to making changes in the model. The authors presents oodles of interesting tools most of which existed.

Perhaps it's no surprise that the implementation language (and platform) was Xerox Lisp.


Simple file parsing in Common Lisp
Friday, September 30, 2005

Here's some code I wrote to read a file of transactions from my bank and convert it into a nice list. The data looks like:

09/29/05
Checking
EFT PAYMENT Comcast FSBlink Chan
$-58.26

09/27/05
Checking
Check 564
564
$-10.00

I.e., each transaction is spread out over four (or five) lines. My code reads the lines, munges transactions together and then post-processes then into an easier to read format.

The Lisp code is readable but a bit verbose... I know that the munging step could be done with a regular expression but, sadly, I'm not expert enough to be able to whip one up that would work (especially one that would deal with either four or five lines for each transaction).

Oh, there's also a bunch of personal utility functions in the code (e-mail me if you're that interested!). This includes: collect-elements, map-lines-in-file, string-trim, bind, time-month and time-date.


(defun parse-transactions ()
  (collect-elements
   (let ((buffer nil)
         (result nil))
     (flet ((parse-buffer ()
              (when buffer
                (push (nreverse buffer) result)
                (setf buffer nil)))
            (add-line (line)
              (push line buffer)))
       (map-lines-in-file 
        (lambda (line) 
          (if (zerop (size (string-trim " " line)))
            (parse-buffer)
            (add-line line)))
        "p2dis:data;transactions")
       (parse-buffer)
       result))
   :transform
   (lambda (transaction)
     (bind (((date nil comment amount-or-check &optional amount) transaction)
            (date-and-time (apply #'encode-universal-time
                                  (multiple-value-list 
                                   (parse-date-and-time-string date))))
            (is-check? (and amount 
                            (string-equal comment "check " :end1 6)))
            (dollars (parse-integer 
                      (remove #\, (if is-check? amount amount-or-check) 
                              :test #'char-equal)
                      :start 1 :junk-allowed t))
            (kind nil))
       (flet ((fixup (find remove the-kind &optional replace)
                (when (string-equal comment find :end1 (min (size find) (size comment)))
                  (setf kind the-kind)
                  (when remove
                    (setf comment 
                          (subseq comment (min (size remove) (size comment)))))
                  (when replace
                    (setf comment replace))
                  (values t))))
         (or (fixup "EFT" "EFT PAYMENT " "EFT")
             (fixup "POS" "POS WITHDRAWAL (DBT)" "POS")
             (fixup "ATM" nil "ATM" "Withdrawal")
             (fixup "External" "External Withdrawal" "EFT")
             (fixup "Deposit" nil "dpt")
             (fixup "Insufficient" "Insufficient Funds/Ovdft. Fee " "---")
             (fixup "Overdraft Protection" nil "opd")
             (and is-check? (setf kind "CHK")))
         (list kind comment dollars (time-month date-and-time) (time-date date-and-time)))))))

Memory Management
Wednesday, September 28, 2005

John Siracusa says that the lack of a language / API with good memory management may be Apple's next big nemesis. It's an interesting thought and the comments are good too.


Time as Essence for Photo Browsing Through Personal Digital Libraries
Tuesday, September 27, 2005

Digital cameras lead to lots of pictures and hierarchical file systems aren't up to the task of managing them especially if the photographer doesn't have the time to invest in labeling, captioning and organizing. The authors of Time as Essence realized that most pictures are taken in batches - a birthday, a trip, another birthday, a holiday, a party - and that the pictures taken at these events often come in sub-batches - the arrival, the opening of the presents, the eating of the cake. From here, it's a relatively simple matter to cluster the stream of pictures hierarchically and present an interface that uses this structure to help user's find the photos for which they look. This paper lays out the problem, provides two photo browser solutions and then compares these with a commercial offering in a series of experiments. Perhaps not surprisingly, the time-clustering browsers bested the simple linear one for photo finding. More interestingly, the simpler of the two browser bested it's cousin (which revealed more structure in its interface which led me to think it would score more highly). The great thing about this work is the understanding that people don't want and often aren't able to organize the masses of data they swim in. Systems that the can find structure automatically are a big win. The other great thing is the reaffirmation that user's want simple interfaces (go Apple go).


Girding for the Grid
Tuesday, September 27, 2005

Interesting article by Carole Goble of myGrid UK (isn't that cute, myGrid!? I think they should have called themselves iGrid). She discusses the different uses biologists and physicists may have for Grid Computing. There is a huge need for extremely flexible, loosely coupled and adaptive systems. I think that Richard Gabriel is right when he says that we need to move away from axiomatic systems and towards biologically inspired ones (indeed, that's part of why I love Lisp). My slogan for it is: patterns not protocols. Now all I need is an actual example but that may be a bit of work!


John Gruber on AppleScript and English
Tuesday, September 27, 2005

AppleScript tries to read like English which sounds good. But English is incurably vague and mixing vague with computers leads to suffering (which leads, as we know, inexorably, to the dark side).

This is AppleScript at its worst. It was a grand and noble idea to create an English-like programming language, one that would seem approachable and unintimidating to the common user. But in this regard, AppleScript has proven to be a miserable and utter failure.

This is partly leaking abstractions and partly the wrong tool for the job. It's also a good lesson for some of what we need to think about when creating Domain Specific Languages.


Building Bridges: Customisation and Mutual Intelligibility in Shared Category Management
Thursday, September 22, 2005

The mix of sociology and computer science provides fertile ground for making tools that make work work better instead of making work more work. It also leads to papers with longer sentences and words like "artifacts", "appropriation", and "mutual intelligibility". This paper by Dourish et. al. explores how a government agency (the Department) deals with the long term categorization problems involved in tracking projects (like building a bridge) from inception to completion and maintenance. The project documentation must be categorized for many different groups using government mandated categories (which occasionally change and which don't always fit the task at hand). To augment the paper categorization, Dourish et. al. provide the metaphor of layered sheets (akin in some ways to magic lenses) which add, remove and modify categories in the system. Each group and individual can create their own set of sheets to structure their work. The sheets don't change the underlying categorizations so user's can understand each other's work by adding and removing them. Thus the architecture supports both customization and intelligibility.

This looks like a nice piece of work but it appears that not much has happened since 1999. We finally have Spotlight, Google Desktop and Windows Vista will be here someday. But none of these come close to the sorts of things offered in research labs 10 and 20-years ago. Sigh.


Kleinberg wins!
Tuesday, September 20, 2005

Jon Kleinberg wins a MacArthur award! And to think, I mentioned him on this very weblog. I'm clearly much more influential than I realized. Seriously, though, Kleinberg has done beautiful work and it wonderful to see it recognized. It's great fun to see the rest of the winners too. The world needs people like this more than ever!


Learning Structured Representations
Tuesday, September 20, 2005

Shastri and Wendelken present an ambitious connectionist architecture that can "encode a large body of semantic, episodic and causal knowledge, and rapidly make decisions and perform explanatory and predictive reasoning." My favorite bit is the technique of randomly sampling from the known types and entity spaces while recruiting other unused "nodes" to tie them together. If the connection make sense (has utility), then it will be strengthened over time; otherwise, it will decay. To me, that sounds about right. The authors are also working very hard to biologically motivate their work.


David Rumsey maps it out
Tuesday, September 20, 2005

From IT Conversations: David Rumsey talks about maps at Where 2.0. It's a fun talk but I wish I could have seen the visuals.


Putting it together: NetNewsWire, del.icio.us, and Cocoalicious
Tuesday, September 20, 2005

Peter Rukavina has a nice screen cast combining NewNewsWire, Cocoalicious and del.icio.us.


Chris Anderson of Wired Magazine
Sunday, September 18, 2005

Chris Anderson of Wired Magazine talks about the long tail at ETech 2005. He has some interesting ideas about how the connectivity of the internet alters the shape of popularity. I'm not sure he's right; it seems more like the internet would alter the scaling factors without altering the overall shape... still, it's fun stuff.


Irving Wladawsky-Berger
Sunday, September 18, 2005

Irving Wladawsky-Berger from IBM talks about IT infrastructure, Open Source, autonomous systems and the like at the Open Source Business Conference 2005 (ITC). I found the presentation interesting but a bit glib: being more connected doesn't mean being more understanding and having everything in XML doesn't mean we're communicating. Also, having more knowledge can become overwhelming and the search for optimizations can leads to extreme fragility.


Even their images are derivative
Thursday, September 15, 2005

Separated at birth?


Nice writeup of Cocoa delegation and notification
Thursday, September 15, 2005

This should be not much news to seasoned Lispers but it's a good write-up by Eric Buck:

Sometimes, however, loose integration and a loose coupling are better. Although subclassing is a powerful reuse tool, it is ironic that subclassing can also increase one of the most common obstacles to reuse, namely the unnecessarily tight coupling of code.

The challenge is staying loose while staying correct.


Bill Clementson demos ContextL
Thursday, September 15, 2005

Bill has a nice write up and demo of ContextL.


Semantic File Systems
Wednesday, September 14, 2005

Before there was Spotlight, before there were Placeless Documents, but not before the Cannon Cat, there were Semantic File Systems. This paper by Gifford et. al. outlines the basic approach: hide the file system from users behind a more or less transparent query interface and build the database for the query using various transducers to interpret files more or less intelligently. It's good stuff. It also shows how far we still have to come before our systems start to work as well as what was in the lab almost twenty years ago.


Folksonomy: stop worrying and love the mess
Tuesday, September 13, 2005

A nice panel discussion from ETech 2005 between Joshua Schachter (del.icio.us), Stewart Butterfield (Flickr), Jimmy Wales (Wikipedia) and Clay Shirky (educator and technology malcontent (in a good way!)). I appreciated the insightful and obvious in hindsight distinction between:

  • your data for you (Flickr)
  • your data for everyone (Wikipedia)
  • other people's data for you (del.icio.us)

It's well worth hearing if you think this stuff is cool.


Emerging Technologies and the military
Tuesday, September 13, 2005

From IT Conversations comes this presentation from ETech 2005. The main topics were a military Flickr system for sharing photos taken by soldiers, using small satellites to provide better information at the edge (though this seems more like wishful thinking unless there are good means to prioritize. Everyone wants everything now, now, now), and the use of fast 3D data capture. Cool stuff though parts were very visual and lost something in the podcast translation <smile>.


You say "peak", I say "pique"
Tuesday, September 13, 2005

This just in from the field (thanks!): Google says that "pique my interest" has 38,500 hits making it the winner (see here for previous contestants). Not surprisingly, the dictionary agrees. I'm happy. I was sure that "peak", "peek" and "peque" (ugh!) were wrong.


Speaking of pequing
Monday, September 12, 2005

Google returns about 14,800 hits for "peak my interest", 1210 for "peek my interest" and 20 for "peque my interest". All of these seem too low for my tastes. Is there another way to spell "peak"?


Very quick review: Formations
Monday, September 12, 2005

Ted Goranson mentioned Formations in a recent About This Particular Outliner column. It's an eclectic, organizer / project manager / PIM tool for the Macintosh. Formations has a busy UI feels cluttered and confusing to me even though it also reveals some interesting features and ideas. I like the Address Book integration and the ability to define multiple views of the same data. Integration with e-mail and dictionary lookup is also a plus. On the whole, however, Formations remains too much of a traditional organizer to really peak my interest.


Minor Tiger quibbles
Monday, September 12, 2005

I've finally upgraded to Tiger on my main work machine. Overall, it's cool. Spotlight is nifty though not magical; Dashboard is cute but not yet a part of my workflow; I use PathFinder (when will they finish 4.0 already!), NetNewsWire and OmniWeb so some of the underlying changes aren't obvious to me. Nonetheless, I'm happy with Tiger. It works, it rocks and it's solid.

On the other hand, Apple new found penchant for UI confusion and inconsistencies is getting to be a bit depressing. Take Key Chain Access (KCA) for example. I love the keychain. It's a great idea and is well implemented. I like how the new version of KCA sorts the keys into different categories and includes a search (two of my long time secret wishes). What I don't like is how the key to delete a key is DELETE (not Apple DELETE the way it should be). I also don't like that deleting a key doesn't make the key disappear (at least not when you're looking at a subset of keys). That's wacko behavior and completely bizarre from any perspective. Apple is supposed to get UI. What's happening.


Language Constructs for Context-oriented Programming
Friday, September 9, 2005

Pascal Costanza and Robert Hirschfeld remind us that things in the world usually have multiple roles (I'm a father, a programmer, and occasionally a human being). These roles come and go dynamically, sometimes overlap, and demand different behavior. Software languages have generally ignored this complexity; leaving the problem to the creative invention of legions of programmers (though Cocoa and Objective-C do provide for the related but simpler behavior of delegation). Since context is so important, it makes sense for languages to support it as a primitive. Costanza nd Hirschfeld then go on to demonstrate the power of the CLOS MOP by implementing a strong language candidate before our eyes (admittedly, with most of the details left under the rug but the source is available!). Context-oriented programming feels like Aspect-oriented programming turned on its side. In AOP, things are expressed "on the side" and then woven throughout the program (e.g., logging or persistence). In COP, things are still expressed "on the side" but now they are treated as multiple layers that can be turned on and off dynamically at run time. This is an excellent paper: clearly written with a strong motivating example and good literature review. It's wonderful to see language design coming back into fashion.


Good Table creation LaTeX hints
Thursday, September 8, 2005

Can be found on this web page. I've long wondered how to do some of these things!


They do a nice job...
Thursday, September 8, 2005

Man do I ever want one. The ROKR seems a bit brain dead in comparison. Why not an iPod form factor with the click wheel serving as as a keypad for numbers? As Andrew observed yesterday, they can obviously handle 4 position sensitivity, why not 10? Frankly, I agree with some of the bystanders that Apple could easily move into the phone design market.


SELF: the power of simplicity
Wednesday, September 7, 2005

This old paper compares and contrasts SELF and Smalltalk. SELF takes the Smalltalk ideas of simplicity and minimalism to even greater extremes. It has no classes (only prototypes), no "free" variables (only objects), and merges state and behavior almost seamlessly.

I've always wanted to play with SELF but still haven't managed to get a working version under OS X (though one exists). It blends a beautiful set of ideas into a really interesting mix.

(update: I googled "self os x programming while I was writing this. Now I've downloaded the SELF environment and am fooling with it! Cool).


Danny Hillis talks about stuff he's done
Wednesday, September 7, 2005

Danny Hillis (of Connection Machine fame and more) talks about what he does for his day job at Applied Minds. Most of the talk is unfocused: a grab bag of cute tricks, robots and interesting falderal. He ends, however, with some ideas about how we might turn the whole internet into a public data store. Worth listening to... quickly.


Using Properties for Uniform Interaction in the Presto Document System
Friday, September 2, 2005

Like Lifestreams, Presto attempted to make computers easier and more powerful. Both projects realized that file systems are an artifact of the computer and usually are more bane than benefit. Where Lifestreams organized everything by time, Presto uses a folksonomy like property system (though properties are typed and can be just about anything). The system did a nice job of incorporating legacy applications via clever manipulation of the file system, allowed services (software agents) to mark up documents automatically, and had some nice user-interface ideas about adding stability to dynamic collections. For some reason, however, Presto is no more. The Placeless documents project at PARC ended in 1999 and the Harland project follow-on ended sometime later. Sad.


I'd like to say it was fun, but
Thursday, September 1, 2005

Applescript still leaves me cold! Firstly, there's all this syntax. Syntax is fun when you're a teenager and it gives the illusion of mystic power and magical incantations. After that, it just gets in the way. After using a language in the Lisp family, going back is just painful. Secondly, I don't know the language and getting anything done is always harder than I expect. Thirdly, it's a full featured, powerful language but it's still missing the little things (like a minimum function of goodness sakes). Enough carping, however. I wrassled with the my Script Editor (still oddly broken, by the way) long enough to be able to export my Address Book into a lispy format that I can now play with. Trivial? Yes. But there it is. (Here's the source in the low probability case that someone else might want to do this).


Lifestreams: a storage model for personal data
Tuesday, August 30, 2005

Lifestreams is a storage model that hides the file system and indexes everything according to time. Its chief motivations are

  • that storage should be transparent (we shouldn't have to come with file names),
  • that directories (and hierarchy) are lousy structuring mechanisms,
  • that archiving should be automatic,
  • that smart summaries should be possible,
  • that reminding should be convenient, and
  • that personal data should be accessible anywhere and everywhere without compatibility headaches.

Lifestreams is an answer to these observations. It is a "time ordered stream of documents that functions as a diary of your electronic life; every document you create and every document other people send you is stored in your lifestream." Lifestreams are organized on the fly via find operations (think Apple's Spotlight). Archiving is automatic because streams are naturally organized into past, present and future. To see what you've done, you dial the viewport backwards; to set reminders, you dial it forwards (Freeman and Gelernter claim this is intuitive but I'd like to see the user tests. To me it sounds like a cute idea that only abstraction loving computer scientists would love...)

The paper includes several examples such as a contact management, e-mail and bookmark sharing (Lifestreams are a fairly natural way to implement something like del.icio.us). There are a lot of good ideas here but it doesn't seem as if enough attention was paid to how people actually use their computers to do their work. Indexing by time is helpful, yes, but we are also very spatial creatures and need to be able to structure our work in a multitude of ways.


Quick Robin, get the bat-bot
Tuesday, August 30, 2005

From Wired (via American Scientist) we present the bat-bot: the first robot that uses in-air sonar effectively for sensing and navigation. It's modeled closely after real bats but we humans have a long way to go:

For all its sophistication, the Bat-Bot still can't hold a candle to its biological progenitor. ... [relies on a] series of powerful computers that crunch through acoustical data from about 750 frequency channels in each ear.

... It turns out a bat's hearing is as complex as it is acute, with hundreds of thousands of frequency channels in each ear, and as many neural receptors, totaling "perhaps a million separate elements,"

"The real challenge is to find a way to duplicate the tremendous parallel processing power of a bat's brain," Simmons said.

A brain that's the size of a pea, he adds.

Now that's high density computation!


the Peace War
Monday, August 29, 2005

Imagine you're an upper level anti-war bureaucrat. Imagine one of your scientists could encapsulate space and time in impermeable bubbles. Imagine you decide to end war and create peace by enclosing all the opposition in your bubbles and becoming the de-facto ruler of the world... If you managed to imagine all that, you have the setting for Vernor Vinge's the Peace War. Like the rest of Vinge's work (here for example), this has excellent plotting and imaginative science. It's a treat worth reading more than once!


Marooned in Real Time
Monday, August 29, 2005

Vinge is an engaging writer with great plotting, interesting characters and wonderful ideas. Marooned in Real Time explores a murder mystery (with one of the most ingenious weapons ever devised!), the nature of technological change, and the implications of controllable time stoppage - imagine what you could see skipping through the millennia .. Marooned in Real Time is a treat.


Nanotubular
Tuesday, August 23, 2005

You can never be too thin or too strong:

The nanotube sheets are about 2 inches wide and just 50 nanometers thick, or about 2,000 times thinner than the width of a human hair. At this thickness, 250 acres of a solar sail made of nanosheet material would weigh less than 70 pounds.


Freakonomics
Sunday, August 21, 2005

Perhaps this book received too much positive press for me to find it too tremendously compelling. It's a good book; it's an interesting book; it's a fun book. Contre Malcolm Gladwell, however, I was not "dazzled." Besides, I think the title is too damn cutesy.

Freakonomics is well written, eclectic and vibrant. The two Steve's are made up of one economist (Levitt) and one writer (Dubner). It's a good combination. Levitt is a wunderkind who has applied economical thinking (that's the style of thinking found in economics, not thinking that makes good use of its resources...) to all sort of non-economical problems. This lets him provide unexpected answers from here, there and everywhere. How do school teachers cheat? What caused crime to drop in the 1990s? How are McDonald's and crack gangs the same? How important is parenting style to school grades? (the more important question of how important parenting styles to life outcomes or school grades to the kind of person you become are not, unfortunatly answered...).

The results may not be dazzling, but they are worth reading.


Three bugs in 512-bytes
Friday, August 12, 2005

Who says you can't go wrong in the small! (via xbox-linux via Bruce Schneier)

512 bytes is a very small amount of code (it fits on a single sheet of paper!), compared to the megabytes of code contained in software like Windows, Internet Explorer or Internet Information Server. Three bugs within these 512 bytes compromised the security completely - a bunch of hackers found them within days after first looking at the code. Why hasn't Microsoft Corp. been able to do the same? Why?


The Pleasure of Finding Things Out
Tuesday, August 9, 2005

This book is a wonderful introduction to Feynman's non-technical work. It includes interviews, speeches, and reminisces from throughout his long and productive career and it shows him clearly as both jester and thinker. I found his discussions of what made science "science" particularly relevant in this time of incipient repression that would have made Galileo fear for his skin. The great benefit of science, says Feynman, is that it shows that it is possible to live life while doubting. We don't need to have the answers to everything. It's OK to keep thinking, and trying, and having new ideas. Scientific thinking, in other words, is an anodyne to fear.


Fully Distributed Representations
Monday, August 8, 2005

Pentti Kanerva made a name for himself way back in 1988 with a little book called Sparse Distributed Memory. In it, he outlined a computational model of memory that made sense from both computational and neurological perspectives. In this 1997 paper, he builds on the work Plate, Hinton, Pollack and others to describe a simple distributed representation for stuff that the rest of us would store in fixed size records with fields. The representation is slightly reminiscent of bloom filters: represent each thing (field name or value) as a very long random bit string (you can use vectors of reals or complex numbers too); (name, value) pairs are bound together with pair-wise boolean exclusive-OR; sets of these bound pairs can then be chunked together according to majority rule (i.e., each bit in the result vector is set according to the value of the bits that appear most often with ties being broken at random).

The amazing thing is that even with all this randomness and bitwise operations, the resultant chunked vectors retain a similarity to the pieces from which they were derived and you can pull out pairs and values from the vector in a variety of ways that represent both regular lookup and more analogical search. In contrast to 'normal' representations where a single flipped bit brings all to ruin, these holistic (holographic) representations handle noise and combine "structure and semantics" so that similarity actually reflects meaning. Since you cannot continue to chunk values together without a disastrous loss of information, the encoding also might explain George Miller's magical 5 plus or minus 2.

In sum, this is a wonderful, eye opening paper that combines math, mind and amazement.


I've been walking more so
Monday, August 8, 2005

I've had more time to listen to IT Conversations.

  • Scott Cook of Intuit talks with Larry Magrid about Quicken, TurboTax, QuickBooks and how companies can be a source of good. It's refreshing to hear someone in business say that companies exist to serve society (and that if they fail to, they should be limited!). Cook also makes a very strong case for ease of use as being the deciding factor in software adoption and the reason for Intuit's success.
  • In a disjointed co-talk, Jim Buckmaster and Craig Newmark of Craig's list talk about the technology and the vision behind their company. Interesting but a bit disappointing. The best bit is Craig's summary of how the list manages itself and maintains trust in spite of openness.
  • Moira Gunn talks with Tim Cook of Isis research about the conflicting goals of university research and commercialization. As Cook says: "The main functions of universities were teaching and research and I see technology transfer as an important byproduct but as a byproduct none the less Because if the technology transfer drives the research agenda then the university turns into a commercial contract research company and so who fulfills the role of university in our society?"
  • Finally, Tom Igoe from NYU talks about networking objects in the small pieces, loosely joined sense. He quickly describes a few dozen of student works in the design space of interconnected objects.

Have fun listening.


Fear and Other Uninvited Guests
Saturday, August 6, 2005

Fear is something we'd rather pretend we didn't have. Fear is something we relegate to the back of the mind, the back of the burner, the back of the closet. But fear is a companion we walk with whether or not we wish.

Harriet Lerner's book provides a taxonomy of fears and gently examines how we can sit with them rather than running. Just as there are no easy answers to life, there are no easy answers to fear. Instead, fear is something that we must learn to accept because failing to accept doesn't avoid it or save us. It just leaves us defenseless and alone.

The goal, I think, is to act correctly regardless, to understand fear not as a failing but as a warning to pay more attention to what life is trying to say.


Google alerts
Friday, August 5, 2005

If you'll willing to let Google save your searches by signing up, they have an alert service that will do a search for you daily and send you an e-mail when there is something new (there is also this similar service). I put in "Lisp help" for fun and have so far found the following:

  • From OSCon: Damian twisted minds and code in 5 dead languages (Lisp, PostScript, C++, SPECS, and Latin), which somehow involved dozens of scary pictures of Russian Lara Croft imitators.
  • From the Wichita Eagle, a review of Play it Again Sam: Allan's married friends, Linda and Dick Christie, step in to help him re-enter the dating scene ... Tough guy Paul Ramondetta ably plays Bogey. He skillfully assumes his look and his characteristic slight lisp.

One for two isn't bad! <smile>


Syntax analysis in the Climacs Text Editor
Friday, August 5, 2005

I've been mulling morosely over the state of Lisp IDEs and development tools for, well, about as long as I've been working in Lisp. As such, it was great fun to read Christophe Rhodes, Robert Strandh and Brian Mastenbook's paper on the Climacs Text Editor. The paper is a high level description of some of Climacs innards and leaves something to the imagination (but that's why there is source code, right?). Nonetheless, it provides a good picture of some of the technicalities that must be managed in modern graphical text editors. It's funny that something so simple is so hard. I suppose that analogous to how hard it is for computers to do things like vision and human like memory. Now, however, I'm rambling so that's a wrap.


Outsourcing data storage
Thursday, August 4, 2005

I've worked on a lot of studies that required sending data (either 1 to N, N to 1 or N to M). Something like StrongSpace might be a good way to support studies that need secure but accessible data... Outsourcing storage. Seems it could beat the hassle of setting up and supporting this yourself (depending on your geek factor of course!).


Still more IT Conversations
Thursday, August 4, 2005

I've been catching up on old Pod Casts (I've been casting up on my old Pod Catches?).

  • Scott Mace talks about Eclipse with the Eclipse foundation's executive director Mike Milinkovich. It's big, it's active, it's cool. I wish Common Lisp had a tenth of this energy. I know that CLimacs is doing some neat things but it seems a shame that all this energy is being spent on Java. Sigh. Think of the humanity.
  • Moira Gunn talks with Patrick Lincoln about bioinformatics: moderately informative and interesting.
  • Larry Magrid talks about Internet Child Safety. He paints the positive picture that this will improve critical thinking skills. SInce this didn't happen with TV, or radio, or whatever I don't see how it's supposed to happen now.
  • George Dyson gives a funny and fascinating talk at ETech 2005 about the birth of the modern digital computer during World War II and at the Institute for Advanced Study.
  • Scott Mace talks with Peter Yared about web services and stuff. This sounded like a lot of oversimplification and marketing to me.

IT Conversations is a damn great service!


More IT Conversations
Wednesday, August 3, 2005


Quick review: Curio
Tuesday, August 2, 2005

I recently took another quick look at Curio. It's a very cool application that just doesn't quite fit my style or into which I can't quite fit my head or something. Curio's target market is graphic designers although they are trying to branch out. Their metaphor is great big sheets of paper that you stick anything on and then add links and annotations and what ever! It's a bit like OpenDoc (but not really). I think it could be used for mind mapping and design of all sorts of things. If you're a visual kind of person, I'd suggest taking it for a spin.


Apple's new mouse
Tuesday, August 2, 2005

Apple's new MightyMouse looks pretty cool. My only concern is "the two buttons hidden behind an apparent single button" feature. My guess is that it remains quickly learnable but it might confuse first time user's for a minute or two.

Update: The ars technica review makes it clear that Apple defaults to having both sides of the mouse act like left clicks. Thats smart and thats good.


Shadow of the Giant
Tuesday, August 2, 2005

Just finished Shadow of the Giant, the third book in Orson Scott Card's "Bean" saga. I missed the second one -- whoopts! -- so I had to mentally fill in a few gaps... It's a decent book. Card is a decent writer. The ideas and plot in this one were very good and the characters interesting and mostly believable. On the other hand, Card always seems a little preachy to me and the moral dilemmas many people rave about generally strike me as, well, silly. I recommend it to fans but not to people who would like to become fans!


IT Conversations
Monday, August 1, 2005

  • Frans Johansson talks about the Medici Effect: creativity, failure, rewards, etc. Interesting though the interview leaves me wondering exactly how deep this really is...
  • In his keynote at OSB Jonathan Schwartz talks about Open Source, Sun Microsystems, growing markets, corporate blogging and more. Pretty good stuff.
  • Philosopher Alva Noe talks about his book Action in Perception. I've been a long time fan of autopoiesis, Francisco Varela and the like so this sounds like great stuff to me and about time!

del.icio.us recommended tags
Saturday, July 30, 2005

When you edit one of your bookmark's tagset in del.icio.us, it shows you recommended tags and popular tags for the page. I haven't seen it documented but it looks as if the popular tags are based on what other taggers have used and the recommended tags are based on the intersection of other taggers tags and your own. What I'd like to see is a way to use the content of the page as part of the input to the tagging recommendations. What I'd really like is to do such a thing myself! No time. dammit, no time.


NSF Claims computers scientists are kids with bicycles
Saturday, July 30, 2005

Computer scientists are no different [than] Kids rac[ing] their bicycles, pedaling madly to move ever faster. Then they advance to sedans, but covet sports cars, still wanting to push that envelope of speed.

OK, so I took a few liberties with the context! I think it makes a better headline.

The rest of the story is worth reading from a historical perspective. I'm not sure why the NFS is talking about it today when it happened in 1996?


Leave me alone will you
Thursday, July 28, 2005

From CNet news:

The typical office worker is interrupted every three minutes by a phone call, e-mail, instant message or other distraction. The problem is that it takes about eight uninterrupted minutes for our brains to get into a really creative state.

I'm totally hip to this message but still find it hard to disconnect. There's always one more message to read or write, one more weblog or news article to read, etc. This is just another example of how technology keeps creating new problems as it solves old ones.

Even Bill Gates knows the value of disconnecting:

Bill Gates takes the time, twice a year, to read and ponder the future of Microsoft. How often do you take any time at all to read new ideas, consider your current work and life, and make changes? Not often enough, I'll bet.

This reminds me of a great book I thought that I had already written about but haven't. The books is: the Tyranny of the Moment by Thomas Eriksen and it is wonderful.


Smart Radios
Wednesday, July 27, 2005

Wireless communication works because the makers of the sender and the receiver agreed to use a particular standard. There are already dozens of standards and more keep coming; furthermore, standards keep evolving and it takes time to implement them in hardware. This reduces flexibility and time to market. Suppose that the standards could be implemented in software instead of hardware? Then your radios could handle multiple standards and be upgraded easily in the field. Then groups from different communities (e.g., fire fighters and police or army and navy) could merge their radios simply and not be frustrated by communication disasters while coping with a disaster. Put it all together and you have Smart Radio. The Economist had a nice overview article but now it's only available for a few. If you want to really go out on a limb, you can instead talk about 'Cognitive Radio':

... the ultimate smart radio would be aware of its surroundings, be able to adapt itself in response and learn from experience...

Sounds almost scary! One thing I haven't seen in this coverage is how secure such things would be. I'd hate to have my radio break or only allow me to listen to certain stations (with lots of ads) because of a virus infection.


Pet peeve of the day
Tuesday, July 26, 2005

People who send mail to broadcast by mistake and then send mail again apologizing... <sigh>


Steps towards world domination
Tuesday, July 26, 2005

It plays chess

The Macintosh version of Shredder performed very well and as far as I know this was the first time that a chess program running on an Apple Macintosh computer has won a major computer chess tournament. The Macintosh hardware has also proved that it is very competitive and fast.

It drives cars

"Dora", is the world's first fully autonomous vehicle driven by Mac OS X. The entire development and race management efforts at Team Banzai is being done using Apple Mac OS X technology.

What's next?


Bruce Schneier rips into Secure Flight
Tuesday, July 26, 2005

Security man Bruce "Beyond Fear" Schneier rips into problems the government's Secure Flight program is having obeying the law.

Secure Flight is a disaster in every way. The TSA has been operating with complete disregard for the law or Congress. It has lied to pretty much everyone.

Given this administration, why am I not surprised. I guess this opens the question: even if someone is watching the watchers, will they have any power to make changes?


This pattern should be avoidable
Monday, July 25, 2005

Newspaper (webpaper?) articles like this one about the apparent deficiencies in the regulation of hospitals leave me wondering why? Why, in all the years that this has been happening, haven't we managed to figure out this who will watch the watchers problem? Why can't we do better? The pattern is clear:

  • A group gets called on to manage, oversee, check up on, etc some other group.
  • Things start out reasonably well
  • Over time, the links between the watchers and the watched become stronger than the links between the watchers and the reason they exist; furthermore, financial incentives pull towards abuse
  • Things go the way of all flesh
  • Articles like the one in the Washington post appear...

I don't have a solution but I feel in my gut that there ought to be one and that decentralized technologies and machine learning play a role.


Great interview with Wil Shipley
Thursday, July 21, 2005

at DrunkenBlog. Delicious Library, the OmniGroup, philosophy, Shakespeare and more!


Useful writer's tips
Wednesday, July 20, 2005

By C.J. Cherryh:

Writerisms: overused and misused language. In more direct words: find 'em, root 'em out, and look at your prose without the underbrush.


Plotting and Lisp: clnuplot
Wednesday, July 20, 2005

I just ran across Ryan Adam’s work on Plotting in Lisp (parts one, two and three) on Lemonodor. Coincidently enough, it turns out that I started working on something similar a few months ago. I called in clnuplot. Which has, I think, a nice ring to it.

From Ryan’s posts, I think we’re approaching the problem from a similar angle. Here are a few notes from two months ago:

I’ve been slowly learning bits and pieces of GNUplot and writing Lisp code to generate data and command files for it. Today (17 May 2005) I spent a bit of time consolidating what I have into something that might be slightly more generally useful.

You can use GNUPlot by writing data files and running plots from the GNUPlot command line or by writing data files and command files and running those or by writing command files that have the data inline. What I’ve done is written some classes and functions that let you manipulate plots in Lisp and then write out a command file that can executed in GNUPlot.

The basic model is one of plots and data-sets. A plot contains information for the entire information display; for example, the title, the axis labels and so forth. Each data set contains information about how to display a single group of data in some format; e.g., the data, the display style, the name of the data in the legend and so forth. A plot contains one or data sets.

Interface

  • make-plot &rest args &key name comment filename plot

    If you do not supply a plot argument, this creates a new plot object that contains a single data set. If you do supply the plot argument, the data set and it’s information will be added to it.

  • For example, I have a command that first calls make-plot with not data: :

    (make-plot nil nil 
            :title "Error rate versus F-measure"
            :xlabel "Percent Mixing"
            :ylabel "F-Measure"))
    

    and then later uses the returned plot to build up a number of data-sets: :

    (make-plot :points data
            :legend (format nil "Negative ~,2F; Positive ~,2F" 
                                (getf key :fnr) (getf key :fpr))
            :x-coord (lambda (x) (getf x :pm))
            :y-coord (lambda (x) (getf x :f))
            :plot plot)
    

    The final plot object returned contains a whole bunch of data sets. Make-plot currently supports :line, :points and :bar styles. Plots can have titles, a label on the x-axis and the y-axis and custom labels for the legend. Much of the rest of the functionality of GNUplot is missing but the framework is in place to add it pretty easily (I thinkâ I’ll be adding stuff as I need it). Look in the parameters *plot-plot-settings* and *plot-data-set-settings* to get a sense of what setting the plot code knows about.

  • write-plot plot destination

    This command writes the plot object to its file. Each plot object specifies a host, fullpath (directory) and filename. The host and directory default to *plot-default-host* and *plot-default-directory*. The filename will default to “plot”

    When you call write-plot it will return the pathname to which the file is written. The file can be executed in GNUPlot (either by piping it from the command line (note bene, I haven’t tried this yet myself) or by using the load command in GNUPlot). The plot commands and data will all be included in this single file.

I do most in Macintosh Common Lisp and use Alexander Repenning’s AppleScript support under OS X to call out to the shell — it seems creaky but works surprisingly well! Once I got the basics in place, I’ve not had much time to add the obvious features (or even to publicize my work until today’s goad came along (thank John)). In any case, I couldn’t find Ryan’s e-mail on his blog so if anyone can put us in touch, it would be great to move forward on this together.


Across the Nightingale Floor
Sunday, July 17, 2005

I came across this on a list of summer reading books for young teens and got it for my son. He devoured it so I thought I'd take a look. This is a wonderful book (maybe I'm still a young teen at heart!): mystery, secrets, love, a bit of magic, danger and conflicting loyalties. It's not a deep book the way some of Le Guin's best work can be. but what it does it does very, very well. Great fun!


Communication Boundaries in Networks
Thursday, July 14, 2005

Most of the systems we view as networks exist in part to communicate something from one vertex to another (the internet, World Wide Web, food networks, cell metabolism, phone networks, and so on). How well do they succeed in doing so? How easy, in other words, is it to send a message from one vertex to another and what factors influence the ease and speed of transmission. This paper quantifies these questions by defining the search information in going from vertex s to vertex t as the number of bits needed to describe the path. This is the sum of the log (base 2) of the degree of each vertex along the path (actually, you subtract one from the degree of each vertex except for the first, because you know that you're not going to backtrack). (If there are multiple shortest paths, then one takes the sum before applying the log). They then measure this for some real graph and for the corresponding random graph (which they define as one that has the same degree distribution and remains connected). This value, delta S = S-graph - S-random, measures how much more (or less) information we need to describe paths in our graph due to its topology. If delta S is positive, then we have longer descriptions; if negative, shorter ones. Interestingly, many real world networks optimize communication for paths of length around 2 or 3. They then go on to investigate modular, hierarchical and scale-free graphs as compared to random ones and find, for example, that hierarchies are not (necessarily) optimal for search.

[The fact] that (club) hierarchies are used in many human organizations may thus be seen as a way to regulate and thus limit the information exchange, rather than optimize it.

This points a way towards measuring information flow in real organizations and perhaps finding structures that enhance the actual goals of an organization rather than hinder them.

The paper continues with a discussion of how global information can aid search and how to stratify information so that the best properties of local and global search are achieved simultaneously. This "scale invariant" strategy selects directions "according to the average traffic to nodes at distances similar to that of the searched target node."

I found this paper very interesting. Its writing is clear, the content useful and the results non-trivial. The Nordic Institute for Theoretical Physics is doing some neat stuff.


Why no NaturallySpeaking for OS X?
Thursday, July 14, 2005

OS X has some built in speech recognition but the only third party application is IBM's ViaVoice and the OS X version is well behind the Windows version. From what I've heard, NaturallySpeaking for Windows is a killer application.


Understanding Terror Networks
Wednesday, July 13, 2005

Sageman's book is a compendium of militant islamic terrorist network history. Though detailed and informative, there is much more minutia here than there is meat. Indeed, I found it almost impossible to do more than very lightly skim the first four chapters (on the origins and evolution of the Jihad, the Mujahedin and on joining the Jihad).

The fifth chapter on social networks was more interesting but even it was weighed down in detail and seemed sketchy in its grasp of Social Network Analysis (SNA). For example, Sageman cites Barabasi's book Linked for the claim that Small world networks are resistant to random assaults but vulnerable to targeted attacks at their hubs. This is true of Scale-free networks (which are Small world) but not necessarily true of other Small world networks such as those of Watts and Strogatz. On the other hand, his analysis of the utility and function of embeddedness, cliques and weak links (in Granovetter's sense) seems spot on.

In summary, Understanding Terror Networks may be an excellent work for those interested in the history and motivations of islamic (and analogous) terror groups. It is not, however, particularly useful from a SNA or computer science perspective.


Development of sampling plans by using sequential selection
Monday, July 11, 2005

When doing any statistical study, we start with a population (sample space), take measurements and then go from there. For example, suppose we want to learn something about the population of movie fans that have seen the Fantastic Four. For the sake of this example, assume that we further want to take a stratified sample based on the row in which the fans were sitting (maybe people closer to the screen enjoyed the movie more). The obvious way to do this is to wait until everyone is seated and then look in the rows and make selections. This, however, is a lot of work and means that you have to interrupt the picture. This ancient (1962!) paper by Fan et. al. demonstrates numerous ways to sample sequentially (item by item) without waiting for the entire group of people to arrive. Some methods are clever statistical tricks made more practical by the advent of digital computers. Others and really quite marvelous. My favorite, for example, is to turn the question of which members of the population do we want into how many members should we skip between samples. This lets us select at random an expected number of items without replacement from the population even when we don't know up front how big the population is! I won't go into the math but I do think it's a very insight. I love how problems can become solvable when viewed in the correct light.


Properties of highly clustered networks
Monday, July 11, 2005

In this mathy paper, Newman presents a network model with tunable degree distributions and clustering coefficients. He analyzes the model to derive closed form solutions for the mean degree, percolation threshold (i.e., loosely and analogically speaking, this is the minimum infectiousness a disease must have to become an epidemic on the network), and the size of the giant component. Newman goes on to analyze epidemics in more detail using networks with both Poisson and power-law degree distributions. He finds that increased clustering decreases the total size of an epidemic but also decreases the epidemic threshold. In particular, no amount of clustering will produce a non-zero epidemic threshold in power-law degree distribution networks.

Newman's model is simple: start with a bipartite graph of groups and individuals, project this down onto the individual graph only and connect individuals with probability p. Newman's insight (at least, I think it's his insight but I'm not a condensed matter physicist (even though I am made of condensed matter)) is that we can view this process as bond percolation. The rest, as they say, is math.

This is an interesting paper though challenging. I'm still digesting it but if nothing else, it's another view of network models and their connections to physical processes.


Describing my interests in < 250 characters
Monday, July 11, 2005

Accelerating Times newsletter application requests that you describe yourself, your passions, etc. as part of the sign up process. I didn't give it a lot of thought but like what I came up with:

Combining computers and appropriate technologies for the rest of us. Specifically, applying AI, HCI and design to technology. Seeking wisdom.


"We're all in this together" - Harry Tuttle
Sunday, July 10, 2005

I just re-watched the movie Brazil for the first time in about ten years. It is an incredible movie and it holds up so well that you would never guess that it was 20-years old!

I remember when I first saw it in 1985 at a little townie theatre in Springfield, MA. The ticket seller warned me about the movie and tried to talk me out of going! Apparently other unhappy Springfieldites had complained! I was not deterred, however, and loved the movie then and love it now. The absurdity, the banality, the mix of past and future, of the normal, the bizarre and the bizarre parading as normal are so fine, so tuned.

If you haven't seen it, I'd recommend getting out to see it now, today! If you have but not recently, then I'd allow you to wait until tomorrow <smile>. It is pure genius.


ITConversations has John Smart
Sunday, July 10, 2005

ITConversations has John Smart from Accelerating Change 2004: Inspiring, amazing, tons of fun. Probably worth a bit more skepticism though!

Earth is pregnant with possibility.

...

The dominant word is surprise!

...

You're never going to be as good looking as you are today and things will never be as slow and simple as they are today.

Recommended.


Patch for QuickSilver's pause script for iTunes
Saturday, July 9, 2005

Though I used to use (and love) LaunchBar, I'm now an bigger fan of QuickSilver. I've modified the pause script so that it's now a toggle rather than only a pause (a behavior that I think is more useful and more sensible...). Being a bear of occasionally very little brain, I haven't figured out how to get this back to Blacktree yet so here it is on my blog (and here's a link for download)!

tell application "System Events" to 
     if (application processes whose name is "iTunes") is not {} then 
	tell application "iTunes"
		if player state = playing then
			pause
		else
			play
		end if
	end tell

(I just realized that QuickSilver's already included a play-pause script... oh well).

(update 11 July 2005)

An alert reader points out that iTunes already has a playpause command!

<pre>

tell application "iTunes" to playpause

</pre>

Oh well. My AppleScripting abilities are quite lame. I can read the damn stuff but writing it almost always leave me stuck between the data model, the syntax and the available commands. I was completely happy to be able to create this little ditty and I'm going to hold on to that happiness for dear life, dammit <big smile>.


Florida continues to be crazy
Friday, July 8, 2005

Arresting someone for accessing an unsecured wireless access point? What's next, a law making it illegal to read over someone's shoulder?


The nature of meaning in the age of Google
Friday, July 8, 2005

Google is continually finding new uses for its vast database of hyperlinked text: spelling, mapping, definitions and so on. Terrance Brooks (who has, I assume, no relation to fantasy author Terry Brooks!) points out that Google makes use of lay indexing (i.e., folksonomies) to produce aggregations with semantic content -- meanings! Similar lay indexing lies behinds Amazon's book suggestions, Flickr's photo-sharing and del.icio.us's bookmark collections. In all these cases, however, a tension develops between the aggregator's algorithmic strategies and user's attempts to exploit that the strategies: spam. Each publisher would like to push Google towards her contents but Google only functions well when it can exploit the wisdom of crowds - i.e., when control is based on diversity. All of these system, then, are fundamentally social and can function when most people play "by the rules" either because they want to or because they have no other choice. Brooks says:

The culture of lay indexing is one of mistrust and ignorance: the lay indexer's ignorance of when, if, and how her work will be used, and Google's mistrust of lay indexers, whom it must assume are constantly scheming to gain an advantage over the Googlebot.

...

Struggling to maintain the ignorance of layindexers in the culture of layindexing contrasts sharply with the historical treatment of indexers. During the last several hundred years in the craft of book arts and scholarly journals, indexers have been honoured and respected. In this legacy culture of indexing, indexer ignorance was an anathema to be avoided, not enhanced.

The internet is new because it is 'open': anyone (in the technological world) can author anything and declare its meaning. It is:

a lawless meaning space... a novelty that most traditional meaning technologies have not anticipated. Being able to operate successfully in a lawless meaning space is, however, the key success criterion for legacy meaning technologies that are applied to Web space.

Most formal systems (e.g., Dublin Core, RDF, meta tags) ignore this dictum and are therefore ignored by Google!

Since, like most people, I'm the sort of person who usually does the right thing, I think that Brook's paper provides an interesting perspective on lay indexing, Google and the differing strategies they adapt. It would be fun to pull in the whole evolutionary games perspective (perhaps someone already has?!).


Tremendous backlog
Friday, July 8, 2005

I have this tremendous backlog of computer science papers that I've told myself I need to summarize for this blog... I mentioned this problem to a friend and he said, "just mention the top one or two things for each one or you'll never get it done." I thought, "sage advice."

Thus begins a rapid (I hope!) set of paper summaries...


Political Suicide
Tuesday, July 5, 2005

This was the first Robert Barnard mystery I'd come across and it made a wonderful introduction. I am admittedly something of an Anglophone and Barnard's books are steeped deeply in the complex social, class and caste issues that permeate British society. Political Suicide takes these as base and stirs in party politics, dirty tricks and even environmentalism. I found it wonderfully funny and equally intriguing.


At Death's Door
Tuesday, July 5, 2005

At Death's Door by Robert Barnard is an enjoyable yarn about relationships, family, trust, hatred, and loathing. It feels typically British in its details and sensibility and the writing and character are superb. To be fair, it is a bit slow going at times -- there is not always all that much there there -- and some of the twists seem gratuitous to the core of the plot. Still, this is a mystery worth reading for its characterizations and its dialog. Recommended.


Google quick reference
Thursday, June 30, 2005

Very handy! I didn't know Google could do all that.


Sideways
Sunday, June 26, 2005

I still haven't seen the movie but can now honestly recommend the book. Sideways is an enjoyable, somewhat over-sexed romp through mid-live crises, friendship, love and wine. Lots of wine. Oh boy, a whole lot of wine!

In the end, I didn't find the novel all that believable -- then again, I live in staid Massachusetts, not rip roaring LA -- but very fun and satisfyingly true.


Enhanced hypertext categorization using hyperlinks
Thursday, June 23, 2005

Intuitively, knowing that this thing is related to that thing ought to help me understand both of them better. Ah, but how to put that intuition into practice? Chakrabarti et. al. present one of the early set of answers. The paper is a wealth of ideas that have been mined by many others in recent years.

Suppose I'm trying to classify a set of objects X into categories or classes. Can linking between objects help? Thinking about the automatic classification of papers into topics or patents into categories provides the seeds of hope and cause for doubt. Papers I link to (or that link to me) should contain information about my class. Ah, but they may also contain much that is irrelevant. Indeed, the authors found that trying to use all of the text in linked papers produced no improvement and often makes things worse. So wow can I use the right information and ignore the bad stuff? How do I fix the "noisy neighbor" problem? One answer is that instead of using the text in the links, we instead use the class of the links. Our classifier then has an input the local text plus class labels on some portion of the papers linked to it. Does this help? Yes. It helps a lot.

Now we can move onto a more realistic problem. Instead of classifying one paper, I got bunches of them plus their interlinks. Some have labels, some don't. How should I classify them? One a time via some sequential decision process (and what would the best order be to ask the questions?)? All at once? How? Do I use only adjacent links or should I travel out further to ask questions about my neighbor's neighbors? Chakrabarti shows that we can borrow techniques from image processing (relaxation labeled) to co-classify everything simultaneously and iteratively. I.e., first take the information you have and make your best guesses (in a maximum likelihood or Bayesian sense) to update all the class labels. Then, do it again. With a bit of math and a network that exhibits homophilly (the love of Philadelphia), this will converge to a stable and remarkably accurate answer. It will do much better than the best text alone ever could and it will do well even if most of the class labels are not initially known; even if all of the class labels are unknown! The relational structure of the network leads towards a co-consistent labeling.

In sum, this is an well written paper with a wealth of ideas drawn together from information retrieval, machine learning, data mining, computer vision and statistics. Very good stuff.


the Wailing Wind
Thursday, June 23, 2005

Though I think his best Navajo work is behind him, The Wailing Wind is another enjoyable yarn from Tony Hillerman. The themes, characters, landscape and even the plot feel somewhat recycled but its still good for a few hours of escape and worth it for the occasional lyrical descriptions or the chance peering into the heart of what makes us human.


the Bat Tattoo
Thursday, June 23, 2005

The Bat Tattoo is am amazing book for those who are made a bit unsure by the nothingness lurking in the interstices of the world, between two lovers, under the bed, in the eyes of your dog. Hoban has a turn of phrase that is all his own and yet reminds me of Walker Percy. Suddenly struck, I stop and reread, wondering at the power behind such thoughts, behiind marks on paper.

Zion is what you think there's no end of when you have it, then all of a sudden it's gone and there wasn't really that much of it.

...

Is it a sign of growing old when the faces coming towards you in the street are full of stories that you don't want to know?

The book concerns the interlocking relationships between Roswell Clark, Sarah Varley, Adelbert Delarue (also R. Albert Streeter), Jesus the man, Jesus the concept, art (real, modern, inane), crash test dummies, ancient Chinese bats, and the reader (though not in so many words).

"What I want," he said, "is you in various attitudes of listening: standing, sitting, lying down -- as many different ones as you can think of?"

"Listening?"

"Listening."

"For what?"

"That we don't know yet," he said, "It could take years."

Kafka said that we don't need books that make us happy. Rather, "we need book like ice picks, to break the frozen seas in us." Hoban's book is a rare one that battered my frozen seas, found me wrecked on a shore I've seen before, and left me happy.


Synchronization of Periodic Routing Messages
Tuesday, June 21, 2005

This is an old (1994!) paper with a really neat result:

Network architects usually assume that since the sources of this periodic traffic are independent, the resulting traffic will be independent and uncorrelated.

...

This paper argues that the architect's intuition that independent sources give rise to uncorrelated aggregate traffic is simply wrong and should be replaced by expectations more in line with observed reality.

...

This research suggests that a complex coupled system like a modern computer network evolves to a state of order and synchronization if left to itself. Where synchronization does harm, as in the case of highly correlated, bursty routing traffic, it is up to network and protocol designers to engineer out the order that nature tries to put in.

The results are sort of old hat to network and synchronization aficionados but they still seem wonderfully counterintuitive. I've not read the entire paper but the introduction and conclusion are clear and well written. Good stuff.


I think we need a generational garbage collector
Monday, June 20, 2005

Think Progress has some nice historical references for the US administrations claims for a short war juxtaposed with Secretary Rice's comments that this will be a generational commitment. Bush did say that the war on terror would be generational, not the war in Iraq.

(Sorry for the politics here on unCLog. I just liked the pun too much!)


Why change-class?
Thursday, June 16, 2005

(updated 21 June 2005)

Common Lisp lets you change the class of things on the fly and in fact has a whole protocol for dealing with appearing and disappearing slots, updating existing instances and so forth. It's really quite amazing and very handy for prototyping and ad hoc experimentation. My only complaint is that changing the class of an object takes way too much typing! You need to

(change-class my-object (find-class 'name-of-class))

This seems silly to me. Why not make class changing as simple as setting any other sort of value? Why not make it seem like Common Lisp by using setf? Why not make it more flexible? So, since I couldn't think of any not to, I wrote this:


(defgeneric (setf class) (class object)
  (:documentation "")
  (:method ((class symbol) (object standard-object))
           (change-class object (find-class class)))
  (:method ((class standard-object) (object standard-object))
           (setf (class object) (class-of class)))
  (:method ((class standard-class) (object standard-object))
           (change-class object class)))

This lets me do things like

(setf (class my-object) 'a-class-name)

and that's easier to type, looks like CL, and is even clearer (in my opinion). Any dissenting voices are welcome to comment!

Comments

Well, it looks like I've put my foot in it! Not only can you already say things like

(change-class my-object 'a-class-name)

but redefining a built in symbol of the Common Lisp package like class is -- of course -- a no-no. My implementation also ignores the fact that you might want to add initargs to the change-class form (though that's easy to fix). On the other hand, I still think that using setf to change classes is a good idea. My general philosophy of change in Lisp is that if you can use setf, then you should. In any case, thanks for the feedback.


You know what's weird
Tuesday, June 14, 2005

I'll tell you what's weird. For the last 6-months or so, OS X's Script Editor has refused to accept backspaces or returns. To make a new line, I need to type control+Return. To delete text, I need to select and type over it. It all works... and I have no idea when or why this began happening. Thank god that computers aren't in charge of anything critical like cars, o