C programmers commit fresh crimes against readability

jjgreen2 pts0 comments

C programmers commit fresh crimes against readability

Jump to main content

Search

REG AD

OFFBEAT

C programmers commit fresh crimes against readability

Prepare to be befuddled and bamboozled – and probably bewitched

Liam Proven

Liam<br>Proven

Published<br>sun 5 Jul 2026 // 13:00 UTC

The Twenty-Ninth International Obfuscated C Code Contest – or IOCCC for short – is back again with the results of the 2025 competition. This year, one of the entrants has a unique new trick up their sleeve: a valid use case.<br>When we reported on last year's event, it was had just been revived from a four-year hiatus, so we're happy to see it back so soon.<br>As we write, the judging concluded some three weeks ago, but although there is a recording on YouTube, it's very nearly three hours long. It took a while to edit it down to individual clips for each winner, which is why we are covering it now. For many of these programs, you really must see what they do to believe it, and although it's generally not our preferred format, video clips are superb for this.

REG AD

There are no fewer than 23 winning entries this year, including a hat-trick of hat-tricks: three entrants, Yusuke Endoh, Nick Craig-Wood, and Don Yang, all had three winning entries each. We have room for only a few of our personal highlights, but we highly recommend reading all the winners – they are well worth your time.

REG AD

One element of the IOCCC is that the judges, Landon Curt Noll and Leonid A. Broukhis, invent new categories each time for each winning entry. We're using their titles, so if the subheadings initially don't make much sense, reading the relevant IOCCC pages might explain all… but we wouldn't rely on it.<br>IOCCC29 – 2025/cable – Best imaginary emulator<br>We cannot claim to have studied every result in every IOCCC. When the first one happened in 1984, this vulture was still at school and learning BASIC. However, this year, Adrian Cable's Subleq computer was the one that grabbed our attention the most.<br>The reason is that we had already looked at it and what it does – or at least a closely related project. Unusually for the IOCCC, it has a real-life use case in software preservation.<br>The idea of the Eternal Software Initiative (ESI) is to aid in the preservation of software after its original hardware platform no longer exists by implementing a computer architecture that is specifically designed to be emulated very easily. There's a sample implementation on GitHub.<br>The CPU architecture isn't new; it's a One Instruction Set Computer called Subleq. OISC is the logical extrapolation of RISC: you can't reduce an instruction set any further than cutting it down to just one instruction. In this instance, that instruction is Subleq (subtract and branch if less than or equal to zero). Here's an explanation from 2020, and it wasn't new then – here's FPGA hardware from 2011 [PDF].<br>The ESI has implemented Subleq in software, built a C compiler to target it using LLVM, and ported Linux to it, complete with C and C++ runtime libraries. Run your emulator on that Linux, and you can bootstrap a runnable version of any hardware architecture from this tiny basis.<br>And we do mean tiny. This is the IOCCC winning implementation of the architecture:

REG AD

#include #define o s[1&s[t=e++]?s[t]/4:t]/4,t b,y,t,e,s[3(s[y]-=_[s])?t:*s&&++b>8e5?s[memcpy(3[ g],6[s]+s,25<br>That is the entire thing. It's 366 bytes long.<br>Yes, it does depend on the SDL libraries so it can display graphics, but even so, we hope you will agree that's pretty remarkable.<br>The demonstration video shows it generating a full-color Mandelbrot set, at a fairly reasonable speed, and then playing a game of Pong, before demonstrating Subleq running Linux and a few apps. When you watch this, try to remember that you could hand-write the source code on a postcard with plenty of room for the address and a stamp. It's nine lines long.

A slightly more readable version of the code is still just 91 lines long.<br>Nick Craig-Wood's hat-trick<br>To go with the Best imaginary emulator, there is also a winning Best real emulator. Nick Craig-Wood offers a working emulator for the original Nintendo Game Boy in a remarkable 66 lines of C, which he formatted to look like the console for the contest.<br>His other winner is the Best fractional emulator: an unbelievably tiny combination of a Commodore 64 emulator (it says here) emulated in John Conway's FRACTRAN language.

REG AD

And he also won for the Best use of Unicode, which implements a version of Forth, and in the C code, contains a Forth program that generates a spinning Mandelbrot zoom.

2025/endoh1 – Most likely to dazzle<br>The first of Yusuke Endoh's three winning entries is a Nixie tube simulator. When The Reg FOSS desk was young, this was how electronic calculators (and some petrol pumps) displayed numbers. A Nixie tube is a tiny electrical tube with filaments in the shapes of all the digits stacked one on top of another, and it displays the desired digit by making just that...

emulator ioccc winning year three best

Related Articles