
Winners Announced in 2025's 'International Obfuscated C Code Competition' (ioccc.org) 48
Started in 1984, it's been described as the internet's longest-running contest. And yesterday 2025's International Obfuscated C Code Contest concluded — with 23 new winners announced in a special four-and-a-half-hour livestreamed ceremony!
Programmers submitted their funniest programs showcasing C's unusual/obscure subtleties while having some fun. (And demonstrating the importance of clarity and style by setting some very bad examples...) Among this year's winners were an OpenRISC 32-bit CPU emulator, a virtual machine capable of running Doom, and some kind of salmon recipe that makes clever use of C's U"string" literal prefix...
But yes, every entry's source code is ridiculously obfuscated. ("Before you set off on your adventure to decode this program's logic, make sure you have enough food, ammo, clothes, oxen, and programming supplies," read the judge's remarks on the winner of this year's "diabolical logistics" prize. "You'll be driving for 2170 miles through a wild wilderness inspired by Oregon Trail...") And one entrant also struggled mightily in adapting a rough port of their program's old Atari 2600 version, but was never gonna give it up...
Thanks to long-time Slashdot reader achowe for bringing the news (who has submitted winning entries in four different decades, starting in 1991 and continuing through 2024)...
Including a 2004 award for the best abuse of the contest's guidelines. ("We are not exactly sure how many organisations will be upset with this entry, but we are considering starting an IOCCC standards body just to reign in the likes of Mr Howe....")
Programmers submitted their funniest programs showcasing C's unusual/obscure subtleties while having some fun. (And demonstrating the importance of clarity and style by setting some very bad examples...) Among this year's winners were an OpenRISC 32-bit CPU emulator, a virtual machine capable of running Doom, and some kind of salmon recipe that makes clever use of C's U"string" literal prefix...
But yes, every entry's source code is ridiculously obfuscated. ("Before you set off on your adventure to decode this program's logic, make sure you have enough food, ammo, clothes, oxen, and programming supplies," read the judge's remarks on the winner of this year's "diabolical logistics" prize. "You'll be driving for 2170 miles through a wild wilderness inspired by Oregon Trail...") And one entrant also struggled mightily in adapting a rough port of their program's old Atari 2600 version, but was never gonna give it up...
Thanks to long-time Slashdot reader achowe for bringing the news (who has submitted winning entries in four different decades, starting in 1991 and continuing through 2024)...
Including a 2004 award for the best abuse of the contest's guidelines. ("We are not exactly sure how many organisations will be upset with this entry, but we are considering starting an IOCCC standards body just to reign in the likes of Mr Howe....")
ROT13 (Score:2)
Why isn't at least the headline ROT13-ed. That's about the lowest level of "obfuscation" I can think of.
Re:ROT13 (Score:5, Funny)
It was ROT13-ed twice for extra obscurity.
Re: (Score:2)
It was ROT13-ed twice for extra obscurity.
That is called Double Secret Probation. Uh. Obscurity.
Commodore 64 made obfuscation fun (Score:5, Interesting)
Using POKE, you could update the spelling of reserved words in its BASIC language.
For example:
REM THIS IS A REM STATEMENT WITH HIDDEN CODE
The REM ("remark" / comment) statement could actually be the altered spelling of, say, "FOR", and each word following could mean something completely different than what you would think.
Not very useful, but fascinating.
Re: (Score:2)
No wonder Apple outlasted Commodore with respect to relevancy in the modern world.
Re: (Score:1)
What do marketing and insane levels of brand loyalty have to do with Tony Isaac's post?!
Re: (Score:2)
Everything.
I mean, absolutely EVERYTHING!
Re: (Score:2)
In contrast with Apple, Commodore didn't gouge customers. Unfortunately, I'm guessing they kept their prices *too* low.
Re: (Score:2)
Oh please.
Charging what people are willing to pay for totally non-essential goods is hardly "gouging".
You would have to be a TOTAL MORON to choose to go out of business rather than charge what people are willing to pay.
Re: (Score:2)
Why the fuck do non-Apple people constantly bitch about Apple's prices anyway?
I don't use Android. You'll never hear me bitch about Android either. I literally do not give a flying fuck about anything Android.
Re: (Score:2)
I'm glad you're happy with your overpriced gear. You made an (apparently) informed decision, and that's fine.
What motivates many of us "non-Apple people" to point out Apple's gouging, is that most Apple users aren't so well educated. They think the prices are just "normal" which they are not.
Informed decisions don't bother me. Cluelessness that leads people to spend money they don't need to spend, is a problem that matters.
Re: (Score:2)
I don't think that opinion is as true as you do, but leaving that aside, why do you even care if uninformed people overspend on computer gear? I mean....why? WHY?!?
Is this interest in what people may overspend on limited to computer gear, or does it extend to other areas, such as houses, vehicles, private school tuition, groceries or anything else?
I honestly don't understand why anyone would care if total strangers are overspending, on anything. Or even if they are underspending. Or even if they are spendin
Re: (Score:2)
Why do I care? Two reasons.
1. For people I care about, like family and friends, it galls me that they spend so much money needlessly, and then they complain about how expensive their tech is. When they complain, I have an answer ready. Beyond that, it's their decision.
2. For people on slashdot, it's just academic discussion. I find many Apple users are "fanboys" who will defend anything Apple does. I find it fun to poke holes in their worship.
You apparently care about my motivations. Why is that? If you can
Re: (Score:2)
Don't confuse caring about your motivations with idle curiosity. I like to understand things. Things great and small. Add in the fact that I'm bedridden and bored shitless, which doesn't help.
Friends and family, I get. Sort of. SORT of. Everyone else? Meh. Fuck 'em.
Trolling? I understand a little more, if one is sufficiently bored.
I guess my position overall is this. I'm not an Android user (although I was in the past, for a short period of time). I'll never be an Android user. But I don't care if someone
Re: (Score:2)
The reason so many Android users react to Apple fans, is that so many Apple fans are condescending towards them. This provokes an emotional response.
Maybe you don't do this, but many do.
Re: (Score:2)
Interesting.
I wonder where such people are found.
I also wonder why one would treat ALL Apple users as such rather than just the ones that are condescending to them. One of life's little mysteries I guess.
Every once in a while I pull my Android out of my "really old shit" drawer. I guess I will do so now.
It says "ZTE" on it. It also has an AT&T logo. It has a little hole on one side. I thought, "this fucker is old that it has a proprietary power port on it!" Then I realized it is a headphones jack. Bee
Re: (Score:2)
I don't assume all Apple users are condescending, I only respond to the ones who post here, who are either clueless or condescending.
Re: (Score:2)
Python2:
True, False = False, True
Re: (Score:3)
Salmon (Score:4, Interesting)
How the feck does that salmon one do that?
The output is nothing like the source code.
Re: (Score:2)
This totally scary in the sense that the source code looks innocuous to a casual eye. (I won't execute obfuscated code on my machine for reasons, is the output listed somewhere?)
Re: (Score:1)
Season salmon fillets with olive oil, lemon juice, garlic, salt, and pepper, then grill over medium heat for 4-6 minutes per side until flaky and cooked through.
Check it here: https://www.onlinegdb.com/onli... [onlinegdb.com]
Just paste the code snippet from https://github.com/ioccc-src/w... [github.com]
#include ;while(putchar(*salmon++))
unsigned int *salmon = U"is very yummy";
#define grill
#undef grill
#define grill
#undef grill
int main() {
for (int i = 1; i = 10; i++) {
printf("%d * %d
Re: (Score:1)
* Paste from github, not the snippet i pasted here as slashdot eats up some stuff
Re: (Score:2)
The C code itself isn't obfuscated. The problem is that your text editor isn't showing you the code.
If you look at the C code in a plain ASCII text editor, you'll see everything. But a text editor that interprets UTF-8 hides a bunch of stuff from you.
If you happen to be viewing the entry in VIM, use ":set encoding=latin1" to see what's really going on.
Re: (Score:2)
I think the code is still obfuscated at because you'd think the for loop would execute, and it does not, and this is due to due to a clever C trick (that it inserts a while() that takes the following for() as code block). Though it's not the main point of the feat.
Re: (Score:2)
The second while loop doesn't run because the character at the pointer is zero? That part is only obscure to a python programmer who expects a particular formatting.
Re: (Score:2)
The worrying thing is that both cat and nano (and presumably many other editors), by default, do not display the text that is present there...
That could cause merry hell for hiding things in copypasta, configuration scripts, logs, etc.
Re: (Score:2)
I think we should get a warning in gcc (and other compilers), or in automated integration workflow, if U32 characters are present in any other file than localisations.
Re: (Score:2)
Re: (Score:3)
A while back someone posted a (now-deleted) comment on the Fediverse about how they were able to construct a single unicode glyph of arbitrary length, e.g. a single character that could require 2MB of data to store.
The salmon code appears to be doing something similar - if you look at the source code in a hex editor, you'll see that the four spaces before "is very yummy" are actually a huge stream of F3,A0,81,93 and so on, where '93' is a varying number that may contain the actual payload (a recipe for cook
Re: (Score:2)
It's not a true C obfuscation, it's a Unicode hack. The compiler treats the code as a series of bytes but your text editor sees UTF-8. The code which actually executes is hiding there.
Re: (Score:2)
Feed UTF-16 to the C compiler and let me know how that works out for you.
Re:Salmon (Score:5, Informative)
The rest of the code is pretty explicit when special invisible characters are shown in hexa after the added char `^` for clarity
#define grill^f3^a0^81^81
#undef grill
#define ^f3^a0^81^81 grill^f3^a0^81^81
#undef grill
int main() {^f3^a0^81^81 ^f3^a0^81^81
for (int i = 1; i printf("%d * %d = %d\n", i, i, i*i);
}
}
The 2 `#undef` are useless.
The first `#define grillHEX code` (which HEX are not visible) defines the real running code.
The second `#define HEX grillHEX` defines HEX as being the running code above.
Finally the invisible HEX is expanded as
Since `putchar()` only prints the LSB and returns its value, the first `while` prints the entire string "Season salmon fillets..." and stops on the byte zero.
The 2nd `while` reads a zero and stops immediately, thus not executing the `for
Amazing work!
Such a shame (Score:4)
I love this contest and reading through the entries every year. Without even planning to I get caught up in an entire day reading the entry source, remarks, and even the rules. They are often a true combination of wit, humor, and ingenuity. Kudos to the submitter here - best abuse of the rules/guidelines is a favourite category and I just fucking love it. This is truly a story for nerds yet such a shame it is basically ignored and not discussed on this site anymore. Not to be part of the shit brigade here, I’m going to spend my Sunday evening reading these entries and will post something back I find amusing.
Re: (Score:3)
ll urge them to include more references to Trump in their rules/results
Why? Because of His obfuscated policies?
Re: (Score:2)
No, because this site is dead.
It's corpse still festers with the slime of trolls, parasites, incels and MAGA. Those do not understand C, or even the interest of obfuscated code.
Re: (Score:2)
No, because this site is dead.
Those do not understand C, or even the interest of obfuscated code.
Yet, it's probably the only site to talk about it ...
Re: (Score:2)
Re: (Score:2)
As of posting this story has 6 comments on a site made for nerds - historically those specific to the software development realm. Maybe I’ll urge them to include more references to Trump in their rules/results to generate interest from the crowd here next year.
Not kidding in what I'm about to say. Just want to be crystal clear about it.
This is because most Slashdotters don't program in C any more. If it was obfuscated Rust, it might get a lot more interest. Shrug.
Spoiler (Score:2)
Spoiler: all winning entries this year were just snippets of Github Copilot generations.
The REAL competition used to be... (Score:2)
... over at https://www.underhanded-c.org/ [underhanded-c.org]
Taught me more about C than most [single] books.
I wish that kept going, or could be handed to someone who could reboot it.
Sigh
Who needs obfuscation? (Score:2)
As a mathematician, I have written programs that anyone without the background has no hope of understanding. Why would I need to make such a thing any harder to understand?