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•10mo ago

Comments

quentinp•10mo 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•10mo ago
Page didnt load for me.

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

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

punnerud•10mo 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•10mo 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•10mo ago
How does the GIL come into play here?
punnerud•10mo 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.

A sufficiently detailed spec is code

https://haskellforall.com/2026/03/a-sufficiently-detailed-spec-is-code
190•signa11•4h ago•77 comments

Cook: A simple CLI for orchestrating Claude Code

https://rjcorwin.github.io/cook/
133•staticvar•4h ago•27 comments

Nvidia greenboost: transparently extend GPU VRAM using system RAM/NVMe

https://gitlab.com/IsolatedOctopi/nvidia_greenboost
255•mmastrac•3d ago•51 comments

Warranty Void If Regenerated

https://nearzero.software/p/warranty-void-if-regenerated
283•Stwerner•10h ago•158 comments

Austin’s surge of new housing construction drove down rents

https://www.pew.org/en/research-and-analysis/articles/2026/03/18/austins-surge-of-new-housing-con...
470•matthest•6h ago•515 comments

OpenRocket

https://openrocket.info/
493•zeristor•3d ago•89 comments

Conway's Game of Life, in real life

https://lcamtuf.substack.com/p/conways-game-of-life-in-real-life
31•surprisetalk•2h ago•3 comments

Autoresearch for SAT Solvers

https://github.com/iliazintchenko/agent-sat
95•chaisan•6h ago•20 comments

Rob Pike’s Rules of Programming (1989)

https://www.cs.unc.edu/~stotts/COMP590-059-f24/robsrules.html
912•vismit2000•20h ago•430 comments

We Have Learned Nothing

https://colossus.com/article/we-have-learned-nothing-startup-pundits/
31•lukestevens•4h ago•8 comments

LotusNotes

https://computer.rip/2026-03-14-lotusnotes.html
43•TMWNN•3d ago•18 comments

RX – a new random-access JSON alternative

https://github.com/creationix/rx
60•creationix•6h ago•20 comments

Wander – A tiny, decentralised tool to explore the small web

https://susam.net/wander/
251•susam•23h ago•65 comments

Framework doesn't matter

https://cemrehancavdar.com/2026/02/19/your-framework-may-not-matter/
13•zdw•4d ago•1 comments

Nvidia NemoClaw

https://github.com/NVIDIA/NemoClaw
285•hmokiguess•15h ago•203 comments

Czech Man's Stone in Barn's Foundations Is Rare Bronze Age Spearhead Mold

https://www.smithsonianmag.com/smart-news/a-czech-man-used-this-stone-in-his-barns-foundations-it...
36•bookofjoe•2d ago•4 comments

Mozilla to launch free built-in VPN in upcoming Firefox 149

https://cyberinsider.com/mozilla-to-launch-free-built-in-vpn-in-upcoming-firefox-149/
66•adrianwaj•3h ago•37 comments

The math that explains why bell curves are everywhere

https://www.quantamagazine.org/the-math-that-explains-why-bell-curves-are-everywhere-20260316/
100•ibobev•2d ago•60 comments

Show HN: Will my flight have Starlink?

213•bblcla•13h ago•274 comments

Show HN: I built 48 lightweight SVG backgrounds you can copy/paste

https://www.svgbackgrounds.com/set/free-svg-backgrounds-and-patterns/
231•visiwig•15h ago•49 comments

Show HN: Browser grand strategy game for hundreds of players on huge maps

https://borderhold.io/play
16•sgolem•2d ago•10 comments

Book: The Emerging Science of Machine Learning Benchmarks

https://mlbenchmarks.org/00-preface.html
111•jxmorris12•4d ago•6 comments

An x86-64 back end for raven-uxn

https://www.mattkeeter.com/blog/2026-03-15-uxn/
27•dcre•3d ago•5 comments

What 81,000 people want from AI

https://www.anthropic.com/features/81k-interviews
69•dsr12•1h ago•48 comments

CVE-2026-3888: Important Snap Flaw Enables Local Privilege Escalation to Root

https://blog.qualys.com/vulnerabilities-threat-research/2026/03/17/cve-2026-3888-important-snap-f...
121•askl•15h ago•69 comments

What’s on HTTP?

https://whatsonhttp.com/
52•elixx•8h ago•24 comments

OpenAI Has New Focus (on the IPO)

https://om.co/2026/03/17/openai-has-new-focus-on-the-ipo/
208•aamederen•20h ago•173 comments

Show HN: Playing LongTurn FreeCiv with Friends

https://github.com/ndroo/freeciv.andrewmcgrath.info
70•verelo•11h ago•29 comments

Machine Payments Protocol (MPP)

https://stripe.com/blog/machine-payments-protocol
169•bpierre•15h ago•71 comments

Show HN: Hacker News archive (47M+ items, 11.6GB) as Parquet, updated every 5m

https://huggingface.co/datasets/open-index/hacker-news
357•tamnd•4d ago•143 comments