IOCCC Accepting New, 'Improved' Entries
Rudolf writes: "The 16th International Obfuscated C Code Contest is open from now until 01 Dec 2001 23:59:59 UTC. Details are at the IOCCC web site. From the front page,
the contest goals are: -- To write the most Obscure/Obfuscated C program (within contest rules -- To show the importance of programming style, in an ironic way. -- To stress C compilers with unusual code. -- To illustrate some of the subtleties of the C language. -- To provide a safe forum for poor C code. :-)"
There are cases, often with complex logical expression with deeply nested parenthese, && and ||, where the assembly is easier to read than
the so called "high level" source code.
(Well, C is not high-level in any case)
Or would that be too easy?;)
My favorite isn't so much obfuscated code, but hair-brained.. I've actually seen this by paid contract programmers......
String getLetter( int index ){
String [] x = { "A", "B", "C", "D" };
for ( int i = 0; i < 4; i++ ){
if ( i == 0 && index ==0 )
return "A";
else if ( i == 1 && index == 1 )
return "B";
else if ( i == 2 && index == 2 )
return "C";
else if ( i ==3 && index == 3 )
return "D";
if ( i >= 4 )
break;
}
return null;
}
Are they getting paid by the line?
I've written Perl and then come back six months later and been unable to figure out what it was doing. Perl is not the world's first Write Only Language (That honor might go to APL though) but it's certainly one of the better ones.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
The highlight of the annual Computer Bowl occurred when
Bill Gates,
who was a judge, posed the following
question
to the contestants:
After a moment of silence, Jean-Louis Gassee (ex-honcho at Apple) hit his buzzer and answered:
Mr. Bill's expression was, in the words of one who was there, "classic."
Trolling using another account since 2005.
There already is one!
...
Also, if you go to Perl Monks, there are heaps of people submitting obfuscated Perl code for judgement
This is the 1990 winner. A complete basic interpreter. For fun I unobfuscated this code (Took a couple of hours). it's really a piece of art. several commands. Variables. Parentesis and operator precedence. Cool Stuff.
' !' );}d=B;while(*F=*s){*s=='"'&&j
* B){X'E':l=-1
) ,P [*d]=S():(*(q=Q(B,"TH"))=0,p
u ts (B+6):(p=B+5,printf("%d\n",S
#define O(b,f,u,s,c,a)b(){int o=f();switch(*p++){X u:_ o s b();X c:_ o a b();default:p--;_ o;}}
#define t(e,d,_,C)X e:f=fopen(B+d,_);C;fclose(f)
#define U(y,z)while(p=Q(s,y))*p++=z,*p=' '
#define N for(i=0;io&&!*z)_ x;}_ 0;}main(){m[11*R]="E";while(puts("Ok"),gets(B)
)switch(*B){X'R':C=E;l=1;for(i=0;i",'#');U("=",
++;if(j&1||!Q(" \t",F))*d++=*s;s++;}*d--=j=0;if(B[1]!='=')switch(
X'R':B[2]!='M'&&(l=*--C)X'I':B[1]=='N'?gets(p=B
=B+2,S()&&(p=q+4,l=S()-1))X'P':B[5]=='"'?*d=0,p
()))X'G':p=B+4,B[2]=='S'&&(*C++=l,p++),l=S()-1 X'F':*(q=Q(B,"TO"))=0;p=B+5;P[i
=B[3]]=S();p=q+2;M[i]=S();L[i]=l X'N':++P[*d]',>)O(K,V,'$',=)
O(V,W,'+',+,'-',-)O(W,Y,'*',*,'/',/)Y(){int o;_*p=='-'?p++,-Y():*p>='0'&&*p
When compiled and run, it prints out the 12 days of Christmas.
12days.c
And this one is has very interesting source, I think it calculates pi.
pi.c
My beliefs do not require that you agree with them.
I'm a computer programmer, not an English major! If I wanted to write English in my programs, I'd use COBOL!
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
(We gotta keep up with the code bloat like everyone else
(why 521? Well 521 is prime and 2^521-1 is a Mersenne prime and I like primes
chongo (was here)