18th International Obfuscated C Code Contest Opens 187
chongo writes "The 18th International Obfuscated C Code Contest, the Internet's
longest running contest, is now open. The goals,
rules, and guidelines are available. Use the online submission tool to submit your obfuscated C code by 22-May-2005 23:59:59 UTC."
Past Winners with Spoilers (Score:5, Informative)
Re:Past Winners with Spoilers (Score:2)
The thing is I know theoretically how the program does it, but I just don't know how he wrote it!
Re:Past Winners with Spoilers (Score:2, Interesting)
It's a command line based ascii to morse converter...
I especially like the fact it's a bunch of DAH DAHDIT!
Re:Past Winners with Spoilers (Score:2, Interesting)
# 1 "arg.c"
# 1 ""
# 1 ""
# 1 "arg.c"
# 9 "arg.c"
char _DAH_[]="ETIANMSURWDKGOHVFaLaPJBXCYZQb54a3d2f16g7 c 8a90l?e'b.s;i,d:";
main ( )
{
char * _DIT,* DAH_,* DIT_,* _DIT_,* malloc (),* gets ( );
for ( _DIT=malloc ( 81 ),DIT_=_DIT++;_DIT== gets ( _DIT );__DIT('\n') )
for ( DAH_=_DIT; *DAH_; __DIT ( *_DIT_?_DAH ( * DIT_ ):'?'),__DIT(' '),DAH_ ++ )
for (* DIT_=2,_DIT_=_DAH_
Re:Past Winners with Spoilers (Score:1)
Re:Past Winners with Spoilers (Score:2)
Mine:
-calculating surface of circle by counting the characters of ascii-arted one,
-the letter from Char(lie) to Char(lotte).
Reminds me of a joke... (Score:5, Funny)
That would be a good joke if Windows were... (Score:3, Insightful)
b) held via Usenet.
I've got a good one in the same vein (Score:5, Funny)
A: Windows sucks!
Re:I've got a good one in the same vein (Score:5, Funny)
A: The Windows NT Chicken is designed to run over the Novell chicken as it crosses the road. Forget about crossing the road with less than 100MB of RAM
B: Win 95 Chicken:
A: The Win95 Chicken can cross any given road in eleven different ways, not counting the use of wizards who will actually cross the road for the chicken. If you can remember all eleven ways, you can become a Microsoft Certified Poultry Specialist (MCPS). If you come up with new way for the Windows 95 Chicken to cross the road, you can become a Microsoft Certified Solution Provider (MCSP.) But if you come up with a whole new chicken altogether, then you will become a Microsoft Certified Enemy (MSROADKILL)
B: Microsoft Chicken (tm):
A: Already owns both sides of the road and the space in the middle (check out "The Road Ahead", by Bill Gates). The Microsoft Chicken no longer worries about getting to the other side of the road. Its sole hell-bent mission is to somehow install MS Internet Explorer on your hard drive and choke the Netscape Chicken.
B: Longhorn Chicken
A: Struts around like it's king, but when it eventually crosses the road, it's indistinguishable from the XP Chicken
Re:Reminds me of a joke... (Score:3, Informative)
- this was I think in 1993 and Gassiee has been more famous since by being the man behind BeOS.
- this was on TV. we NEED to find that episode...
It apparently is not in these archives: http://www.archive.org/movies/movieslisting-brows
Anyone with it? Maybe Mr Gassiee has it
Re:Reminds me of a joke... (Score:2)
Re:Reminds me of a joke... (Score:1)
Re:Reminds me of a joke... (Score:3)
all the links to andrew.cmu are dead as I've removed the video from my webspace, but there are plenty of copies floating around.
Re:Reminds me of a joke... (Score:2)
http://www.sorn.net/misc/CtrlAltDel.asf
Re:Reminds me of a joke... (Score:3, Informative)
Re:Reminds me of a joke... (Score:4, Informative)
http://www.archive.org/details-db.php?mediatype=m
or
http://www.archive.org/details-db.php?mediatype=m
Re:Reminds me of a joke... (Score:2)
Re:the joke's on Gassee (Score:4, Insightful)
No one knew the answer to the quiz question. When it became obvious no one was going to respond, Gassée decided to be facetious with that smug we're-better-than-everyone-else 1980s hubris that would later bring "old Apple" to its knees ("we're so cool we don't need to think about modernizing our OS architecture - you'll never be as good as us").
It's hardly surprising Gates had no pity for Apple during the "GUI OS war" and probably relished seeing that smug attitude pounded into the dirt.
And it's very fortunate for Apple that when Jobs returned to save it from bankruptcy, he took a groveling stance towards Gates and told the fanboys, "Microsoft is not the enemy. For Apple to survive, we have to do a really good job." A much better attitude than a smartass remark designed to antagonize an extremely powerful man.
Our Legacy code (Score:5, Funny)
Re:Our Legacy code (Score:2, Funny)
Re:Our Legacy code (Score:2)
Appropriate forum (Score:2)
Hmm.. (Score:5, Funny)
Mirrors (Score:5, Informative)
www.au.ioccc.org - Sydney, Australia
www.de.ioccc.org - Frankfurt/Main, Germany
www.es.ioccc.org - Madrid, Spain
www.gr.ioccc.org - Athens, Greece
www0.us.ioccc.org - Sunnyvale California, US
www1.us.ioccc.org - Saint Paul, Minnesota US
Imawhore (Score:5, Informative)
Full text of rules.txt
Re:Mirrors WITH A CLICKABLE LINK (Score:3, Informative)
I wonder... (Score:3, Interesting)
Re:I wonder... (Score:5, Funny)
http://humorix.org/articles/2000/09/unobfuscate
Re:I wonder... (Score:4, Funny)
Re:I wonder... (Score:5, Funny)
Oh, it would be hard, just not in the way you think. If none of the judges can figure out any of the entries, how would they be able to pick a winner?
--Ryv
Re:I wonder... (Score:4, Informative)
Re:I wonder... (Score:5, Interesting)
One example - one competition involved calculating and printing out the huffman codes for a given input - the winner achieved this with a 76 character perl program!
find more here:
http://www.google.com/search?hl=en&q=perl+golf [google.com]
or here http://terje.perlgolf.org/ [perlgolf.org]
Yes (Score:5, Funny)
Re:I wonder... (Score:2, Funny)
Everyone's a winner!
Re:I wonder... (Score:2)
Re:I wonder... (Score:3)
Re:I wonder... (Score:2)
Quoth the output, "I've dumped a core" (Score:5, Funny)
code obfuscated like ne'er seen before.
I could hear a faint grinding,
As the preprocessor went on finding,
it was a noise I could plainly say I abhor.
T'was an executable destined to dump quite a core.
It was a nice sunny day, I remember, in May,
and there lay pizza boxes scattered all o'er the floor.
But because of this Gentoo, I felt I was being sent to
the depths of hell for damnation evermore.
All for a program that would dump its core.
In time, day diminished, and gcc was finished,
and the program was a size worthy of lore,
because of the a.out, my hard drive near ran out,
as the program took up gigabytes galore,
and when I ran it, quoth the output, "I've just dumped a core."
Slashdotted (Score:2)
while I websurfed, weak and weary,
Over many a strange and spurious
website of hot chicks galore,
While I clicked my fav'rite bookmark,
suddenly there came a warning,
And my heart was filled with mourning,
mourning for my dear amour.
'Tis not possible, I muttered,
give me back my cheap hardcore! --
Quoth the server, "404".
Yes but the real question is... (Score:2)
Re:Yes but the real question is... (Score:2)
Careful! (Score:1)
It's a great program; one that has been distracting me since March 1st [slashdot.org]!
Maze of Code (Score:5, Interesting)
char*M,A,Z,E=40,J[40],T[40];main(C){for( *J=A=scanf(M="%d",&C);
-- E; J[ E] =T
[E ]= E) printf("._"); for(;(A-=Z=!Z) || (printf("\n|"
) , A = 39
) ; Z || printf (M ))M[Z]=Z[A-(E =A[J-Z])&&!C
& A == T[ A]
|6<<27<rand()||!C&!Z?J[T[E]=T[A]]=E,J[T[A]=A-
Re:Maze of Code - Does NOT work with Visual Studio (Score:1)
Click on OK to terminate the program
Click on CANCEL to debug the program
OK Cancel
OMG (Score:4, Funny)
(Real men use visual basic!!!!)
Re:Maze of Code - Does NOT work with Visual Studio (Score:2, Informative)
gcc -fwritable-strings -o maze maze.c
Re:Maze of Code - Does NOT work with Visual Studio (Score:2)
I don't know if VC has an option for it, but what it does is allow you to write to string constants. Without it, it will segfault.
Re:Maze of Code - Does NOT work with Visual Studio (Score:2)
Re:Maze of Code (Score:4, Informative)
There's another one in which the program is shaped like a sailor's semaphore, and produces stick-figure cartoons of a sailor waving semaphores to spell out a user-supplied message.
Speaking of obfuscated code... (Score:5, Informative)
Re:Speaking of obfuscated code... (Score:5, Funny)
This truly brings tears to my eyes...
Oh why aren't we teaching more people to code like this?
Re:Speaking of obfuscated code... (Score:2)
Tears...chest pains...same thing.
Re:Speaking of obfuscated code... (Score:2)
Re:Speaking of obfuscated code... (Score:2)
In my experience, code like that often comes about as a programmer is experimenting with a different algorithms (sometimes to fix bugs) and simply forgot to finish refactoring that slice.
For instance, I once used a byte array of one 1 element as a buffer! The reason was that my previous design overused Java IO streams. The next version (which is much simpler) just modified the bytes directly from a single stream. However, with my brain in "byte" mode I tried to use bytes where I should have used an int.
Re:Speaking of obfuscated code... (Score:2)
int buffer;
while((buffer = in.read()) != -1) {
It reads the easiest, to me. "While the read operation doesn't return -1"
Since most read operations return the number of characters/bytes read though, I'd probably write it as:
while ((buffer = in.read()) > 0)
to give a clearer indication of expecting more than 0 characters/bytes. Maybe I'm just overly used to reading while(read(buf,1024) > 0) statements.
Re:Speaking of obfuscated code... (Score:2)
That wouldn't work, since the null character is still a legit byte. Did you mean:
That's why I usually deal with buffer classes and streams for both reading and writing rather than looking at the bytes by hand. :) However, in this case they were overkill for my method.
Re:Speaking of obfuscated code... (Score:2)
I actually had a problem with the null character recently where somehow one of them ended up in an XML document and my parser was just choking all over it and I couldn't figure out why until I pulled the source into a hex editor the examine all the character codes specifically
Re:Speaking of obfuscated code... (Score:2)
That's true in C, but not in Java. Try this code fragment:
The first println w
Re:Speaking of obfuscated code... (Score:2)
Correction! Actually, the faulty line was:
That's what I get for typing from memory...
Re:Speaking of obfuscated code... (Score:5, Funny)
while (strncmp(p," ", 1) == 0)
++p;
To find the first non-space character in a string.
Re:Speaking of obfuscated code... (Score:2, Funny)
Apologies Mr Watterson: (Score:3, Insightful)
That pink stuff on the walls... (Score:4, Funny)
But what's the point? Why expend all that effort on obfuscating code when there are languages with obfuscation already built in [archive.org]?
Ode to C. (Score:5, Funny)
May your references be bounded
All memory aligned
Floats to ints rounded
Remember
Non-zero is true
++ adds one
Arrays start with zero
And NULL is for none
For octal, use zero
0x means hex
= will set
== means test
use -> for a pointer
a dot if its not
? : is confusing
use them a lot
a.out is your program
there's no U in foobar
And char (*(*x())[])() is a function returning a pointer to an array of pointers to functions returning char.
Re:Ode to C. (Score:2)
Re:Ode to C. (Score:2)
For the same reason you can't use words like "abstruse" in any modern text. People just don't want to learn their language before insisting on using it.
Re:Ode to C. (Score:2)
Re:Ode to C. (Score:2)
No, I'm trying convey my perspicuous indignation at the tenacity of human ignorance. The ignominy of its apostles inspires enmity and distaste in any reasonable man. Alas, the conundrum of their persistence is unexplainable.
Not many languages could have such a contest (Score:4, Insightful)
Wasn't there some kind of obfuscated vote counting software contest announced before the recent US election? I would like to see some of the entrants into that.
But C++... (Score:2)
- operator overloading
- multiple inheritance...
Re:But C++... (Score:2)
Re:Not many languages could have such a contest (Score:2)
A tattoo of obfuscated C ... (Score:5, Interesting)
http://tattoo.thomasscovell.com/index.html [thomasscovell.com]
This I also love - the first ever entry was a hello world program!
That entry was the longest one ever made into a tattoo, however there are hundreds of people around the world who have unknowingly had this entry tattoed on their forearm:
http://www.de.ioccc.org/years.html#1994_smr [ioccc.org]
This is really a great competition - lots of fun, lots to learn. Try understanding how some of the entries work, its really a challenge sometimes, and you can learn plenty about C and the preprocessor.
Re:A tattoo of obfuscated C ... (Score:2)
http://www.de.ioccc.org/years.html#1994_smr [ioccc.org]
wow. I didn't realize that I had that tattoo!
Winner of all times (Score:4, Funny)
Learnings from the Competition ... (Score:3, Insightful)
They certainly achieve their goal of showing how bad caode can be and also of providing a safe forum for amazing C code.
I have also learnt much better how to program in C, even for unobfuscated code. There is nothing like going through some of these entries to understand much better how the preprocessor works, and how compilers react to differrent constructs.
So, the only goal left is that of stressing the C compilers
Last Year's Winners (Score:2, Interesting)
I'd recommend you stick to v1.0 {which is actually PD}, for licencing reasons. The v2.8 licence is unnecessarily restrictive.
Who thinks.... (Score:4, Funny)
Submitting SCO code? (Score:2)
But what happens if someone submits obfuscated SCO code? Heck, what happens if someone submits code that used to be proprietary? Noone really checks, and say the code gets printed on T-shirts and the like, and is discovered by the owners, wonder what the consequences will be.
I'll just send my sendmail.cf
A more interesting contest of skill (Score:2)
The many who do not write good code also produce obfuscated code without even trying. This is particularly true with large projects, done by groups, over time, and with limited oversight.
Another interesting contest would be to see how fast different people could figure out such code.
Great! (Score:2)
Finally.. (Score:2)
Is it just me... (Score:2, Funny)
You want obfuscated? (Score:4, Informative)
Try this:
Whitespace [dur.ac.uk]
It is so obfuscated, you cannot even see it!
Re:You want obfuscated? (Score:3, Interesting)
Re:Rawr (Score:3, Funny)
Re:Rawr (Score:2, Funny)
Besides, if Keanu Reeves can do it, anyone can.
Re:Rawr (Score:2)
Re:Rawr (Score:1)
Grr (Score:1)
Re:Grr (Score:2, Informative)
Re:Oh. My. God. (Score:1)
Re:Oh. My. God. (Score:3, Funny)
Like... posting on Slashdot?
I agree with you. Join us. Join us. (Score:5, Funny)
Unproductive labor is bad. Only productive units can be allowed in hive. Workers who waste energy must be sent to the vats. It is therefore in interests of workers to be productive. To conserve energy. To obey.
(This message brought to you by the World Utilitarian Council).
Too right! (Score:3, Funny)
Re:Oh. My. God. (Score:2)
Seriously if I see what most people do for the play part, watching TV, reading slashdot,
It's not like most people are productive 16 hours a day (or more if they sleep less than 8 hours).
Re:Simple (Score:1)
I wrote this to my (girl) friend (Score:3, Funny)
int ec(int c){return c-5;}
void dc(char *s){if(*s){putchar (ec(*s));dc(s+1);}}
int fp();se(f){f&1?fp():f&2?
fp2(): f&4 ? fp3():0;}
fp(){char t[4] = "";dc("N%fr%ytt%ynwji%ytif~33%|fsy%f%ltti%mtrj%rf i j%yjf%gjktwj%mjfinsl%mtrj$");putchar(012);dc("Nx%n y%utxxngqj%ytif~D%`~jx4stb%");gets(t);(!strcasecmp (t, "yes"))?
se(2):se(4);}
fp2(){char s[21]="";dc("|mfy%ynrj%hfs%N%iwtu%nsD%");gets(s);
dc("N%|nqq%gj%ymjwj%g~%");puts(s);dc("Ymfsp%~tz") ;
s/Oxymoron/Redundancy/; (Score:3, Informative)