5 ms·
Somewhat related to this, printf alone in a loop is Turing-complete, by using %-directives like that. It was introduced in “Control-Flow Bending: On the Effecti
by thaliaarchi 3y ago
Somewhat related to this, printf alone in a loop is Turing-complete, by using %-directives like that. It was introduced in “Control-Flow Bending: On the Effectiveness of Control-Flow Integrity” (Carlini, et al. 2015) and the authors have implemented Brainfuck and an obfuscated tic-tac-toe with it.
[0]: https://nebelwelt.net/publications/files/15SEC.pdf https://nebelwelt.net/publications/files/15SEC.pdf
[1]: https://github.com/HexHive/printbf https://github.com/HexHive/printbf
[2]: https://github.com/carlini/printf-tac-toe https://github.com/carlini/printf-tac-toe
- isatty 3y ago> While its primary purpose is to serve as The One True Debugger, printf also happens to be Turing complete. Excellent.