frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

How async/await works in Python (2021)

https://tenthousandmeters.com/blog/python-behind-the-scenes-12-how-asyncawait-works-in-python/
61•sebg•11mo ago

Comments

quentinp•11mo ago
While it stays at the Python level, https://github.com/AndreLouisCaron/a-tale-of-event-loops really helped me to understand how asyncio and Trio are implemented. I had no idea how sleeps worked before reading that post.
incomingpain•11mo ago
Page didnt load for me.

https://realpython.com/async-io-python/

Multiprocessing all the way!

emmelaich•11mo ago
(2021)

Good article!

punnerud•11mo ago
A more simplified version:

Synchronous code is like a single-lane road where cars (tasks) must travel one after another in perfect sequence. If one car stops for gas (waiting for I/O), every car behind it must stop too. While orderly and predictable, this creates massive traffic jams as tasks wait unnecessarily for others to complete before they can proceed.

Pure asynchronous code (with callbacks) is like dispatching multiple cars onto independent routes with no coordination. Cars move freely without waiting for each other, but they arrive at unpredictable times and following their progress becomes chaotic. It's efficient but creates a complex tangle of paths that becomes hard to maintain.

Async/await combines the best of both approaches with a multi-lane highway system. Cars follow clear, synchronous-looking routes (making code readable), but only wait at strategic "await" exit ramps when truly necessary. When a car needs data, it signals with "await", pulls off the highway temporarily, and other cars continue flowing past. Once its operation completes, it merges back into traffic and continues. This gives you the logical simplicity of synchronous code with the performance benefits of asynchronous execution - cars only wait at crossroads when they must, maximizing throughput while maintaining order.

The genius of async/await is that it lets developers write code that looks sequential while the runtime handles all the complex traffic management under the hood.

explodes•11mo ago
Excellent write up. I appreciate the level of details here showing the history from the days of old, before async/await were even keywords.
bilsbie•11mo ago
How does the GIL come into play here?
punnerud•11mo ago
GIL is like a "red-cap" on the head for the CPU-core running the task, so you would not be able to run true Async without GIL. Have to hand the "red-cap" back, for the next task.

Instead of using a global lock ("red-cap"), Python objects have introduced a specialized reference counting system that distinguishes between "local" references (owned by a single thread) and "shared" references (accessed by multiple threads).

In that way enabling to remove GIL in the long run, now starting with making it optional.

Vercel April 2026 security incident

https://www.bleepingcomputer.com/news/security/vercel-confirms-breach-as-hackers-claim-to-be-sell...
641•colesantiago•15h ago•361 comments

A Brief History of Fish Sauce

https://www.legalnomads.com/fish-sauce/
135•vinhnx•20h ago•58 comments

Stop trying to engineer your way out of listening to people

https://ashley.rolfmore.com/stop-trying-to-engineer-your-way-out-of-listening-to-people/
114•walterbell•9h ago•25 comments

The Bromine Chokepoint

https://warontherocks.com/cogs-of-war/the-bromine-chokepoint-how-strife-in-the-middle-east-could-...
180•crescit_eundo•11h ago•87 comments

Claude Token Counter, now with model comparisons

https://simonwillison.net/2026/Apr/20/claude-token-counts/
37•twapi•4h ago•7 comments

Monumental ship burial beneath ancient Norwegian mound predates the Viking Age

https://phys.org/news/2026-04-monumental-ship-burial-beneath-ancient.html
13•pseudolus•2d ago•1 comments

Sudo for Windows

https://github.com/microsoft/sudo
48•luispa•5h ago•23 comments

Show HN: Run TRELLIS.2 Image-to-3D generation natively on Apple Silicon

https://github.com/shivampkumar/trellis-mac
123•shivampkumar•5h ago•21 comments

Turtle WoW classic server announces shutdown after Blizzard wins injunction

https://www.pcgamer.com/games/world-of-warcraft/turtle-wow-classic-server-announces-shutdown-afte...
176•Brajeshwar•13h ago•150 comments

Mechanical Keyboard Sounds – A listening Museum

https://sheets.works/data-viz/keyboard-sounds
71•akashwadhwani35•4d ago•29 comments

Changes in the system prompt between Claude Opus 4.6 and 4.7

https://simonwillison.net/2026/Apr/18/opus-system-prompt/
260•pretext•18h ago•152 comments

Swiss AI Initiative (2023)

https://www.swiss-ai.org
37•doener•6h ago•13 comments

2,100 Swiss municipalities showing which provider handles their official email

https://mxmap.ch/
105•doener•6h ago•33 comments

Prove you are a robot: CAPTCHAs for agents

https://browser-use.com/posts/prove-you-are-a-robot
79•lukasec•4d ago•38 comments

Scientific datasets are riddled with copy-paste errors

https://www.sciencedetective.org/scientific-datasets-are-riddled-with-copy-paste-errors/
64•jruohonen•10h ago•9 comments

The RAM shortage could last years

https://www.theverge.com/ai-artificial-intelligence/914672/the-ram-shortage-could-last-years
242•omer_k•22h ago•271 comments

A cache-friendly IPv6 LPM with AVX-512 (linearized B+-tree, real BGP benchmarks)

https://github.com/esutcu/planb-lpm
8•debugga•2h ago•1 comments

Show HN: A lightweight way to make agents talk without paying for API usage

https://juanpabloaj.com/2026/04/16/a-lightweight-way-to-make-agents-talk-without-paying-for-api-u...
20•juanpabloaj•5h ago•5 comments

A Common MVP Evolution: Service to System Integration to Product (2017)

https://www.skmurphy.com/blog/2017/08/07/a-common-evolution-service-to-system-integration-to-prod...
8•skmurphy•2d ago•2 comments

Archive of BYTE magazine, starting with issue #1 in 1975

https://archive.org/details/byte-magazine-1975-09
558•DamnInteresting•2d ago•145 comments

Recovering Windows Live Writer Files

https://benovermyer.com/blog/2026/04/recovering-windows-live-writer-files/
18•bovermyer•5d ago•6 comments

The seven programming ur-languages (2022)

https://madhadron.com/programming/seven_ur_languages.html
318•helloplanets•21h ago•120 comments

Interesting Map Geometry and Mathematics

https://www.markrjohnsongames.com/2026/04/11/ultima-ratio-regum-0-11-update-57-interesting-map-ge...
18•Hooke•1d ago•0 comments

Six Levels of Dark Mode (2024)

https://cssence.com/2024/six-levels-of-dark-mode/
64•Akcium•10h ago•28 comments

Show HN: A working reference implementation of context engineering

https://github.com/outcomeops/context-engineering
39•linsys•2d ago•11 comments

I wrote a CHIP-8 emulator in my own programming language

https://github.com/navid-m/chip8emu
59•pizza_man•10h ago•14 comments

Nanopass Framework: Clean Compiler Creation Language

https://nanopass.org/
126•NordStreamYacht•4d ago•29 comments

Show HN: Faceoff – A terminal UI for following NHL games

https://www.vincentgregoire.com/faceoff/
109•vcf•11h ago•35 comments

SPEAKE(a)R: Turn Speakers to Microphones for Fun and Profit [pdf] (2017)

https://www.usenix.org/system/files/conference/woot17/woot17-paper-guri.pdf
169•Eridanus2•20h ago•69 comments

PopOS Linux: Creating a Bootable Backup USB With Encryption

https://hajo.me/blog/2026/02/16/popos-linux-creating-bootable-backup-USB-with-encryption/
13•fxtentacle•2d ago•1 comments