
20th IOCCC Source Code Released 46
An anonymous reader writes "The 20th International Obfuscated C Code Contest apparently has the turbo button pressed, as the source code has been published in only two months, versus almost four years of the 19th contest. As we discussed in February, the judges' verdicts are in: the Best of Show entry comes from Don Yang with a program containing more programs. Some other entries winning this year are a text raytracer (used this year in IOCCC logo), a MOD player, a X11-based dual player tank shooter and a bouncing ball (Amiga-style) with ANSI escape sequences. Remember that every IOCCC entry has a limit of 4 kilobytes, so indeed every one is pretty impresive."
Winners link (Score:5, Informative)
Re:Poop (Score:5, Funny)
I eat poop.
This is about C coding.
Relating your experience coding Java is irrelevant.
Turbo button? (Score:4, Funny)
Your age is showing...
Yes, kids, PCs used to have turbo buttons.
Re:Turbo button? (Score:4, Informative)
Weren't they actually underclock switches to maintain compatibility with older software that relied on the processor's clock for timing, the "turbo" being a marketing gimmick to make it sound faster?
Re: (Score:2)
(Pipe down, grandad. I'm not on your lawn.)
Re: (Score:3)
it was pretty handy for che.. creative playing. you know, like in star control 2 doing the lander resource gatherings.
Re: (Score:1)
Yes. The "turbo" button, when on, would run the processor at full speed or allow caching. The Wikipedia article [wikipedia.org] mentions that exceptions exist, but did not mention any. I think the reason is that people would start some programs and go "Whoa! This is running too fast," and then hit the turbo button to try and get it to run normally. None of my computers had one, but I don't know if I would actually run a computer like that.
Interestingly, one of my uncles had a computer that had one and always had it se
Re: (Score:2)
Re: (Score:2)
My family's first computer was a 25mhz 486sx.
Running North & South at 25 made it exceedingly hard to do anything at all due to the speed of everything.
Turning off the 'turbo' button slowed it down to 10mhz and made it playable.
Re: (Score:2)
I had a 50Mhz DX back then(early ninties), with turbo off down to 25Mhz. Made "blip to death" in fighter mode on Wing Commander down to "warp speed to death" with the turbo off. Another great game bit the dust as I had sold my earlier rig to pay for the DX. I still have my copy of WC in my basement somewhere too.
Re: (Score:1)
The turbo button on my Cyrix-based machine disabled a cache.
The best thing about the machine was the /proc/cpuinfo reported "CyrixInstead" rather than "IntelInside".
Re: (Score:2)
Actually, it's 12 characters long - 3 registers.
Intels report "GenuineIntel"
AMDs report "AuthenticAMD"
Vias say "CentaurHauls"
I don't remember what the other x86-clones report.
Re: (Score:3)
Re: (Score:2)
i had the same thing.. except it was different values and was wired to the jumpers for the bus speed.. so flipping it would overclock the bus and there for the CPU and did make things go faster.. it was not a wise idea to flip it while running.. but it did work.. I used it to overclock a dual P-Pro setup from 180-233(225).
Re:Turbo button? (Score:4, Interesting)
Weren't they actually underclock switches to maintain compatibility with older software that relied on the processor's clock for timing,
Yup, that's what they were. The original PC had a hardware timer (an 8253 IIRC), but all available counters were used for timekeeping interrupts, sound generation and the like. Many programs (especially games) used software loops to generate timing, assuming the clock ran at the original IBM PC's 4.77 MHz. When the 80286-based /AT was introduced, those programs become unusable. To preserve some compatibility, manufacturers introduced the "turbo" button, whose purpose was actually to slow down the machine close to the original PC speed. This button remained a feature on cases for years, even though it often wasn't even connected to anything anymore.
Re: (Score:1)
My CS teacher used to turn turbo off by default 'so that all those outputs would not flash in front of her eyes so blazingly fast'.
Re: (Score:2)
Yep. The only machine I ever had with a turbo button read its state at boot time and then ignored it if you pressed it again before rebooting. This machine (a Pentium 90) has a mini Linux distribution on it, so booting the thing with it enabled is... boring.
I believe the goal of most turbo buttons was to approximate the speed of an 8 MHz 80286. I don't know why this was chosen instead of a 4.77 MHz 8088; maybe it was easier to simulate the speed of something faster.
UCC is better (Score:2, Interesting)
I always thought that the Underhanded C Contest was better. Rather than making the code hard to read or doing the odd layout, I think it is better to show people that malicious things can be hidden in even the most readable code. People always worry about malice hidden in the long unreadable stuff, but can you find the problem in this? [notanumber.net]
the true obfuscation (Score:1)
The true obfuscation is that Chrome will not display .c files, but forces you to save it.
Then, if you open it in Notepad, it will show it all as one line, so you can't see whats going on.
Pure genius.
Re: (Score:3)
Re: (Score:2)
The true obfuscation is that Chrome will not display .c files, but forces you to save it.
Then, if you open it in Notepad, it will show it all as one line, so you can't see whats going on.
Pure genius.
it's just their mimetypes. ie and firefox do the same thing. if you had opened the .c file in IE, it would show the source as intended. silly, huh?
Re: (Score:2)
Re: (Score:2)
There's an add-on for that. I'm running "Open In Browser 1.11" on Firefox 10.0.3. Works great.
Comment removed (Score:5, Interesting)
Re: (Score:1)
Can you tell why not?
I should also note that Daniel Ireland's explanation of why/how it works is incorrect.
Do you know what is wrong with the explanation?
How does it actually work?
That is still one of the best, because all the assumptions it relies upon were valid at the time it was written.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Thanks for the tip. Now to hide an nurses program source in a makefile and laugh while everyone is wondering how hello.c is doing all that stuff.
The prank potential of -D is unbounded... not to mention backdoor hiding...
Re: (Score:2)
Re: (Score:2)
What command line options do you need? It's not working for me, even if I specify --std=c89.
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
Ofuscated-C Compiler (Score:2)
You need to use an Ofuscated-C compiler. I would settle for Avenger Assembler though.
Re: (Score:3)
The only thing that threw me is that "unix" symbol. cpp says it's "1" -- I assume it's one of those #defines to let you know what platform you're on.
*** SPOILER ALERT ***
After that it's easy -- obvious principle at work is that a[b] is equivalent to *(a+b).
Re: (Score:1)
I don't like this because it depends on knowing an obscure trivia (i.e. that unix == 1) that is not in ISO C and totally useless. An interviewee shouldn't fail because of that.
Re: (Score:3)
Re: (Score:1)