Thursday, October 30, 2008

Battlestar Galactica restarts "soon"

Can't wait.
And check out some hints for the up and coming final episodes.

Incandescence

I just finished reading Incandescence by Greg Egan.
As always, Egan writes with his hard-core knowledge of physics. You simply can't expect to understand everything unless you're really enjoying that third year degree subject right now. The core part of this book is about a pre-industrial race working out some of the details of the theory of relativity from observation and low-tech experiment.
It really is very cool. The other half of the book fills in some culture and technology for the rest of the galaxy, and could probably be an interesting backdrop for many SF novels, but that isn't how Egan works. The contrast between the halves is stark, and you are left wondering how that will be resolved right up until the end. Which I won't tell you about except to say I didn't find it very fulfilling.

Tuesday, October 28, 2008

variable argument lists

I found an interesting problem with using var args today. When you implement a function that takes a variable number of arguments, you have to use a nasty little function called va_start() which gets a pointer to the first of the variable arguments that was passed on the stack to the function. See code below. In order to do this, you pass to va_start() the argument that was just before the variable arguments passed, in this case a const MyObj&.
I found that this just caused the user of the va_list to crash.
It turns out that you can't use an object reference like this, because the sizeof mechanism that determines how far to advance the pointer past the parameter thinks the parameter is as big as the object, where it is really just a reference to that object.
Solution: Pass a const MyObj* or a MyObj by value. In some functions, you could arrange the order of params so that a pointer or value is next to the var args.
Nasty.

void doStuff(const MyObj& details, ... )
{
va_list args;
va_start(args, details);
//use args
va_end(args);
}

Monday, October 27, 2008

Awesome weekend

Wow- what an awesome weekend.
Friday was my birthday, thanks to all the well-wishers! I bought some geeky t-shirts from here, to celebrate.
Saturday, we dropped the kids off at my Dad's place and then went to Andrew's wedding. That was really cool. Andrew showed a brilliant video of himself (and others) instead of doing a speech.
Sinead and I stayed in a hotel afterwards. No kids. Whooo-hooo!
Sunday we relaxed, eventually went and picked up the kids and had a Thai takeaway for dinner. It just doesn't get much better :_)

Wednesday, October 22, 2008

Free Nappies!

Free sample at ecodirect.com.au, and check out the sunscreen while you are there.
OK, a little gratuitous, but links is links :_)

Sinead's business is going well. I've just been over to check on the backup system I've just put in place. I have a RAID 1 NAS set up, sending it daily backups at night.
I used a Lacie 2big Network. I've one issue so far with the windows share on it disappearing, but it came back with a reboot, so I'll have to keep an eye on it. But it looks pretty!

Thursday, October 16, 2008

Half-Orc to Centaur in three Easy Steps

I am mourning Moag as a Half-Orc. Moag as we knew him is dead. The party faced a room full of some real nasties on Wed night, player-time. One such nasty was a Grell, a brain with tentacles. With a brain that size, you just know it is going to cast spells and be, well, you know, clever and stuff. Moag battled bravely, and even thought he had it cornered, seemingly trapped in a small room, silenced by Vim, co-adventurer. But the Grell was too clever, and found a way out of the room, where it could cast spells, and viciously pointed a tentacle back at Moag and cast Disintegration. Moag was instantly turned to a small heap of ash. Moag was suddenly gone.
Later, as the party was back in town, carrying a small bag of ash, counting their coin, and looking at options, they remembered that they had a very special magic item. This magic item can turn back time itself, and if used within a few seconds of Moag's death, would have brought him back, and tactics could have been revisited. Only, back in town, many hours had passed and the party as one, thought "ooops".
Then the party realised that in order to perform the less expensive version of Resurrection, Raise Dead, you actually need the body whole. And the better spell Resurrection, which does not require a body, was waaay too expensive.
A final option remained. They Reincarnated him.
Moag returned as, yes, a Centaur. Weird, but actually not bad strategically as a fighter as Centaurs are really strong. Moag lives, but lives hating orcs, as Centaurs do, which is really disconcerting for Moag as Moag's mother is an orc.

[Update]
Looking for a picture of a Centaur? I've pulled it. Too many hits.

Monday, October 13, 2008

Evolution is Over

