Skip to content

Category Archives: Computers

On the qsort() comparison function

23-Jun-06
When asked to write a comparison function for qsort()ing an int array, one might write it like so: int cmp_int(const void *a, const void *b) { if(*(const int *)a < *(const int *)b) return -1; if(*(const int *)a > *(const int *)b) return +1;   return 0; } But after reading the manpage for qsort(), in […]

LaTeX! LilyPond!

18-Jun-06

Whoa, I got LaTeX and Lilypond working in WordPress with FigureRender. Cool stuff!

The only bump in the road was the fact that my host is running PHP4 and FigureRender was written for PHP5. The changes to make it work in PHP4 were pretty trivial, though, so I hacked up a patch. I […]

Gah…

15-Oct-05

Don’t you hate it when you’ve been working on a side project and then you find out it’s already been done? And better? I was working on a C++ library for simulating quantum computation and then I ran into this page. And the annoying thing is that I’ve started this side project […]