Even though I started programming more than 16 years ago and got to used to several different programming languages in the meantime, this is the first time I came across the behaviour shown below.
Assume the following piece of code:
int main(int argc, char *argv[]) {
int x = -2;
unsigned int y = 10;
std::cout << (x * y) << std::endl;
std::cout << (x - y) << std::endl;
}
I’d have expected something like
-20
-12
but instead it returns
4294967276
4294967284
Obviously, this is a type casting issue. Well, more a kind of peculiarity caused by the C/C++ type hierarchy: The signed integer is promoted to an unsigned int, causing the whole calculation to be handled this way. Nothing new but quite interesting for me and some colleagues, though :)
For more information in C/C++ type casting issues, have a look at the following web page: http://www.learncpp.com/cpp-tutorial/44-type-conversion-and-casting/
Using chained SSL certificates with Cherokee is quite simple: Given you decide in favour of StartCom/StartSSL, download their intermediate CA certificate (Class 1, Class 2, or Class 3) and append it to your signed certificate:
cat your-cert.crt.pem sub.class2.server.ca.pem > your-chained-cert.crt.pem
and pass this new file as the server certificate.
All services will be unavailable between 2010-05-10 (22:00) and 2010-05-11 (08:00) because Hetzner reorganises their infrastructure.
This server will be moved to the new Hetzner Online Data Center Park in Falkenstein/Germany and hopefully be available again on Tuesday morning — I won’t be available so I’ll take care of some replacement admin just in case something goes wrong :)
Edit 2010-05-04: Due to some other issues, we had to switch over to a new server. Hence, we expect no further downtime.
In his blog, Nigel McNie provides a nice hands-on introduction to LXC. Along with this, he provides us with a set of scripts that do the work quite nicely. I cloned that repository and added a script for Ubuntu Lucid. It’s quite handy to me, supposedly also for somebody else out there?
A git repository is available at GitHub: http://github.com/phbaer/lxc-tools

RoboCup German Open 2010
It took a while but I finally managed to upload the pictures we took during the RoboCup German Open 2010 in Magdeburg. Just as usual, they are available in my gallery.
Actually, these pictures show only what happened during the weekend; I joined them on Saturday. We (they) finished just as every year, ranked fourth. No matter, have fun! :)