07 Jun 2011, 06:16

SBCL git repo is now official!

Almost exactly four years after I announced the availability of the first iteration of the SBCL cvs->git mirror (and a few more years after the cvs->arch mirror even!), we now have an official SBCL repository! Many thanks to Nikodemus for doing all the heavy lifting! (-:

I’ve stopped the (now defuct) cvs->git mirror. In its place, there is a new repository that mirrors the official git repo. To get the old, now static repo, see sbcl-cvs-import.

If you are a committer and have any old checkouts around, please make sure that you follow the procedure for eliminating unnecessary branches / tags.

20 Nov 2010, 08:28

Userscript for nicer l1sp.org search

I love the l1sp.org documentation redirection service. It is quick and easy to look stuff up there if you know the name, and it has a pretty good search if you don’t. However, the search results are not presented very nicely: They’re very close together, and the ones I’m looking for most often (mostly CLHS pages) are buried somewhere in the middle.

So I wrote a userscript (for Firefox through greasemonkey or Google Chrome/Chromium) to improve things a bit: It enables keyboard navigation (j/k or cursor-down/up select the next/previous result, enter opens the page, and / focuses the input field), and searches for the closest match from the results (ranks them by section and then selects the shortest matching entry).

Get the l1sp.org userscript here.

I do hope that Xach will consider adding these features to l1sp proper (maybe de-uglified a bit… that yellow highlight is really not too great). Until then, you can already enjoy the benefits of just a little javascript (-:

25 Sep 2010, 00:52

Visualizing the CLHS interlinking structure

Lately, I’ve been wondering what we could use the ~110k Hyperlinks in the CLHS for, other than click through the spec in a web browser. For example, given a glossary entry, how do you find out which functions refer to it?

So I wrote a little program that crawls (a local copy of) the HyperSpec, and creates an RDF graph of its link structure. This graph can be used to answer these questions, or it could be the basis of a useful research overlay on top of the HyperSpec, who knows.

Lots of tools exist to visualize and manipulate the facts in an RDF graph already; Here’s a screen shot of gruff with a small trace through the HyperSpec:

Gruff with Hyperspec RDF

You can get the code to create the RDF graph at github.

11 Aug 2010, 00:09

Huge life changes ahead.

In October, I will be moving to California to work for a hugely awesome lisp company there.

Exciting and excellent times ahead, I’m sure!

28 Apr 2010, 19:51

I think this is going to be pretty sweet.

I’ve been toying around with making a Common Lisp adapter to Cucumber, a behavior-driven development tool. I think this will really be very sweet.

Clucumber baby steps

Here’s how the step definition file would look like (these are really just stubs; in reality, you’d put in the lisp code you want to happen for the given textual description):

(Given* #?"^I start clucumber in (.*)$" (path)
  (assert path))

(When* #?"^I define some-other-package as the test package$" ()
  (pending))

(Then* #?"^the current package should be \"([^\"]+)\"$" (package-name)
  (pending (format nil "package is ~A" package-name)))

19 Feb 2010, 10:02

Vienna informal Lisp meeting 2010-02-27

Date: Saturday, 2010-02-27 Time: 12:30 Venue: In and around the Metalab, Rathausstrasse 6, Vienna (map)

I’m pleased to announce the first international totally informal lisp meeting in Vienna. A bunch of Lisp hackers are coming to here on the 27th, and we will meet, talk and hack in and around the Metalab.

The approximate schedule is as follows:

12:30 - Lunch at Fromme Helene. There is a table reserved for 15 persons (we’re 5 confirmed hackers at the moment). If you want in, drop me a line. ~14:30 - Reconvene at the Metalab for hacking/coffee/cold drinks/(optional) lightning talks

Hackers who have confirmed they’ll be there, so far:

  • Tobias C. Rittweiler
  • Luke Gorrie
  • Stelian Ionescu
  • Attila Lendvai
  • Gábor Melis
  • Mark Evenson

Thanks to the SBCL team for infusing this event with positive energy. SBCL: Harming the software industry since 1999.

31 Jan 2010, 17:49

cl-beanstalk: A queue service client

Over the weekend, I wrote a little client library to a queue server that I’ve grown very fond of over the last year, beanstalk. It’s a very simple queue server, but it comes with a nice feature (delayed jobs) that I’ve had a use for recently.

The queue server is nicely engineered (written in C, works with queues a few million jobs deep), and very fast; it has guards in the protocol against worker failure, and it was a pleasure to implement: The whole thing is just 320 lines of code, including comments.

You can get the source (and a tiny example) at the cl-beanstalk github repository.

Hope this is useful for anyone else - I am planning on using this in autobench myself, to distribute work across several build hosts.

15 Nov 2009, 22:11

Hunchentoot gets a debugging-acceptor

Today, I submitted a patch (the first free software lisp one in months for me!) to the Hunchentoot project, and it got accepted. Yay!

Some backstory: Hunchentoot’s 1.0.0 release dropped a lot of implementation-dependent features, among them functionality to invoke the debugger if an error happens while handling a request. While workarounds exist, none of them were obvious to new users or users who recently upgraded.

The patch I sent should fix this, hopefully. It adds a rudimentary error handling protocol to Hunchentoot, and provides two generic functions whose behavior can be adapted to your error handling needs. You can see for yourself in Hunchentoot’s svn repository.

If you’re a Hunchentoot user, I urge you to test this (in both development mode using debuggable-acceptor and running with the default settings). The sooner you find bugs, the sooner they can be fixed, the sooner a release can be pushed out. And if you don’t find bugs at all, that’s cool, too (-:

29 Mar 2009, 13:00

Clojure and Art of Illusion: BFF

Two weeks ago, the rotary program dial on my dishwasher broke. Luckily, I could fix it with two Lego parts (a Cross Axle #6 and a 16-teeth gear) initially, but the program selection experience suffered from the axle’s being too thin: it’d always bend in the turning direction until the selector would too-rapidly rotate past the point I wanted to select. Ugh.

Luckily for me, there’s a reprap at the Metalab. This is a low-cost 3d printer that can extrude parts made of ABS (the same material that Lego pieces are made of). With the help of Philipp’s MetaCADEvaluator plugin to Art of Illusion (AoI), I managed to create a very nice 3d model of a replacement for the dial. That plugin let me define parameters for each part, so I could easily resize all parts manually once I discovered that I’d mistakenly noted down each part’s diameter instead of the radius. However, this was slightly fiddly business: All editing happens inside Art of Illusion’s part name text fields, the syntax is slightly odd, and you can’t define your own part library.

Enter my urge to try out Clojure. This little side project took three steps:

  1. Find out how to embed clojure in AoI (done).
  2. Make it open a swank port so I can on AoI from emacs without having to recompile all the time (done).
  3. Build a part definition DSL (ongoing, one milestone achieved).

There’s a detailed description of these steps after the jump. Here’s the github project for my AoI clojure plugin.

Embedding clojure inside AoI

This was rather easier than I’d thought. The hardest part was finding out how clojure’s gen-class works so as to generate two classes, one to implement the Plugin interface (so that the plugin gets loaded) and one to implement the Tool interface (so I get a menu entry that lets me start the Swank listener).

After that, it was building an extensions.xml and figuring out how to make ant build a .jar file that AoI could grok (both easy).

Making it open a Swank port

That one was easy, as well: Just add the swank-clojure project as a submodule, and add its sources to the plugin .jar file. Having done that, open a port and add the current window somewhere so we can manipulate objects in it later (source).

So after that, opening the Swank port vie the tool menu let me connect to AoI with emacs and off I went, doing experiments! For all who want to build Art of Illusion plugins with clojure, I’ve made a minimal-plugin branch that does exactly this, available here.

Building a part definition DSL

This one was the biggie: I wanted to write lisp that lets me interactively define 3d models. What is here right now is a little DSL that lets me create simple 3d models, and lets me perform boolean operations on them (union, difference, intersection). This is enough to make this model, which is the exact same part we extruded before.

There are still things left TODO:

  • The syntax of the DSL needs more love. It is quite verbose right now.
  • Models need relative transformations: witness the “90 0 0” on almost every part.
  • For debugging purposes, it would be useful to get a tree of the composite objects (with only the end result visible), instead of just the one result object.

Conclusion

All of this was way easier and far more fun than I’d thought building plugins to java projects could be: I’d gone in expecting something in the order of gratuitously frustrating and mind-numbingly boring. Instead, after I had the first few hurdles out of the way (most of which were rooted in my emacs’s slime config (-:), I was euphoric from regular small successes all the way. As you can tell from the commit history, this took a little over 3 days to build.

I strongly recommend the Clojure and swank-clojure approach to building plugins to java projects: Once you’ve got a Swank listener open, it’s all experimentation and small bits of progress. Excellent stuff, all around.

01 Apr 2008, 17:34

Perfectstorm by Johann Korndoerfer

perfectstorm screenshot

This isn’t original work, so perhaps more suited to being in my soup than this blog, but it’s so cool it just has to be on Planet Lisp. perfectstorm is:

a real time strategy game study written in Common Lisp using OpenGL for graphics display and cairo for texture generation.

Looks very very interesting. Google SoC students take note: this is an open source project (-:

(found via neingeist)