Perl has always had a playful nature. For a surprisingly long time, my top rated post on Perlmonks was http://www.perlmonks.org/?node_id=29977. Since it is short, here it is in full:
He should scare you. He has one talk where he asks for volunteers from the audience to try to punch him. The ways that he proceeds to immobilize them relate to the various points he's making in his talk.
He's also the only person that I can think of who would seek to explain the concept of elementary particles being made of quarks using Mars bars as analogies. Right down to the fact that the sum of 3 of the masses of the small Mars bars slightly exceeds the mass of the large one - that right there is the binding energy!
For those who have not experienced him, Damian is hard to explain. For those who have experienced him, the full mind-bending reality is hard to remember. He's the only person about whom I say that if he's giving a presentation you go, just because it is Damian. Even if you don't know the topic. Even if you hate the topic. Even if you're bored by the topic. It is Damian. Go.
Having had a chance to experience Larry up close at a YAPC, I firmly believe he's one of the most quirkily brilliant people in the industry (for whatever industry means in this case).
I was 12, I have a video game in Perl I wanted to modify (Frozen Bubble), I only knew shell. I did not have an Internet connection at home so I had to boy a book. So I bought Programming Perl 3rd edition, which had recently been released. And I read it. Front to back. Several times.
I probably wouldn't advise anybody to start programming by reading 1000+ pages of Larry Wall's prose. I do advise anybody serious about programming to read that book sometime. It is not only a book about a programming language. It is a book about the essence of software, or rather Larry Wall's vision of it, hidden behind a book about a programming language.
If I write code for a living today, it was in large part thanks to Larry Wall.
Here's a little something in Python that I spent the last few hours writing:
def unfalse_poem():
(None is True) and False
for subject in [complex(True,False)]:
subject is not object
for certainty in [complex(False,True)]:
certainty is not Exception
certainty is not license
subject and certainty
reduce and coerce
coerce and reduce
while certainty.real: unexamined
for certainty in [complex(False,True)]:
return certainty is not certainty.real is not certainty
Will's Study is a room. The desk is here.
A hastily handwritten note is on it.
Description is "It's from your friend Shakespeare:
'I've gone to lunch. You'll have to write the sonnet.'"
Composing is an action applying to nothing.
The quill is a thing that is in the study.
Understand "write sonnet" as composing.
Description of the quill is "Old and cruddy".
Instead of composing when the player
has no quill, say "You have not got the quill."
Instead of composing, say "And... done. 'Heya',
says Will, returning. You say, 'Hello, Will!'
Says Shakespeare, 'Thank you for the time you've taken!
You really are a pal, Sir Francis Bacon.'"
It never occurred to me how perfect programming languages are for poetry. You have all these extra characters and whitespace to change how a piece of text feels or reads, and it becomes a visual experience too, like looking at art. Are there other program-poems people should look at?
The only thing I'd seen like this before was "Sunrise, Sunset" written in PHP. I know these things aren't new for many of you but I keep being surprised by the creativity I find.
As a hard core atheist, it is good for me to see really religious guys like Larry Wall which are so laid back that they can make fun of their own opinions.
For the record, I have met a few.
A little bit like when, as an Emacs user, I see a post on a really informative blog about their Vi configuration. Or at a conference when the speaker connects the computer -- "wtf, he use Windows!?" :-)
(And as a metal fan I mostly avoid the lyrics, it might destroy the music if they are too stupid. But I'm a wimp which listen mostly to technical death.)
Completely offtopic, but there are some black(ish) metal bands with great lyrics.
Being a nerd, I am for example very partial to Vintersorg's album Cosmic Genesis (check out the song Algol ! [1]). (The singer, Andreas Hedlund, is actually a primary school teacher)
See (and hear) also the Irish band Primordial, who have great songs about Ireland. I've got goosebumps everytime I hear the chorus of "The Coffin Ships" [2] or the ending poem of "Death of the Gods" [3].
I could go on forever, but I'll mention three more bands, Vulture Industries for their very theatrical lyrics [4] and Solefald for the crazy and philosophical stuff [5]. And finally, a personal favorite of mine, Behemoth's "The Youth Manifesto" [6]. (Nergal, the lead singer and guitarist, is a fantastic lyricist and an incredible person)
Meshuggah, Nile, Dillinger Escape Plan, etc. Not the extreme stuff (when Darkthrone's "Blaze in the northern sky" gave me a headache; then I knew I was at my limit :-) ).
Disclaimer: I do like lots of whining singer-songwriters and folk music (including Irish like Altan etc) too. Even Mary Gauthier!
Variables in perl are preceded by a sigil($,@,%,*). Those undefined words are not variables, but, at least in perl5, when you don't use strict, perl tries several fallbacks in order to find their value: see if it is a function (called without paranthesys), see if it is a constant, use it as a string otherwise.
The Perl Poetry contest used to be a thing -- I don't think anyone ever measured up to "Black Perl" in awful audacity, but the parser can take a hell of a lot of abuse before it cries uncle.
"perl -c" checks syntax without executing. (Try it and you'll see a lot of syntax errors using perl 5, so no chance of it executing -- but even if you run it under perl 3, you have nothing to fear.)
I don't understand what you mean by 'expressive' in this sentence: if it's not to make the program do something specific, you could just wrap everything in a comment block and be as 'expressive' as you like in any language.
Yeah, I get that it's valid Perl code, but it doesn't cause the computer to do something, or give an interesting output. A human can read it and find it interesting. I tried to say that in a witty way. Oh well...
It not doing anything matters - generally, code poetry is something that does do something interesting while being relevant to human interpretation; so code that simply validates syntactically isn't that amazing.
If "any sufficiently advanced technology is indistinguishable from magic" [Arthur C. Clarke] then incantation is really just programming through voice interface done smart.