Songs in Code: One Second, Paradise Lost

#include <unistd.h>
int main(int argc, char *argv[]) {
    sleep(1);
    return 0;
}

Explanation: the program exits after one second.

Songs in Code: Eraser, Nine Inch Nails

void e( head ) {
    if ( head->tail )
        e( head->tail );
    free( head );
}

Explanation: deletes a linked list.

Songs in Code: Destroy Everything You Touch, Ladytron

touch * && rm *

Explanation: “touch” all files, then if that is successful, delete them.

Songs in Code: 4 o'clock, Emilie Autumn

lover.clock.tick()
for girl in girls:
    assert(girl.clock.remaining<TIMEOUT)

Explanation: “ticking away from the ones we love, so many girls, so little time”.

Songs in Code: Lost Forever, uncertain attribution

while True:
    assert( self not in universe ), "http://maz.nu/wpaf"

Explanation: continuously test that “self” is not in the “universe” and raise an unexpected error if it is.

Pages

Subscribe to mazblog.c3.archive.hosted.faelix.net RSS