Archive for July, 2008

Never before have the words of the Black Speech been uttered here

Thursday, July 31st, 2008

It is astonishing. Sometimes the blackness just comes back and bites you on the bum. The most exquisitely fascinating thing about depression is how it removes almost all feeling. One isn’t sad, one just… continues.

I’m becoming amazed at my ability to not care about people, places or things at the moment. It is strangely liberating.

Dark have been my dreams of late

Friday, July 25th, 2008

I’m in an incredibly bad mood today. I’m snappy, bullish and obstructive. I think it is due to the office being too hot.

Either that or I hate everyone.

GObject - Bringing OO Assembly into the 20th Century

Wednesday, July 23rd, 2008

Dear LazyWeb,

Does anyone know of a SWIG-a-like which can turn fairly vanilla C++ into GObject-ified C? If it can make IDL files suitable for Vala, all the better.

The hidden agenda behind my question is the way that all the ‘cool kids’ in the Desktop world seem to use GObject for some strange reason and I guess it would be nice if Firtree could as well.

On the Firtree front: One can now save images! Sort of… This moves Firtree almost to the level of functionality shown by Photoshop 0.01 :). Until I get the OpenGL redner-to-texture stuff abstracted away inside Firtree::Image however, it wont be able to save the results of accelerated GLSL processing. Being as this is the main feature of Firtree, the image saving feature is a bit pants at the moment :).

Fun, fun, fun in the sun, sun, sun

Wednesday, July 9th, 2008

Today is the first day of a conference I am attending here in sunny Mallorca. Muct to my surprise, the weather is actually quite pleasant and the room’s aircon is very good. There is something exquisitely debauched about sitting by a swimming pool writing a blog entry.

3G antics

Monday, July 7th, 2008

I’ve been experimenting with connecting my Linux box to t’Intertron via my mobile. It is surprisingly easy. Plug in the phone, add the following to /etc/wvdial.conf and type sudo wvdial. The important thing to note is the ‘deflate 9′ bit which enables compression on the network traffic and has single-handedly made the browsing experience bearable.

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
ISDN = 0
Phone = *99#
Password = three
Username = three
PPPD Options=defaultroute deflate 9

Bazaar attraction

Tuesday, July 1st, 2008

My life was saved yesterday.

Less dramatically, a piece of software made my life better whereas, without it, life would have been worse.

Let’s give a bit of context first though: I’ve a very basic form of regression testing for Firtree (reflecting its somewhat volatile nature) which consists of a number of ‘example’ python scripts which exercise Firtree’s features. Each script also prints out the allocated object count at program exit which, if non-zero, indicates something has fecked up in my reference counting, either inside Firtree itself or in the Python bindings.

Usually, being a good little software engineer, after writing a feature, but before committing, I run these scripts confirming they still look right and this reference count is zero. Yesterday I went a bit mad and added a ton of features and an associated ton of commits. As is virtually guaranteed when you behave so recklessly, when I did run the scripts everything looked screwed up and memory leaked like a sieve. This prompted one of the worst things you could hear when, for example, you are sitting in the passenger seat of a moving car: a single, sharp, under the breath uttering of the word ’sh*t’.

Fortunately I had used Firtree as a test-bed for developing with Bazaar, a decision I am now very glad of. Suddenly I had the coding equivalent of a TARDIS and an infinite number of universes to play with. I branched off from the last ‘good’ version of Firtree and gently rolled forward in time until the naughty patch was revealed. Then, in true time-traveller style, I made a change in the past but then let the future merge in. Painless in the extreme with bazaar. Finally we reached the ‘alternate 1985′ where, far from being the apocalyptic vision I had created, all was well and no memory leaked (that I could detect).

I am far from groking Bazaar in any meaningful way (as anyone who cares to notice the fsck-ups in the Firtree tree will attest) but already I have experienced a complex branch and step-by-step merge which would have been incredibly painful with other tools.

Oh, by the way, feel free to s/Bazaar/$MY_VCS/. This is more a post of how rocking modern VCSs are, not how Bazaar is necessarily the best.

Update: An example of the process is available on my website. I’m not recommending this as the ‘Right Way’ but it worked for me.