Domain: ioccc.org
Stories and comments across the archive that link to ioccc.org.
Comments · 408
-
Re:Why
Try Computer Engineering - it's a bit of Electrical Engineering mixed with Computer Science with that C and assembly flavor. Minty!
It's not the execution speed that makes me stay away from Java -- it's that I like C so much more. Doesn't help that I despise the absurdly long function names (IOCCC parody) -
How about a compromise?
I'm thinking releasing the source in seriously obfuscated c with no descriptive identifiers. Or, there's always the old uncommented assembly.
-
Other possible issues
So what happens if someone with ADHD tries to program in C with this? Can you enter the result in the Obfuscated C Code Contest?
-
Re:How small? Gavin's 3721 byte OS!
In 2004, Gavin Barraclough wrote an OS (from scratch) in only 3721 bytes:
"This is a 32-bit multitasking operating system for x86 computers, with GUI and filesystem, support for loading and executing user applications in elf binary format, with ps2 mouse and keyboard drivers, and vesa graphics. And a command shell. And an application - a simple text-file viewer."
Granted, it may not be the must useful (or maintainable!) OS ...
http://www.de.ioccc.org/years.html#2004_gavin -
Re:Cryptic? Complex!?
-
Re:Cryptic? Complex!?
-
Re:Cryptic?
I agree. Not only is it harder to create unreadable code with C, in C the purpose of the code is often obvious even to non-programmers.
http://www.ioccc.org/1995/dodsond1.c
http://www.ioccc.org/1994/dodsond1.c
http://www.ioccc.org/1994/schnitzi.c
http://www.ioccc.org/1994/shapiro.c
Although I guess the this last one is an exception.
http://www.ioccc.org/1988/phillipps.c -
Re:Cryptic?
I agree. Not only is it harder to create unreadable code with C, in C the purpose of the code is often obvious even to non-programmers.
http://www.ioccc.org/1995/dodsond1.c
http://www.ioccc.org/1994/dodsond1.c
http://www.ioccc.org/1994/schnitzi.c
http://www.ioccc.org/1994/shapiro.c
Although I guess the this last one is an exception.
http://www.ioccc.org/1988/phillipps.c -
Re:Cryptic?
I agree. Not only is it harder to create unreadable code with C, in C the purpose of the code is often obvious even to non-programmers.
http://www.ioccc.org/1995/dodsond1.c
http://www.ioccc.org/1994/dodsond1.c
http://www.ioccc.org/1994/schnitzi.c
http://www.ioccc.org/1994/shapiro.c
Although I guess the this last one is an exception.
http://www.ioccc.org/1988/phillipps.c -
Re:Cryptic?
I agree. Not only is it harder to create unreadable code with C, in C the purpose of the code is often obvious even to non-programmers.
http://www.ioccc.org/1995/dodsond1.c
http://www.ioccc.org/1994/dodsond1.c
http://www.ioccc.org/1994/schnitzi.c
http://www.ioccc.org/1994/shapiro.c
Although I guess the this last one is an exception.
http://www.ioccc.org/1988/phillipps.c -
Re:Cryptic?
I agree. Not only is it harder to create unreadable code with C, in C the purpose of the code is often obvious even to non-programmers.
http://www.ioccc.org/1995/dodsond1.c
http://www.ioccc.org/1994/dodsond1.c
http://www.ioccc.org/1994/schnitzi.c
http://www.ioccc.org/1994/shapiro.c
Although I guess the this last one is an exception.
http://www.ioccc.org/1988/phillipps.c -
Re:A bit of code...
-
Re:c programing language
Yea, he did, twice actually.
-
Re:Isn't it time for a CLEAR code contest?
Clearest code? Here's your winner.
:) -
Re:A good one for a good programmer...
That's probably a good way to lose since creativity is one of the key factors, not just plain illegibility. Take, for example, this program (one of my all-time favorites) which prints out the value of pi:
http://www0.us.ioccc.org/1988/westley.c
Or this one which, when compiled and run, prints out another character as program source. You compile the output to that, run it and it outputs another character as program source. You compile that, and you get back the original program's source:
http://www0.us.ioccc.org/2000/dhyang.c
And given the space constraints, your program should be quite clever and compact itself even before you try and obfuscate it. -
Re:A good one for a good programmer...
That's probably a good way to lose since creativity is one of the key factors, not just plain illegibility. Take, for example, this program (one of my all-time favorites) which prints out the value of pi:
http://www0.us.ioccc.org/1988/westley.c
Or this one which, when compiled and run, prints out another character as program source. You compile the output to that, run it and it outputs another character as program source. You compile that, and you get back the original program's source:
http://www0.us.ioccc.org/2000/dhyang.c
And given the space constraints, your program should be quite clever and compact itself even before you try and obfuscate it. -
Re:A good one for a good programmer...The first steps it goes through are a preprocessor and an indenter. Things like "#define i void" are pretty much old hat and not seen as creative nowadays. Most of the obvious things (that syntax scramblers tend to do) are poor scoring manipulations. See the guidelines for exactly how they score. Highest scores are given to novel approaches, and that in turn is somewhat dictated by what has been done in the past.
--
Evan -
RTFA
Lethyos, I just thought of a New years Resolution for you.
http://www0.us.ioccc.org/years.html - 17th was 2004. 19th is... Hmm... Yeah, 2006. And the contest started in 2006. So yeah, 2006. -
Re:find theirs
What kind of an interview is that? Figure this out in 5 minutes. All that really shows the employer is that you know the language, synax, grammar, and quirks of a language extremely well. Does that mean you can design software? No. That just means you can throw together code that will compile. In fact if someone could figure out an Obfuscated C contest winner in 5 minutes then I'd be more worried about him writing code like that for the company and causing nightmares later on.
-
Obfuscated C Code Contest Winner
Back in 1990 someone wrote a BASIC interpreter that won (or was at least recognized by) the IOCCC. A revised entry was recognized in 1991 (in just 17 lines of code).
I tried to post the code but the lameness filter rejected it. :( -
Re:No Silver Bullet but a Silver Hammer
we are reinventing things that had been figured out in Lisp with OO, UML, Design Patterns, and all of the crazy things we do with objects.
We are even reinventing the design principles behind the Lisp syntax. ;) -
Re:Ruby is worse
Give me a break. Nobody writes Ruby that way.
Ruby is far from perfect, and it's not for everyone, but that can be said for any language. You could at least try to criticize it for its faults, not some guy who programs like a moron.
OMFG!!!1 C is a bastardization. Only crazy zealots program in C, cause they're always doing stuff like this or this. You'd have to be a zealot to use C!
See how stupid that looks?
-
Re:Ruby is worse
Give me a break. Nobody writes Ruby that way.
Ruby is far from perfect, and it's not for everyone, but that can be said for any language. You could at least try to criticize it for its faults, not some guy who programs like a moron.
OMFG!!!1 C is a bastardization. Only crazy zealots program in C, cause they're always doing stuff like this or this. You'd have to be a zealot to use C!
See how stupid that looks?
-
Re:so?
Yeah, because offering a peek at the goddamned source code didn't go far enough, right?
If you really, really believe that looking at the source code will tell you what it does and how it works, then I suggest you check out the IOCCC. It's an extreme example, but mostly in length.
You can not study a million lines of code and understand what they do. Source code does not replace documentation. -
The End for Microsoft?
Does this spell the end for Microsoft? I can't imagine how anyone would ever use a computer again with this concept -- bloated software embloating?
I wonder how many Microsoft programmers win the Obfuscated C contect, and how many more will win without entry after this 'simplification' happens. -
Re:Go Linux!
I don't believe you can overload a C function.
Ohhh, young man. Much have you to learn of the dark paths of C. -
Re:"How long, O Lord?"
When are people going to start programming contests where the award is given for something that's actually useful, such as fewest bugs, most readable, best re-use of existing code, etc?
There's no point to it, the best has already been done - I can't find any bugs or anything confusing in the source (somewhat ironic considering that the 'O' in "IOCCC" stands for "Obfuscated").
Well, maybe not re-use of existing code but one could very easily apply the source to any application with minimal impact to a program's speed or even its size - that level of adaptability is extremely rare. :) -
Re:...it ruins thousands of potential wizards a yeIn response to Learning C teaches them that if they don't have the patience and brains to be an excellent developer, then they should find a career that will give them long term satisfaction that doesn't involve an entire team of co-workers covering for their mistakes
aled (228417) wrote: No, it doesn't.
Winners of the International Obfuscated C Code Contest are marvels of coding wizardry. While to the unfamiliar eye there's no difference between a bad programmer's output and an IOCCC winner, the extents an ioccc winner goes through to intentionally make it hard to read are truely inspiring. My favorite winner was the entry that took any integer as a command line parameter, and used fork(), exec() and SIGFPE (division by zero) to find the denomenators of the number.
-
Re:...it ruins thousands of potential wizards a ye
Learning C teaches them that if they don't have the patience and brains to be an excellent developer, then they should find a career that will give them long term satisfaction that doesn't involve an entire team of co-workers covering for their mistakes
No, it doesn't. -
Re:If you haven't mastered the language...C can be mastered.
OK. Name a person - one will suffice - that can read every entry in the IOCCC and truly understand them.
But beyond that, mastery implies perfect knowledge. I doubt that anyone, even K&R, knows every interesting and useful idiom and can use them at will. It's obvious that you can become an expert at C, but master? I truly don't think so.
-
Re:May be risky, but...
Microsoft would increase the cost of every product by five percent (that is the limit by european law, which europe could charge as a fine) and print on the box that this increase in the cost is due to an unfair tax by European Commision on Microsoft. No need to pull out or anything.
Raising the cost from "way overpriced" to "way overpriced". Windows is already seen as extrmely expensive. Besides, it's been years since I've seen a copy of Windows that wasn't pirated or OEM.
By definition, source code is the most correct and complete documentation and is the only such documentation.
Have you ever heard about the IOCCC? The fact that there is source code using an API does not mean that it fully explains the use of said API. Also, everyone using the sourcecode would have to license it from Microsoft, effectively keeping Open Source completely out of the picture. Of course we could ask Microsoft to put the source code of every new Windows release into the public domain, but for sime reason I think that might not be better for Microsoft.
With correctness and completeness comes the complications. If you want to define a year precisely then you have to define a leap year (4th year) and then a non-leap leap year (100th year) and then a non-non-leap non-leap leap year (400th year) and so on. Even after all those things you need a dead second every between years every now and then.
Yeah, "we can't be bothered to write a documentation, because it's too complicated. If people want to use our APIs they can figue them out by trial and error" is really what's interoperability is all about. Besides, you don't really assume that Microsoft have no kidn of internal documentation whatsoever, do you?
Who decides what is an adequate documentation?
The EC's trustee, which happens to be a software business. If they find that the provided information is in fact usable and does not contradict the way Microsoft programs communicate (as was found to be the fact with Microsoft's latest offering) it's adequate.
EU wants that the documentation could be used as spoon feed to competitors so that they can compete with Microsoft. I agree that competitors should be able to compete with Microsoft but on their own merit not on Microsoft's merit. Why Microsoft is asked to understand all that source code (many coders who has written that code are probably left microsoft). It should be competitors who should do that.
Microsoft is using undocumented API behavior to make adequate competition impossible. Other companies can not compete on their own merit because they are severely handicapped. Besides, if it's really like you imply and Microsoft has no internal documentation whatsoever they also gain something from this punishment: They can actually continue using their own APIs without having to guess how they work.
Competitors could probably argue that if these other divisions in Microsoft can't understand something then they could call somebody and learn about it. Well, Microsoft is also offering this service to others. Microsoft is giving five hundred hours of free tutorial in understanding this documentation. Five hundred hours of tutorial is like a minor diploma. If a smart coder can't learn in five hundred hours then probably that's not a smart coder to start with. Plus one can also purchase more hours for money to cover-up their dumbness.
Hey, that's great. I'm going to call Microsoft right now and tell them that I need the unpublished documentation for their APIs for my Open Source project. They will surely help me. The 500 hours are available to private customers and come without any conditions, right?
EU is unfair. If Microsoft's product are taxed five percent in the name of fine, then probably US people and on their behalf US government could come in rescue.
What? Are you going to send the International R -
Re:Bah.
Yeah, contests should promote creative abuses of the rules, like the venerable IOCCC.
Completely off-topic, just to satisfy my curiosity: what were some of the other entries in that egg contest? I've been looking at the rules, and about the only thing I can think of would be a parachute... what other ways are there to get an egg slowly from 15 feet up to the ground?
-
Re:Shower Smarts, Too!
Sounds like there's nothing great about being intelligent. Aren't the simplest solutions generally the most desirable? (IOCCC is an exception) And isn't intelligence regarded positively because it allegedly leads to more desirable solutions?
-
Re:Source?
Even if you can look at the source, it ain't secure.
-
About Larry
Larry Wall (b. September 27, 1954), programmer, linguist, author, is most widely known for his creation of the Perl programming language in 1987. Wall earned his bachelor's degree from Seattle Pacific University in 1976.
Wall is the author of the rn Usenet software and the nearly universally used patch. He has won the International Obfuscated C Code Contest twice and was the recipient of the first Free Software Foundation's award for the Advancement of Free Software in 1998.
Beyond his technical skills, Wall is known for his wit and often ironic sense of humor, which he displays in the comments to his source code or on Usenet. For example: "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise."
Larry Wall is a trained linguist, and has used this training in the design of Perl. He is the co-author of Programming Perl (often referred to as the Camel Book), which is the definitive resource for Perl programmers. He has edited the Perl Cookbook. His books were published by O'Reilly.
Wall's Christian faith has informed some of the terminology of Perl, such as the name itself, a biblical reference to the "Pearl of great price" (Matthew 13:46). Similar references are the function names bless and confess and the organization of his talks into categories such as apocalypse and exegesis. Wall has also alluded to his faith when he has spoken at conferences, including a rather straightforward statement of his beliefs at the August, 1997 Perl Conference and a discussion of Pilgrim's Progress at the YAPC (Yet Another Perl Conference) in June, 2000.
Wall continues to oversee further development of Perl and serves as the Benevolent Dictator for Life of the Perl project. His role in Perl is best conveyed by the so-called 2 Rules, taken from the official Perl documentation:
1. Larry is always by definition right about how Perl should behave. This means he has final veto power on the core functionality.
2. Larry is allowed to change his mind about any matter at a later date,regardless of whether he previously invoked Rule 1.
Got that? Larry is always right, even when he was wrong.
Larry's personal home page
Larry Wall wiki quotes -
Re:The Fastest Code of All
Too bad someone beat you to the bunch in 1994, in the IOCCC contest. Plus, this program is self-reproducing, too. Runs about as fast as the OS will allow any program to run.
http://www.ioccc.org/1994/Makefile
http://www.ioccc.org/1994/smr.c
http://www.ioccc.org/1994/smr.hint -
Re:The Fastest Code of All
Too bad someone beat you to the bunch in 1994, in the IOCCC contest. Plus, this program is self-reproducing, too. Runs about as fast as the OS will allow any program to run.
http://www.ioccc.org/1994/Makefile
http://www.ioccc.org/1994/smr.c
http://www.ioccc.org/1994/smr.hint -
Re:The Fastest Code of All
Too bad someone beat you to the bunch in 1994, in the IOCCC contest. Plus, this program is self-reproducing, too. Runs about as fast as the OS will allow any program to run.
http://www.ioccc.org/1994/Makefile
http://www.ioccc.org/1994/smr.c
http://www.ioccc.org/1994/smr.hint -
Need an IOJC...
Why go through that article when I already learned all the coding skills I need from from the IOCCC and OPC contests? (acronym redundancy intentional)
Java? Pah! Don't make me laugh. Nobody's going to take that language seriously for securing permanent indenture until it has its own IOJC, especially with all those self-documenting and de-obfuscation tools floating about. Sheesh, Postscript has an OPC. Get with the 21st century! Automated code obfuscation tools, such as exist for java, are poor substitutes. There's nothing that can obfuscate as effectively as hand-tuned code.
-- This message brought to you by The Department of Redundancy Department. -
Practical tips for same purpose, but C instead
-
Re:And in a related story...
The obfuscated web server was one of last year's entries, you know.
-
Re:Obfuscated code compiler?One of my winning entries did something like that; because the judges would c-preprocess the file while judging it, I wrote the program in a high-level assembly language as macros, and let the c-preprocessor "compile" it to (obfuscated) two-opcode machine language inspired by the Analytical Engine. (However, the program wasn't a compiler at all.)
The after-expansion version was too large for me to submit it directly, but it's definitely more impressive than the original entry. If I had done something simpler, I might have just been able to submit the post-processed code, but I doubt it would have won.
-
Re:My favorite
This one's my favorite: http://www0.us.ioccc.org/1988/westley.c
How to calculate pi... -
Re:Best contest EVER!
excellent question, but one yielding highly idiosyncratic answers.
(i was a co-winner of the 1990 contest, severely dating myself.)
brain cells have decayed so much that i must reference the
abstract (and engineering notes + literary allusions) at:
http://www.es.ioccc.org/1990/jaw.hint
in our case, a techno"seed" was planted, in one of those already-obscure
usenet signatures by some unheralded genius (aka karl fox).
then whatever that was became hopelessly abstracted into some
drug-addled concept that was even more grandiose but still sublime,
like the industry's first practical decompression virus that would
be shamefully illegal today.
then the incredibly tense work (by paul eggert, compiler guru extraordinaire)
began in earnest, with email flurries and double espressos run rampant.
even then it was an effort whose time only arrived three years later
after aborted early attempts, all pre-world-wide-web mind you, young
whippersnappers ...
after all that, other ignobel-stature contest winners contributed even
more insane babel. i'm not sure if any of it helps on a resume,
but don't let such ur-history discourage you! -
Re:My favorite
My favorite is http://www.ioccc.org/2001/williams.c
Its an entire missile command game for X that is mostly in the shape of a radiation symbol or something.
The crazy thing is that it completely plays like the old game, complete with smartbombs, scoring, increasing levels. Pretty impressive in my book. -
Re:Mirrors
* Asia Pacific and Australia www.au.ioccc.org - Sydney, Australia (34 0' S 151 0' E)
Interesting that they show the meatspace coordinates of the servers, but which major ISPs they're directly and / or closely connected to would be far more useful.
* www.es.ioccc.org - Madrid, Spain (40 25' N 3 41' W)
* North America www0.us.ioccc.org - Sunnyvale California, US (37 22' N 122 02' W)
* www1.us.ioccc.org - Saint Paul, Minnesota US (44 57' N 93 06' W) -
Re:Mirrors
* Asia Pacific and Australia www.au.ioccc.org - Sydney, Australia (34 0' S 151 0' E)
Interesting that they show the meatspace coordinates of the servers, but which major ISPs they're directly and / or closely connected to would be far more useful.
* www.es.ioccc.org - Madrid, Spain (40 25' N 3 41' W)
* North America www0.us.ioccc.org - Sunnyvale California, US (37 22' N 122 02' W)
* www1.us.ioccc.org - Saint Paul, Minnesota US (44 57' N 93 06' W) -
My favorite
My favorite from years past is this one by smr which claims to be the smallest self replicating program.
-
IOCCC
What does it do? What can it do?
Well for starters you can win the IOCCC with just a little more effort, and that had to be worth something.
Don't do that in code I need to maintain though.
-
Re:I'm confused: a viral "download source" button?
Yeah, and to top it off if you have a bug in your program so that "download source" doesn't work correctly then you're in violation of the license, at least temporarily.
IMO the main problem with this GPL3 idea is that it forces you to become a software distributor when all you really wanted to do was distribute the output/products of the software. At least with the GPL the requirement to provide the source isn't as big of a deal because you were already distributing software.
Lots of odd situations come to mind:
- Let's say my GPL3'ed website goes over my bandwidth quota so I have to shut it down. Now the output itself and the GPL3'ed source are both unavailable. Am I still under obligation to all of the people who visited the site while they had a chance to download the output, but did not have a chance to download the source?
- GPL3'ed programs with smaller source code are more valuable to me as a website operator now! In fact, it would be very handy to distribute source code with all of the comments stripped and with the shortest possible variable names. Whatever you get from "download source" will be perfectly valid but it will look like an IOCCC entry.
- Does this only apply to the web? What if I use a GPL3'ed mixing studio to make a track that somehow ends up in the top 40 on the radio? Do I have to include a notice in the track with my name and address so that everyone who hears the song can request me to distribute them a copy of the mixing studio source code?
D