Monthly Archive for July, 2008

Aaah, stability

WARNING: Technically inclined rant.

After about one week of laziness, I finally configured my new operating system install and hardware. I connected the older hard drives, along with the new 160GB hard drive, and wiped them clean. I now have 3 hard drives with a total of 280GB hard disk space, with about 190gb unformatted.

It’s been several months since I’ve even used a windows machine, so far I haven’t felt the explicit need for one. I spent the evening populating my bashrc and vimrc and my fstab to do my bidding nicely.

I tried KDE4. It was pretty but I’m a sucker for gnome’s minimalist design, plus I was used to the console keybindings. I still haven’t configured the look, let alone change the desktop background for two weeks. Ubuntu’s default theme seems fine for now. I will probably move to fluxbox or awesome as a window manager, but Gnome’s fine for now.

I’ve been working a lot with pygtk. Writing a GUI is easier than I thought. I’m keeping the GUI away from my code using Glade, which is really sweet. I moved from banshee to amarok as my default media player. Lack of good proxy support in gnome is annoying. Apparently any program that uses kioslaves seems to be working fine.

I should post more often :( Atleast now I have a stable, working machine.

Yay! protocol buffers are now open source!

I woke up this morning with an odd thought in my head. It was 4am, and instead of thinking of the absurdly awesome dream I just had, the thought running through my mind was simply: “How am I ever going to work without protocol buffers again?”

And an hour later, voila : http://google-opensource.blogspot.com/2008/07/protocol-buffers-googles-data.html

If you do a considerably large amount of C++ or python programming, you really should look at that. It takes the best of Javascript’s objects style data representation, and the power of C++ classes, and tons and tons of nice little utilities like printing debug strings, compressing and decompressing from ascii, etc.

Having worked with protocol buffers for a while, I can say that they’re extremely useful, particularly when you have many levels of protocol buffers, that can be used to structure data very nicely, and read them in a jQuery-esque fashion.

For example: parsed message blogpost { optional string posttext = 1; } parsed message blog { repeated message post = 1; } You can simply say blog x; x.mutablepost(i)->setposttext("Hello world"); string data = x.post(i).posttext();

You can read a more in-depth introduction here