Blog articles
How to dismantle a compiler bomb
main[-1u]={1};
You have heard of "zip bombs" (a tiny ZIP file that decompresses to multiple gigabytes) and "XML bombs" (small XML file abusing the entities to consume lots of memory), and now there is a "compiler bomb" to follow suit. The idea is quite similar -- the source code is only 14 bytes, but the generated executable will be over 16 GB in size…
Namaste India
This obfuscated piece of C code prints the map of India to the standard output.
…Regex prime checker
This Java snippet uses a regular expression for something way different than they were designed for: a primality check.
public static boolean
…Quine - a self-replicating program
Quines are computer programs that accept no input and write its own source code on the standard output. This entry was taken from the Jargon File, the author is unknown.
char*f="char*f=%c%s%c;main()
{printf(f,34,f,34,10);}%c";
…Underscore Pi
This clever program written by Brian Westley calculates π by looking at its own area. It is one of the winning entries of IOCCC in 1988.
int F=00,OO=00;
…