New WordPress hotness

Since I finally went ahead and upgraded the site to the latest version of WordPress, I finally made a few tweaks to my ugly-but-functional theme to take advantage of some relatively new features. In particular, the sidebar over to the right is being managed as a series of widgets, instead of all being hard-coded into the theme. Doing that also gave me the opportunity to put up a tag cloud, which I believe all the cool kids started doing a couple years ago. Note that only posts I’ve made since upgrading to 2.3 have been tagged (since that’s when WordPress added native support for tags), so don’t think the cloud is going to give you an extensive archive.

And since I was mucking about in the theme, I also added some CSS that plays nicely with Vim‘s :TOhtml command (with let html_use_css = 1 somewhere in your .vimrc). The result gives me an easy way to syntax highlight the code I post, like this:

#include <stdio.h>
#include <stdlib.h>
 
static unsigned long long
fibonacci (unsigned int which)
{
        unsigned int i;
        unsigned long long a = 0;
        unsigned long long b = 1;
 
        if (which < 2)
                return which;
 
        for (i = 2; i <= which; i++)
        {
                unsigned long long tmp = a + b;
                a = b;
                b = tmp;
        }
 
        return b;
}
 
int
main (int argc, char *argv[])
{
        if (argc >= 2)
        {
                int which = atoi(argv[1]);
                if (which >= 0)
                        printf("Fibonacci number #%u is: %llu\n", which, fibonacci(which));
                else
                {
                        fprintf(stderr, "Must give an nonnegative integer\n");
                        return EXIT_FAILURE;
                }
        }
        else
        {
                fprintf(stderr, "usage: %s number\n", argv[0]);
                return EXIT_FAILURE;
        }
 
        return EXIT_SUCCESS;
}

Yeah, hardly the most exciting code for a demo, but easy syntax highlighting will come in handy later.

As with most upgrades, if something broke, let me know.