• printf can act as a Turing-complete language using format specifiers like %n. • A new tool, sebsite, lets users write higher-level assembly that compiles to printf. • The project demonstrates fizzbuzz in assembler, using alias constants and arrow statements for assignments. • Compiling requires C23 support, and the resulting output is intentionally cryptic. • Hackers can even play tic‑tac‑toe via printf, showcasing its computational power. • The article invites speculation on whether printf could run complex programs like Doom.
Article Summaries:
- A new online tool lets developers write a lightweight assembly‑style language that compiles directly into C’s
printffunction. Hosted on the site “sebsite,” the compiler targets C23 and demonstrates thatprintf-with its rich format specifiers such as%n-can act as a Turing‑complete language. The page includes a fizz‑buzz example written in the assembler, showing how variables and control flow are expressed with simple “alias” and “arrow” statements. The author notes thatprintfcan even implement games like tic‑tac‑toe, highlighting the quirky but technically powerful possibilities of this approach.
Sources: