• Migrated this blog to Jekyll from Wordpress. Using occasion enjoyed reading my posts from the past several years.

  • Sorting Chinese characters

    Recently we decided to localize country selection list at work and there was some confusion about how to sort Chinese characters. I asked my wife and she told me that sorting by pinyin is seems most reasonable to her. So here’s how to do it in Perl:

  • View on Putrajaya

    View on Putrajaya

  • ZeroMQ Rant

    Today deployed at work a new service that based on zeromq. I never liked zeromq because it does not provide any feedback about what is going on, and this is exactly what caused problems. After deployment service worked as expected on all servers except one. Daemon was starting, creating zeromq socket and waiting for messages, but zeromq did not establish connection and of course did not report any errors – it is supposed simply work, and if it does not… well, it will pretend that everything is fine, zeromq developers assume that it is better to do nothing than return an error or at least print some warning.

  • Cameron Highlands. Sunset.

    We spent four days in Cameron Highlands in December. Here are photos of sunset I took from balcony of our hotel room.

  • Packing timeval

    Recently I got a lot of failures from CPAN Testers for RedisDB on NetBSD i386. After investigating a bit I’ve found that NetBSD 6.0 comes now with 64-bit time_t on all architectures. It means that the way I used to pack struct timeval value to set timeout on socket, didn’t work anymore. Previously it was the same as long, long on all systems and pack looked like this:

  • Memory leaks

    Spent the whole day looking for sources of memory leaks. One of them was because I decided to use named captures. It so happened that perl leaks some memory if named capture doesn’t match. Here’s an example:

  • Uploaded RedisDB 2.00 to CPAN yesterday. It features XS parser which improves performance about 25%. It still loses to Redis::hiredis in pipelining mode, but in synchronous mode it is faster.

  • A point on a map

    Three and a half years ago while playing with maps on my then new Nokia 5800 I marked McDonald’s somewhere on another side of the planet. Last month I ate double quarter pounder there, it wasn’t that far after all.

  • Installed CyanogenMod onto my HTC Desire. It feels like a new phone now, and it takes less memory, so I was able to install some additional applications. The only problem so far is that I have lost handwritten Chinese input, which was a very useful feature.

subscribe via RSS