February 27, 2005

UAV Safety

You know what might slow down the adoption of UAVs for mundane, civilian tasks? The fact that their accident rate is 100 times higher than that of manned aircraft.

I found an analysis of UAV risk, “Safety Considerations for Operation of Small Unmanned Aerial Vehicles in Civil Airspace”.

The map below shows how reliable a 26,000 lb. Global Hawk UAV would have to be to achieve a “Target Level of Safety” (TLS) of one event involving a fatal injury to people on the ground per 100,000,000 hours of operation. Regions with higher population densities require the UAV to be more reliable.

global hawk ground safety

You can see that the much smaller Scout UAV poses considerably less risk:

scout ground safety

This map of the risk of midair collision was calculated assuming that all UAVs are the same size:

uav midair safety

Posted by jjwiseman at 04:54 PM | Comments (6)

February 26, 2005

Almost 200 Applications for 2005 Grand Challenge

applicant map

DARPA announced that it has received 195 applications to compete in this year's Grand Challenge, which has a $2 million prize.

DARPA Director Tony Tether expressed his delight at the large number of applicants. “When we first thought about the Grand Challenge in 2003, we genuinely believed only a handful or so of teams would be interested in competing,” he said. “It takes ingenuity and perseverance to build a vehicle that can win the Grand Challenge prize. We were surprised when we received 106 applicants for the first Grand Challenge competition, which we held last year and no one won. The response to this year’s Challenge is an even greater surprise.”

Winnowing will occur after entrants provide vehicle specs and a video of their vehicle in action, which they must do by March 11.

I think the google ads that come up for a search on “darpa grand challenge” are kind of funny:

gyros and interns

Posted by jjwiseman at 06:31 PM | Comments (0)

February 25, 2005

ALU CLiki Content's New Home

fancy like a wiki

It looks like Drew Crampsie has answered the call from Dan Barlow to host the data from the doomed ALU CLiki:

jan 2005 : I've added all the content from the soon the be defunct ALU Wiki. The index below is from the front page. I plan to take steps to prevent spam here, even it if has to be non-wiki-like (log in, filters etc).

And from *hyper-wiki*'s ALU Wiki page:

All (most.. i had some charset issues with 4-5 articles -- drewc) of the ALU content has been preserved here.

This is a good outcome, I think.

Posted by jjwiseman at 09:48 PM | Comments (0)

February 24, 2005

Hard 'N Phirm

don't cross the streams

Remember Singled Out, MTV's “dating” game show from the mid 90's starring Jenny McCarthy, with her kinda straight man, eye-rolling sidekick Chris Hardwick? Of course you do.

No one was more surprised than I to learn that Chris Hardwick, besides being a one time C-level personality for the MTV host grist mill, is one half of the really clever and funny band Hard 'n Phirm. Tuesday night we went to see Chris and his partner, Mike Phirman, host a comedy/music show at M Bar.

They were hilarious. The highlights of the show were (i) seeing Hard 'n Phirm do their bluegrass medley of Radiohead songs, Rodeohead, (ii) Sarah Silverman putting her gum on my friend Sally's straw, and (iii) this completely fucking insane, drunk guy who calls himself Dragon Boy Suede absolutely KILLING (me). I just want to insinuate myself into DBS' circle of friends so I can go sit in his filthy, cramped living room and be doubled over in laughter for three hours at him being himself.

Posted by jjwiseman at 11:03 PM | Comments (0)

CLiki Diff Patch #1

I've packaged up a patch against CLiki to add the ability to compare different revisions of a page, in the style of Aaron Swartz' HTML Diff.

Download: cliki-0.4.3-diff.patch

What it does

The diff changes the “Revisions: 1 2 3 4” links at the bottom of every page to “Revisions: 1 < 2 < 3 < 4”, where each “<” is a link that will bring up a page displaying the differences between the two adjacent revisions. (See this earlier lemonodor post for screenshots.)

Diff urls look like “http://<cliki root>/<page>?diff&va=<version #>&vb=<version #>”. It wouldn't be hard to create an interface that would allow the comparison of arbitrary versions of pages.

How to customize it

CL-HTML-DIFF outputs HTML that wraps changes with <ins> and <del> tags. My browser defaults to displaying these tags like this:

styleless diff

If you want something that looks a little more slick, you can take advantage of CSS by adding a few styles to your CLiki stylesheet:

del.diff {
        color: #f22;
        text-decoration: strikethrough;
}

ins.diff {
        color: #2f2;
        text-decoration: none;
}

With these styles applied, you get the following:

styled diff

By default, CL-HTML-DIFF attaches the CSS class “diff” to the <ins> and <del> tags, but this is easy to change using HTML-DIFF:HTML-DIFF's :insert-class, :delete-class and :replace-class arguments if you want greater control (HTML-DIFF:HTML-DIFF is called by the VIEW-PAGE-DIFF function).

What you need to use it

