Simon Tatham, the creator of PuTTY, found a way to fake coroutines in standard C using…
This is a dev post classified by AGK Intelligence as Terminal & editor (a tutorial), kept by the Dev Radar because it carries real work, not commentary.
Simon Tatham, the creator of PuTTY, found a way to fake coroutines in standard C using the same switch/case trick behind Duff's Device. He combined it with __LINE__ so a function could return a value, remember exactly where it stopped, and resume there on the next call. no threads & assembly just a few macros. PuTTY still uses versions of this trick in its SSH protocol code. Here's a minimal example:
Posted by Arika (9k followers) 1 days ago · 898 likes · 44.9k views · view the original post on X. Kept by the Dev Radar as Terminal & editor.
More dev work like this
- fx v0.0.16 — @vercel_dev
- oh by the way you can put the Nous Girl in your Hermes Agent terminal. — @witcheer
- App Store Connect CLI 6.1.0 is out! — @rudrank
- it is launch day at https://opencomputer.dev! — @utpalnadiger
- happy Halloween! 🎃 — @zenorocha
- Woah, Visual Studio Code now displays SVG previews in the gutter? — @codepo8
- Best IDEs for programming Languages #BigData #Analytics #DataScience #AI… — @Sheraj99
- contract editor UI 📃 — @marcelkargul
Every post is read and classified by AGK Intelligence: what it is, which market it belongs to, and whether the link is a real tool. 31.2k posts from 5k X accounts over the last 21 days, 8.8k tools, 12 markets. New posts are collected several times an hour and the full ranking is recomputed every hour — last update 2026-10-30 20:27 UTC. Full method.