• You may or may not know, but printf is a Turing-complete language, once you exploit all the strange and wonderful format characters in it (especially %n). • But who has time to write code as printf modifiers? • Now, thanks to [sebsite], you can at least write in a slightlyhigher level assembly language and compile to printf. • As an example, the page shows fizzbuzz written in the assembler: The alias keyword defines constants and, owing to default values, sets i to zero, fizz to one, and buzz to 2. • The “arrow” statements store a result into a variable (so the first assignment sets the resulting value into fizz). • You need C23 to compile the assembler.

Article Summaries:

  • A new online tool lets developers write a lightweight assembly‑style language that compiles directly into C’s printf function. Hosted on the site “sebsite,” the compiler targets C23 and demonstrates that printf-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 that printf can even implement games like tic‑tac‑toe, highlighting the quirky but technically powerful possibilities of this approach.

Sources: