Subscribe to
Posts
Comments
NSLog(); Header Image

99 Bottles

Justin posted something about 99 Bottles of Beer written in several languages (for example, Objective C), and it reminded me of a "trick" I played on a former roommate of mine in school.

You see, years ago there was a little application (I looked and couldn't find it, but for all I recall it could have been a perl script with a small GUI) that allowed you to enter any number (say, 1,321,336,235). The text-to-speech engine would then sing the song downward from that number. You could adjust the pitch and rate of the singing. It was a deadly weapon in the nine-month fight against the roommate.

You see, this roommate was, well, let's just say he wasn't the ideal roommate, so picking on said roommate was was a near-full-time activity for my friend Jim and me. His existence was torture enough, so he never had to explicitly "pick" back at us. Anyway, one of the more interesting pranks was to crank up this app and enter a number (say, 1,321,336,235) before leaving for a few hours of class (or for a weekend). The roommate never unplugged my computer or turned down the volume (we had, oddly enough, a great deal of respect for each other's property). I'm not sure what happened while I was away, but I'd always return to find the song had dutifully gone through a few thousand verses.

I'll leave you with one indelible image burned into my brain in the hopes that this gives you a glimpse into my world for nine grueling months: the sight of a half-naked 350-lb man humping his bed in the middle of the night.

Ick.

4 Responses to "99 Bottles"

  1. OK man, I don't wanna know about your sexual fantasies about fat naked men. But, whatever floats your boat. 🙂

  2. Yeah Erik, go back to Britney. Yuck, never thought I'd say that. 😛

  3. My favorite thing to do at work when I am bored is to ssh into someone's machine and use osascript to run an applescript that uses text2speech to speak to that person 🙂

    Nothing freaks a person out more than their computer talking to them for no reason.

  4. Panther has a nifty "say" utility. And it seems to work if you ssh into someone's machine... combine these facts with the following Perl script for great amusement:

    #!/usr/bin/perl

    my $bottles = $ARGV[0] || 99;

    my $text = "";

    for (my $x = $bottles; $x > 0; --$x) {

    $text .=

    "$x bottle" . (($x != 1)?"s":"")." of beer on the wall, " .

    "$x bottle" . (($x != 1)?"s":"")." of beer. " .

    "Take one down, pass it around, ".

    ($x-1)." bottle" . (($x != 2)?"s":"") . " of beer on the wall.\n";

    }

    system "say", "-v", "Fred", $text;


Comments RSS

Leave a Reply


Warning: Undefined variable $user_ID in /var/www/vhosts/nslog.com/httpsdocs/wp-content/themes/nslog/comments.php on line 96

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.