cyrusharmon.org

Cyrus Harmon's new completely useless blog

 

retrospectiff

posted by cyrus in Lisp

The TIFF image file format has been around a long time, and lisp even longer. Yet, I couldn't find any common lisp libraries for reading TIFF images. Perhaps there's one out there I missed, but the only one I could find was my previous attempt, tiff-ffi, which consists of some wrapper functions around FFI calls to libtiff. I wanted a native common lisp TIFF library that wouldn't require the libtiff library so, at Robert Strandh's urging, I wrote retrospectiff.

The retrospectiff git repository can be found here.

Currently, there is no support for writing TIFF files, and only a fraction of the TIFF image formats are supported, but RGB and ARGB images, both uncompressed and with LZW compression, can be read. Grayscale support should come next and, hopefully, support for writing TIFF files before too long.

Enjoy.

no way to run a railroad

posted by cyrus in General

So, attempting to get on MUNI this morning, I had a fun experience trying to actually purchase a ticket. To recreate the problem, try buying a ticket to get on MUNI at the Embarcadero station with only a US $10 bill. Turns out, you need to pay for your ticket with coins only.

Ok, so how do you get coins? Well, there's a machine that takes $1 bills and gives you a $1 coin. Has to be the only change machine that doesn't in fact give you "change", at lost not as one might expect, but rather changes your bill into a coin. Oh, and the machine takes $5 bills as well. Great. But I've got a $10. Now what?

Well, let's ask the oh-so-helpful person on the other side of the bulletproof glass talking at me through the loudspeaker. Why they have bulletproof glass when they only accept coins is a mystery, but that seems to be the case. In any event, she tells me I have to go over to the BART change machines which only accept $10 and $20 bills and use those machines which, much to my surprise, actually give out $5 bills in exchange for the $10 and $20 bills. Again, a new twist on the change machine. I've never seen a change machine that takes bills and gives you more bills, just as I had never seen a change machine give you a dollar for a dollar, but, OK.

Great, now I've got a $5 bill. Now what? Ok, go back to the $1/$5 change machine and get 5 $1 coins. Perfect, but, with the BART transfer, I only need $1.25. What do I do now? Well, ask the oh-so-helpful lady, of course. And, of course, she sends me back to the BART change machines. Well, OK, not the BART change machines, but the BART ticket machines, where you put in your dollar coin and then hit cancel and, lo and behold, the machine gives you 4 $.25 pieces for your $1 coin. Amazing.

All of this instead of just being able to buy a card that would automagically charge my credit card when I got on the damn train. Well, I guess such a thing might exist, but you certainly can't buy it at the train station, at least not at Embarcadero. All you have is a BART ticket station with signs all over the place saying NO MUNI TICKETS. So, it's not like a bunch of other people haven't tried to show up there and buy MUNI tickets, but, instead of, oh, you know, figuring out how to sell MUNI tickets, they put up a sign telling you to f**k off and leave you to go talk to the scary people behind the glass in order to figure out how to use three change machines to get the exact (coin) change required for the train.

Look, I'm all for SUPERTRAINS, but perhaps we should start by firing whomever is in charge for the ticket collection at Embarcadero MUNI and then we can work on a decent rail system for the bay area.

Fortune

posted by cyrus in General

From tonight's Kirin takeout: "You will be showered with good luck before your next birthday." Well, let's hope so anyway.

The Race Card

posted by cyrus in General

So, now that the presidential race is heating up, what, exactly does it mean to "play the race card"? The McCain camp is accusing Obama of doing this, but I don't know what this even means and everyone talks about it like it's obvious. What are they trying to say here?

I Like Maps

posted by cyrus in General

This one is pretty funny:

http://graphjam.files.wordpress.com/2008/06/funny-graphs-californians.gif

cl-jpeg and ch-image updates

posted by cyrus in Lisp

Ok, after a couple of years... I've finally gotten around to incorporating (some of) my changes to the cl-jpeg library into the upstream sources. There's a new version (1.023) up on the common-lisp.net cl-jpeg site.

To go along with this, the latest git sources of ch-image now use cl-jpeg.asd instead of my hacked up jpeg.asd. My jpeg project will now disappear and should be replaced with the upstream sources.

hunchentoot-cgi

posted by cyrus in Lisp

I know, I know... Why on earth would you want to run CGIs from hunchentoot? Well, while it may seem counterintuitive, I've found a need for this as I want to run the gitweb cgi interface behind hunchentoot and don't feel like setting up apache as the front-end to an otherwise happy hunchentoot site (this one), so I rigged up a little CGI interface for hunchentoot.

To use, check out the hunchentoot-cgi::create-cgi-dispatcher-and-handler function.

git migration

posted by cyrus in Lisp

Ok, so I've finally gotten around to moving (at least some of) my projects over to git. The good news, besides having the code in a modern version control system, is that the repos are now publicly accessible. The list of projects can be found at:

http://git.cyrusharmon.org/cgi-bin/gitweb.cgi

It's not just a good idea, it's the law!

posted by cyrus in General

new ch-asdf and ch-util releases

posted by cyrus in Lisp

SBCL recently removed the sb-ext:find-executable-in-search-path or whatever it was called function, so ch-util and ch-asdf were broken. The new ch-util and ch-asdf should fix that.