For a recent project of mine, I wanted to use what some people call “Compile Time Polymorphism” in C++. Here’s how I implemented it. Polymorphism in the context of programming computers usually refers to the ability to tread objects of a different data type through the same interface. In C++, this is often implemented through […]
Here’s a good article about how PCI Interrupts for x86 Machines under FreeBSD are implemented. While the article is targeted at FreeBSD, it also looks into the various interrupt routing mechanisms on x86 which apply to all systems software such as firmware and operating systems.
It has been over two years since the last time I worked on TianoCore for coreboot. These days I had some free time to spend and I used it to continue the project. I updated my code to the latest versions of coreboot and TianoCore and got it to work again in QEMU. Here’s a […]
Here’s how I got ImageMagick with JPEG support to compile and run on Mac OS X 10.6 (Intel). First, I got the ImageMagick Source Code via Subversion, per the instructions from http://www.imagemagick.org/script/subversion.php. Short version: $ svn co https://www.imagemagick.org/subversion/ImageMagick/branches/ImageMagick-6.6.5 ImageMagick-6.6.5 Then, I pulled libjpeg from the Independent JPEG Group. I had to extract the source code […]
This week I found out that hexdump(1) on Linux doesn’t seem to work with bytes but with half-words. I found out because I compared a byte-by-byte binary dump (output of a separate program) to the output of hexdump(1) (dumping the same data) and noticed that hexdump(1)‘s output always swapped two adjacent bytes. Maybe I haven’t […]
Here are a couple of ways of generating random passwords without using a “password generator”. First, generate a random string like this: $ dd if=/dev/urandom count=500 bs=1 | tr “n” ” ” | sed ‘s/[^a-zA-Z0-9]//g’ or like this $ dd if=/dev/urandom count=500 bs=1 | md5 Then adjust the length by piping the output through cut(1): […]
Just to save the link somewhere… This command tunes in on the Big R Radio 90’s Alternative station. mplayer http://livestream2.bigrradio.com/90salt
Today I came across an interesting article that sums up why abstractions still require one to know the lower levels. In essence, the author claims that abstractions are good and help us build complex systems, but are a great burden if something fails in the lower levels. I couldn’t agree more, especially when I think […]