null program

Three Rivers Stadium Implosion

As noted elsewhere here, I grew up in Pittsburgh, Pennsylvania. Back in February 2001 I got to witness Pittsburgh's Three Rivers Stadium demolition. My dad brought our old 1980's video camera to film it, and afterwards we dumped the recording to the computer. And so I present another low-quality video,


Original video dump

I put this up on YouTube in September 2006, and as of this writing it has gotten about 28,000 views. Now that I finally put it here, it's clearly available under any of the licenses at the bottom of this page.

We were standing nearly underneath the Fort Pitt Bridge (seen at the top of the video) facing directly north, next to some railroad tracks. You can see all three rivers: Ohio river to the left, Monongahela river to the right, and the Allegheny in the top middle behind the Point.

That thick dust cloud you see at the end rose up and engulfed the whole city, overtaking us as we headed back to the car. So I got a little bit of history in my lungs. If you're some distant-future archaeologist reading this maybe you can retrieve some particles from my decomposed rib cage. Put them in a museum or something.


Television Commercials

Old television First, let me note that I don't watch television. At least not in the sense of sitting on the couch, turning it on, and flipping through the stations. I can't stand the compressed audio, the constant, loud commercial interruptions, and general lack of control over my viewing. VCRs, and more recently PVRs, have mitigated these last two points, but not enough to grab my interest.

The way I see it, there are four ways to access television. Here is the matrix,

2x2 table thingy

For an "acceptable" situation we have cost-free television, but with advertising, in broadcast and streaming television. And in the opposite "acceptable" situation we have ad-free television, but with a monthly fee, in premium television. I think these two are acceptable compromises. Someone else can foot the bill, or you can foot the bill.

In a few cases, such as viewer-supported television like PBS, it's both cost-free and ad-free. This is pretty nice. You can have your cake and eat it too.

However, most television is only legitimately available in the worst case situation! Not only do you have to pay to access it, but one-third of it is annoying, unwanted advertising. This is awful, and it is one reason why I choose not to participate.

Luckily, there is another "best case" option which provides quick access to most television shows of the world: peer-to-peer file-sharing. Unfortunately, it doesn't include live television, and it's usually not quite legal. We have the technology to distribute large amounts of data to huge numbers of people at practically no cost, but a bunch of old, out-of-date laws stand in the way. It's a shame. I think this quote by "muuh-gnu" sums it up well,

We have 2009. Everybody and their dog has a computer, which is designed to copy stuff. Also we have broadband which is, again, designed to ... move stuff around the world. So is what you're actually pointlessly advocating is that we collectively should ... actually what? Abstain from using a common technology in order to make absurdly archaic 50's business models of "manufacturing and selling single copies" viable in day and age when everybody can manufacture and distribute those copies themselves?

It's a good thing some bad laws don't get in the way of progress too much.


Dry Ice Potato Gun

This was almost 6 years ago now. In my freshman year of college, three of us (Matt Stine and Matt Takach) designed and assembled a dry ice powered potato gun. We got the idea for using dry ice after purchasing some from the famed Penn State Creamery. They sold it for 50 cents per pound, no questions asked. The purpose was for keeping ice cream cold over a long car trip, but they'd sell it to you even if you didn't buy ice cream.

Here is a low-quality video of it in action,


Original video source.

I don't recommend doing this yourself unless you are going to take extreme caution. Like, more caution than we did. We weren't too careful ourselves and were really lucky no one got hurt. The dry ice "bombs" can be very powerful, enough to shatter PVC tubing. We did bring safety glasses with us (but they went mostly unused). We also did this in cold weather, which made things a bit safer.

On to the details, here is a diagram I drew up at the time,

Diagram of the potato gun.

It's just glued PVC tubes and a nail. The bottom of the "blast chamber" had a screw-on cap, which kept getting blown to smithereens. We bought several of those. The original plan also had some wires, connected to some kind of high-resistance wire, so we could control when the gun would fire. That didn't work out.

