Archive for 2 November 2007

God Checker

Posted: 2 November 2007 in Uncategorized
Tags: , , , , ,

Norse and Greek mythology have always interested me. I’ve also had a bit of an interest in Egyptian mythology, but never pursued it in depth. So finding a good resource that makes finding about mythologies from all over the world really makes my day. Godchecker.com has a whole slew of mythologies including Aztec, Incan, Mayan, Australian, Baltic, and the list goes on. Quite cool.

A lot of the information, especially for the lesser known gods/mythologies is light, but if you ever wanted to know who the God of Passion in Eastern European mythology was, look no further. Yarilo arrived on a white horse and ready for action. Plus the site incorporates a bit of humor into the posts. For example, from the post for Apollo:

“Sudden deaths are not uncommon when he is around — and don’t try to compete with him musically. It’s all very well to be played alive but not flayed alive like poor old Marsyas. Or to be given the ears of an ass like poor old King Midas. CASSANDRA never got another chance either, nor was he very pleasant to the SIBYL-OF-CUMAE, granting her immortality but leaving out the age clause.”

So, fun and informative.  Good times.

Morning Madness

Posted: 2 November 2007 in Uncategorized
Tags: , , , , , , , , , ,

Ever get pissed twice before you’ve really even opened your eyes? This is why I shouldn’t read my RSS feeds so early in the morning. At the top of the list is Bush equating Democrats who oppose the war (as if it could be called opposition, anyway) to those who ignored Hitler and Lenin and then Hillary firing back. Am I mad at Bush for making this analogy? No and I think he’s correct, but not in the way he thinks. I’m more angry at Hillary for firing back and not recognizing her own culpability. The Sheepocrats sat back and did nothing four years ago when this war began and passed the Patriot Act before that. They have endorsed the war at every stage since and even their current so-called opposition is luke-warm and putrid with its weasliness. So yeah, they are like people who ignored the rise of Hitler and Lenin. If she had recognized that and said it publicly, it would have done her credit.

 

Next up, I was reading a few bit twiddling hacks and came across a nice one for branchless absolute value [hat tip]. The hacks are all in the public domain, too, so that’s good. He does list the occasional variation that is patented, an enormously helpful fact if you’re producing commercial software. So here is the patented version of the branchless absolute value:


int v; // we want to find the absolute value of v
int r; // the result goes here
int const mask = v >> sizeof(int) * CHAR_BIT - 1;
r = (v ^ mask) - mask;

The last ^ (XOR) – (subtract) combination represents the patent. What works also?

r = (v + mask) ^ mask;

As Sean points out, though, the patent probably could be contested if the holder (none other than Sun Microsystems) ever tried to enforce it. So what ticked me off is that such a thing could be patented. I raise my hands in impotent fury at the ludicrousness of software patents. I don’t blame the inventors for them, it’s something you pretty much have to do these days. I blame the system that makes that true.

Update

Did some benchmarks on the two versions of absolute value given above.  Using a 3.06GHz processor, I could run 4 billion absolute values in 18.916 +/- 0.021 seconds for the patented version and 18.906 +/- 0.026 seconds for the free version.  So no need to even bother with the patented version it looks like.

Dog Obsession pt. 5

Posted: 2 November 2007 in Uncategorized
Tags: , , , , ,

Donna wasn’t feeling well today so I took the dogs to the dog park solo — a very rare act for me.  Despite some initial social anxiety, it didn’t go badly.  Autumn is really starting to kick in, though it hasn’t peaked yet.  There are still plenty of green leaves on trees.

My dog Willow on a trail in the fall at Frick Park in Pittsburgh

View of the South Hills from Frick Park in Pittsburgh during the autumn