I have been planning to move my blog to a new server and I thought it would be a good opportunity to try to migrate to the latest version of Octopress. I have noticed the development ongoing on Octopress 3.0 for a long time, and after the write-up about it on the main Octopress site I have been looking for the right time to test it.

To be clear, Octopress 3.0 is not done yet, but it has come pretty far. I am not sure if you can call it in beta stage yet, but it is pretty stable and works well.

Using Octopress 3.0 is very different than Octopress 2.0, but it is much simpler. Gone is the requirement to clone the official repository, instead Octopress is now a collection of Jekyll plugins. Styling can be done with Jekyll themes or Octopress 3.0 themes. There isn’t much of Octopress 3.0 specific themes available yet, the only one I have found is the Genesis theme in the Octopress repository and that is still under development. For the migration I am sticking with the default theme and will look into using Octopress Ink to create my own later.

Continue reading

I recently bought a SSD drive for my HP Z820 workstation for use as the main drive. This weekend when I installed it I discovered that I needed to upgrade my BIOS as the one I had did not fully support AHCI mode. I haven’t had any need to upgrade the BIOS earlier so the BIOS version (01.02) was two years old. I always find such an operation a bit scary so as long as the BIOS does what it needs to I leave it pretty much alone. But now that I had the need I went to the HP support site and downloaded the latest BIOS for this workstation. Right now this is version 03.65.

After extracting the SoftPAQ I ran the Microsoft Windows utility to install the BIOS (HPQFlash.exe). It ran through the full upgrade procedure, first saving the current BIOS then flashing the new one. As soon as it completed writing the last block it immediately threw up this scary error message: An unrecoverable error has occurred while flashing the BIOS. Error code = 0x0D.

Continue reading

Yesterday I wrote about playing a WAVE sound using basic PySDL2. I also mentioned that I thought that using the SDL2_mixer extension (or sdl2.sdlmixer as it is called in PySDL2) would probably be easier. What I didn’t anticipate was how much easier it would be. Using sdl2.sdlmixer more than halved the lines of code necessary to play the wav file, most importantly by removing the requirement to create a callback function to feed frames to the sound buffer.

Continue reading

For the last couple of weeks I have been playing around with PySDL2 to learn a bit of game programming. Figuring that prototyping in Python was a good place to start learning, I originally planned to use Pygame which is a popular wrapper and extension of SDL. Now it seems that SDL (and Pygame) has been discontinued and PySDL2 looks to be the successor.

So far, using PySDL2 has been both easy and fun to create graphics and move them around, especially when using the extensions methods in sdl2.ext. But when adding sound to the mix, I hit upon a bit of trouble. For playing sounds it is necessary to use the SDL2 library functions. I decided to use a WAVE file (.wav) for my sound testing which meant using SDL_LoadWav to load the file. PySDL2 uses a ctypes wrapper around the SDL2 library so that you can use the methods in almost the exact same way as from C code. This is both good and bad. The bad, at least for me, was that I had very little experience with ctypes and spent a lot of time figuring out how to declare the variables and types to use in the function calls. PySDL2 offer very little documentation on how to do it, and the SDL2 documentation doesn’t have too much example code on using SDL_LoadWav with SDL_OpenAudio. After a lot of trying and failing I finally figured out a way that worked.

Continue reading

Update: This obviously doesn’t match the current site since I moved it and switched theme again. You can see the result at my old site toomanyideas.net.

I was getting a bit tired of the look of this site which was using a slightly modified version of the classic Octopress theme. By chance, I came across Octostrap3 which is an Octopress theme based on Twitter Bootstrap 3.. There seem to be some debate about whether Bootstrap is good or bad, but it is widely used and has some nice themes so I am going to try this out for a while.

Continue reading