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.

Native Instant Space Switching on macOS

https://arhan.sh/blog/native-instant-space-switching-on-macos/
120•PaulHoule•1h ago•54 comments

Reverse engineering Gemini's SynthID detection

https://github.com/aloshdenny/reverse-SynthID
45•_tk_•1h ago•12 comments

Charcuterie – Visual similarity Unicode explorer

https://charcuterie.elastiq.ch/
23•rickcarlino•1h ago•2 comments

PicoZ80 – Drop-In Z80 Replacement

https://eaw.app/picoz80/
73•rickcarlino•2h ago•14 comments

Hegel, a universal property-based testing protocol and family of PBT libraries

https://hegel.dev
56•PaulHoule•2h ago•19 comments

Old laptops in a colo as low cost servers

https://colaptop.pages.dev/
74•argentum47•3h ago•37 comments

Research-Driven Agents: What Happens When Your Agent Reads Before It Codes

https://blog.skypilot.co/research-driven-agents/
83•hopechong•4h ago•37 comments

Unfolder for Mac – A 3D model unfolding tool for creating papercraft

https://www.unfolder.app/
78•codazoda•4h ago•14 comments

Show HN: I built a Cargo-like build tool for C/C++

https://github.com/randerson112/craft
97•randerson_112•5h ago•86 comments

Top laptops to use with FreeBSD

https://freebsdfoundation.github.io/freebsd-laptop-testing/
246•fork-bomber•12h ago•141 comments

Maine is about to become the first state to ban major new data centers

https://www.gadgetreview.com/maine-is-about-to-become-the-first-state-to-ban-major-new-data-centers
165•rmason•1h ago•208 comments

Show HN: Druids – Build your own software factory

https://github.com/fulcrumresearch/druids
6•etherio•1d ago•1 comments

EFF is leaving X

https://www.eff.org/deeplinks/2026/04/eff-leaving-x
865•gregsadetsky•4h ago•744 comments

Reallocating $100/Month Claude Code Spend to Zed and OpenRouter

https://braw.dev/blog/2026-04-06-reallocating-100-month-claude-spend/
251•kisamoto•12h ago•178 comments

Bitmap fonts make computers feel like computers again

https://korigamik.dev/blog/bitmap_fonts/
62•speckx•2h ago•47 comments

Introduction to Nintendo DS Programming

https://www.patater.com/files/projects/manual/manual.html
195•medbar•1d ago•37 comments

How Do You Find an Illegal Image Without Looking at It?

https://mahmoud-salem.net/the-invisible-shield
5•danso•2d ago•0 comments

A WebGPU implementation of Augmented Vertex Block Descent

https://github.com/jure/webphysics
112•juretriglav•9h ago•14 comments

Netflix Prices Went Up Again – I Bought a DVD Player Instead

https://aywren.com/2026/04/09/netflix-prices-went-up-again-i-bought-a-dvd-player-instead/
142•speckx•1h ago•145 comments

The Future of Everything Is Lies, I Guess: Part 3 – Culture

https://aphyr.com/posts/413-the-future-of-everything-is-lies-i-guess-culture
71•aphyr•7h ago•47 comments

Wit, unker, Git: The lost medieval pronouns of English intimacy

https://www.bbc.com/future/article/20260408-the-extinct-english-words-for-just-the-two-of-us
169•eigenspace•11h ago•104 comments

Meta removes ads for social media addiction litigation

https://www.axios.com/2026/04/09/meta-social-media-addiction-ads
496•giuliomagnifico•8h ago•204 comments

Doing Impressions: Monet's Early Caricatures (ca. late 1850s)

https://publicdomainreview.org/collection/claude-monet-caricatures/
39•prismatic•3d ago•1 comments

Show HN: CSS Studio. Design by hand, code by agent

https://cssstudio.ai
126•SirHound•10h ago•89 comments

Open source security at Astral

https://astral.sh/blog/open-source-security-at-astral
340•vinhnx•17h ago•94 comments

Help Keep Thunderbird Alive

https://updates.thunderbird.net/en-US/thunderbird/140.0/apr26-1e/donate/
465•playfultones•14h ago•328 comments

Building a framework-agnostic Ruby gem (and making sure it doesn't break)

https://newsletter.masilotti.com/p/on-building-a-framework-agnostic
45•joemasilotti•2d ago•6 comments

LittleSnitch for Linux

https://obdev.at/products/littlesnitch-linux/index.html
1240•pluc•21h ago•407 comments

Lichess and Take Take Take Sign Cooperation Agreement

https://lichess.org/@/Lichess/blog/lichess-and-take-take-take-sign-cooperation-agreement/DZS0S0Dy
160•stevage•9h ago•45 comments

Haunted Paper Toys

http://ravensblight.com/papertoys.html
218•exvi•3d ago•28 comments