"Yup, that's with two Rs and two Ls."
Best of  |   Email

2nd December 2009

Link reblogged from Enthusiasms

westley.c →

dailymeh:

Quines and Y combinators, go home. This is a whole new level of meta:

This is Brian Westley’s submission to the 1989 The International Obfuscated C Code Contest. The code compiles in its original form, but also if you reverse it, rot13 it, or both. In all cases, it does the same thing, with four different algorithms: depending on the number of command line arguments you feed to the compiled program, it outputs its input, rot13s it, reverses it, or both. Thus it can produce any of its four working versions when fed itself. In addition, the code is formed like a “K”, for Brian Kernighan, and if you reverse the code, it forms an “R”, for Dennis Ritchie (the guys who made the C programming language and literally wrote the book on it.) Also, according to the hint file: “There is a secret way to get ONE of the versions to print out ‘Hello, world!\n’.” Lots of discussion on reddit.

Westley has made other notable contributions to the IOCCC over the years. One reads like a poem. Part of it:


char*lie;

    double time, me= !0XFACE,

    not; int rested,   get, out;

    main(ly, die) char ly, **die ;{

        signed char lotte,


dear; (char)lotte--;

    for(get= !me;; not){

    1 -  out & out ;lie;{

    char lotte, my= dear,

    **let= !!me *!not+ ++die;

The hint file mentions this wonderful error message if you run the program through lint: “warning: eroticism unused in function main”.

C is truly poetry.

This is entirely insane.

Source: dailymeh