Wednesday, August 29, 2007
She was 85 years old, and she knew she'd be going one of these days. She had the funeral planned for quite some time, the paperwork, the estate. She'd even carefully selected the coffin.
Paying last respects, the bereaved shuffled past her lifeless frame nestled in padded satin; and as they did, they received three final words in the form of a button pinned to her lapel: Vote for Hillary!
(a story relayed to me by my father about a funeral he attended last week)
Bit Hacks & Superoptimizers
There are many clever optimizations that can be done by twiddling bits. Excellent sites on the subject include Sean Anderson's Bit Twiddling Hacks, The Aggregate Magic Algorithms by Hank Dietz, et al. and Hacker's Delight by Henry S. Warren, Jr.
A while back, I had the idea of writing a program to search for bit hacks. Given a simple function y = f(x), are there any interesting sets of machine instructions capable of emulating the function?
Given the speed of today's machines, much like a chess program, a simple algorithm could take millions of stabs at the problem each second. Add some decent pruning, I figured, and one might be in business.
Recently I learned there's a word for the object of my imagination--it's called a superoptimizer. The Wikipedia page on superoptimization has some decent links at the end of it.
At this point, I think it's worth pointing out a rule:
If you think of a good idea that's outside your area of expertise, someone else has already thought of it.
If I were naive, I'd claim ownership of that rule, but I'm sure somebody else has said that too.
I discovered my lack of originality while persuing Warren's Hacker's Delight web site. On the site he includes source code for a superoptimizer he's written called Aha! (code, docs).
It's easy to get it running. Compile the C code and implement the function for which you're seeking a bit hack. Finally, specify the number of operations allowed (recommendation: stay below five).
Also, if you'd like some puzzles, another good I found on Warren's site is this Computist Quiz.
Way over yonder...
Note from johnnysmooth, the video creator: "I made this for an old roommate who wanted to see some work because he said he wanted to buy a painting. It's real choppy. I'm kind of in a hurry, because I'm goin' to Kansas City..."
Artist: Billy Bragg
Song: Way Over Yonder in the Minor Key
Disc: Mermaid Avenue
Tuesday, August 28, 2007
Vignette: Very Good English
"Well, I'll go into a shop and a clerk will say, 'I can hear you've got an accent. Where are you from?' And when I reply with 'London', the clerk will shrug and say, 'Oh, but you speak very good English.'"
(conversation I had with a transplanted Briton)
Wednesday, August 22, 2007
A Frozen Moment
Thirty seconds before this moment, Mr. Magee bailed out of a B-17 flying alongside the Memphis Belle. Injured when a German flak shell exploded in his ball turret, the machine-gun-equipped spherical sardine can hanging from the plane's belly, Mr. Magee miraculously wriggled up to the flight deck only to find his parachute destroyed. When a second round of flak sent the plane spinning out of control, Mr. Magee, having neither a parachute nor options, jumped out of the aircraft and whispered a prayer. At an altitude of 22,000 feet in freezing, oxygen-depleted air, his fall began.
At this point, you may be guessing that Mr. Magee will die. If so, you have guessed correctly. He will die. After living a long and productive life, he will die from a stroke and kidney failure, in Texas, in over sixty years, at the age of 84.
Thirty seconds after this moment, Mr. Magee's fall will come to an end. The number of people surviving falls from thousands of feet can be counted on one hand, but Mr. Magee will be one of them. The key to survival is having something to break one's fall. Given that Mr. Magee will fall into the city of Saint Nazaire, the chances of landing in a suitable place seem astronomical. In thirty seconds, Mr. Magee will crash through the skylight of the Saint Nazaire train station. He'll be battered up, with 28 shrapnel wounds, some serious lacerations and a broken leg and ankle, but he'll recover, spend a couple of years as a P.O.W. and return to America.
Saturday, August 18, 2007
Coffee and a roll. A few dollars change hands. I take a seat in the corner and survey the surroundings. Just a few other customers, most notably a smartly dressed, prudish-looking lady in her 60s. Half round glasses with a gold chain swinging from the frames, hair up, scanning the NYT.
On the floor near her feet I notice an English Sparrow subtly eating crumbs with the characteristic "hop, peck and repeat" strategy.
Shortly thereafter, the prudish lady notices the bird too. Clearly aghast, she waves her hand and hails the burly baker attending the counter. A wrinkled nose and stiffened index finger accompany her nasal admonishment. "Sir, do you realize there is an ANIMAL in here?"
Unfazed, the white-smocked baker ambles to the glass door, grabs the handle and swings it wide open.
At this point, there's an imaginary line from the door to prudish lady with the baker and the hopping sparrow falling in the middle. My skepticism quickly congeals. Anyone would agree that apparent strategy is doomed, because it involves a burly baker standing between the wild animal and freedom. Everyone knows the winner requires the order in which the wild animal sits between freedom and the pursuer. When the pursuer stands in the way of freedom, all bets are off.
An incredulous smile finds me mentally prepped for slapstick.
Suddenly, still holding the door, the burly baker looks down at the little bird and shouts, "LEROY! GET OUTTA HERE!"
Obediently, the sparrow complies--flying around the baker and out the door.
All I can do is shake my head.
Thursday, August 16, 2007
You're a Wolf
Wednesday, August 15, 2007
Are we living in a simulation?
"Until I talked to Nick Bostrom, a philosopher at Oxford University, it never occurred to me that our universe might be somebody else’s hobby. I hadn’t imagined that the omniscient, omnipotent creator of the heavens and earth could be an advanced version of a guy who spends his weekends building model railroads or overseeing video-game worlds like the Sims. "
"But now it seems quite possible. In fact, if you accept a pretty reasonable assumption of Dr. Bostrom’s, it is almost a mathematical certainty that we are living in someone else’s computer simulation."
Hmmm... What if quantum uncertainty is the result of trying to sample beyond the resolution of the game... i.e., the point at which rules fail to work due to some underlying discreteness in the simulation.
via Boing Boing, 3QD, et al.,
Tuesday, August 14, 2007
Monday, August 13, 2007
Hard Puzzles. Like Butter.
Anyhow, what follows is a puzzle / problem to which I don't know the answer. The first time I saw it was on Ronald Hoeflin's Mega Test, which was once published in Omni Magazine. Famous high scorers include Marilyn vos Savant and John Sununu.
I took the test and came up with an answer, but I never found out if my answer was correct. Relative to other questions on the test, I believe it was the question the fewest people answered correctly.
The Question: Suppose a cube of butter is sliced by five perfectly straight (i.e., planar) knife strokes, the pieces thereby formed never moving from their initial positions. What is the maximum number of pieces that can thereby be formed? (The figure to the right illustrates three knife strokes.)
Finally, if you want a whole pile if challenges such as this to bang your head against, check out Darryl Miyaguchi's Uncommonly Difficult IQ Tests. I don't believe the original Mega Test is available, but check out Ronald Hoeflin's other tests. The question above is still #12 on the Power Test.
Also, many by Rottus are a lot of fun too.
IHWTH: Willie & Frankie
All too often I run into news stories so excruciating and incomprehensible they'd be absurd if they weren't true--stories of a failed suicide involving a nail gun, a husband who wakes up with a headache because his wife shot him, a woman with 3" of pencil embedded in her head for over fifty years.
"I Hate When That Happens" (IHWTH) is a reference to an old SNL bit (mid 1980s) by Billy Crystal and Christopher Guest (Spinal Tap, Best in Show, etc.). It consists of a couple of security guards, Willie and Frankie, played by Crystal and Guest.
The shtick is absurdist, two masochists take turns recalling the most painful personal experiences imaginable--pounding meat thermometers in their ears, etc. After each recollection, the other responds, "Oh! Ouch! I hate when that happens!"
Here's a transcript to one of the bits.
It's on Billy Crystal's disc Mahvelous!, which also means it's also available on music services such as Yahoo! Music, Rhapsody, etc.
The bit still makes me laugh. The real life analogues are incomprehensible.
Sunday, August 12, 2007
It might be time to upgrade your worldview.
Saturday, August 11, 2007
What you don't do...
Dysfunction: The only consistent feature of all your dissatisfying relationships is you.
Thursday, August 09, 2007
Life in a Northern Town
Artist: Dream Academy
Song: Life in a Northern Town
Disc: The Dream Academy
Invented by Heron (aka "Hero") around 60 A.D., it's generally credited as being the first recorded steam engine. Boiling water in the lower chamber resulted in steam expelled through jets perpendicular to the sphere's axis of rotation.
Sadly, the device was regarded as merely an object of amusement. This was centuries before the collapse of the Roman Empire. The conception of steam power wasn't a great leap, but in the hundreds of years following, the leap was never made.
Given the Roman capacity for massive engineering projects, it's mind-numbing to think what the Romans might have done with steam power and how radically such a technological innovation could have changed the course of human history.
It would have enabled the Romans, for example, to more effectively deal with the management of problems that were difficult for them to handle given the vastness of the empire--problems such as famines, for example.
Had the empire never fell, European might have remained a unified nation of Latin speaking citizens.
Monday, August 06, 2007
IHWTH: Pencil Head
I hate when that happens!
"BERLIN (Reuters) - A 59-year-old German woman has had most of a pencil removed from inside her head after suffering nearly her whole life with the headaches and nosebleeds it caused, Bild newspaper reported on Monday."
Saturday, August 04, 2007
I'll be at SIGGRAPH 2007 from tonight until Wednesday.
If you're interested in meeting up, send me a note.
Friday, August 03, 2007
This Time Tomorrow
Artist: The Kinks
Song: This Time Tomorrow
Disc: Lola Versus Powerman and the Moneygoround, Part One*
I noticed this song is in the trailer for The Darjeeling Limited. Perhaps it will be on the soundtrack as well.
Thursday, August 02, 2007
Brilliant and Dense...
The brilliance of the moral imperative shines through in its simplicity, its scope, its power, its compactness. It is brilliant, yet simple, and dense.
How many thick-enough-to-stun-an-ox moral treatises written by great, learned minds will stand test of time as aptly, and how many work as well?
When rules become too complicated, the simplest minds fail to understand and the cleverest minds find open invitation to rationalization and debate. When this happens, it seems all is in vain.
Many intelligent minds are capable of complex and exhaustive moral theorizing that runs on and on through a thousand pages, but the truly brilliant mind, I think, is one that can produce a more powerful model orders of magnitude simpler: a mere sentence overpowering volumes.
Discovering and describing complexity can be a difficult task, but distilling boundless complexities into fundamentals, principles or simple equations is much harder. So it is with many intellectual pursuits.
Wednesday, August 01, 2007
"Are u guys okay? We are all okay. 35W bridge collapsed."
We returned home at 10:00 PM. The Minneapolis traffic map was still on my laptop (below). I pulled up it up at 4:58 PM when I was trying to decide which route to take (the best route always depends on the traffic).
I wound up taking the blue path. I decided not to take the 35W bridge (X) due to the construction signs. We arrived at the museum (B) at 5:55 PM.
The bridge collapsed at 6:05. Nine are dead. Twenty are missing. Sixty are injured. My heart goes out to the families of the victims. It's shocking. With a slight twist of fate, we might have been on the bridge when it went down.