Yeraze's Domain 3.0

Supercomputers, Programming, and Life in Mississippi

Entries for August, 2006

Python: The Right Way and the Wrong Way

As you’ve probably noticed by now, I’ve been trying really hard to learn Python and work it into my daily coding rituals.  It’s a popular language with alot of potential, but I’ve unfortunately ran into some problems with it.  Most of my issues have been related to the poor execution speed.  I expected, since Python is interpreted, that it would be slightly slower than native C code but not terribly so.  Sadly, I’ve seen performance hits of 3x-10x of Python code over C code (using VTK).

It’s been a bit disheartening.  It’s so quick to develop that I’ve got a nice collection of little scripts to work with VTK.  Since VTK is all C, the performance penalty is negligible.  But start to do anything that’s pure python and suddenly the performance plummets to simply unworkable levels.  Just yesterday I was presented with another one of these, but thanks to Viraj I learned a valuable lesson:  While there may be more than 1 way to skin a cat, there is 1 way that is far superior to the others.  Unfortunately, it’s the most obscure way as well.

Read on for the details…
[tag:python][tag:sourcecode][tag:vtk][tag:performance]

Disfiguring Accident

This weekend I had a horribly disfiguring accident.  There were witnesses, and people are still commenting on it.  I’m sure, with time I’ll get past it and everything will return to normal.  What happened, you ask?

I got paint in my hair.

Not just any paint, mind you… Kilz Oil-Based Primer.  I was painting with it Friday night and I’m still pulling little white specks off of my arms and hair.  This stuff is persistent.  Not to mention noxious, once I had 3 walls painted Friday night I nearly passed out I was so dizzy.  And to think, people go buy illegal stuff like marijuana and LSD when all they really have to do is crack open a can of Kilz for the same effect.  I wonder if you can get a DUI for an open container of Kilz?

Anyway, now that we know it’s a Boy on the way I couldn’t put it off any longer.  With Laura’s directions in hand I spent the weekend rearranging the house and painting 3 rooms.  The gray study became the new blue boy’s room, Rhianna’s pink room became the new green guestroom/study, and the dark green guest room became Rhianna’s new pink room.  It’s pretty, and bright.  I never really believed the old adage that bright colors make a room look bigger, but now that I’ve seen it in action it’s true. 

So I spent Friday & Saturday doing that, and Sunday was spend mowing my lawn (far overdue).  Took all morning but I got it done.  Now I’ve just got to get the paint off my hair before the jokes about grey hairs start.
[tag:home][tag:family][tag:painting]

And the new baby is……

It's a BoyIt’s a boy! 

That’s right, now I have the complete set.  Not only that, I have someone to carry on the family name, which I’m sure will make everyone happy.  Not to mention, take some pressure off. 

On a bad note, tho, that means I can’t punk out on rearranging the house.  Can’t have Rhianna and the new boy together in the same room, and can’t have him wearing all her old pink clothes.  So it’s time to restock and get all new stuff.  I’ve also got to play musical furniture with Rhianna’s room, the study, and the guest bedroom (Move Rhianna to the guest room, move the guest room & computer room into her current larger room, and prepare the computer room to be the new nursery).  New paint all around, as well.

Any suggestions for names?
[tag:family][tag:baby][tag:boy]

The Dancing Wu-Li Masters

I just finished reading Gary Zukav’s The Dancing Wu Li Masters. It’s a book about the “new physics”, meaning Quantum Physics, and it’s similarities to eastern mysticism and religions. It’s a fascinating read and covers everything starting with Newton and his discoveries in physics, all the way through to Bell’s Theorem and Quantum Particle Theory. It stays pretty light with the math (thank goodness) but discusses alot of the theories and how they were discovered. Some of it seems pretty preposterous by modern comparison, like the “Ether” experiments and such, but alot of it is truly eye-opening.

