IE 9 – doesn’t like console.log()

Turns out you can use console.log in IE 9, but it only works in developer mode.

Fine, so the sensible thing in “not developer” mode would be for console.log to by turned into a NOP. This doesn’t seem to happen and random things were breaking until I commented out the console.log lines. It looks like trying to do anything with the console object throws an exception – not even

alert("console null?"+console==null);

is allowed (no alert gets shown).

Just another one of those annoying “it’s works in the debug version” things, and everyone the world over has to build their own console.log wrappers.

Posted in Uncategorized | 6 Comments

ROCK (part 2)

Another remix for Sacha’s Morbid Atrophy project:

Story There (Distortion Mix) by Tom Blench

Posted in Music, Uncategorized | Leave a comment

ROCK \m/

Had great fun doing this remix for Sacha’s Morbid Atrophy project. Hopefully I managed to get this somewhere between metal and drill n bass!

A Porter Too (Remix for Sacha, bounce 2) by Tom Blench

Posted in Music, Uncategorized | 1 Comment

Getting data off a Holux GPSport 245 (Mac OS X/Linux)

The problem: I have a Holux GPSport, which although it’s a nice device, requires me to use their fairly nasty Windows software to get the data off it.

The solution? Well there seems to be lots of software out there for this sort of thing, but getting it to work is tricky. In the end I went for GPSBabel, which is GPL and works on the Mac. It also appeared to support my device.

But I couldn’t get it to work. Maybe there is something in the documentation that I haven’t found, but the solution is to install these USB to UART Bridge Drivers from Silicon Labs. Basically the GPS device is serial, and the Silicon Labs chip bridges this across USB.

Thanks to this blogger who came to a similar conclusion with a different device.

The Mac driver seems pretty solid, and once installed you can use the

/dev/cu.SLAB_USBtoUART

device.

An example of using this with GPSBabel would be

gpsbabel -t -i m241 -f /dev/cu.SLAB_USBtoUART -o kml,lines,points,floating,track,trackdata,labels -F out.kml

Or you can use the GUI front end to do the same thing.

Note that if invoked from the command line, the current directory has to be writable so it can write its “data.bin” file – this seems like a bit of a failing as this should really be written to /tmp.

Other current issues include:
– It’s slow. There seems to be some baud rate setting going on in mtk_logger.c, and I guess they haven’t chosen a higher one because it isn’t supported by the chipset used in the GPSport.
– I can’t get useful KML out of it. It just comes out as one massive track, but this might be user error.

Posted in Uncategorized | Leave a comment

bash: how to retain history across multiple shells

I like to have lots of shells open, some inside emacs and some in stand-alone terminals. With the default settings, it seems that the last shell to exit saves its history to the file:

If the histappend shell option is enabled (see the description of shopt under SHELL BUILTIN COMMANDS below), the lines are appended to the history file, otherwise the history file is overwritten

(from the bash man page)

It’s nice to be able to dig out some obscure shell command issued ages ago when you need it.

So stick the following lines in your .profile at amend this:

shopt -s histappend
export HISTFILESIZE=1000000

Posted in Uncategorized | Leave a comment

Japan – Days 12 and 13: Tokyo (again)

P1000319

Posted in Uncategorized | Leave a comment

Japan – Day 11: Hakone

Fuji poking out

Posted in Uncategorized | Leave a comment

Japan – Days 8, 9, 10: Kyoto

P1000180

To the ancient capital of Japan, full of temples and Geisha.

Posted in Uncategorized | Leave a comment

Japan – Day 7: Hiroshima

Hiroshima Prefectural Industrial Promotional Hall

Sadly some place names are synonymous with their disastrous events to such a degree that the evocation of the place name fails to suggest any other images.

Whilst the urge “to remember” (as often seen in connection with the Holocaust) is important, this is a shame as Hiroshima was such an enjoyable city in the spring sunshine.

The picture is the remains of the Hiroshima Prefectural Industrial Promotional Hall, one of the closest buildings to the “hypocenter” of the explosion.

Posted in Uncategorized | 2 Comments

Japan – Day 6: Himeji Castle

P1000159

This is the garden adjacent to the ground of Himeji castle. The castle is “by far the most impressive” of “Japan’s twelve surviving feudal-era fortresses”, according to our guide.

Also famous as a backdrop for the films You Only Live Twice and The Last Samurai, it is an impressive castle. Unfortunately for us, the main fortress building is covered in scaffolding whilst various conservation work takes place, and it won’t be a few years until it’s complete. Cleverly they have turned the scaffolding into a feature, serving as a vantage point to see the building close up (several stories above ground level). Despite these efforts, I didn’t think the sight was as impressive as it will be once the scaffolding comes down.

Once in the gardens pictured above, we attend a traditional tea ceremony. This is a great experience but fraught with opportunities for cross-cultural faux pas. The tea is thick and green and unlike any I have encountered before, but tastes pleasant.

Posted in Uncategorized | Leave a comment