Submission timeline
2007–2026One 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 orderOddly 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…
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.
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
- Total points
- 599
- Total comments
- 105
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2020-06-05 | Printf-tac-toe, and a guide to printf-oriented programming | fanf2 | 2 | 1 |
| 2020-06-07 | C implementation of Tic-Tac-Toe in a single call to printfFirst breakout · Best thread | Megabeets | 377 | 82 |
| 2022-06-08 | C implementation of Tic-Tac-Toe in a single call to printf (2020)Latest 20+ point return | ddtaylor | 202 | 21 |
| 2024-04-05 | Tic-tac-toe implemented in a single call to printf | orlp | 4 | 0 |
| 2024-04-06 | Printf-Tac-ToeHall induction | jf | 2 | 0 |
| 2024-04-06 | tic-tac-toe in a single call to printf | colinprince | 2 | 0 |
| 2024-04-07 | Tic-tac-toe in a single call to printf | signa11 | 1 | 0 |
| 2024-04-07 | Printf-tac-toe: tic-tac-toe in a single call to printf | signa11 | 1 | 0 |
| 2024-04-19 | A C implementation of tic-tac-toe in a single call to printf | memset | 3 | 0 |
| 2024-08-05 | Tic-tac-toe in a single call to printf | fzliu | 5 | 1 |