Perhaps the biggest thing to take away from the book is how physics is becoming less and less like how we are traditionally taught it. Things like The Law of Conservation don’t really apply as rigidly as we once thought, and have now been replaced by 12 laws that apply to various aspects of reactions, and even they don’t apply all the time. The other thing to realize is that Quantum Physics is not an absolute explanation of processes like Newtonian physics, but rather a way to explain the results. What actually happens in the middle is a mystery, quantum physics just gives you a way to predict the result (in a large statistical sort of way). Overall, the final thrust of the book is that human logic and language are incapable of describing the way the universe works, but are capable of an inner experience of how it works. At a glance, it’s very similar to the “enlightenment” of eastern religions, and perhaps that’s no coincidence. It’s a fascinating read, and has definately got me wanting to read more.

Which is a good thing, since this book was published based on a talk in 1976, and is therefore missing all the latest advances like String Theory. I’m definately going to have to look around and try to find a newer book, and the Wikipedia entry has some good suggestions.
[tag:quantumphysics][tag:physics][tag:book][tag:dancingwulimasters][tag:zukav]

Snakes on a Plane

Remember when you were a kid and the teacher would tell you something, and the first response out of any kids mouth was “Well, what if <insert preposterous scenario here>”.  Usually you were met with a befuddled “How could you possibly come up with something like that?” expression, or even the ageless “We don’t do what if’s“.  The game usually degenerated into a contest between two similarly aged participants to see who could come up with the most outlandish scenario.

Snakes on a Plane is the result of such a contest.  Now, I won’t go so far as to say it’s a good movie, but it’s definately a fun and entertaining movie if you’re in the right mindset.  The movie has pretty much every single embarrasing “What if a snake bit you <insert anatomy part here>?” acted out in gory detail.  The acting isn’t fantastic, especially the pilot who, in any real-world scenario, would have long-since been fired for sexual harassment.  But even with it’s faults, it’s a fun movie.  It had a few good scares (snakes jumping out of vents and such) and a lot of good laughs.  It’s got a little bit of gore, but not excessively so.  It does have nudity, but only one scene that I recall.

So all in all, it’s a 50/50 shot.  If you’re in the mindset of action/humor and not horror, then you’ll enjoy it.  I can only image the fun the guys behind MST3K (Now doing RiffTrax) would have with this.

[tag:movie][tag:snakesonaplane]

Fun in Leesburg

So I’ve spent the weekend here in Leesburg, VA hangin out with Patrick and Russ.  It’s been, oh 4 years since we last hung out so it’s been alot of fun.. What all did we do?

  • Quick bit of D&D 3.5.. New to me, an old 3.0 player, but the Warlock is a pretty fun class.
  • Half-Life 2 – Patrick hadn’t played it yet, and now you can get a nice combo pack of HL2, HL2: Lost Coast, Counter Strike, and HalfLife 1 remade with the Source engine, for $40
  • Little bit of Prey
  • Snakes on a Plane . Yes, we saw it.  I wouldn’t go so far as to say it’s “good”, but it’s definately entertaining. 
  • Waiting - Frickin hilarious man…
  • Coupling - a Great BBC Comedy in the vein of Friends, but 100x better.  Patrick has seasons 1,2, & 3on DVD..
  • Mongolian BBQ at a place called “bd’s”

And today, with a bit of luck, we’re gonna head into DC & do some of the touristy stuff.  We’ve been told that we might even get a tour of the Capitol Building & maybe the house floor (yipee for Marcus/Nickie!).  So it’s been a great trip. Catch a flight home this afternoon, and get to spend a night in my own bed.  Sleepin on an air mattress and all is ok, but can’t compare with a real bed.  Plus I miss Rhianna & Laura, so it’ll be good to be home.  And tomorrow’s adventure:  Laura’s Sonogram
[tag:travel][tag:leesburg]

My First Flight in the Post-"Hair Gel Bomber" age

So today I boarded a flight from JAN to BWI for a business trip in DC this weekend.  I had a 2 hour direct flight on Southwest Airlines, and this was my first flight in the new age of “no liquids or gels” so I was pretty nervous about what was going to happen. 

