As I do not see any fundamental reasons that would inhibit this, the task should be solvable. Therefore I call you all for a contest on "Poetic Programming".
Some research on the net revealed, the world's first Perl poem is a Haiku, written by --- Larry Wall (lwall@jpl-devvax.jpl.nasa.gov) in March of 1990:
[font=Courier New]
print STDOUT q
Just another Perl hacker,
unless $spring
[/font]
Explanation
In this poem, the q operator causes the next character (in this case a newline) to be taken as a single quote, with the next occurrence of that delimiter taken as the closing quote. Thus, the single-quoted line ’Just another Perl hacker,’ is printed to STDOUT. In Perl, the "unless $spring" line is mostly filler, since $spring is undefined. In poetical terms, however, "$spring" is very important: haiku poetry is supposed to specify (directly or indirectly) the season of the year. As for the q operator, that reads in English as the word "queue", which makes perfect sense in the context of the poem.
Some more perl poetry can by found on http://www.digitalcraft.org/iloveyou/im ... Poetry.pdf
And now for the really brain damaged part
And if you, most honourable reader, tend to think that programmers are a bit weird in their minds, have a look at The Shakespeare Programming Language designed to create beautiful source code that resembles Shakespeare Plays.
A simple program that prints out the famous words "Hello, World" looks like this:
The Infamous Hello World Program.
Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.
Act I: Hamlet's insults and flattery.
Scene I: The insulting of Romeo.
[Enter Hamlet and Romeo]
Hamlet:
You lying stupid fatherless big smelly half-witted coward!
You are as stupid as the difference between a handsome rich brave
hero and thyself! Speak your mind!
You are as brave as the sum of your fat little stuffed misused dusty
old rotten codpiece and a beautiful fair warm peaceful sunny summer's
day. You are as healthy as the difference between the sum of the
sweetest reddest rose and my father and yourself! Speak your mind!
You are as cowardly as the sum of yourself and the difference
between a big mighty proud kingdom and a horse. Speak your mind.
Speak your mind!
[Exit Romeo]
Scene II: The praising of Juliet.
[Enter Juliet]
Hamlet:
Thou art as sweet as the sum of the sum of Romeo and his horse and his
black cat! Speak thy mind!
[Exit Juliet]
Scene III: The praising of Ophelia.
[Enter Ophelia]
Hamlet:
Thou art as lovely as the product of a large rural town and my amazing
bottomless embroidered purse. Speak thy mind!
Thou art as loving as the product of the bluest clearest sweetest sky
and the sum of a squirrel and a white horse. Thou art as beautiful as
the difference between Juliet and thyself. Speak thy mind!
[Exeunt Ophelia and Hamlet]
Act II: Behind Hamlet's back.
Scene I: Romeo and Juliet's conversation.
[Enter Romeo and Juliet]
Romeo:
Speak your mind. You are as worried as the sum of yourself and the
difference between my small smooth hamster and my nose. Speak your
mind!
Juliet:
Speak YOUR mind! You are as bad as Hamlet! You are as small as the
difference between the square of the difference between my little pony
and your big hairy hound and the cube of your sorry little
codpiece. Speak your mind!
[Exit Romeo]
Scene II: Juliet and Ophelia's conversation.
[Enter Ophelia]
Juliet:
Thou art as good as the quotient between Romeo and the sum of a small
furry animal and a leech. Speak your mind!
Ophelia:
Thou art as disgusting as the quotient between Romeo and twice the
difference between a mistletoe and an oozing infected blister! Speak
your mind!
[Exeunt]
Explanation
[*]There are two different output sentences, "Open your heart" and "Speak your mind". The first causes the character being spoken to output her or his value in numerical form, and the other, being more literal, outputs the corresponding letter, digit, or other character, according to the character set being used by your computer. In this program, only the second form is used. The whole program is a long sequence of constructing a number, writing the corresponding character, constructing the next number, writing the corresponding character, and so on.
[*]The first text until a dot is the title (ignored by the parser).
[*]Dramatis Personae are variables (only Shakespearan names are allowed).
[*]Acts and Scenes are labels.
[*]Enter, Exit (and the plural Exeunt) are needed to make variables viewable. A variable that did not "Enter" can not be used.
[*]Lines are used for output, and as statements which cause a second person to assume a certain value.
[*]Any noun is a constant, the value depends on whether it is nice or not (flower == 1, pig == -1). Prefixing nouns with adjectives multiplies it by 2 (3 adjectives multiply it by 2x2x2=8). Substitution is done by using the word "difference" (This way of writing constants gives you much more poetic freedom than in other programming languages).
[*]Assignment is done by a character name followed by a number (Example: "You lying stupid fatherless big smelly half-witted coward!" reads to you = -64;.
Have fun!
