Bank Notes

Banknotes.com has different images of banknotes from all over the world. Get nostalgic while looking at some older non-Euro bank notes of the different European countries (eg Deutsche Mark, Belgian frank, and Dutch guilder).

Huge storms converge on Jupiter

The two biggest storms in the solar system are about to collide on Jupiter, in plain view of backyard telescopes. The Great Red Spot, and Oval B (aka Red Jr) are on a close encounter course around the 4th of July. There won't be a head-on collision, The Great Red Spot is not going to 'eat' Oval BA or anything like that. But the storms' outer bands will pass quite close to one another and no one knows exactly what will happen.

Storm #1 is the Great Red Spot, twice as wide as Earth itself, with winds blowing 350 mph. The behemoth has been spinning around Jupiter for hundreds of years. Storm #2 is Oval B, also known as "Red Jr.," a youngster of a storm only six years old. Compared to the Great Red Spot, Red Jr. is half-sized, able to swallow Earth merely once, but it blows just as hard as its older cousin.

Jupiter will be an interesting object to watch in the coming weeks. What will actually happen? We'll see, that's what telescopes are for.

Sucking XML in Perl

I'm working on some XML stuff in Perl, and took quite some time to explore the available XML parsers in Perl. There are quite a lot of them, so choosing the right one isn't allways easy :

* XML::Twig looks quite interesting and powerfull, but has quit a steap learning curve due to the imo cumbersome interface, espacially the twighandler stuff. Not intended if you want to do something quickly in Perl, unless you have the Twig experience.

* XML::Simple seemed a good tool so I started implementing using this module, but the performance is horrible : it took 14 seconds to parse a document around 3500 lines big, which took me straight back to the drawing board.

* XML::Parser was close to what I wanted, but the output was too cluttered, certainly if you're working with more complicated XML files.

* XML::LibXML is a module specifically built to corner some of the performance issues of XML::Simple, but it was built around the Gnome XML libraries, which weren't available on the HP-UX 11.11i server.

* XML::Smart seemed a great and intuitive interface for my problem. Unfortunately it isn't available in the default Perlmods, this could not be used. As it had quite some dependancies, installing it on the server wasn't an option.

There are also the SAX modules, but they seem more stuff you want to use when you're working in framework related stuff, and the SAX thing seemed too much of a burden to carry around (the program wasn't that big after all...).

So what did I do then ? As far as speed goes, the reality seems to be: a regexp-based, non-XML parser is going to be faster than a "close to the metal" parser (XML::Parser or XML::LibXML), which is going to be faster than a more convenient parser (XML::Simple, XML::Twig) which is going to be faster than a pipeline involving passing events througth various object-oriented layers (XML::SAX). So with that in mind, I implemented my own regexp based XML parser. It took to my surprise only half an hour to get it working, and was about 1500% faster than XML::Simple.

SIGUSR1

If there's on thing you can say about Unix, then it's the fact that it keeps on amazing you, even after years of usage. Here's a new gem I recently discovered :

When using dd to copy data between devices, it can take a long time to finish, even when using large block sizes. The dd utility doesn't report status information by default, but when fed a SIGUSR1 signal it will dump the status of the current operation :

$ dd if=/dev/zero of=/tmp/foo bs=512 &
[1] 7749

$ kill -SIGUSR1 7749
1038465+0 records in
1038465+0 records out
554904576 bytes (555 MB) copied, 8.79635 seconds, 63.1 MB/s