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.

Where the Goblins Came From

https://openai.com/index/where-the-goblins-came-from/
112•ilreb•53m ago•36 comments

Craig Venter has died

https://www.jcvi.org/media-center/j-craig-venter-genomics-pioneer-and-founder-jcvi-and-diploid-ge...
130•rdl•2h ago•28 comments

Zed 1.0

https://zed.dev/blog/zed-1-0
1635•salkahfi•13h ago•524 comments

Finetuning Activates Verbatim Recall of Copyrighted Books in LLMs

https://github.com/cauchy221/Alignment-Whack-a-Mole-Code
20•reconnecting•1h ago•2 comments

Biology is a Burrito: A text- and visual-based journey through a living cell

https://burrito.bio/essays/biology-is-a-burrito
20•the-mitr•49m ago•2 comments

Copy Fail

https://copy.fail/
715•unsnap_biceps•10h ago•294 comments

Functional Programmers need to take a look at Zig

https://pure-systems.org/posts/2026-04-29-functional-programmers-need-to-take-a-look-at-zig.html
18•xngbuilds•1h ago•1 comments

Cursor Camp

https://neal.fun/cursor-camp/
758•bpierre•12h ago•127 comments

Zulip 12.0 Released

https://blog.zulip.com/2026/04/27/zulip-12-0-released/
16•tabbott•2h ago•0 comments

OpenTrafficMap

https://opentrafficmap.org/
175•moooo99•8h ago•36 comments

FastCGI: 30 years old and still the better protocol for reverse proxies

https://www.agwa.name/blog/post/fastcgi_is_the_better_protocol_for_reverse_proxies
280•agwa•11h ago•67 comments

Noctua releases official 3D CAD models for its cooling fans

https://www.noctua.at/en/3d-cad-models
6•embedding-shape•2d ago•1 comments

HERMES.md in commit messages causes requests to route to extra usage billing

https://github.com/anthropics/claude-code/issues/53262
1039•homebrewer•9h ago•444 comments

Consequences of passing too few register parameters to a C function

https://devblogs.microsoft.com/oldnewthing/20260427-00/?p=112271
33•aragonite•2d ago•16 comments

Laws of UX

https://lawsofux.com/
218•bobbiechen•11h ago•31 comments

Creating a Color Palette from an Image

https://amandahinton.com/blog/creating-a-color-palette-from-an-image
25•evakhoury•1d ago•3 comments

Why I still reach for Lisp and Scheme instead of Haskell

https://jointhefreeworld.org/blog/articles/lisps/why-i-still-reach-for-scheme-instead-of-haskell/...
178•jjba23•19h ago•78 comments

An open-source stethoscope that costs between $2.5 and $5 to produce

https://github.com/GliaX/Stethoscope
222•0x54MUR41•13h ago•89 comments

Gooseworks (YC W23) Is Hiring a Founding Growth Engineer

https://www.ycombinator.com/companies/gooseworks/jobs/ztgY6bD-founding-growth-engineer
1•shivsak•6h ago

DRAM Crunch: Lessons for System Design

https://www.eetimes.com/what-the-dram-crunch-teaches-us-about-system-design/
39•giuliomagnifico•1d ago•3 comments

The Zig project's rationale for their firm anti-AI contribution policy

https://simonwillison.net/2026/Apr/30/zig-anti-ai/
25•lumpa•1h ago•2 comments

A Grounded Conceptual Model for Ownership Types in Rust

https://cacm.acm.org/research-highlights/a-grounded-conceptual-model-for-ownership-types-in-rust/
12•tkhattra•2h ago•0 comments

Ramp's Sheets AI Exfiltrates Financials

https://www.promptarmor.com/resources/ramps-sheets-ai-exfiltrates-financials
120•takira•10h ago•35 comments

We need a federation of forges

https://blog.tangled.org/federation/
534•icy•14h ago•339 comments

Kyoto cherry blossoms now bloom earlier than at any point in 1,200 years

https://jivx.com/kyoto-bloom
288•momentmaker•8h ago•82 comments

Mike: open-source legal AI

https://mikeoss.com/
32•noleary•3h ago•10 comments

Vera: a programming language designed for machines to write

https://github.com/aallan/vera
68•unignorant•6h ago•59 comments

Show HN: Qumulator – quantum circuit simulator, 1000 qubits, no GPU

https://github.com/qumulator/qumulator-sdk
7•nnoorbakhsh•2d ago•3 comments

Postgres's lateral joins allow for quite the good eDSL

https://bensimms.moe/postgres-lateral-makes-quite-a-good-dsl/
73•nitros•2d ago•15 comments

Online age verification is the hill to die on

https://x.com/GlennMeder/status/2049088498163216560
835•Cider9986•12h ago•530 comments