In the Digital Craft exhibit of Frankfurt's Museum fur Angewandte Kunst, you will find this brilliant piece of code poetry. The characters are silkscreened in black onto a meter square of translucent plastic, the whole resting on a simple white surface, in a display case behind glass.

Attributed to a writer identified only by the name "Jaromil", the exhibit text says that when it is run in a *n?x shell like zsh, this letterless code replicates itself like a virus until the memory of the system is full and causes a segmentation fault.

Pseudocode translation of :(){:|:&};:

:() = Define a function named : (A colon is a legal function name, it would seem.)
{:|:&}; = When this function is called, run a copy of itself
: = Execute the function named :, now.

I'm neither a h4x0r nor a virologist, but I wouldn't consider it a true virus since it can only replicate when run in a shell executed by its user. Plus its effects are negligible. But for it's typographic mystique, elegance, and efficiency, it is more than code. Like a little joke between the coder and the OS about how simple and mysterious self destruction can be.

E2 hates pipes in node titles, thus the HTML symbol. It displays properly in Nodelets and in links, but not in the title of the writeup. The bold text with the pipe in the text is correct.
Plasma says: oh, and it's probably worth adding that in linux it will not segfault, but rather will produce unpredictable behaviour, with the most likely result being a massive slowdown of the system. See the OOM killer for why. (Thanks, Plasma!)

Log in or register to write something here or to contact authors.