Evolution is over apparently.
Actually, I used to agree with this but for a different reason than is discussed in this article. The article suggests that evolution is slowing because, among other things, older guys aren't having children as much - especially in the West, and it's older guys that produce the mutations required for beneficial changes to be selected. Sounds plausible. I would have thought that modern medicine would have been the largest contributor, simply by allowing those who would have otherwise died to live and reproduce. It isn't survival of the fittest anymore. Its survival of damn near everyone.
I say I used to agree with this, but I guess I should say that I have broadened my definition of evolution to include technological as well as biological evolution. Evolution hasn't stopped, it has found a way to work even FASTER. Biological evolution got us to the point where we could used tools, and record information, and that was enough to boot-strap the technological phase of evolution. We don't need biological evolution anymore, technology is changing us far more, and far more quickly than biology has/will. Have you noticed the computer that 20 years ago was in the study, is now in your pocket? Where will it be 20 years from now?
Behind your eyes.

Thursday, October 9, 2008

Capacity

Just finished reading Capacity by Tony Ballantyne.
This is good science fiction but not for the usual reasons. OK, it has plenty of cool ideas in it, but there's something disturbing going on. It's close enough to a lot of other science fiction environments, that you don't notice at first, but the differences start to get more creepy as you read. Also, I found it quite hard to decide who to side with at times. I wasn't quite sure which side was going to triumph. You should note that this is book 2 of a trilogy, so perhaps things would have been a bit different if I had read the first book, Recursion already. Ah well. The novel stands by itself and I'll now be reading the other two...

Peggle Nights

Seriously, this game is fun. Its like a reverse version of that C-64 game (what's it called?) only with less skill involved. And that's probably a good thing.

Tuesday, October 7, 2008

The Godfather

Sinéad and I sat down and watched all The Godfather films over the weekend. I've wanted to see these for quite some time, just never managed to do it. They were quite good I suppose. I think a lot of the impact was probably lost because I have sat through all of the Sopranos. I really enjoyed seeing the very young Al Pacino and Robert De Niro at work. I also picked Robert Duvall who I recognised from Days of Thunder. That's just tragic, I know. I also picked Sofia Coppola (director's daughter, oooooh!) in part III. I thought she was ok! Apparently, her acting was widely panned in this. Part III was probably a bit over the top with all the super corporate empire and Pope shenanigans. The first one is cool. Ah, Marlon Brando.

Laying a floating floor

I finally got round to laying the floating timber floor in the den (rumpus). A lot bloody harder than it looks. Sure, click clack, front and, um, sides. Sawing the timber for the ends wasn't too bad, the worst part was trying to get each row to join correctly with the previous one. First you lay out a row of boards, end on end, and measure and cut the last one to suit, and then hammer them end on end so you have one long piece that stretches the width of the room. Then, with much cursing at first, angle the boards so the close edge of a row dips its interlocker tongue into the next row's groove. Sounds sexy? It's bloody not. Fernickety damn son-of-a sweaty frustrating muscle aching pain in the ass. Here's some photos.

MapReduce

Google's MapReduce infrastructure is the backbone of Google. They use it for loads of stuff, most importantly, building their search index. Here's a video high level description. Wikipedia has some good info, but the Google white paper has real detail.
Sounds elegant and powerful.

Wednesday, October 1, 2008

Mediagate MG-45

The digital multimedia player, Mediagate MG-45 turned up today. Wow, it was so easy to plug in and use. LAN and power in, video and audio out to my TV and amp. Remote control. Bam. I'm watching a downloaded DivX on my TV, from the couch. The DivX is where I downloaded it on a shared drive on my PC. It just works. It also plays music and shows photos. $179. Not using the mouse, priceless.

Physical media is dead.

statcounter.com

I recently added page hit statistics from statcounter.com, you can see the counter down the bottom right of the page. All you see is a hit count, but I get a load of detailed statistics. It's so cool and unbelievably detailed given that it is free!
Check this out. Yesterday, for example, I know that someone from Chicago, Illinois, was searching for "drinking blackouts" on google.com, and found a reference to my blog entry, Of Blackouts and Drinking, and clicked it. I'd say this person was probably very disappointed, but I don't have to guess because I also know the visit lasted less than 5 seconds. Heh. I also know they were using IE7.0 from WinXP and rendered the page on a 1024x768 display. I also have the IP address and their ISP name. Now it's getting scary.