I've crufted together version 0.1 of my blog thing. It's crufty in the extreme, and I need to split out each entry into a separate file really, and have just the few most recent ones on the front page. Still, this generates some XHTML, which RXP says is valid, so it's a start. All in Perl of course, although it isn't the most tasteful Perl I've written.
At work: today I have been mostly writing reference counting smart
pointer classes and dicking with auto_ptr.
I also enjoyed splitting apart the two stages of object creation
(allocating memory and calling a constructor to turn it into an object).
You have to call operator new (which isn't the same as the
‘new operator’, of course) to allocate memory, and use
‘placement new’ to call the constructor. For example:
// Allocate enough memory to hold a 'string', but don't // initialise it. This is a 'malloc' in sheep's clothing. void *memory = operator new(sizeof(string)); // Call some constructor string::string(...). We have to have // another form of 'new' to do this, because the constructor is // far too 'special' to be called directly without fiddling around. string *s = new (memory) string("hello");