Hacker GitHub

← All repos

HexHive/printbf

View on GitHub ↗ ★ 697 Brainfuck

Brainfuck interpreter inside printf

14 mentions on Hacker News by 14 people: 7 stories, 7 comments · first 2015-12-28 · latest 2025-01-07

Mentions per year 14 mentions · busiest year 2016 (4)
20082026
  1. …that printf() is Turing complete and wrote a first person shooter in 13kB of Javascript. https://github.com/HexHive/printbf https://github.com/carlini/js13k2019-yet-another-doom-clone
    comment by basementcat · 2025-01-07 · in A minimax chess engine in regular expressions
  2. …and an obfuscated tic-tac-toe with it. [0]: https://nebelwelt.net/publications/files/15SEC.pdf [1]: https://github.com/HexHive/printbf [2]: https://github.com/carlini/printf-tac-toe
    comment by thaliaarchi · 2023-07-01 · in Lesser known tricks, quirks and features of C
  3. That code is wrapped in a loop - https://github.com/HexHive/printbf/blob/master/src/pbf_pre.c...
    comment by moonchild · 2021-01-09 · in Best of show – abuse of libc
  4. …this. [0] That printf allows for this kind of Turing complete control flow is well known [1]. [0] https://github.com/HexHive/printbf [1] http://nebelwelt.net/publications/files/15SEC.pdf
    comment by shakna · 2021-01-09 · in Best of show – abuse of libc
  5. https://github.com/HexHive/printbf well this is a brainfuck interpreter inside printf. I’m pretty sure there are plenty of c-to-bf transpilers.
    comment by hahajk · 2021-01-08 · in Best of show – abuse of libc
  6. https://github.com/HexHive/printbf/blob/master/src/pbf_pre.c...
  7. Reminds me of the turing complete interpreter lurking in libc's printf. https://github.com/HexHive/printbf