frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Printf-Tac-Toe

https://github.com/carlini/printf-tac-toe
38•carlos-menezes•3d ago

Comments

danbruc•2h ago
How did we end up with printf - within a loop - being Turing-complete? Was it designed that way from the beginning? Were new features added over time until we got there?
marmakoide•1h ago
Having something Turing-complete is surprisingly easy, and it hides everywhere. The repository have a small document that explains how you can use printf() as a computer : it can performs additions, logical union and negation, which is enough.

It was unintentional, but Ken Thompson being Ken Thompson, can't be 100% sure.

danbruc•25m ago
So there was no extension of the functionality over time, all the formats have been supported from day one?
st_goliath•5m ago
The key features that is used here is the '%n' format specified, that fetches a pointer as the next argument, and writes a character count back.

There is actually an interesting question here: was '%n' always in printf, or was it added at one point?

I took a cursory look at some old Unix source archives at TUHS: https://www.tuhs.org/cgi-bin/utree.pl

As far as I can tell from the PDP11 assembly, Version 7 research Unix (relevant file: /usr/src/libc/stdio/doprnt.s) does not appear to implementation it.

The 4.1BSD version even throws an error, treating it as an invalid format specifier.

Only in a System V R4 archive (relevant file: svr4/ucblib/libc/port/stdio/doprnt.c) I found an implementation of "%n" that works as expected.

I guess it was added at some point to either System III or System V and through that eventually made it into POSIX?

idorozin•50m ago
This is both impressive and slightly terrifying. Format strings are way more powerful than most people realize.

3D-Knitting: The Ultimate Guide

https://www.oliver-charles.com/pages/3d-knitting
88•ChadNauseam•3h ago•29 comments

Avoiding Trigonometry (2013)

https://iquilezles.org/articles/noacos/
43•WithinReason•2h ago•6 comments

Returning to Rails in 2026

https://www.markround.com/blog/2026/03/05/returning-to-rails-in-2026/
166•stanislavb•5h ago•88 comments

Show HN: s@: decentralized social networking over static sites

http://satproto.org/
307•remywang•11h ago•131 comments

SBCL: A Sanely-Bootstrappable Common Lisp (2008) [pdf]

https://research.gold.ac.uk/id/eprint/2336/1/sbcl.pdf
60•pabs3•4h ago•32 comments

Dolphin Progress Release 2603

https://dolphin-emu.org/blog/2026/03/12/dolphin-progress-report-release-2603/
13•BitPirate•2h ago•0 comments

Printf-Tac-Toe

https://github.com/carlini/printf-tac-toe
38•carlos-menezes•3d ago•5 comments

Temporal: The 9-year journey to fix time in JavaScript

https://bloomberg.github.io/js-blog/post/temporal/
700•robpalmer•20h ago•222 comments

Making WebAssembly a first-class language on the Web

https://hacks.mozilla.org/2026/02/making-webassembly-a-first-class-language-on-the-web/
581•mikece•1d ago•206 comments

Datahäxan

https://0dd.company/galleries/witches/7.html
79•akkartik•2d ago•5 comments

Galaxy Zoo

https://www.zooniverse.org/projects/zookeeper/galaxy-zoo
14•mooreds•3d ago•2 comments

1B identity records exposed in ID verification data leak

https://www.aol.com/articles/1-billion-identity-records-exposed-152505381.html
57•robtherobber•1h ago•14 comments

Tested: How Many Times Can a DVD±RW Be Rewritten? Methodology and Results

https://goughlui.com/2026/03/07/tested-how-many-times-can-a-dvd%C2%B1rw-be-rewritten-part-2-metho...
174•giuliomagnifico•3d ago•48 comments

WebPKI and You

https://blog.brycekerley.net/2026/03/08/webpki-and-you.html
65•aragilar•2d ago•5 comments

I was interviewed by an AI bot for a job

https://www.theverge.com/featured-video/892850/i-was-interviewed-by-an-ai-bot-for-a-job
330•speckx•17h ago•308 comments

Don't post generated/AI-edited comments. HN is for conversation between humans

https://news.ycombinator.com/newsguidelines.html#generated
3656•usefulposter•16h ago•1363 comments

Many SWE-bench-Passing PRs would not be merged

https://metr.org/notes/2026-03-10-many-swe-bench-passing-prs-would-not-be-merged-into-main/
245•mustaphah•14h ago•125 comments

NASA's DART spacecraft changed an asteroid's orbit around the sun

https://www.sciencenews.org/article/spacecraft-changed-asteroid-orbit-nasa
38•pseudolus•3d ago•16 comments

Reliable Software in the LLM Era

https://quint-lang.org/posts/llm_era
17•mempirate•3h ago•1 comments

The MacBook Neo

https://daringfireball.net/2026/03/the_macbook_neo
555•etothet•1d ago•887 comments

Show HN: I built a tool that watches webpages and exposes changes as RSS

https://sitespy.app
261•vkuprin•19h ago•63 comments

Google closes deal to acquire Wiz

https://www.wiz.io/blog/google-closes-deal-to-acquire-wiz
301•aldarisbm•20h ago•173 comments

BitNet: Inference framework for 1-bit LLMs

https://github.com/microsoft/BitNet
348•redm•23h ago•163 comments

Faster asin() was hiding in plain sight

https://16bpp.net/blog/post/faster-asin-was-hiding-in-plain-sight/
212•def-pri-pub•21h ago•117 comments

Personal Computer by Perplexity

https://www.perplexity.ai/personal-computer-waitlist
166•josephwegner•17h ago•132 comments

Entities enabling scientific fraud at scale (2025)

https://doi.org/10.1073/pnas.2420092122
293•peyton•22h ago•202 comments

Newcomb's Paradox Needs a Demon

https://samestep.com/blog/newcombs-paradox/
5•sestep•2d ago•2 comments

What Happens After You Die? (2016)

https://lamag.com/news/the-end/
47•NaOH•3d ago•30 comments

About memory pressure, lock contention, and Data-oriented Design

https://mnt.io/articles/about-memory-pressure-lock-contention-and-data-oriented-design/
57•vinhnx•3d ago•6 comments

Show HN: Klaus – OpenClaw on a VM, batteries included

https://klausai.com/
147•robthompson2018•19h ago•84 comments