HN Hall of Fame Weekly email

C implementation of Tic-Tac-Toe in a single call to printf

github.com Software & code Source code Software engineering Class of 2024-04 Hall of Fame
Screenshot of github.com captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 3 calendar years, with breakout response in 2 of them.

submissions
10
submitters
9
observed span
2020–2024
peak thread · 82 comments
377 pts
latest 20+ return · 2022-06-08
202 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

Oddly enough I find that the #define macro soup detracts from the performance here. I was rather unimpressed at first because obfuscating C code by just #define'ing a bunch of code is a trivial and rather uninteresting way to write unreadable code. Of course you can make any arbitrary code look like a printf call with enough macros! But it's actually a lot more clever than that. I feel like this would be a lot more impressive if it was…

simias·377-point thread·

A few key points (also mentioned in the README): The "%n" specifier makes printf() fetch an int* argument and write the number of characters written so far to the target location. The funky stuff happens when you abuse that to overwrite the format string itself, actually making printf() Turing-complete. This also means that if you lazily stuff a user controller string into a printf() style function (instead of doing e.g. `printf("%s", str)`), this can be used as a gadget for…

Link to the Usenix paper that shows that printf() and fputs() are Turing complete. https://www.usenix.org/conference/usenixsecurity15/technical...

Reading through the printtt.orig.c was a wilder ride than I expected. I taught about some of the interesting format string techniques in the shell coding portion of a penetration testing course I used to teach at IBM, but this went way ahead of where I had ever dared to tread.

ksaj·2-point thread·

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
599

reference only — not used in Hall rules or ranking

Total comments
105

reference only — not used in Hall rules or ranking

Every submission