explanation
Let the music play
char a;float b,c;
Good news for all International Obfuscated C Code Contest fans -- here's another winning piece from 2013 written by Yusuke Endoh, who is no stranger to the Contest. It is dubbed the Most Tweetable 1-Liner, because is small enough to fit in a tweet (137 characters only), yet can "tweet out a tune", that is, will play some music for your entertainment.
…Dots and Dashes
;
Perl is (in)famous for the ability to write programs that look like line noise, and today I will take apart this beautiful piece of code. Written by tybalt89, it can decode sequences of dots and dashes to Latin letters in just 73 characters of code.
…Anatomy of the heart
;
my$f= $[;my
$ch=0;{}
{,
(,$_)}{($_
,$_,$_)}{$_=$_;
(($_,$f,1));$f+=()/2;$f%=
();$f++if$ch%2;$ch++}my$q=
(.
);$_=$q; $q=~
;my@ever=1..&
;my$mine=$q
;{
@_;
}
$mine for @ever
This heart-shaped program is written in the language of choice for producing unreadable and obfuscated code: Perl 5. It also serves an unusual purpose of a proposal.
…Have fun with Unix
Just one line of code, but lots of confusion. What does this program do?
…Some are more equal than others
"And to avoid the tedious repetition of these words: is equal to: I will set as I do often in work use, a pair of parallels, or Gemowe lines of one length, thus: =, because no 2 things, can be more equal." -- Robert Recorde, The Whetstone of Witte (1557)
…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;
…Duff's device
"This code forms some sort of argument (...), but I'm not sure whether it's for or against."
register short *to, *from;
register count;
…