Domain: ioccc.org
Stories and comments across the archive that link to ioccc.org.
Comments · 408
-
obfuscated code
just like this contest has been promoting for years, obfuscated code may "fool" any automated tool that would somehow parse various languages. Virus writers already display some talent -- this would just encourage them to be more creative with the source.
-
one thing to try
An interesting thing you could do with a PDP-11 emulator is try out one of the winning entries from the 1984 IOCCC that requires a PDP-11 to run. Look at the entry and you'll see why.
:-) -
Sick programmers...
If you really want to see how sick programmers spend their time, surf over to The Obfuscated C Contest. It has been going on for years, I used to try it back in the 80's, but I was not sick enough! LOL!
Check out the archives and try to compile the winners and at last run the result for both amazement and amusement.
Good Luck!
Oh, the SED Sokoban was neat, but I lost interest after 8 moves... So much for your work... -
it's called Software Quality Metrics
A quick trip to the IEEE's online store, and about $300 bucks will give you all the gory details you need to measure software quality
... provided you consider that software quality synonyous with programmer productivity.
For example. In grad school, we took the 1992, IEEE Standard for a Software Quality Metrics Methodology, along with GNU Flex, and wrote a program that would slice-n-dice C & C++ programs against a table of measureable metrics for code readability and reusability.
Of course, we had a blast testing it against winning entries from the 9th International Obfuscated C Code Contest. But we also noticed that there were just some things that it would never be able to test. For exmaple, while our little app spotted code that was uncommented, it could not tell us whether or not the comments were useful or relevant.
Point is, judging code and productivity is always (or at least until HR offices are equipped with Beowulf's) going to have a subjective element. Because lets' face it, when it comes down to it, many bosses really only care that the job gets done on-time and under-budget.
Or what's that great line from the movie "War Games" ... Hell, I'd piss on a spark plug if I thought it'd help. -
Re:Here's an idea for a contest
The entry is 2000/primenum. He won again this year (Best Short Program).
-
It has been done
... without just appearing to be in another language, but actually being so. Take a look here . Genius or travesty?
-
Re:Did Microsoft enter this year?We (the judges) don't look at who submitted the entries that did not win, so we could not tell you.
There was the Bill Gates award that was given out back in 1993.
On a slightly related topic, one can use the Best Utility from 1998 to pootify Microsoft's web site for better reading.
:-) -
Re:Did Microsoft enter this year?We (the judges) don't look at who submitted the entries that did not win, so we could not tell you.
There was the Bill Gates award that was given out back in 1993.
On a slightly related topic, one can use the Best Utility from 1998 to pootify Microsoft's web site for better reading.
:-) -
Re:Did Microsoft enter this year?We (the judges) don't look at who submitted the entries that did not win, so we could not tell you.
There was the Bill Gates award that was given out back in 1993.
On a slightly related topic, one can use the Best Utility from 1998 to pootify Microsoft's web site for better reading.
:-) -
GPL Abuser WINS the IOCCC CONTEST!
GPL ABUSER has WON the IOCCC CODE CONTEST!
-
The list of who wonAn updated list of who won the 16th IOCCC may be found at:
http://www.ioccc.org/whowon.html
We have already had one anonymous winner request to become non-anonymous.
-
Re:It's a GPL violation, and more
But there are simpler remedies than legal ones. If the free software developer community hears about a product using obfuscated code to circumvent the GPL, they will retaliate by creating a non-obfuscated version and using it to compete with your company's product.
Even if that company releasing their code under the GPL would legally and technically make the code perfectly obfuscated (which of course is impossible, as even the IOCCC winning entries are not even near that goal) they have to tell their customers, that they can legally copy and resell it however they want. I don't think that company would love such an idea... -
Re:Total obfuscation is not possible
Good point, besides, there are many experts that can be called upon.
-
Obfuscated?!?!
All this talk of obfuscated makes me worry. This is preferred code here: http://www.ioccc.org/
This place seems to provide a sort of "safe forum" for these guys. There is a whole community of these people who would love to get their hands on code like this.
JFYI: I am completely kidding.
However, we should get this contest shut down immediately before it destroys our infallible license.
-
Are you sure?
*proved* the impossibility of efficiently obfuscating programs.
Obviously they have never heard of IOCCC :-) -
Obfuscated Code?
It says you must provide source. But that does not mean that you can't also enter it in an obfuscated programming contest!
-
What Concerns Me
I don't think cheaters should be caught and here's why. Cheaters won't learn and in the real world will not succeed as developers. So who cares if they pass a few courses along the way. I knew a cheater in school who later cheated at work and was fired.
But instituting a cheat-detector, especially as lamely as some have indicated, will force students to find "creative" ways to make their code different from their classmates. Not better, but different. These people will be educated enough to be successfully employed. But their code will be fraught with illogic and inelegance because of the ingrained "must be different" attitude. Coding standards will be ignored completely. People will begin to submit production code to the IOCCC. And software quality as a discipline will take a huge step backwards.
-
Re:Obfuscator App
That's why it's an obfuscator and a thesarus! Don't you know about Obfuscated code?
-
Re:OOPs (I did it again)
Somebody used error messages like that to implement an adventure game a while back. In C though, not C++
;-)
Here it is; it's one of the 1994 winners in the IOCCC (International Obfuscated C Code Competition).
westley.c: "Adventure/Dungeon like game played via the C pre-processor"
(The main index is here.) -
Re:OOPs (I did it again)
Somebody used error messages like that to implement an adventure game a while back. In C though, not C++
;-)
Here it is; it's one of the 1994 winners in the IOCCC (International Obfuscated C Code Competition).
westley.c: "Adventure/Dungeon like game played via the C pre-processor"
(The main index is here.) -
Re:OOPs (I did it again)
Somebody used error messages like that to implement an adventure game a while back. In C though, not C++
;-)
Here it is; it's one of the 1994 winners in the IOCCC (International Obfuscated C Code Competition).
westley.c: "Adventure/Dungeon like game played via the C pre-processor"
(The main index is here.) -
The URL Elite
Oh yeah. People are stupid.
Ignorance of URL synatx == stupidity? Perhaps you think the world would be a better place if it were ruled by people who'd won the Obfuscated C contest. Scary thought that. -
Re:language preference
If you think that crossover between coding and art demeans both, take a look at The International Obfuscated C Code Contest. There are some quite artistic pieces of code there, for example the one that looks like an ASCII ball and calculates pi.
-
Re:Not a trollBut isn't it obvious why it doesn't work? No?
yes - obvious as soon as I tried running it - lets see
perl -e '@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";
sub p{@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*= 2) +=$f=!fork;
map{$P=$P[$f^ord($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;
map{$p{$_}=~/^[ P.]/&& close$_}%p;wait until$?;map{/^r/&&}%p;$_=$d[$q];
sleep rand(2)if/\S/;print '
syntax error at -e line 4, near "&&}"
Line 4 , near "&&}" ,eh? - well "&&}" looks plain wrong anyway - grepping the code for this clause points me to the map{/^r/&&} fragment . Now && is the C-style "short-circuit" logical "and" operator - so there should be a right hand side there - lets try just losing the && altogether
perl -e '@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";
sub p{@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*= 2) +=$f=!fork;
map{$P=$P[$f^ord($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;
map{$p{$_}=~/^[ P.]/&& close$_}%p;wait until$?;map{/^r/}%p;$_=$d[$q];
sleep rand(2)if/\S/;print '
tl hnU ei hPkaecJua/ sterrnoxr
Ok - I get it its a JAPH - and this guy has obviously cut and pasted
it from somewhere and something has munged his code - presumably the
slashdot form - hmmm -if he's posting HTML and there was to be a line
input operator pair there < > then they wouldn't display
properly in the browser. Wonder what the filehandle name could be - well
the only thing in scope inside that map { } block is the implicit $_
coming from the %p elements on the RHS of the map statement - lets try
that
perl -e '@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";
sub p{@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*= 2) +=$f=!fork;
map{$P=$P[$f^ord($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;
map{$p{$_}=~/^[ P.]/&& close$_}%p;wait until$?;map{/^r/&& <$_>}%p;$_=$d[$q];
sleep rand(2)if/\S/;print '
Just another Perl / Unix hacker
Each letter appearing after a certain delay - hey , thats quite cute !
This took me lest than a minute to run debug and fix - without even
analysing the core algorithm there - just responding to the helpful
diagnostic messages emitted by the perl interpreter and fixing the
obvious syntax error ( with a little lateral guesswork ). Bear in mind
that (i)I am no perl guru , by any means and (ii) this
is a JAPH - its supposed to be a cute obfuscated bit of code
for people to have fun decoding and figuring out. So no, I don't
accept your point at all - would you judge the quality of the C
programming language based on the entries from the annual Obfuscated C
contest. No ? I'd also wager it would take you (or me) a damn sight
longer than two minutes to debug one of those beauties based
on someone elses poor transcription. -
Except..
Many of your Joe-Windows-users likely said they were experienced.. Who decides the person's skill level? If they aren't chosen by the person being tested but rather by a selective approach.. what constitutes experienced? The testing for if someone is experienced or not could end up rigging the voting process. Anyway, this is probably answered on the webpage if only I bothered to read it.
I vote you must grok this to qualify as experienced :) -
Re:Precedence and Associativity cause Unreadable C
If you're just talking about readability, Lisp is much more readable than most other languages. Especially "popular" ones like C++ and Perl.
Not to troll, but what are you smoking?!
Did you get fired over a misplaced operator in the past, or something, and still hold a grudge against C? Because operator precedence is not the major obstacle to readability in any language. Let's talk about block structure.
Lisp:
(while (< (point) (match-end 2))
(setq s (read (current-buffer)))
(if (<= (point) (match-end 2))
(setq tcl-default-command-switches
(append tcl-default-command-switches
(list (prin1-to-string s)))*))))))
Java:
if (imp==null)
{IJ.noImage(); return;}
if (arg.equals("reset")) {
nLanes=0;
saveID=imp.getID();
if (plotsCanvas!=null) {
plotsCanvas.reset();
}
*
return;
}
I've inserted a star in each of these code snippets. Which block does the star fall in? This is what makes the C/C++/Java/Perl languages 30 times more readable, for all their faults, than the Lisp/Scheme family.
What's that? You say Emacs has built-in support for helping you find out which s-expression the star is in? Dude. If you need a computer to help you read code, the code isn't readable.
Let's be honest here. What are the real usability problems with languages?
- C++: Well, it isn't operators. It's bad compiler messages. And templates. (e.g. for (list<IEye>::iterator i = boz.begin(); i != boz.end(); i++) { pitchfork.jab(*i); (*i).bleed(); })
- Perl: All that $_<=>@*_ing punctuation. And a cultural bias against readability.
- Java: Listeners and anonymous classes.
- C: The compiler again. And a cultural bias against readability.
- Python: None (it was developed by one of those annoying usability gurus)
- Lisp: All those damn parens. You can say it's not a problem 'til you're blue in the face. But it is.
I haven't done usability testing with programming languages. But I can guess what you'd find if you did:
- One statement per line aids readability.
- 30 lines of short, simple statements are easier to read than 10 longer, more complex lines.
- A distinction between statements and expressions aids readability.
- Deeply nested code and structures are confusing. Flatness is good.
- Meaningful error messages help.
Lisp goes against every one of these principles.
-
Re:How does this compare to the other flight sims?
-
Re:How does this compare to the other flight sims?
-
Re:How does this compare to the other flight sims?
-
The Essies
There is also an IOCCC-like contest for esoteric languages. It's homepage is here.
Take a look especially at Sorted!, which is a real cute language... :)
Another list of esoteric languages is also available. -
Perl trying to outgrow its niche
Let's face it, perl is absolutely great for its original intention - fast, easy, write-and-forget scripting. But as I see the plans for Perl 6 unfold, one thought comes to my mind - Yuck. The language they propose is bloated and convoluted beyond words; it's clearly evident that Wall and his fellow "designers" are struggling vainly to make Perl "grow up" -- something that it has absolutely no need to do. There are other languages out there to fill the other niches; languages which try to do everything doom themselves to failure. Ambition kills.
-
Re:Is It Open to the Pros?All entries must be in the public domain. We toss out anything that comes with a copyright. So unless Micrsoft started giving away
...p.s. Speaking of twisted array references I like Korn's: 1987 Best One Liner:
main() { printf(&unix["\021%six\012\0"],(unix)["have"]+ "fun"-0x60);}
Try to figure out what it does without compiling it first. Over the years I have not found very many people who could do it correctly the first time.
It compiles with out any special flags:
cc korn.c -o korn
Hint: it does not work the same on a Microsoft based system.
:-) -
Stress test C Compilers?Typically each year we find that at least 1 entry that will cause someone's C compiler to dump core or go haywire.
Over the years, gcc has survived the best. It has chucked core cookies on a few entries, but not nearly as often as some of the commercial C compilers.
If a winning entry does cause problems for somebody's C compiler, we usually file a bug report. They may not be pleased with the code sample, but that is the break;'s.
:-)p.s. The entry that broke causde the most problems on the most platforms was the 1988 Best of show. Not only did it crash a few C pre-processors, it cause one system to turn casters-up when it ran out of swap space!
-
The 1998 flight simulatorFYI: The 1998 X-Windows flight simulator, along with a sample data file, is on-line. The server is a little slow, but you should be able to fetch it.
FYI: This year we are allowing use of OpenMotif which should improve things for folks writing new X-Windows progs.
-
Best of IOCCCYes, your 1990 Best Language Tool was an outstanding entry. It was one of several of outstanding wins that I have had the pleasure of judging over the years.
However, the greatest and longest laugh at a IOCCC BOF occurred when I presented your 1998 Best abuse of the rules. For those you were not there, his entry consisted of a single, simple Un*x portable line of code:
#include "/dev/tty"
That Truely twisted entry is listed in my top 10 all time best IOCCC progs. -
Best of IOCCCYes, your 1990 Best Language Tool was an outstanding entry. It was one of several of outstanding wins that I have had the pleasure of judging over the years.
However, the greatest and longest laugh at a IOCCC BOF occurred when I presented your 1998 Best abuse of the rules. For those you were not there, his entry consisted of a single, simple Un*x portable line of code:
#include "/dev/tty"
That Truely twisted entry is listed in my top 10 all time best IOCCC progs. -
Best of IOCCCYes, your 1990 Best Language Tool was an outstanding entry. It was one of several of outstanding wins that I have had the pleasure of judging over the years.
However, the greatest and longest laugh at a IOCCC BOF occurred when I presented your 1998 Best abuse of the rules. For those you were not there, his entry consisted of a single, simple Un*x portable line of code:
#include "/dev/tty"
That Truely twisted entry is listed in my top 10 all time best IOCCC progs. -
Re:a couple of my favs
This one is funny: http://www.ioccc.org/1990/westley.c
No clue what it does, but it's arranged as a series of letters.
And you've gotta read the hint file for http://www.ioccc.org/1995/heathbar.c.
I can't find the one I wanted to link to... It was a program to print a maze, in the shape of a maze, that spelled the word "MAZE". Quite beautiful. -
Re:a couple of my favs
This one is funny: http://www.ioccc.org/1990/westley.c
No clue what it does, but it's arranged as a series of letters.
And you've gotta read the hint file for http://www.ioccc.org/1995/heathbar.c.
I can't find the one I wanted to link to... It was a program to print a maze, in the shape of a maze, that spelled the word "MAZE". Quite beautiful. -
Re:a couple of my favs
This one is funny: http://www.ioccc.org/1990/westley.c
No clue what it does, but it's arranged as a series of letters.
And you've gotta read the hint file for http://www.ioccc.org/1995/heathbar.c.
I can't find the one I wanted to link to... It was a program to print a maze, in the shape of a maze, that spelled the word "MAZE". Quite beautiful. -
new to this contestAs part of the IOCCC tradition, we always tweak/adjust the rules and guidelines each year. Noteworthy changes for the 16th contest include:
- New max size limits: 4096 (was 3217)
(We gotta keep up with the code bloat like everyone else :-) :-() - New max size for non-whitespace / non {:} chars: 2048 (was 1536)
- New max compile/build line: 521 (was 255)
(why 521? Well 521 is prime and 2^521-1 is a Mersenne prime and I like primes ... :-)) - We now allow people to use OpenMotif
- MS gets two pot shots directed at it in this contest (yet another tradition)
- New max size limits: 4096 (was 3217)
-
new to this contestAs part of the IOCCC tradition, we always tweak/adjust the rules and guidelines each year. Noteworthy changes for the 16th contest include:
- New max size limits: 4096 (was 3217)
(We gotta keep up with the code bloat like everyone else :-) :-() - New max size for non-whitespace / non {:} chars: 2048 (was 1536)
- New max compile/build line: 521 (was 255)
(why 521? Well 521 is prime and 2^521-1 is a Mersenne prime and I like primes ... :-)) - We now allow people to use OpenMotif
- MS gets two pot shots directed at it in this contest (yet another tradition)
- New max size limits: 4096 (was 3217)
-
Cute site
Anybody notice the 'A is for ASCII, B is for Byte' stuff on the winners index?
link -
Very clean code.
Vor sowe good examples how NOT to mrite your programs, check this site: IOCCC
-
can you say "Java?"
from the overview page...
features to keep:- compile/link/debug development model
- Exception handling
- Runtime Type Identification
- link compatibility with the C calling conventions
All except the last is contained in Java.
features to drop:- C source code compatibility
- Link compatibility with C++
- Multiple inheritance
- Templates
- Namespaces
- Include files
- Creating object instances on the stack. In D, all objects are by reference.
- Trigraphs and digraphs
- Preprocessor
- Operator overloading
- Object oriented gradualism
- Bit fields of arbitrary size
- Support for 16 bit computers
This seems to be precisely the parts of C++ that Java also does away with. Furthermore, the C preprocessor is not strictly part of the C language and in fact many other programming projects use cpp for simple cut and paste includes of their favorite language. When I first read about trigraphs, I couldn't wait to try them out to make some extra obfuscated code, but alas the C compiler I was using didn't support them. In fact the lack of standards compliance is one of the main drawbacks to programming in C++ and C. If my Java code compiles on sun's compiler, then I can be assured that it will also compile on any other compiler claiming to compile Java code.
The author also mentions that D will not have any bytecodes. From a strict perspective, the Java programming language and the Java VM are two different standards and just because you typically compile Java code into (confusingly named) Java byte codes, doesn't mean you can't use one without the other. For example, anyone (who is insane) can pick up a copy of the Java Virtual Machine Specification and a hex editor and make some syntactiacally correct class files. More realistically though, java bytecodes are often targets for compiler construction classes. Also, if you use the GNU Java Compiler you can compile programs written in the Java programming language directly into machine code.
While 90% of the description of this language screams Java, there seem to be some of the more useful features of C++ thrown in (typedefs, scope operator, etc.). The only way for this to be successful, is to finish standardizing the language as soon as possible and get a reference compiler for it so it leaves the realm of theoretical vaporware. Perhaps Java might have looked more like this if the language design was revisited. However, Java has lots compilers which are much much more likely to conform to the standard than the C++ equivalents.
-
Re:486 still in production?Competitions like the Perl obfuscated code contest are cool, but I'd like to see some contents based upon the best program than can be squeezed into an "antique" box like the TRS-80 Model I - that would really separate the hackers from the script kiddies...
Actually, most of those contests (e.g. the Obfuscated C Contest) have some very strict rules about how big the source can be, which does force economy of a sort. I takes some work to squeeze an X Window flight simulator into 1.5K of source code.
Just for the heck of it, I once wrote an ANSI C artificial life program. Doesn't sound too hard, but ANSI C only guarantees objects 32K in size! Anything more than that is not guaranteed to work. I also tageted it for low-memory environments like Minix where you can at most get 64K for code and 64K for data. The final program ran in less than 128K. It's really amazing to see how fast a program can run when it fits entirely into the L2 cache...
-
Re:486 still in production?Competitions like the Perl obfuscated code contest are cool, but I'd like to see some contents based upon the best program than can be squeezed into an "antique" box like the TRS-80 Model I - that would really separate the hackers from the script kiddies...
Actually, most of those contests (e.g. the Obfuscated C Contest) have some very strict rules about how big the source can be, which does force economy of a sort. I takes some work to squeeze an X Window flight simulator into 1.5K of source code.
Just for the heck of it, I once wrote an ANSI C artificial life program. Doesn't sound too hard, but ANSI C only guarantees objects 32K in size! Anything more than that is not guaranteed to work. I also tageted it for low-memory environments like Minix where you can at most get 64K for code and 64K for data. The final program ran in less than 128K. It's really amazing to see how fast a program can run when it fits entirely into the L2 cache...
-
International Obfuscated C Contest origins
Let's not forget another SGI-boosted website that originally started up at reality.sgi.com which is the International Obfuscated C Contest . The contest has now moved from SGI to its own domain www.ioccc.org hosted by Plaidworks(??).
-
Re:Turing equivalence?
It's possible to do iteration with the C preprocessor. One example of it is http://www.ioccc.org/years-spoiler.html#1995_vans
c hnitzIt is basically a file that #includes itself. Don't know if it's Turing complete though.
-
Programs as expression
Programs as speech/art: The International Obfuscated C Code Contest
------