国际C代码混乱大赛^_^
时间:2005-12-10 来源:puvttd
转载:http://www.ttian.net/forum/viewtopic.php?id=57
{copyright reservered}
“国际C代码混乱大赛”起始于1984年。一位程序员在看了4.2BSD里的Bourne Shell的源代码后感叹道:“天哪!这太恐怖了!”于是他在USENET的新闻组上提出,如果程序员故意将代码写得乱七八糟,那么代码究竟能乱成什么模样?[主办者的介绍]遂就举办了第一届“C代码混乱大赛”。那一届的规则很简单,就是在512字节内,最大程度的写出混乱但是可以顺利编译的完整C代码。之后,这项比赛持续举办了下去。由于是在互联网上举办的,所以参加人数众多,范围也很广。终于它变成了今天的“国际C代码混乱大赛”,并且成为众“黑客”们一展编程功力和与众不同的想象力的舞台。
{copyright reservered}
“国际C代码混乱大赛”起始于1984年。一位程序员在看了4.2BSD里的Bourne Shell的源代码后感叹道:“天哪!这太恐怖了!”于是他在USENET的新闻组上提出,如果程序员故意将代码写得乱七八糟,那么代码究竟能乱成什么模样?[主办者的介绍]遂就举办了第一届“C代码混乱大赛”。那一届的规则很简单,就是在512字节内,最大程度的写出混乱但是可以顺利编译的完整C代码。之后,这项比赛持续举办了下去。由于是在互联网上举办的,所以参加人数众多,范围也很广。终于它变成了今天的“国际C代码混乱大赛”,并且成为众“黑客”们一展编程功力和与众不同的想象力的舞台。
下面是历年的获奖作品。
年代
文件名 概要
1984下载
anonymous prints hello world, where read is write
decot prints garbage, weird cpp defines (keywords for others)
laman prints spiralling numbers, laid out in columns
mullender hardcoded vax and pdp-11 code to move :-) across the screen
1985下载
applin one-liner to print hello world, with execlp
august cpp obfuscated, compressed, main-recursive primes in binary
lycklama heavily cpped with o_oo identifiers, scrolls text right
shapiro two defines, one 7-liner, results in a maze
sicherman rot13 with strange #defs that create comment headers etc.
1986下载
applin hello world works under cc, /bin/sh, and f77
august struct-heavy e-computation, memory allocation with sbrk
bright hex dump, cpp compressed, uses lost of << for constants
hague morse code filter written with 'DIT DAH _DIT DIT_DAH'
holloway prints hello world! via a recursive main
marshall train engine-shaped program prints "choo choo"
pawka prints 'obfuscated?' big, uses xyyyx idents...
stein prints HHMMSS in UTC time
wall dvorak keyboard emulator
1987下载
biggar program: "P;" defined on command line
heckbert obfuscated fold program
hines counts goto's, all ids anagrams of 'goto', all flow w goto
korn one-liner that prints a message on a Un*x system
lievaart very good othello player
wall roman numeral -> decimal and vice versa conversion
westley individually palindromic lines prints a palindrome
1988下载
applin massive #define stuff, includes itself; prints table of primes
dale prints command line, using lots of system calls
isaak table driven table of the elements; cpp, self-inclusion
litmaath sorts each arg using only argc, argv, and 'while(<cond>);'
phillipps 'first day of christmas', tables, heavily main() calling
reddy prints name of 'char *(*(foo[16])();', compressed
robison print e in any base, uses only --, >=, and while()
spinellis #include "/dev/tty"
westley prints '3.141', circle made of '_-_-_-_' in layout
1989下载
fubar self-reconstructing, recompiling factorial program
jar.1 char*_="Hello world. ";
jar.2 lisp interpreter, compressed
ovdluhe monkey-typer following template, 'APE' identifiers
paul print fibonacci base 2 by simulating turing machine
robison apl-expression interpreter (binary), written in C--
roemer prints e, script-pi shaped layout, _31415 identifiers
tromp squished tetris
vanb one-liner prints all subsets of arguments
westley reversible, rot13able program that reverses and/or rot13s.
1990下载
baruch short prog to solve N-queens problem
cmills squished blackjack game
dds basic interpreter, heavily compressed
dg rot13 done with strange cpp macros
jaw compress & atob standins
pjr the quick brown fox... cppd, structs of functions
scjones trigraph-abusing self-reproducing program
stig nested-comment tester (all on command line)
tbr simple compressed shell, silly layout
theorem numerically solves the equation y'=f(x,y)
westley poetic exchange between lovers, prints "luvs me, luvs not"
1991下载
ant compressed vi-like editor
brnstnd sorta stack language
buzzard walk thru a maze from a first person point of view
cdupont prints a message without vowels
davidguy plays life on a root window, doesn't need Xlib or include files
dds basic compiler, heavily compressed
fine rot13s lines of input
rince game with sprites, boulders, dimonds, and keys
westley plays tic-tac-toe, compile output for next move, prints board
1992下载
adrian grep-like utility using a state machine transition language
albert factors multi-precision numbers with factors < MAX_LONG
ant make utility
buzzard.1 print factorial, gcd or prime test using a Babbage-like engine
buzzard.2 forth-like stack machine
gson anagram generator
imc Mandelbrot/Julia drawer
kivinen X11 space invaders, dropout and knockout games
lush prints "Hello, World" using error messages
marangon game to balance a grid of digits to all 5's
nathan obfuscation by (trivial) encryption (source not exported)
vern plays chess
westley print ASCII world map and mark a location by lat/long
1993下载
ant egrep utility with Posix-like documentation
cmills X11 program that shatters and bounces windows
dgibson plays the game of like using cpp
ejb tower of Hanoi and patience pizzle
jonth game of Tetris
leo game of mastermind (cows & bulls)
lmfjyh source is the filename, prints value of __FILE__
plummer prints numbers up to a given value
rince game state machine language, comes with a number of games
schnitzi answers questions about English text in a file
vanb calculator that prints in octal
1994下载
dodsond1 plays a game of othello
dodsond2 Hunt the Wumpus (gziped source)
horton Plot cubic equations on a tty
imc print a random n by n magic square
ldb print a random line from stdin
schnitzi flips stdin along a diagonal (source mirrored along diagonal)
shapiro print time of day on an tty
smr world's smallest self reproducing program
tvr interactive fractals for the X Window System
weisberg prints prime numbers
westley Adventure/Dungeon like game played via the C pre-processor
1995下载
cdua Generate a maze on the scren and then solve it
dodsond1 Text to "Pig Latin" translator
dodsond2 Interactive 3D Maze
esde Searches for words in a file which have the same Soundex code
garry Environment-expansion and binary output via escaped env vars
heathbar 16 bit addition the easy/hard way
leob Output interesting patterns and cycles in PostScript
makarios Emits the base 8 representation of prime palindromic in base 8
savastio Infinite-precision factorial calculator
schnitzi Find divisors: where a core dump is a feature, not a bug
spinellis Abusing the rules
vanschnitz Towers of Hanoi via the C pre-processor
1996下载
august Subset of C compiler and byte code interpreter
dalbec Generator of strong probable-primes to a given base
eldby Flying 3D spheres in an ASCII display
gandalf Displays the ASCII and 8 bit character tables
huffman Braille to ASCII and vice versa
jonth X based dual player tic-tac-toe game
rcm Gunzip equivalent
schweikh1 Gunzip equivalent
schweikh2 Search for a limited class of expressions that equal a constant
schweikh3 Determins the memory allocation honesty of the OS
westley Shows the time on clock with a configurable face and style
1997
----
There is no contest in this year.
1998下载
banks A flight simulator!
bas1 Outputs a gziped 3D beam maze in Postscript
bas2 determines the size of stdin under IOCCC sizing rules
chaos Rotates and zooms an object using ASCII graphics
df A word guessing game
dlowe Pootifies stdin (useful to view Microsoft html files)
dloweneil A very addictive ASCII poot game
dorssel ASCII / Morse code translator
fanf Translates Lambda expressions into combinator expressions
schnitzi Prints a C program that sorts arguments using strange functions
schweikh1 Tests to see if your compiler and headers are standard
schweikh2 Prints random 0's and 1's; causes some gcc's as passes to choke
schweikh3 Finds duplicate files that waste disk space
tomtorfs CRC generator
1999
----
There is no contest in this year,too.
2000下载
anderson ASCII to semaphore code convertor
bellard Prints M6972593 (2^6972593-1) by Modular Fast Fourier Transform
bmeyer An image compressor
briddlebane Verbally abuses the user
dhyang Saitou Hajime image that prints a prog that prints a prog ...
dlowe A dc-style calculator that uses embedded Perl
jarijyrki An X-based spreadsheet program with graphing features!
natori Phase of the moon
primenum Source with English words that looks like a prime tester
rince Plots the positions of the four Galilean moons of Jupiter
robison Highly Compressed Program for Playing Hygienic Checkers
schneiderwent Prints the aproximate time in words
thadgavin Prints a dazzeling moving image under multiple interfaces
tomx C source, shell program and Makefile
说明:
以上程序请在Unix环境下编译,或使用GCC核心编译器,例如 Dev-C++ 编译器
最后补充一句——千万不要在自己的代码中这样做,除非你报名参加这项比赛!
copyright announcement:
this publishment is under protection of GPL--GNU General Public License,and is published in 天天安全网(http://www.ttian.net) by lzp729.
every person or organization CAN NOT republish this article in any publishment or web site without
declaration of this announcement.
All files are stored in The Free Software Library(http://yea.xiloo.com)
转载:http://www.ttian.net/forum/viewtopic.php?id=57