Older blog entries for ingvar (starting at number 305)

Currently tooling away at asked-for functionality for my IMAGE library (specifically, a request was made to see if I can scare up another font or three, so I am currently noodling on a PCF font-file reader, as you do).

Common Lisp continues to be amazingly convenient for "binary I/O", although it does require a certain mind-set to consider it convenient, I guess.

I've just packaged up a new release of my IMAGE library, with some new functionality in place. It now supports copying (parts of) an image into another image (with either the same alpha across the whole copied section or with a provided alpha map, so one can do Clever Stuff that way).

I suppose I should write documentation for the image library at some point, but...

Idleness is the source of many bugs. I suppose. It's certainly the cause for a lot of code I write.

Lately, I have been pondering hashing of octet vectors. Well, actually, I've been pondering the hashing of strings, but these days strings need mangling to octet vectors before one can reasonably reason about them as numbers (in my case, turning a vector of characters into a possibly- longer (well, possibly-more-elemented) vector of (UNSIGNED- BYTE 8), containing a UTF-8 encoding of the character string).

But, what's a hash without an idea how well it performs? So, with a pluggable (or at least semi-pluggable) hash algo, what I now do is run it across a dictionary (in my case it is /usr/dict/words, containing a British word list) and see how many collisions one gets.

The next step is, of course, to try to figurte out what is and isn't bad, as far as collissions go. From memory, the last attempt say something like 600 collisions out of just under 70k words. I'd have to run a simulation to say if it's well above, well below or around what I'd statistically expect.

Next after that will have to be concatenations of words, though that MAY take a bit longer to test-run.

Interesting (but rather pointless) self-replicating shell- script:


#! /bin/cat
Self-replicating!

Make sure it's executable, then you can replicate the whole script by running it... But, maybe, there's some usefulness to it? Doubt it, though.

IN slightly less whingeing news, since the latest (well, second) installment of the annual Snooper Report has been turned down, I'll let it loose on an unsuspecting public (and, of course, the URL is too wide for the Advogato editing window, so now I'll get bots come and look for URLs with %0A in them, grr).

In almost as exciting news, I cobbled up a proof-of-concept of a blackhole maintenance library (CLI client, web client, libarry code, DB backend and a reaper suitable to stick in cron, to remove blackholes once they expire).

One of the little web toys I knocked together and occasionally use for pontificating is my Essays site. Since its initial creation, I've added a comment functionality, but due to the prevalence of spam, everything requires manual verification.

Not, in and of itself, a major problem, but I've noticed something quite disturbing in the spam comments (most, alas). The latest is that they're pointing to the SourceForge forum (with URLs that start http:// cmr.sourceforge.net/forum/) and I am in two minds about that.

One mind says I shouldn't bother complaining, because they should already have noticed. The other mind says I should, indeed, point it out to them (with a slight risk that the forum is zapped; this happened last time I pointed the issue out).

Instead, I decided that thee Right and Proper thing to do is to have a semi-public whinge. Don't know that it makes me feel any betetr, but at least I am not feeling any worse.

I have previously written a short essay, or possibly a rant on "develop and release straight out of version control" or "release in versioned lumps of code, with the development being separate".

That whole thing just jumped to the fore-front of my mind, as it seems that SLIME has changed under my feet again (no, I didn't intentionally upgrade SLIME, but it seems as if I need to stop getting SLIME via Debian and instead pull it myself, so it stops changing when the rest of the system upgrade; I also need to downgrade the SLIME I have installed as whatever I run now is less functional (for me) than what I ran prior to the last upgrade).

I don't know if things would be better or worse if "package and release" was the dominant paradigm, though. It'd probably cause less friction with an auto-update system that is tailored to packaged and versioned releases.

So, upgrades happened at home and, as occasionally happens, X stopped working. X stopping working varies from "trivial" to "annoyingly painful" to troubleshoot, especially as there was NOTHING in the xorg.N.log file to indicate what the issue was and it wedged the console to the point where "shutdown, reload" was the only way to get it back (thankfully, I could log on from another machine to do that).

In the end, it was a surprisingly simple fix, after "startx 2>&1 > trace-file" gave me the crucial bits of info. An expected symbol was not around in a dynamic linking stage and chasing that down gave a simple(ish) fix. All I had to do, in the end, was to uninstall the fglrx driver (something I installed in the first place to get working accelerated 3D primitives and direct rendering).

But, it did made me wonder, if the Xorg server can write to stderr, why can't it log the lack of a symbol to the og file? Maybe, I don't know, because that writing happens in a non-X library? I should probably have a poke at that, at some point.

18 Jun 2009 (updated 18 Jun 2009 at 08:51 UTC) »

As Pierre Mai so eloquently writes, the evaluation order corner case is explicitly covered as "it depends" by the Standard, so any code that depended on it is, well, relying on implementation-specific details.</a>

17 Jun 2009 (updated 17 Jun 2009 at 11:41 UTC) »

Intriguing. I have found an interesting corner case, where I believe the Common Lisp standard doesn't have an opinion. I don't think it's really any critical corner case, as I (right now) can't see any legitimate use of the difference, but...

Basically, in the case of the following:


(defun frob (x) (format t "Frob: ~a~%" x))
(frob (defun frob (x) (format t "New frob: ~a~%" x))
does the printed line say "Frob" or "New frob"?

It is, I believe, fully specified what will happen when you do either of (funcall #'frob ...) or (funcall 'frob ...), but out of the two implementations I have tried (SBCL and CLisp), I have two different behaviours. SBCL prints "New frob" and CLisp prints "Frob".

I shall have to ponder this, for a bit, I think.

296 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!