http://qs1969.pair.com?node_id=30953

Background information: This poem can be found in Douglas Hofstaedter's book Gödel, Escher, Bach which I'm sure a lot of you have read. The following poem was written by Johann Sebastian Bach. Hofstaedter writes "Old Bach was fond of versifying, philosophizing, pipe smoking, and music making (not necessarily in that order). He combined all four into a droll poem which he set to music. It can be found in the famous musical notebook he kept for his wife, Anna Magdalena, and is called "Edifying Thoughts of a Tobacco Smoker"" I present it to you in English and Perl. Enjoy!
~W

#!/usr/bin/perl #Whene'er I take my pipe and stuff it #and smoke to pass the time away #my thoughts as I sit here and puff it, #Dwell on a picture sad and grey #It teaches me that very like #Am I myself unto my pipe if ($I{hold} = my $pipe){true} &smoke; sub smoke {sleep 5;} my $thoughts; while($I{puff} = my $pipe) {@Thoughts = "A picture","Sad","Grey";} $I = "learn that as"; $one=$one; $I = my $pipe; #Like me, this pipe so fragrant burning #Is made of naught but earth and clay; #To earth I too shall be returning. #It falls and, ere I'd think to say, #it breaks in two before my eyes; #In store for me a like fate lies. $pipe{smell} = "fragrant burning"; $pipe = 0+$earth.$clay; $me = 0+$earth.$clay; $soon; $earth = $me; $pipe{acceleration} = (9.8)."m/s**"; $pipe = split //; my $eyes; if ((@date=localtime(time))and($date[5]>200)){$me = $m.$e;} #No stain the pipe's hue yet doth darken; #It remains white. Thus do I know #That when to death's call I must harken #My body, too, all pale will grow. #To black beneath the sod 'twill turn, #Likewise the pipe, if oft it burn.
$stain=-0x111111; $pipe{color}=0xFFFFFF; if(($I eq "Dead")&&($I eq "Buried in sod")) {for(0..9){$body{color}-=$stain;} while($body{color}>0x000000){$body{color}+=$stain;}} if (1){for (0..$pipe{times_smoked}/10) {$pipe{color}-=$stain;}} #Or when the pipe is fairly glowing, #Behold them instantaniously, #The smoke off into thin air going, #Till naught but ash is left to see. #Man's frame likewise away will burn #And unto dust his body turn. while(($pipe{color} eq "orange")&&($pipe{luminosity} >= 1)) {$observe; sleep 0; $thin_air = "The smoke"; $thin_air = (0)."ash"; $body{man}=$thin_air=(0)."ash"; $body{man} != "ash"; $body{man} = "dust"; } #How oft it hapens when one is smoking: #The stopper's missing from the shelf, #And one goes with one's finger poking #Into the bowl and burns oneself. #If in the pipe such pain doth dwell, #How hot must be the pains of Hell. if (($date[0]>0)&&($date[0]<50)&&($smoke)) {$stopper{location} = "!shelf"; push @bowl, $ones{finger}; print "Ouch!\n"} if($pain{pipe}=2) {for(1..256){$pain{Hell}=$pain{pipe}*=$pain{Hell};}} #Thus o'er my pipe, in contemplation #of such things, I can constantly #indulge in fruitful meditation, #And so, puffing contentedly, #On land, on sea, at home, abroad, #I smoke my pipe and worship God. while($I){($smoke) and ($think);} @thoughts = "Death","Hell","Pipes"; if (1) {$meditation{fruitful}="indulge";} $I{puff}="content"; if(((my $locale = "On land") || ($locale = "At sea")) ||((my $locale = "At home") || ($locale = "Abroad"))) {$I; &smoke; (my $pipe) and ($worship = 1*1*1);}

Replies are listed 'Best First'.
RE: Edifying Thoughts Of A Perl Programmer
by damian1301 (Curate) on Sep 17, 2000 at 22:24 UTC
    Nice!