I have a deep and long running affection for programming puns. Iím sure most people will be aware of Jaromilís fork bomb http://jaromil.dyne.org/journal/forkbomb_art.html
The elegance of this one seems like the direct opposite of other kinds of programming word play (such as the ones Rob mentions below). The commonality though is in the way that they sort of duck in and out of being about performative action (as in being computational) and being a formal game.
Begin forwarded message:
From: Rob Myers <[log in to unmask]<mailto:[log in to unmask]>>
Subject: Re: [NEW-MEDIA-CURATING] on interpreters and compilers
Date: 22 March 2014 22:36:47 GMT
To: <[log in to unmask]<mailto:[log in to unmask]>>
Reply-To: Rob Myers <[log in to unmask]<mailto:[log in to unmask]>>
On 21/03/14 06:21 PM, Barbara Lattanzi wrote:
The link to java2k was startling and funny. It made me wonder if there is
any use to creating a programming language made completely out of
puns...for machines or dancers, and thus guaranteeing the "effects of
There's a technique in programming called "type punning" that
circumvents the rules of a given programming language in order to allow
it to perform a task:
There's a good discussion of puns and programming languages here:
although it moves away from natural language puns almost before it starts.
There are programs called Quines that output another program:
And there's a Quine that loops through fifty different languages to
output the original program:
I think this kind of code comes close to puns, although again it's not
like a natural language pun.
Some programming languages or libraries do infer meaning from, for
example, the plurality of words. ActiveRecord in Ruby knows that a Dog
object will go in a Dogs table, for example. So a pun grammar could be
meaningful in a programming language in the way that you suggest.
Although I wouldn't want to program a nuclear power station using it. :-)