Monday, November 30, 2009

Sun C++ compiler precompiled headers implementation sucks.

I'm using the Sun C++ compiler (Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12) on Solaris (5.10 Generic_141444-09 sun4v sparc SUNW,SPARC-Enterprise-T5220) for work.

I noticed that the compiler supports precompiled header files recently, and thought, great, this is going to speed up compiling enormously. For a given C++ package, compiling on Windows under VC9, the time taken decreases from 55 seconds to 22 seconds when precompiled headers is enabled. That is a significant difference, and well worth the effort of setting it up to work for you.
On Solaris, without precompiled headers, this same package takes 2:30s to compile. OK, it's an older machine, but when precompiled headers is turned on (-xpch=autofirst), the time taken, incredibly, increases slightly to 2:40s. I mean, seriously, WTF!?
With some more digging, I work out that the Sun compiler's implementation of pchs is infantile. They just collect up the postprocessed code from the headers and lob into one large file. There is nothing precompiled about Sun's precompiled headers, If anything, it's preprocessed headers. And it has to be implemented badly to take longer! Sheesh! Even the link above shows a minimal improvement for a really simple case.
Get it together Sun! Oh, right, Oracle is buying, and they probably care less.

Wednesday, November 25, 2009

Primer

Speaking of Time and Space, you seriously have to watch the film Primer. Don't read the plot on the wiki page before you see the film though, you should watch the film totally flat.
It's about time travel, and is incredibly complicated. Even after watching it twice, I still hadn't worked out the last 13 minutes. "What the bloody hell just happened?". And this is the point of the film, to feel very confused. And the last 13 minutes is the explanation, if you don't get it, you've missed the depth of what has been going on. But that's ok, you're not supposed to understand the first time. I think re-watching the film to understand the events nicely mirrors the time travel in the film.

Watch the film, maybe a couple of times, and then go and read the timeline explanation here.
Brilliant.
Like many things, this came to my attention via XKCD.

Splitting Time from Space

Here's an interesting article discussing a recent theory of gravity by Petr HoĊ™ava. I particularly like the way it can explain dark matter and dark energy without requiring some new exotic particles that we can't prove exist. I've always been very sceptical of dark matter and dark energy, particularly the latter which looks very much like a problem with the model.
More here.
His home.
Another article.
Hmmmm.

Sunday, November 22, 2009

D&D campaign progress

Ive been working on my D&D adventure recently as Andrew will finish running Call of Cthulhu soon so I need to be ready to start probably in February, it looks like. I've finished plotting all the levels, rooms etc and have written basic flavour text for all of them. I've just started working on mechanics and details for traps and required skill checks etc. I've recently received my copy of the Pathfinder Bestiary too, so I can start filling the place with wildlife as well. That's always fun. Then I need to add the treasure and magic items etc. Some of the later stuff can wait until the adventure is underway of course. Hopefully the players will find it fun. Mostly that means a decent challenge and believable. Hopefully.

LHC completes full beams

The LHC team just completed testing of the circulation of a beam in both directions. Apparently it looks good. I think the idea now is to slowly ramp up in speed and duration of beam to make sure everything is going well.
More detail here.

Saturday, November 21, 2009

Stupid Impact

I watched what is perhaps one of the most stupid science fiction films of all time last night. It was on commercial television, so I suppose I'm really just asking for it.
It was called Impact. I don't care if it is just low budget and made for telly. There is no excuse for plain stupid science mistakes. The main premise of the film is that some super dense asteroid hits the moon, and lodges inside it, making the moon weigh twice as much as the Earth. This asteroid was later shown to be a piece of a brown dwarf. Seriously, there are so many problems with this it is in the same realm as Space 1999, only this was made in 2008! Complete and utter bullshit.
Most obviously to me, anything that weighs around twice as much as Earth and is the size of an asteroid, hitting the moon is just going to punch straight through like it's made of cheese. Conservation of momentum isn't going to see this chunk of superdense rock travelling at interstellar speed slow down anytime soon hitting something one twelfth as massive, especially when it's so much smaller than its target. Bullet through cheese.
Secondly, a brown dwarf is something half way between Jupiter and a star. It's not even a star. I think they probably meant a white dwarf. At least it has a super dense core, and could at a stretch be responsible for the thing in this film. This shit reminds me of Jennifer Anniston in a hair product advert saying "Here comes the science!". Hey, Writer, you suck!
The film progresses from here downhill with random gravitational fluctuations, "like electrical storms", where gravity is practically reversed on the Earth's surface in selected small areas. That's just plain crap. I can't be bothered going on any more. Of course it ends with them trying to blow up the moon, *sigh*, splitting it in half, allowing the super dense asteroid to escape to the Sun, and the two moon halves magically going back into a proper orbit. Oh yeah, I didn't tell you about the gross abuse of orbital mechanics in the film either. Watch it if you want.

Tuesday, November 17, 2009

Really old whiskey.

They're going to dig up some really old whisky from under the ice in Antarctica. After a hundred years, frozen, in glass, I doubt they'd be that interesting to drink. Probably hasn't changed much, and it isn't clear if its a single malt, a blend, or how long it was aged in the barrel.