The patch requires that you have CL-DIFFLIB and CL-HTML-DIFF installed. (CL-HTML-DIFF is my quick and dirty translation of Aaron Swartz' Python code to Lisp.) Both libraries are ASDF-INSTALLable.

This patch is against version 0.4.3 of CLiki, which is the only version I know of that is publically accessible right now. I think that the only issue involved in using this code in a newer CLiki is that one might want to change the VIEW-PAGE-DIFF function to handle conditional HTTP GETs. This should be easy to do if you look at the code for VIEW-PAGE (though you'll want to modify PAGE-LAST-MODIFIED so that you can pass it a version argument).

Posted by jjwiseman at 06:05 PM | Comments (0)

February 23, 2005

"Astonishing, Disturbing and Subversive"

poor mary

Evans, E.P. The Criminal Prosecution and Capital Punishment of Animals. New York: E.P. Dutton, 1906.

This pioneering work in English brings together an amazing assemblage of court cases in which animals have been named as defendants--chickens, rats, field mice, bees, gnats, and (in 34 recorded instances) pigs, among others--providing insight into such modern issues as animal rights, capital punishment, and social and criminal theory. Evans suggests an intriguing distinction between trials of specific animals or particular crimes (the ""murder"" of an infant by a pig, for example) and trials of animals for larger, catastrophic events such as plagues and infestations.

Posted by jjwiseman at 11:59 PM | Comments (0)

PCL Blurbs

oops

Peter Siebel got a pretty nice blurb from Peter Norvig for Practical Common Lisp:

This book shows the power of Lisp not only in the areas that it has traditionally been noted for—such as developing a complete unit test framework in only 26 lines of code but also in new areas such as parsing binary MP3 files, building a Web application for browsing a collection of songs, and streaming audio over the Web. Many readers will be surprised that Lisp allows you to do all this with conciseness similar to scripting languages such as Python, efficiency similar to C++, and unparalleled flexibility in designing your own language extensions.

Zach Beane's blurb isn't bad either.

Blurb blurb blurb!

Posted by jjwiseman at 11:10 PM | Comments (2)

CLiki Diffs for RSS

screenshot of cliki rss feed with html diff'ed recent changes

It wasn't too hard to use the CLiki diff code to generate some more (overly?) informative RSS feeds of CLiki recent changes.

(That's a screenshot from NetNewsWire, which already does its own HTML diffing, which looks exactly like my HTML diffing, but I swear that that particular diff was generated by CLiki and not NetNewsWire.)

Posted by jjwiseman at 01:44 PM | Comments (2)

February 22, 2005

Comparing Lisp Implementations on OS X

In the comp.lang.lisp thread “MCL for OS X worth the price?”, Raffael Cavallaro surveys the current Lisp implementations for OS X:

I run now, or have run, just about every common lisp that runs on Mac OS X. These include, in no particular order:

  • Armed Bear Common Lisp
  • Allegro Common Lisp (trial version)
  • MCL
  • OpenMCL
  • LispWorks (4.4)
  • clisp
  • cmucl
  • sbcl

I'll rate these on the categories that would matter to most Mac OS X programmers - Carbon, Cocoa, speed (of compiled code), compiler, and issues (i.e., problems), and unusual features.

Rainer Joswig follows up with his take:

LispWorks is by far the best Lisp for Mac OS X right now - especially because of the Cocoa-based IDE.

BUT, LispWorks is also far away from what would be possible under Mac OS X. If one would develop a good native Lisp IDE on Mac OS X, it would be possible to go far beyond what LispWorks does support. Actually I think there is an opportunity for a commercial Lisp with a much better Mac-OS-X-like user interface and much better support for and integration of Mac OS X technology (Webkit, SpotLight, Quartz Extreme, the font engine, Quicktime, AppleEvents, Rendezvous, iLife, Interface Builder, ...). For Mac OS 9, MCL was this Lisp. On Mac OS X there is currently no Lisp that targets the Mac OS X that way.

I agree with Rainer, none of the implementations are 0wning OS X like MCL did with Mac OS 7, 8 and 9.

Posted by jjwiseman at 05:34 PM | Comments (5)

February 21, 2005

Music for a Waterlogged Los Angeles

Mud slides, runaway boulders crashing into apartment buildings, 40 foot sink holes swallowing entire roadways. Trees have begun to take their revenge and the DSL is spotty. To top it off, there's a 600 lb. African lion roaming the north suburbs.

Hey, how about we just stay inside today? Good idea. Here's the music you'll need:

Lori has turned me into a Beatles fan (actually, a bunch of the above suggestions are hers; I'll take good ideas where I can get them).

Posted by jjwiseman at 03:57 PM | Comments (0)

February 20, 2005

The First Groovy Challengers

Two people so far have taken Peter Siebel up on his challenge of creating an RSS reader that can compete with a 150-line Groovy implementation.

drewc's bloglines reader

Drewc used a secret GUI weapon I had forgotten about when I said that the only way someone would be able to compete with the Groovy app was to integrate with Java or Cocoa, or use CLIM: He created a webapp and generated HTML.

It took me about 3 hours to write. The initial quick hack version took only about an hour and was about 120 lines, but it was not as nice as this one :).

The final version of the code, at about 200 lines, looks pretty good and wouldn't be hard to turn into a desktop GUI app.

rich hickey's bloglines reader

Rich Hickey used some serious Java integration, in the form of his not-yet-released successor to JFLI, Foil. His code uses SWT and attempts to mirror the structure of the Groovy version.

The code length is about the same. I don't see any wins for Groovy here.

I'm kind of excited about the idea of playing with SWT, which seems to be the first Java GUI API that doesn't have crippling design faults. (Among other things, SWT isn't ugly. But I didn't know it was possible to use it from Lisp.)

Posted by jjwiseman at 11:04 PM | Comments (0)

February 17, 2005

Beginnings of Diffs for CLiki

There was a reason I wrote CL-DIFFLIB.

cliki diff links

Mostly it was to try to experiment with alternative CLiki RSS feeds, but certainly other wikis have found it useful to be able to display the differences between multiple revisions of a page.

cliki diff page

The next step is to tweak the tokenization a bit, then maybe offer a way to view just the changed portions of a page, perhaps with some surrounding context.

I do think that this way of presenting differences is probably more appropriate for a wiki than the standard diff-style parade of <'s, >'s, !'s, +'s and -'s.

> blah blah blah
> whee
< glah glah glah
< whirrr
Posted by jjwiseman at 06:10 PM | Comments (3)

February 16, 2005

Robot Wisdom Returns

dj meatsock is a very caring person
valentine's greetings from my pal, dj meatsock

Jorn Barger, known for his Robot Wisdom weblog and for being the first person to use the term “weblog” in the way I just used it, is back after a sudden disappearance two years ago [via wmf].

In the past Jorn has said nice things about lemonodor and bad things about friends of mine, and I'm curious to see what he has to say about the web, AI and politics now.

Posted by jjwiseman at 08:25 PM | Comments (0)

Paolo Interviewed

positively no beer sold to indians

Paolo Pirjanian, our Chief Scientist, was interviewed by Robotics Online.

A little practicality:

What are some examples of products that incorporate technology from Evolution?

The Sony AIBO incorporates ViPR, our visual pattern recognition technology, for autonomously finding and returning to its charging station using its camera. It also reliably recognizes flash cards that are used to command the robot to do things such as dancing, playing, and following you around.

e-Vac, the robotic vacuum cleaner from Sharper Image has our intelligent navigation software for sweeping floors and avoiding obstacles and stairs. The impressive part of that navigation software is that we implemented it on a low-end 8-bit PIC with just 32 Kilobyte of memory and 40MHz clock speed.

And a little vision:

What can we expect in the near future for robots and intelligent devices in your sector?

Many experts agree that robotics today is at the same stage as the PC market was in the seventies. It is only a matter of time before we see a major explosion of this emerging market. That anticipated market explosion depends on, among other things, market interest, viable applications/products, and enabling technologies. The market interest is growing. Over the last two to three years more than two million consumer robots have been sold and the UN World Robotics Report projects that the number will increase to more than 7 million domestic robots in 2007. Robotic vacuuming and floor care products in general seem to constitute the current killer application for consumer robotics. But with the availability of enabling technologies that is soon to change. With the ability to autonomously localize, recognize, navigate, and interact the robots of the future will be much more intelligent and useful. Most major consumer electronics companies realize the opportunity that these market and technology conditions present and they are working hard to come up with the next killer application. Evolution Robotics and other technology companies are working hard to provide the next enabling technologies and standards for the robots of today and tomorrow. Soon we will witness a slew of new robotic products in the market which will change the way we live, work, and play. It is only a matter of time.

Posted by jjwiseman at 01:12 PM | Comments (1)

February 15, 2005

Tom Bihn

tom bihn id messenger bag and brain cell
my ID messenger bag with Brain Cell

I'm not really all that into gadgets and things and stuff. I didn't get a cell phone until just a few years ago, and I've only ever owned a single mp3 player and a single digital camera in my life. Occasionally I'll become fixated on a particular thing and imagine that having it would make me a little bit happier, but even then its really more a matter of trying out, just for fun, the idea that some thing would make my life 25% better than actually believing it. Still, there are a few things I own that I enjoy owning because they're designed well, and when I use them they work well. Like my Chrysler 300, my iPod, my Salomon hiking boots.

I think my new Tom Bihn laptop bag is going to be one of those things. I've been envious of Lori's Tom Bihn bag for a while (she's had it for 15 years), and she kept telling me how nice the company was, and then they had colors I liked so I got one. And after a few days I really like it. It has lots of pockets and the strap is very comfortable and it feels great. It seems well put together and has some nice features, and the company really does seem respectable. Also, Tom Bihn is probably one of the few laptop bag manufacturers who has a Snopes page.

Posted by jjwiseman at 11:58 PM | Comments (0)

February 14, 2005

XMLisp

i deal a lot with the bottoms of baskets these days
Mechanicsburg, Pennsylvania by Eric Etheridge

Alexander Repenning's XMLisp (which works with MCL and LispWorks) is beautiful, in an insane way.

XMLisp is the integration of Lisp with XML. The Lisp Meta Object Protocol is used to establish a simple and highly efficient mapping between CLOS objects and the XML extensible markup language. It is not just an API to read XML files and turn them into some Lisp flavored representation. Instead, it integrates Lisp and XML into one environment at two levels. At a language level it allows the arbitrary combination of Lisp expressions and XML elements. CLOS objects can be printed as XML elements. XML elements evaluate into CLOS objects. At a tool level XMLisp allows users to fluidly experiment with XML. Type XML elements into the lisp listener. Evaluate complete or parts of hierarchical XML elements. Inspect complex XML elements using the inspector. Get support from symbol completion when editing XML.

Check it out:

? (defclass A (xml-serializer)
   ((href :accessor href :initform "" :initarg :href))
   (:documentation "HTML link"))
#<STANDARD-CLASS A>

? (make-instance 'a :href "http://lemonodor.com/")
<a href="http://lemonodor.com/"/>

? (describe *)
<a href="http://lemonodor.com/"/>
Class: #<STANDARD-CLASS A>
Wrapper: #<CCL::CLASS-WRAPPER A #x2877F56>
Instance slots
CONTENT: NIL
HREF: "http://lemonodor.com/"

? (describe <a href="http://lemonodor.com/"/>)
<a href="http://lemonodor.com/"/>
Class: #<STANDARD-CLASS A>
Wrapper: #<CCL::CLASS-WRAPPER A #x2877F56>
Instance slots
CONTENT: NIL
HREF: "http://lemonodor.com/"

It's like object relational mapping for XML. Make sure to look at the RSS example on the project page.

Posted by jjwiseman at 12:53 PM | Comments (1)

February 13, 2005

Recent Highlights of c.l.l

it began with judy

Here are a few highlights of the last few weeks of comp.lang.lisp.

Subject: Announcement: CL-FAD

Edi Weitz packaged up a version of the portable pathname library from Peter Seibel's imminent book, Practical Common Lisp: CL-FAD.

Subject: Final 1st draft chapter of Practical Common Lisp on web

Peter Siebel posted chapter 32, the last one in his upcoming book, to his website. “In this chapter I touch on a few topics not given full coverage elsewhere in the book such as finding libraries, packaging Lisp applications, and optimization so there's some technical meat (i.e. opportunities for technical errors).”

Subject: Lisp added to koders.com

kanzen@mail.com let everyone know that the koders.com website, which is a search engine for source code, has added Lisp code to its index. There is some misguided paranoia in the associated thread.

Subject: [ANN] UnCommon Web 0.3.5 - untitled #7

Marco Baringer announced version 0.3.5 of the web app framework UnCommon Web.

Subject: [Ann] Ah2cl : Another Header To Common Lisp converter

Philippe Brochard has written a C header parser and FFI generator that can generate FFI code for both clisp and UFFI: ah2cl.

Subject: Possible Common Lisp contract available.

Erik Enge advertised for a Lisp programmer.

The project is a webapp, HTML in the front, SQL or somesuch in the back and some Common Lisp in the middle.  You will be responsible for translating the customer's requirements into software and you will be working alone most of the time.  The customer is a mortgage company and the application must handle mortgage applications and the workflow around them; nothing exciting or exotic.

The amount of work is probably enough to fill two full months but perhaps less or more; it's hard to tell at this point.

Subject: My road to Lisp (or why Lisp for poker software)

Joel Reymont's road to Lisp sounds like the beginning of a novel co-written by Tom Clancy, Elmore Leonard and Kent Pitman.

Subject: Re: Data for Erann Gat's chellenge (phone numbers & dictionary).

By popular demand, Erann Gat has placed more data online regarding his famous paper, “Lisp as an Alternative to Java”.

Subject: European Common Lisp Meeting, Amsterdam, April 2005

I nominate Edi Weitz as architect of the Lisp Emergency Broadcast network, when we finally decide we need one. No lispers will be left behind when it comes to knowing about the European Lisp meeting in Amsterdam goes. For some of us the getting there part may be a little more difficult.

Speakers include the following:

Subject: Looking for bored Lisper with GUI chops.

Peter Siebel challenges comp.lang.lisp readers to write a three-pane desktop RSS/Atom reader in Lisp, hopefully better than the 150-line Groovy implementation described in this O'Reilly Network article on the bloglines API.

I don't think that will happen unless someone uses McCLIM, OpenMCL's Cocoa integration, or Java integration. And only one of those options will lead to something non-ugly.

Posted by jjwiseman at 07:50 PM | Comments (0)

February 11, 2005

Rendezvous-Enabled iTunes Control

I'm totally pleased that Richard Newman was able to so easily Rendezvous-enable his iTunes controller, which I just posted about a few days ago, using the CL-ZEROCONF code I posted yesterday.

rendezvous-enabled itunes

Posted by jjwiseman at 10:34 PM | Comments (0)

I'm Not the Only One

On delicious-discuss, the problems del.icio.us' RSS feed has with ampersands and '<' characters has been tracked down to the Perl XML::RSS module. One person looked into the history of that modules' encoding issues, which go back to 2002.

"XML::RSS tends to automatically unescape HTML entities as it
reads them" (May 17, 2002)
-- http://www.webreference.com/scripts/sidebar/5.html


"Create a basic RSS feed with a dc:subject of "This & that", plain
ASCII.  Output the RSS feed using $rss->as_string.  The resulting
RSS feed will fail to validate as proper XML, as the '&' in the
subject has not been encoded to the ASCII string '&' in the
resultant RSS output.

This is contrary to the documentation, which states that
as_string will encode special characters.

This bug is responsible for virtually all of the reported
problems I've seen with XML::RSS, as well as virtually all of the
resentment.  May I ask why it's been stalled?"  (Mon Dec 8
09:59:59 2003)
-- http://rt.cpan.org/NoAuth/Bug.html?id=2285


And last but not least, it looks like this may still not be
resolved in version 1.05:
"- auto encode text?"
-- http://search.cpan.org/src/KELLAN/XML-RSS-1.05/TODO

I left this out of my previous post on this topic, but since del.icio.us came up... I reported a bug early in del.icio.us's life about its not escaping HTML entities in URL descriptions.

Posted by jjwiseman at 10:07 AM | Comments (0)

February 10, 2005

CL-ZEROCONF

I've finally cleaned up the current incarnation of my Lisp Zeroconf service discovery code, CL-ZEROCONF. Apple's implementation of Zeroconf is called Rendezvous, and they probably have the best explanation of its value.

Rendezvous lets you create an instant network of computers and smart devices just by getting them connected to each other. The computers and devices take over from there, automatically broadcasting and discovering what services each is offering for the use of others. The network could be as simple as two AirPort Extreme-equipped PowerBook users sitting in a hotel meeting room miles from the nearest AirPort Extreme Base Station with some large files they need to share. Before Rendezvous, frustration. With Rendezvous, your computer will discover others, making file sharing completely simple.

Here's an example of advertising a service with CL-ZEROCONF:

(dns-sd:publish (make-instance 'dns-sd:service
                   :name "My CLiki"
                   :type "_http._tcp"
                   :port 80)
        nil)

(dns-sd:process-dns-sd-events 3.0)

Here's an example of browsing for services on the local network:

(defclass my-observer ()
  ())

(defmethod dns-sd:browse-add-service ((self my-observer) service &key more-coming-p)
  (declare (ignore more-coming-p))
  (format T "~&Found service ~S." service))

;; Look for iTunes servers.
(let ((browser (dns-sd:browse "_daap._tcp" nil (make-instance 'my-observer))))
  (dotimes (i 10)
    (dns-sd:process-dns-sd-events 3.0))
  (dns-sd:cancel browser))

Even though it's named CL-ZEROCONF, this library only deals with one part of Zeroconf: service discovery. Link-local addressing (allocation of IP addresses without a DHCP server) is outside its scope, and probably doesn't make much sense for a Lisp library.

This is definitely version 0.1 quality code. The common use cases work nicely enough, but I'm sure there are situations it won't handle well. There's no documentation (though Apple's DNSServiceDiscovery API docs are relevant, as are its Rendezvous Network Services pages). There is some code to look at in examples.lisp, which is a collection of short examples of using the library, and test-browser.lisp, which generates an Araneida-based web page that displays services on the local network.

CL-ZEROCONF has been tested under OS X 10.3 with OpenMCL 0.14.2-p1, ACL 7.0, SBCL 0.8.16, and LispWorks Personal 4.3.0. Under Linux, it has been tested with SBCL 0.8.17 and ACL 7.0. But see the notes below for SBCL and ACL.

CL-ZEROCONF is really just a UFFI-based wrapper around Apple's multicast DNS “Responder”, which is a daemon that handles most of the work in doing service discovery for you. mDNSResponder is built in to OS X, and is offered as open source for other operating systems.

It took me a while to come to mDNSResponder. I tried Howl, but it was buggy, the API was incomplete and the event handling model was different in OS X than in the other OSes it supports. I tried the Cocoa NSNetService API and the Core Foundation CFNetServices API, but they weren't portable. I considered writing a complete Lisp implementation of multicast DNS that didn't rely on any external libraries other than for basic networking, but that has some disadvantages too*. mDNSResponder is free and quite portable, and saved me a lot of work.

In order to use CL-ZEROCONF on Linux, you will need to download and install mDNSResponder. It can be downloaded from Apple as a tarball, or via CVS. Make sure to read the instructions on using Apple's Darwin CVS repository--you will need to get a (free) Apple ID first. The mDNSResponder code base is under active development, so I recommend getting the code from CVS. If you run into any trouble, the tagged version I used was mDNSResponder-86. Once you've compiled the code, install it and start the mdnsd daemon.

If you want to use CL-ZEROCONF with SBCL, you will need to install Thomas Burdick's Alien Function package to enable callbacks from foreign code (integration of this functionality into the base SBCL is probably imminent; you may want to check to see if your version of SBCL already includes it):

$ tar -zxf sbcl-af-2004-10-22.tgz
$ cd sbcl-af
$ sbcl --load "system"
* (sb-ext:save-lisp-and-die "/tmp/sbcl.core")
$ cd /usr/local/lib/sbcl
$ mv sbcl.core sbcl.core.orig
$ mv /tmp/sbcl.core .

Coincidentally, both SBCL and ACL seem to have had an identical bug in their handling of foreign shorts on PowerPC. Franz recently fixed the bug in patch “update/paa005.001”, which you can automatically download and install (along with many other patches) by doing (sys:update-allegro). As far as I know, SBCL still has this bug. The bug exhibits itself in CL-ZEROCONF by causing all service port numbers to be reported as 0.

Once you've patched up your compilers and compiled new daemons, you can install CL-ZEROCONF with ASDF-INSTALL (of course).

I hope you find this useful.

* This is the approach that is usually taken in Python and Ruby, for example, but I think it's clear that Zeroconf should be, and soon will be supported at the system level, and I don't think it makes sense to spend the effort on another implementation, which will be at least several hundred lines of code, will not itself be any more portable, will certainly have bugs that will not be immediately apparent and will take months to be shaken out, and will possibly even be in contention with system-level services.

Posted by jjwiseman at 03:21 PM | Comments (9)

February 09, 2005

Culling Planet Lisp While Making a Disk Image

ACM Queue has an interview with Alan Kay [via Markus Fix].

Ingvar Mattson has a short script to create ASDF-INSTALLable packages. “No docs, as of yet (well, there's some built-in help text) so here goes: ‘list all files you want in the package in .filelist and either force a version using -v version or have it in .version’”

Nyuk nyuk [via Dave Roberts]:

i get really bored with comparisons of xml and s-expressions

Posted by jjwiseman at 06:01 PM | Comments (0)

February 08, 2005

Allegro NFS Server 3.0 for Windows

allegro NFS server for windows

The new 3.0 version of Allegro's NFS server includes support for UNC shares as NFS mount points, a configuration option to use the system portmapper, improved performance and minor updates for ease of use.

Posted by jjwiseman at 10:32 PM | Comments (1)

Taste for the Web

Xach Beane's new essay on Google Maps:

Google Maps is essentially a large JavaScript application. Great hackers have an almost instinctual aversion to JavaScript. Google is betting its future on something a tasteful programmer's radar rejects.

Posted by jjwiseman at 12:27 PM | Comments (8)

February 07, 2005

Lisp Controller for iTunes

Richard Newman has a web interface to iTunes, written in Lisp.

From his initial weblog post:

Today, rather than doing anything useful, I wrote an Araneida-based Web application to control a running instance of iTunes. Picture the scenario: our office server is an iTunes platform, serving up the tracks. But there are 4 of us! How do we all skip songs?

Well, up until today I was SSHed into the server, using some shell scripts to Applescript iTunes. That's no good for anyone not logged in as me, though; they can't talk to my running iTunes process.

However, by running this little app in a Lisp (tested with OpenMCL2; might work in others) on the server, we all get a sweet little Web interface.

Later he modified it to use AppleScript directly instead of shelling out:

I decided to investigate further, and I've managed to get a massive speed boost (indeed, I now use the Web interface rather than my shell scripts!). As an example, to increase the volume this function was used:

(defun volume-up ()
  (run-program "vu" ()) t)

Now, we close over a precompiled Applescript object, and provide a function to run it:

(defun make-volume-up ()
  (let ((vu-event (make-instance 'ns:ns-apple-script
    :init-with-source #@"tell application \"iTunes\"\
 to set sound volume to (sound volume + 10)")))
    (send vu-event :compile-and-return-error
      (ccl::%null-ptr))
    (defun volume-up ()
      (send vu-event :execute-and-return-error 
      (ccl::%null-ptr)))))
Posted by jjwiseman at 12:47 PM | Comments (1)

February 06, 2005

Aibo Hacker Looks at Vision

ersp vision demo screenshot

An Aibo hacker posts information on the Evolution vision software used by the robot dogs.

When used in AIBO, there are 3 pattern databases containing:

  • 15 cards
  • 16 pole patterns/positions
  • and database that appears to remember up to 3 local scenes

There also appear to be 3 additional databases, I believe for installable games.

You should already be familiar with the many cool features of AIBO using the cards, and finding the poll. The behavior related to the remembered local scenes appears to be rather limited. In future if a hypothetical RCODE release supports custom visual patterns, this could be used for much more.

Here I'll focus on the basic technology used to detect such things as the AIBO cards.

Posted by jjwiseman at 11:53 PM | Comments (0)

February 05, 2005

Two Symbolics on Ebay

symbolics on ebay

Four days left on an eBay auction for two Symbolics machines, an XL1201 and a UX400. Don't bid too early.

Posted by jjwiseman at 07:46 PM | Comments (0)

The Little Javascripter

Douglas Crockford's notes on approaching The Little Schemer from a Javascript perspective.

JavaScript has much in common with Scheme. It is a dynamic language. It has a flexible datatype (arrays) that can easily simulate s-expressions. And most importantly, functions are lambdas.

Because of this deep similarity, all of the functions in The Little Schemer can be written in JavaScript. The syntaxes of these two languages are very different, so some transformation rules are needed.

Posted by jjwiseman at 01:20 PM | Comments (3)

On Native Thread Support in SBCL

1965 chrysler 300
1965 chrysler 300

It looks like I never posted a link to Dan Barlow's 2003 paper, “Adding Native Thread Support to SBCL, Or n Things Every Programmer Should Know About Signal Handling

From the abstract:

We added thread support to the Steel Bank Common Lisp environment on Linux platforms, using the clone() syscall: this presents interesting challenges

  • Lisp's introspective abilities and runtime environment requires OS support for things like writing to our own instruction stream, setting breakpoints on ourself, and finding the register contents and faulting address in a SIGSEGV handler. These features are often provided, more seldom tested, and hardly ever documented.
  • The primary interface to the Linux kernel is through glibc, and defined in terms of the glibc header files. Accessing this functionality from languages other than C is sometimes harder than it needs to be.
  • The de-facto standard for CL multithreaded programming was based on special-purpose Lisp hardware (where, for example, user hooks could be installed directly into the scheduler) and is less suited to today's mainstream computing systems.

Topics include thread-local storage, garbage collection, mmap, breakpoints and ptrace, signal handling, floating point, terminal handling, dynamic linking, and atomic operations. We conclude with a look at some tools (cparse, SWIG, FFIGEN) to help in this area, and some recommendations for kernel and library authors about how they can make life easier for users of non-C languages.

Posted by jjwiseman at 01:05 PM | Comments (1)

February 04, 2005

ACL and LispWorks Compared

troubled harajuku teen, from flickr
troubled harajuku teen, from flickr (copyright 2004 cherry vega)

On comp.lang.lisp, Joel Reymont (who is working on industrial strength poker room software in Lisp) asks “Why choose Franz ACL over LispWorks”:

Folks,

I need to choose between Franz ACL and LispWorks for commercial development. Franz seems to be  more willing to negotiate but LW is way cheaper. Why would I go with Franz? Is ACL substantially better from a technical prospective?

Posted by jjwiseman at 06:24 PM | Comments (2)

February 03, 2005

The Least Important Open Problem in Programming Languages

john wiseman of centralia

From Todd Proebsting's “Disruptive Programming Language Technologies” presentation:

The Least Important Open Problem in Programming Languages: Increasing program performance via compiler optimization

  • Moore’s Law suffices
  • Algorithms and design make the big difference
  • Challenge: Name a single significant software product that relied on compiler optimization for viability.
Posted by jjwiseman at 11:11 PM | Comments (17)

McCLIM: Freetype and Clouseau

mcclim listener with freetype

Brian Mastenbrook has been optimizing McCLIM's Freetype bindings for SBCL, which is an activity that naturally leads to screenshots with nicely aliased fonts.

mcclim's clouseau inspector

He's also posted a screenshot of the new McCLIM inspector, called “Clouseau”.

Posted by jjwiseman at 08:17 PM | Comments (0)

Localization and NorthStar in Appliance Design

this is the most Philip K. Dickian hip -hop song ever
this may be the most philip k. dickian hip-hop song ever

Appliance Design magazine is carrying a short article by Evo's VP of Robotic Systems on robot localization technologies, including NorthStar (previously mentioned here in October).

The system is based on low cost IR technology, and may be the least expensive within-home localization system in the world. In fact, once the projectors are set up in a home, any number of robots can use them so it would be possible to develop an entire lineup of indoor robots using the same system.

I want to NorthStar-enable my cats.

Posted by jjwiseman at 11:15 AM | Comments (0)

CL-DIFFLIB

I wrote CL-DIFFLIB, which is a library for computing differences between pairs of sequences. It is nearly a transcription of Python's difflib module, which contains the following description of its algorithm:

The basic algorithm predates, and is a little fancier than, an algorithm published in the late 1980's by Ratcliff and Obershelp under the hyperbolic name “gestalt pattern matching”. The basic idea is to find the longest contiguous matching subsequence that contains no “junk” elements (R-O doesn't address junk). The same idea is then applied recursively to the pieces of the sequences to the left and to the right of the matching subsequence. This does not yield minimal edit sequences, but does tend to yield matches that “look right” to people.

Simple enough, I guess.

Anyway, it's got the unified diff:

CL-USER> (unified-diff *standard-output*
                       '("one" "two" "three" "four" "five" "six")
                       '("one" "three" "four" "seven" "six")
                       :test-function #'equal)
---  
+++  
@@ -1,6 +1,5 @@
 one
-two
 three
 four
-five
+seven
 six
; No value

And it's got the context diff:

CL-USER> (context-diff *standard-output*
                       '("one" "two" "three" "four" "five" "six")
                       '("one" "three" "four" "seven" "six")
                       :test-function #'equal)
***  
---  
***************
*** 1,6 ***
  one
- two
  three
  four
! five
  six
--- 1,5 ----
  one
  three
  four
! seven
  six
; No value

It should work on any sequence (as long as the elements can be properly kept track of in a hash table--that's what the :test-function argument is for):

CL-USER> (context-diff *standard-output*
               #(1 2 3 4 5 6)
               #(1 3 4 7 6)
               :from-file "original.fake"
               :from-file-date "Mon Sep 27 14:13:57 2004"
               :to-file "modified.fake"
               :to-file-date "Thu Jan 13 15:55:05 2005")
*** original.fake Mon Sep 27 14:13:57 2004
--- modified.fake Thu Jan 13 15:55:05 2005
***************
*** 1,6 ***
  1
- 2
  3
  4
! 5
  6
--- 1,5 ----
  1
  3
  4
! 7
  6
; No value

It's got some similarity measures:

CL-USER> (defparameter *lisp-symbols* '())
*LISP-SYMBOLS*
CL-USER> (do-external-symbols (sym "COMMON-LISP")
           (push (symbol-name sym) *lisp-symbols*))
NIL
CL-USER> (get-close-matches "PRING" *lisp-symbols*)
("PRINC" "PRINT" "PRIN1")
CL-USER> (get-close-matches "SPROING" *lisp-symbols*)
("STRING" "PROG" "STRINGP")
CL-USER> (get-close-matches "WITH-HASHING-TABLE" *lisp-symbols*)
("HASH-TABLE" "WITH-HASH-TABLE-ITERATOR" "HASH-TABLE-P")

And it's got some lower level building blocks:

CL-USER> (let ((m (make-instance 'sequence-matcher
                                 :a '("one" "two" "three" "four" "five" "six")
                                 :b '("one" "three" "four" "seven" "six")
                                 :test-function #'equal)))
           (pprint (get-opcodes m)))

(#<OPCODE :EQUAL 0 1 0 1> #<OPCODE :DELETE 1 2 1 1> #<OPCODE :EQUAL 2 4 1 3>
 #<OPCODE :REPLACE 4 5 3 4> #<OPCODE :EQUAL 5 6 4 5>)
; No value

Some things it doesn't have: Python difflib's Differ class, and the ndiff or restore functions (maybe someday). It also hasn't been performance tuned. I guess it's also got some ugly bits of code that look a little Pythonesque. I did change a few things to be more Lispy, but most of the documentation for the Python module should still be applicable.

CL-DIFFLIB is pretty simple, but the diffs it generates look decent. It should be completely portable Lisp. And, best of all, you can download it via ASDF-INSTALL.

(Nathan Froyd has some diff code that looks more complicated than this.)

Posted by jjwiseman at 12:04 AM | Comments (2)

February 02, 2005

Immersed Remains

blub blub blub

On Friday the Center for Land Use Interpretation (CLUI) in Culver City is having an opening for its show “IMMERSED REMAINS: Towns Submerged in America”:

Elbowoods, North Dakota; Kennett, California; Enfield, Massachusetts; Neversink, New York; Butler, Tennessee; St. Thomas, Nevada. Each of these towns represents a different element of America's development. Yet they all share the same fate: they, and hundreds of other communities like them, were vacated, demolished and flooded to make way for dams and reservoirs. Their remnants persist, preserved underwater, and sometimes emerge, as reminders of what was not allowed to be.

Sounds great, I can't wait.

Posted by jjwiseman at 01:06 PM | Comments (2)

February 01, 2005

Scissor Sisters

scissor sisters

After Monday Night Margaritas at Acapulco (the $2 margaritas are lethal) I saw the Scissor Sisters at the Wiltern with Lori, Charley and a few BRC people. The live show wasn't quite so fabulous as I was expecting, but this was the last show of their year and a half long tour, and at least the crowd sure was into them. Heard a great LA story involving Gary Coleman and Lazer Tag.

Posted by jjwiseman at 11:52 PM | Comments (2)