Prototype completed

The first week of my project was scheduled as  “April 25: Write a perl script capable of parsing a specific XML, extrapolate results to determine relativity to our performance requirements.”.

That week is over and the original goals of the prototype have been completed. In fact I sort of got carried away and the prototype is now nearly feature complete, for printer xml parsing. It turned out to be so fast that I simply have it parse ALL of the printer xmls when ever I want to test it. How fast? About twice as fast as the C program. Since this is a prototype the results are only preliminary, but I expect the final implementation to be at least on par with the C program. This speed was unexpected, my expectation was for the Perl to be linearly slower than the C, and  hoped it wasn’t exponentially slower, yet it is actually faster! This bodes well for the other three fourths of this portion of the project; driver xml, options xml, and overview.

Thanks to this unexpected computational speed I will be focusing on simplicitly in the implementation, since maintainability was the primarly goal of this portion of the project. I will keep an eye out for improvements but now primarily for the opportunity to simplify the code base.

All ready, let GSoC begin!

I’ve now officially finished setting up my workstation, and I have to show it off.

Muhahaha, although the third monitor is waiting until I can get to the store and buy a displayPort cable. =\ I bought an ATI graphics card because in theory they can now drive three monitors with the one card, unfortunately a displayPort connection is required for it to do so.

On a related yet more useful note I set up a launchPad repository for my development work. I’m using Bazaar because that’s what The Linux Foundation repositories are, and launchPad because bzr has mature support for the site. The path of least resistance.

Stop Mobs from spawning on trees in Minecraft SMP

I transfered my single player Minecraft world to my home server so that I could play survival multiplayer with my roommate. One major issue that I encountered was that hostile mobs started spawning on the top of trees. Normally this would not have been an issue except I happen to have a massive artificial forest in my main home, let’s call it a wildlife preserve. I happen to like my wildlife preserve but abhor the idea of creepers falling from trees killing me and damaging my precious forest. Luckily I found a Bukkit plug-in that stops mobs from spwaning on trees. Disaster averted.

WordPress XML-RPC documentation links

Unfortunately the documentation for WordPress’ XML-RPC API only covers the WordPress specific extensions. As such if you want to do anything useful you’ll have to seek help else where. Perhaps the most important thing to note is that WordPress supports Metaweblog a proper open standard.

During my google’ing I came accross several helpful links:

Attaching an image to a post:

One thing that was absolutely un-documented was a method to attach an image to a post. After some digging I found attach_uploads() which is a function that wordpress calls every time a post is created or edited over xml-rpc. What it does is search through the list of un-attached media objects and see if the new/edited post contains a link to them. Since I was trying to attach images so that the theme’s gallery would use them I didn’t necessarily want to link to the images within the post, nor did I want to edit wordpress. So what I ended up doing was including the image url within an html comment.