The "power cell" was a soda bottle with water and dry ice in it. Some brands worked better than others. We had to smash the dry ice into little pieces to get them in the bottle. Dry ice goes in first, then the water, then the cap goes on. After that it's a ticking time bomb, and you want to load it into the gun ASAP. In warm weather you have, maybe, a few seconds. In cold weather it could be 30 minutes.

Yeah, you don't want that in your hand when it explodes.

Once the bottle explodes, there is a lot of pressure behind that potato, so it gets quickly pushed down and out of the barrel. As I said, in that cold weather this could take about 30 minutes. In the video above we were adding warm water to speed up the process.

Gun construction

When we fired a golf ball out of the gun straight up in the air, it took about 10 seconds to hit the ground. This put it at maybe 50 m/s (110 mph) barrel exit speed. When launching into the field, we found the potatoes between 150 and 250 meters.

At night we stuck glow sticks in the potatoes so we could watch their entire trajectory. Pretty cool.

Some campus "security" person stopped us on our way home, since carrying a muddy pipe looks suspicious. We told her it was just a potato "cannon", which she told us "wasn't allowed on campus" (yeah, yeah). That's time to just walk away.

Here are some pictures of the construction, and my excessive beard,

Gun construction Gun construction Gun construction Gun construction Gun construction

Extra, less interesting video,


Lisp Fantasy Name Generator

Earlier this year I implemented the RinkWorks fantasy name generator in Perl. I think lisp lends itself even better for that, and so I have a partial elisp implementation for you.

What stands out for me is that the patterns can easily be represented as a S-expression. We represent substitutions with symbols, literals with strings, and groups with lists. For example, this pattern,

s(ith|<'C>)V

can be represented in code as,

(s ("ith" ("'" C)) V)

I want a function I can apply to this to generate a name. First, I set up an association list with symbols and its replacements,

(defvar namegen-subs
  '((s ach ack ad age ald ale an ang ar ard as ash at ath augh
       aw ban bel bur cer cha che dan dar del den dra dyn
       ech eld elm em en end eng enth er ess est et gar gha
       hat hin hon ia ight ild im ina ine ing ir is iss it
       kal kel kim kin ler lor lye mor mos nal ny nys old om
       on or orm os ough per pol qua que rad rak ran ray ril
       ris rod roth ryn sam say ser shy skel sul tai tan tas
       ther tia tin ton tor tur um und unt urn usk ust ver
       ves vor war wor yer)
    (v a e i o u y)
    ...
    (d elch idiot ob og ok olph olt omph ong onk oo oob oof oog
       ook ooz org ork orm oron ub uck ug ulf ult um umb ump umph
       un unb ung unk unph unt uzz))
  "Substitutions for the name generator.")

Since we will need this in a couple places, make a function to randomly select an element from a list,

(defun randth (lst)
  "Select random element from the given list."
  (nth (random (length lst)) lst))

A function for replacing a symbol,

(defun namegen-select (sym)
  "Select a replacement for the given symbol."
  (if (null (assoc sym namegen-subs))
      (throw 'bad-symbol
             (concat "Invalid substitution symbol: " (format "%s" sym)))
    (symbol-name (randth (cdr (assoc sym namegen-subs))))))

And finally, the generator. Find a string, pass it through, find a symbol, substitute it, find a list, pick one element and recurse on it.

(defun namegen (sexp)
  "Generate a name from the given sexp generator."
  (cond
   ((null sexp) "")
   ((stringp sexp) sexp)
   ((symbolp sexp) (namegen-select sexp))
   ((listp sexp)
    (concat (if (listp (car sexp)) (namegen (randth (car sexp)))
              (namegen (car sexp)))
            (namegen (cdr sexp))))))

That's it! We can apply it to the expression above,

(namegen '(s ("ith" ("'" C)) V))
-> "rynithi"

But that's really the easy part. The hard part would be converting the original pattern into the S-expression, which I don't plan on doing right now.

Something else to note: this is thousands of times faster than the Perl version I wrote earlier.

I threw the code in with the rest of my name generation code (namegen.el),

git clone http://git.nullprogram.com/fantasyname.git

S-expressions are handy anywhere.


Don't stop here! This isn't everything. Check out the archives (on the left) for more posts. Or just have a look at the index.