Hudson BuildMonitor v1.5.5
FIFA World Cup 2010 update: Australia was demolished by Germany 0-4.
After ten months since the last public approval (v1.0.2) and four review rejections from the Mozilla editors, Hudson BuildMonitor v1.5.5 was finally approved a couple of weeks ago.
This version contains a major refactoring effort, attempting to separate the generic JavaScript code from the Firefox specific code. The goal was to make it easier for me to create a Chrome extension version of Hudson BuildMonitor, but of course I never had the time to do it and by now there are already two Chrome extensions out there, Hudson Extension by sanitz and Hudson Monitor by Henning Hoefer.
What I didn’t know back then when I started the refactoring effort was that Mozilla introduced an add-on verification suite about a month after v1.0.2, and that the Mozilla editors started working on reducing global namespace pollution. Those two things were good of course, it’s just that I had to put more sporadic efforts to work on those changes, which then stretched this release even longer.
Some of those changes are:
- Everything is now namespaced, and I really mean everything. The editors even picked up un-namespaced external libraries, which means Dean Edward’s Base is now name_edwards_dean.Base .
- setTimeout usage should be replaced by nsITimer.
- Login details management should use *drumroll* nsILoginManager.
- Datejs can’t be used anymore because it extends native Date, I replaced it with Matt Kruse’s Date library.
Out of the bug fixes included in the 1.5.x releases, I’m particularly happy with:
- Finding a workaround for HUDSON-2979, a problem that has been a blocker for OS X users. I bought a MacBook Pro about six months ago and was finally able to investigate this error myself.
- Fixing the mysterious error with French translation files. It used to work in older versions prior to v1.0.2 because the property files were UTF-8 without byte order mark and they contained non-ASCII characters, then at one point it was accidentally encoded as ISO-8859-1 while still having those non-ASCII characters which then broke the add-on. To avoid this problem from happening again in the future, I decided to take the safer option and unicode-escape those non-ASCII characters.
Working on Hudson BuildMonitor on and off for the past two years (the first release was on 8 June 2008, wow, has it been _that_ long?) has been a good opportunity to revisit JavaScript, a language many developers used to look down at. I agree with Douglas Crockford that JavaScript has been misunderstood, checkout his talk on JavaScript: The Good Parts at Google, and with the emergence of server side JavaScript, I believe this language is going to take off next year.
And to those who are still using Hudson BuildMonitor, thank you.
iPhone Equation
Here’s my review of the iPhone…
I’m not an Apple fanboy, I started using an iPhone several months ago, I give credit where credit is due. Despite all the criticisms about Apple, they still make the best consumer products on earth, ’nuff said.
Update (04/12/2012): I found an old photo, from ~1997, of a Macintosh that my dad used for his work (which I borrowed for playing Sim Tower). I then moved to Australia in 1998 and never used any Apple product since then, until I bought a MacBook Pro in 2009, and I was reminded how Apple products were teh awesome [tm];.

Noosa Getaway 2010
I decided that my new year resolution is to blog more often. Epic fail.
Two weeks ago I went to Noosa, a quiet little coastal area in Queensland. The people there were much friendlier than those in other Australian cities I’ve visited before. I reckon it was mostly because majority of the population there were of the older age group, and yes, I’m implying that younger crowd tend to perform anti-social behaviour involving alcohol.
The food was great. We had a fabulous dinner at Maisie’s, you can’t go wrong with seafood, steak, and wine. Nice breakfast at Elegant Eggplant, nice coffee at Organika. We had another nice breakfast at Wolf’s place, a little German-Australian cafe on Weyba Rd. I talked to the owner about the upcoming World Cup, where both German and Australia will face each other in a group match, he was being diplomatic and said he’s not going to take sides and will be happy whichever team wins.
Also on Weyba Rd, there’s a very intriguing little book shop called Embiggen Books with the tagline ‘Where science meets art.’ Classy!
We also did a 5-hour walk at Noosa National Park. After lunch at Noosa Civic, we started the walk from the southern, more forest-like, part of the park, and it turned out to be a good decision because we then finished off along the northern cliffs where the sunset was in full view from Hells Gate, Granite Bay, Dolphin Point, all the way to Boiling Pot.
If you’re looking for a quiet weekend break, then Noosa is definitely the place to go. Highly recommended!
Compiling Node.js on Solaris – The Issues
Disclaimer: I’m not a sysadmin, better solutions are welcome.
Earlier today, I was trying to compile node.js on Solaris (x86, 64-bit), get it installed, and setup a simple OHAI server.
And as usual, installing stuffs on Solaris is never straightforward and I ended up encountering several issues. I’m sure these issues (specially the errors) will bite me again in the future, hence I’m blogging this.
First up…
nom> ./configure /usr/bin/env: No such file or directory
Oh right, I forgot to install python and all of its dependencies. From node.js home page “The build system requires Python 2.4 or better.”
obj/release/mksnapshot obj/release/snapshot.cc --logfile "~/blah/ry-node-29ca7af/build/default/obj/release/snapshot.log" --log-snapshot-positions
ld.so.1: mksnapshot: fatal: libstdc++.so.6: open failed: No such file or directory
scons: *** [obj/release/snapshot.cc] Error -9
scons: building terminated because of errors.
Waf: Leaving directory `~/blah/ry-node-29ca7af/build'
Build failed: -> task failed (err #2):
{task: libv8.a SConstruct -> libv8.a}
*** Error code 1
ldd is your friend every time you hit this kind of error.
So I inspected mksnapshot…
nom> ldd obj/release/mksnapshot
libpthread.so.1 => /lib/libpthread.so.1
libsocket.so.1 => /lib/libsocket.so.1
libnsl.so.1 => /lib/libnsl.so.1
librt.so.1 => /lib/librt.so.1
libstdc++.so.6 => (file not found)
libm.so.2 => /lib/libm.so.2
libgcc_s.so.1 => (file not found)
libc.so.1 => /lib/libc.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
libscf.so.1 => /lib/libscf.so.1
libaio.so.1 => /lib/libaio.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libgen.so.1 => /lib/libgen.so.1
Turned out that both libstdc++.so.6 and libgcc_s.so.1 were installed in /usr/local/lib but not available from /lib. So I simply created symlinks for /lib/libstdc++.so.6 and libgcc_s.so.1 pointing to /usr/local/lib . Another workaround was to set LD_LIBRARY_PATH=/usr/local/lib, but I heard it’s bad.
On to the next one…
ImportError: ld.so.1: python: fatal: relocation error: file /usr/local/lib/python2.6/lib-dynload/_socket.so: symbol inet_aton: referenced symbol not found
This one was just strange, I couldn’t figure out which library dependency was missing, and it took me a while to find out that the python binary I had wasn’t built correctly (some library links were missing from _socket.so) . At the end I used the binary from Sunfreeware which had the correct links.
I got this next error when I accidentally compiled node on a SPARC box, which I believe is not a supported architecture. c-ares only has sunos-x86 header files for Solaris.
../deps/c-ares/ares_expand_string.c:18:24: ares_setup.h: No such file or directory
And another one, on the same SPARC box…
TypeError: cannot concatenate 'str' and 'NoneType' objects:
This is a similar issue that stevel mentioned on nodejs Google Group. Basically deps/v8/SConstruct couldn’t figure out the compiler and returns ‘None’ which can’t be concatenated to a String, this line here…
the toolchain to use (' + TOOLCHAIN_GUESS + ')'
After 3-4 hours, I finally got node.js installed, and a simple server up and running on Solaris.
OHAI KTHXBYE
















