Archives for October 2006

Wikipedia links in the last post

In an effort to help explain the technical post son this site with as little difficulty as possible, I’ve started linking terms to Wikipedia. To do this I added a little WordPress plugin to the old my-hacks.php file.

This adds support so that typing any topic between <wiki> tags will automatically create a link to the desired Wikipedia article.

The code follows below:

(more…)

Planning to checksum in PHP?

I am rewriting NINJA to use the block scanning part of the rsync algorithm for binary differences, so I needed to figure out which checksum would be fastest to achieve in PHP. rsync normally calls for Adler-32, but any checksum algorithm should work fine.

Below are the results of several checksum/hash algorithms in PHP. Clearly, PHP’s native crc32() function is the fastest of the group:

(more…)

Making AjaxWp and Lightbox play nice

You may have noticed this entire site is now AJAX based. That wasn’t easy to pull off, but finding AjaxWp helped a lot.

Contrary to what the top of the page suggested, AjaxWp did not work with my Lightbox 2.0 install at all. Thinking perhaps 2.0 wasn’t supported, I tried 1.0. That didn’t work either.

It took me about three hours of fiddling with FireBug’s DOM inspector, but eventually I realized two things:

  1. Lightbox was not accessible to new content coming in from an AJAX load.
  2. When Lightbox was accessible, all navigation links within the lightbox were being arrested by AjaxWp.

(more…)

The Game

I just lost :(

This is the first time I’ve lost since I started playing in 2001.