Much to my surprise, it was a pure delight.  I checked one large suitcase and carried on all my toys (Laptop, iPod, Camera, etc).  For the last several years I’ve flown all carry-on, but there’s a strange relief in checking the bulk of your luggage and not having to drag it around with you.  They didn’t have any trouble with me bringing a pack of gum along with me, and everything went smoothly.  I managed to get an entire row to myself so I had plenty of space to stretch out.  The employees are great compared to other airlines, and unlike other certain airlines they actually hand out Roasted Peanuts, snack bars, and drinks to passengers.  Everything was on time and I didn’t have a single bad experience of the whole flight.  It was a real surprise.

So right now I’m sitting in the hotel awaiting tomorrow.  It’s a Hilton, but undergoing some pretty extensive renovations so it’s a bit of a mess.  But my room is nice and cold, and I’ve got free wifi so it’s all good.  Tomorrow is the “big day”, and then I’m crashing the weekend with Patrick.  Hopefully get some fun touristy things out of the way .
[tag:flight][tag:airplane][tag:southwest]

Prey

(Updated 8/15/06, at the end)
This weekend I got my first taste of “Prey“, the new game from 3D Realms. (Yes, the same company behind Duke Nukem Never.. I mean Forever). It’s a first-person shooter that tells the story of “Tommy”, a Cherokee Indian, who finds himself as the unwilling savior of humanity when “The Dark Ones” return to cleanse the earth.

The game is very rooted in Cherokee Mythology (so it claims) and borrows from it extensively (so it claims). As an auto mechanic, you’ve essentially shrugged off everything to do with the Cherokee nation except the dark skin, and any attempt to get you to believe in it results in profanity. Of course, when the aliens come and kidnap you and your girlfriend, you start to think maybe it’s not so wacky afterall when you can walk through walls and find yourself invincible.

The gameplay is pretty good and the AI is respectable (easy to make AI for an alien race you know nothing about, I guess). There are no cut-scenes, everything is rendered ingame with their engine. The game is rather dark but they give you a lighter to help you through (Similar to a flashlight, but with a short-range ambient effect, instead of a directed effect). Starting off with nothing but a pipe wrench you beat your way through the alien hordes finding more and more unusual alien weapons. Of course, you can think of them as “the rifle”, “the snipergun”, “the machinegun”, “the grenade”, etc. It’s pretty standard FPS fare.

There are, however, a few things that make this game unique (The fact that there is more than 1 thing in this list is impressive enough):

  1. Portals While not quite as slick as Narbacular Drop or the Portal preview, it’s pretty impressive. The portals are static (you don’t control them) but show all the same features. It’s a bit unnerving to walk past a small box on the floor only to find that there’s a portal inside to another room. Also, portals are only visible from 1 side, and have 0 thickness. This leads to alot of puzzles which are simply “find the portal”. The transitions are perfect, completely seamless, and offer an interesting gameplay mechanic.
  2. Spirit Form You have the ability to separate your spirit from your body. While this sounds cheesy, it’s a requirement for several situations. The spirit form leaves your body unprotected (in a levitating trance-state), but the form itself is invisible to electronics and capable of passing through some forcefields. This creates several scenes of “open the door, see the 10 automated turrets, switch to spirit mode, turn them off”, as well as “see forcefield, spirit form through forcefield, deactivate”. Also, some areas are only reachable through spirit form as certain bridges and things can only be seen then.
  3. Gravity Puzzles In several rooms there are buttons on the walls (and ceiling and floor) that change the direction of gravity. This is used to reach alot of impossible areas, like hallways at the top of very tall rooms.
  4. Electric Walkways Small sidewalks that snake along the walls and ceilings. You hear the sound of metal clanking (Magnetic Boots?) as you walk on them and you can follow them all around. But if you jump or get knocked off prepare for a confusing ride as gravity remains normal and you fall back to the “ground”.
  5. Invincibility You basically can’t die. Any time you die (health hits 0, fall off a cliff, etc) you find yourself in the “spirit realm”. About 15 seconds of target practice later you’re back in the action right where you left off.

