tirsdag 21. september 2010

Beautiful code

I find this piece of coding quite beautiful:
:(){ :|:& };:
Breakdown:
:() //defines ":" as a callable object
{ //that does the following
: //Calls itself
|:& //and pipes itself to yet another instance of itself.
}; // Into the sunset.
: //GO

It results in a wonderful exponentially expanding tree of ":"s in your ram.

This my friends is how you make a logic bomb. Try and type it at your shell prompt -I dare you.

2 kommentarer: