[ Content | Sidebar ]

Archives for 2011

Deer in the way

March 6th, 2011

Today I went for a walk near the house of my good friend and neighbour, the Queen. But the path through her garden was blocked by a herd of deer!

Later on it brightened up a bit. Here is the bridge over Virginia Water:

Virginia Water is a large man-made lake at the southern end of Windsor Great Park. It has an adjacent village of McMansions, apparently home to various celebrities and formerly General Pinochet. I felt rather out of place and so escaped as quickly as I could.

Pretty Norman Church

February 27th, 2011

Here’s a pretty and very old Norman church I saw this morning:

This is inside the remains of the Roman town at Silchester, which you may remember I visited last summer. Here, for comparison, is what the ruins look like in the winter. It’s still a very pleasant place!

Filed in photos - Comments closed

Cuckoo Hashes in Lisp

February 20th, 2011

I’ve been learning about cuckoo hashing this evening and to help with that I’ve written an implementation in Common Lisp that others might find useful: cuckoo.lisp. It provides a package cuckoo which exports make-cuckoo-hash, cuckoo-insert, cuckoo-lookup, and cuckoo-delete which perform the obvious hash-table operations. The key feature of cuckoo hashes, if you haven’t come across them before, is that they have constant worst-case lookup time. They are also quite amenable to implementation in hardware.

The keys are implicitly fixnums since it’s a prototype for a C/VHDL implementation, but it shouldn’t be too hard to extend to a generic key type. The insert function automatically rehashes in-place if the table becomes full. The hash function is the xor of three randomly selected universal hash functions, as recommended by the Pagh and Rodler paper.

TrainGame updates

February 19th, 2011

I’ve been quite silent about TrainGame recently, but it’s not dead! I have been working on it a little bit – here’s an up-to-date screenshot:

The most obvious change is the new green train! Eventually there’ll be multiple trains driving around and you’ll have to take care not to bump into each other.

I’ve also been trying to make the ground look more realistic and less dull. After a few failed attempts I’ve settled on using a procedural noise texture to make the grass look more interesting. Seems to work quite well for little overhead.

A bit more subtle, but I’m slowly replacing the various existing track types with a single spline-curve track element. This means the track is no longer constrained to travel along the X or Y axis – you can see the train travelling along some diagonal track in the picture.

Loudwater, Henley, things in between

February 13th, 2011

Yesterday I went for a walk between Loudwater (near High Wycombe) and Henley on Thames. Here’s roughly where I went:

Distance was a tad over 14 miles. Not a lot of interesting things to report: it was mostly quiet countryside alternating between farmland and woodland. The Chiltern Hills are very pretty: I should go there more often! Here are some photos I took:

Sonning Bridge

February 13th, 2011

Here’s a nice photo of the bridge at Sonning that I took a few weeks ago and forgot to post.

Filed in photos - Comments closed

Chicken SLIME now an Egg

January 22nd, 2011

The Chicken Scheme SWANK implementation I’ve been working on is now available from the main Egg repository. So now you don’t need to faff about with Git and can install it like any other extension using:

$ chicken-install slime

Follow the instructions on the Chicken Wiki to get it set up.

I’ll be mirroring changes in the Chicken SVN to the existing GitHub repository so you can carry on using that if you like.

Since I last posted about this Christian Kellermann has submitted some great patches which improve the SLDB support allowing you to examine lexical scopes in the call chain. For example:

Hit enter or click on a frame in the backtrace that says “more …” and you will see a list of the lexical variables in that scope.

Colne Valley

January 9th, 2011

I went for a walk today in the Colne Valley. It’s a strange strip of land between West London and the M25 that can’t decide whether it wants to be part of the countryside or the city. It’s quite a nice part of the world anyway. Here’s where I went, from West Drayton – which you might remember I ended up in before – to Rickmansworth:

The weather was really nice and sunny for the first time in ages but not many people seemed to be out. Most of the time I was following the Grand Union Canal. Here it is just past West Drayton:

The fork you can see to the left is the start of the Slough Arm of the canal. A bit later on I saw some house-barges which have discovered a cunning method for making themselves look bigger than they are:

From here until Uxbridge it was all a bit dull with housing and industrial estates on either side. After that though there’s pretty woodland and lots of lakes. Actually, there’s probably more water than land. Apparently they are all former gravel pits that have been flooded. Here’s one at Denham Quarry:

From then on I was mostly following the Colne Valley Trail, which is helpfully sign-posted. After passing through Harefield the path went through some farmland and I came upon the curiously named Iron Fairy:

I like it very much: seems to be a sort of mini-crane. After that the path rejoined the canal and stayed on it until Rickmansworth. Just before there I met this strange mechanical fellow on the tow path:

Rickmansworth looked nice enough, although I didn’t spend long there. Getting back home was a bit of a trek: I had to get the Metropolitan line all the way into London and then the train out again. Unfortunately north-south train lines in the Thames Valley are pretty much non-existent.

So, to summarise, it’s a really good place to go walking if you live in the area. If you wanted to go further than the 10 miles or so I did then you could follow the canal to Watford. I took some more photos which you can see here if you’re interested.

List outgoing changesets in Git

January 8th, 2011

I normally use Git for my personal projects but at work I use Mercurial. While I prefer Git overall, Mercurial has some nice commands that are missing from Git. One particularly useful one is hg out which prints the changesets in your local repository that are missing from the remote. Here is a simple script which does approximately the same thing for Git:

for i in $(git push -n $* 2>&1 \
    | awk '$1 ~ /[a-f0-9]+\.\.[a-f0-9]+/ { print $1; }')
    git log --oneline $i

Store it as git-out somewhere in your PATH and you can use git out just like a regular Git command.