All of these together make for one really wierd game. They also make for a very nauseating experience at times as you walk through a door and find gravity in that room reversed, or 90-degrees offset. Same thing for portals. I’ve already had to take several breaks to settle my stomach, so if you’re DIMS prone beware. The story is a bit lightweight, most of the time I don’t really know why I’m running down a hallway killing aliens other than “because it’s there”. All that said, the new gameplay mechanics (gravity, portals, etc) make it worth checking out.

It’s no Half-Life 2, but it’s worth the $50 if you enjoy first-person singleplayer shooters.
[tag:game][tag:pc][tag:fps][tag:prey]

Update 12:13am:

If you have any experience with Flight Simulators, be prepared to be extremely frustrated with the vehicular controls (spaceships). When you transition from FPS to Flight-sim, the same navigational controls apply. Unfortunately, so do the same constraints (90 degrees up and down viewing) leading to some nasty gimbal lock problems.

Update 8/15/06 9:00pm
3 Days… I started on Sunday Afternoon, finished it Tuesday night.  I think we’re talking somewhere in the 6-8 hour range.  Short, but fun.  The story does get much better toward the end, although I don’t really understand the ending.

The End of the Friendly Skies

Unless you’ve been hiding under a rock for the last few days, you’ve undoubtedly heard about the attempted takedown of several planes leaving the UK for the US that was foiled yesterday. They arrested 24 people that planned to use some combination of liquid explosives and disposable electronics to blow the planes up mid-flight, suicide bomber style. This has prompted a harsh crackdown in the UK that has banned electronics, drinks (even the ones bought in the airport), and all carryons except baby formula. And even the baby formula, you have to drink yourself to prove it’s safe. In the US it’s not quite so bad, but they’ve still banned all liquids and gels. That means no toothpaste, no shampoo, no soap, no aftershave, etc. There’s plenty of stuff floating around the net about this, including alot of firsthand reports of it all.  I find it humorous that all this “potentially explosive” liquid is just being thrown in trashcans or poured into barrels right next to huge crowds of people stuck in security lines.  Not only is the net effect (lots of people dead or injured) just the same, but who has to empty all this foul sticky tarry beverage every few hours?  And where?

One has to wonder just how effective this will be, but CNet has an excellent article detailing a previous attempt to do what these guys had planned. I have to think that we’re (the US) not very far from being in the same boat as the UK, and I do not look forward to the prospect of putting my $5000 laptop in checked baggage. I also do not enjoy the prospect of taking a long 5 hour flight with absolutely no carryons, including books and ipods. Next week I head to Maryland for a few days (work related, mostly) and after the last travesty with my checked baggage (checked against my will anyway) I’m not looking forward to this.

I frankly don’t think it’s worth it to sacrifice the tiny bit of comfort of every flier in the hopes of preventing the one airplane-related terrorist attack every 5 years. I also feel bad for my dad heading to Austin for a week.
[tag:news][tag:airplane][tag:explosives][tag:terrorism]

Doctored Photo or Digital Painting?

Image by Wayne Forrest

A few days ago I found this post about the World’s Most Photorealistic Vector Art. If you look at it, you’ll see a large collection of photographs like the one to the left. Only, if you look closer you’ll see that they aren’t photographs but rather “digital art” created with Adobe Illustrator and the Gradient Mesh tool. Essentially they create a rough 3d-outline of the image, and then use advanced gradient fill operations to create the smooth surfaces. A nice tutorial can be found at Creative Bush.

But, if you look at the tutorial you’ll notice quickly that the first step is to use a reference photograph.  The mesh lines are constructed by tracing over a starting photograph, and then the colors are done by sampling the photograph.  In the basest form, “he’s just a tracer“.  Can this really be considered “original art”, if it’s really just a heavily (very heavily) processed photograph?  Not just a philosophical question, but a legal one as well as I’m sure there would be problems using a copyrighted image as source material and then using this process to create “original art”.  Where does one put the line between “Heavily Edited Photograph” and “Original Digital Painting” ?

Either way, the results are impressive.  The guys doing this truly are artists, as the amount of time & skill that has to go into something like this is far beyond my abilities. 
[tag:illustrator][tag:graphics][tag:painting][tag:art]