Dollhouse is done.

It's all over folks. It's done. Nine episodes to go.
Ah well, some of it has been really good, othertimes just a little bit crap. I'm looking forward to see how Whedon finishes it off.

Thursday, November 12, 2009

How to Survive a Robot Uprising

Just finished reading this.
Very Boring.
Half the book(let) was robot facts, the other half was how to thwart an imaginary aggressive robot using said facts. The book is interleaved, fact, followed by attempted humorous discussion of thwarting robot knowing this.
For example, a robot using a thermal imager to seek and destroy you could be thwarted somewhat by smearing cold mud all over yourself as you flee for your life.
The book is supposed to be in the humour genre, however, its really of the roboticist-telling-you-about-robots-and-trying-to-be-funny-and-failing genre. Which sucks. Quite frankly.

Tuesday, November 10, 2009

Hardwired

I've just finished reading Hardwired byWalter Jon Williams.
This is a great cyberpunk novel, written in 1986 when cyberpunk was at its peak - Gibson's Neuromancer was from 1984, and Count Zero was 1986. This is a real cyberpunk novel as well, it's not just a wannabe, it has the hackers, AI, large corporations, fantastic drugs, body enhancements, and recent past massive social (and geopolitical) upheaval. It has beautifully written text, full of imagery born of technology. It has gruesome fights, deaths, and ghosts in the machine. It is paced well.
I just loved the panzers. These are mil-spec hovercrafts travelling at 200mph, bristling with gattling guns and heat seeking missiles, reinforced with armour that lets them blow through just about anything in their path. Great fun.

Monday, November 9, 2009

Cian's DSTT

I finally got Cian's DSTT working properly. It's been a bit of a saga really.
I ordered this thing along with a 4Gb MicroSD card, and with the DSTT comes free, a USB MicroSD reader.
Now I suspect that my problems all started with the shipping of these three items from the dodgey online store from which I ordered it. In fact, the store's website isn't even loading as I type this. The Dodgey Award givewaways are:
  • all three components ship to me loose, in a standard envelope
  • none of them are wrapped in boxes, plastic, foam or even bubble wrap, but are directly exposed to the care and attention of Australia Post directly. [The microSD card shipped inside the USB reader, which is probably better than loose, since it is the size of a small finger nail]
  • the address was hand written on the envelope in writing clearly more used to writing chinese characters (it is amazing how you can tell this, isn't it? BTW - its the very badly hand-written part that's dodgey, not the chinese hand, the Chinese rock)
  • the microSD card ships with a load of pirated games on it (complain, me?)
I open the envelope on arrival, and my shoulders are already slumping, this is not a good sign. First, I put the microSD in the DSTT and then into the DS Lite. It actually friggin works! For about a minute. And then then it has problems loading occasionally. And then it has problems loading games ever.
I tried putting the MicroSD card in the reader, and the USB reader in the PC, and the PC can't see any files, and tells me I need to format the files system.
I send back the USB reader, as it wasn't until the next day that I see loading problems on the DS. Anyway, they happily send me another reader to try, a different brand, also loose in an envelope. This reader allows me to see files, but will only allow transfer of files for ten seconds before off-lining itself.
At this point, Cian loses the DSTT and MicroSD card, and a week later we find it under his car seat. *growl*
I send back the reader and the MicroSD card, and they happily send me another of each, a third brand of reader. Loose, in an envelope of course, even after explicitly asking them to send the gear in its original packaging. *sigh*. This time, I can read and write the files on the card happily, and the DS can play the games on there, no problem. Occasionally, it can't load games, but mostly it is now all working. Way more trouble than $40 is worth. Don't use this website.

Wednesday, November 4, 2009

Karmic Koala upgrade problems

I think maybe I'll wait a while before upgrading my Ubuntu 9.04 to 9.10 (Karmic Koala). If only 10% of upgraders are getting a good experience, I'm just not going there for at least a month. OK, the Windows 7 upgrade took 12 hours to complete, and that was the fourth attempt, but I'd rather multiple attempts with flawless rollback than being stuck with an OS release with graphics drivers issues.

Monday, November 2, 2009

Windows 7 Upgrade Finally Completes

You may know I had some initial difficulties upgrading to Windows 7. As it turns out, mostly, I just wasn't patient enough. Apparently 5 hours just isn't enough time, and it doesn't matter if the PC appears to be doing nothing, you need to be patient!
I went camping on the weekend, and decided to give the upgrade another try and let it take its own time while I was away. It had 48 hours, and that has to be patient enough, right?
The bad news is that the upgrade was still going when I got back on Sunday. Seriously! But ok, the good news is that it had stopped at a very well known point with a documented hang. The old 62% point. The log showed that it had taken around 11 hours to reach this point, even with my recent hardware upgrade!
I think the 62% metric is really just a Microsoft stab in the dark, because I followed the KB article fix, restarted the upgrade and forgot about it for another 12 hours or so.
And this time, it worked. I'm writing this from Windows 7. Yay.
No other serious issues encountered. I needed to upgrade VMWare Workstation to the latest version. No big deal. Everything else just worked - Ubuntu domain login included.