🌗 GitHub - carlini/printf-tac-toe:僅靠單次 printf 呼叫實現的井字遊戲
➤ 當格式化輸出成為一種圖靈完備的程式語言
https://github.com/carlini/printf-tac-toe
本項目展示了一個極致的 C 語言程式設計技巧:如何僅通過單一的 `printf` 函式呼叫來實現完整的井字遊戲邏輯。作者利用 `printf` 格式化字串中不為人知的特性(特別是 `%n` 與位置參數指定符),將記憶體操作與邏輯運算轉化為字串處理,不僅實現了圖靈完備的計算模型,還編寫了一個可互動的遊戲。這項作品曾入選 IOCCC(國際 C 語言混淆程式碼大賽),是研究底層記憶體操作與編譯器行為的經典案例。
+ 這簡直是瘋狂的藝術!我從未想過 `%n` 可以被這樣濫用,這已經超越了代碼,簡直是字串上的數位邏輯電路。
+ 這是計算機科學領域的奇蹟。雖然實用性為零,但作者對 `printf` 參數處理與記憶體位址存取的洞察力令人嘆為觀止,這確實是駭客精神的巔峯。
#C 語言 #IOCCC #代碼混淆 #printf 導向編程
GitHub - carlini/printf-tac-toe: tic-tac-toe in a single call to printf

tic-tac-toe in a single call to printf. Contribute to carlini/printf-tac-toe development by creating an account on GitHub.

GitHub
GitHub's latest masterpiece: a Tic-Tac-Toe #game powered by the sheer #complexity of a single `printf` call. 🤖💻 Because who wouldn't want to pit their wits against a glorified string formatter in the most convoluted way possible? 😅🎉
https://github.com/carlini/printf-tac-toe #GitHub #TicTacToe #printf #programming #fun #HackerNews #ngated
GitHub - carlini/printf-tac-toe: tic-tac-toe in a single call to printf

tic-tac-toe in a single call to printf. Contribute to carlini/printf-tac-toe development by creating an account on GitHub.

GitHub
GitHub - carlini/printf-tac-toe: tic-tac-toe in a single call to printf

tic-tac-toe in a single call to printf. Contribute to carlini/printf-tac-toe development by creating an account on GitHub.

GitHub
Running In Printf

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 m…

Hackaday
Implementing a web server in a single printf() call

A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don't u

Tinyhack.com
✨🎨 Breaking news: yet another tech genius spends holiday break inventing a #printf #hack for #HLSL because, clearly, what the world needs now is more ways to debug shaders. 🙄 Meanwhile, in a shocking turn of events, we discover people might actually want useful tools. Who would've guessed?! 💡🔍
https://www.abolishcrlf.org//2025/12/31/Printf.html #technews #shaderdebugging #innovation #HackerNews #ngated
An Experimental Approach to printf in HLSL

Bringing the best form of debugging to shaders!

Abolish \r\n
An Experimental Approach to printf in HLSL

Bringing the best form of debugging to shaders!

Abolish \r\n
🚨 Breaking News: "Programmer discovers #strncpy is bad! 🎉" In a shocking revelation, it turns out using a function that doesn't null-terminate strings can lead to problems. Who would have thought? Next, Daniel plans to tackle the #mysteries of 'printf' – stay tuned! 🤔
https://daniel.haxx.se/blog/2025/12/29/no-strcpy-either/ #BreakingNews #ProgrammerProblems #Issues #printf #HackerNews #ngated
no strcpy either

Some time ago I mentioned that we went through the curl source code and eventually got rid of all strncpy() calls. strncpy() is a weird function with a crappy API. It might not null terminate the destination and it pads the target buffer with zeroes. Quite frankly, most code bases are probably better off completely … Continue reading no strcpy either →

daniel.haxx.se