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.

Clean code in the age of coding agents

https://www.yanist.com/clean-code-in-the-age-of-coding-agents/
31•yanis_t•57m ago•31 comments

LittleSnitch for Linux

https://obdev.at/products/littlesnitch-linux/index.html
1082•pluc•15h ago•369 comments

A WebGPU Implementation of Augmented Vertex Block Descent

https://github.com/jure/webphysics
49•juretriglav•3h ago•2 comments

Meta removes ads for social media addiction litigation

https://www.axios.com/2026/04/09/meta-social-media-addiction-ads
164•giuliomagnifico•2h ago•72 comments

Session is shutting down in 90 days

https://getsession.org/donate
54•balamatom•2h ago•71 comments

How Pizza Tycoon simulated traffic on a 25 MHz CPU

https://pizzalegacy.nl/blog/traffic-system.html
128•FinnKuhn•2h ago•29 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
95•eigenspace•5h ago•53 comments

Lichess and Take Take Take Sign Cooperation Agreement

https://lichess.org/@/Lichess/blog/lichess-and-take-take-take-sign-cooperation-agreement/DZS0S0Dy
70•stevage•3h ago•7 comments

Introduction to Nintendo DS Programming

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

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

https://newsletter.masilotti.com/p/on-building-a-framework-agnostic
14•joemasilotti•1d ago•1 comments

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

https://cssstudio.ai
71•SirHound•4h ago•59 comments

FreeBSD Laptop Compatibility: Top Laptops to Use with FreeBSD

https://freebsdfoundation.github.io/freebsd-laptop-testing/
77•fork-bomber•6h ago•46 comments

Open Source Security at Astral

https://astral.sh/blog/open-source-security-at-astral
289•vinhnx•11h ago•68 comments

Show HN: 41 years sea surface temperature anomalies

https://ssta.willhelps.org
109•willmeyers•3h ago•36 comments

Help Keep Thunderbird Alive

https://updates.thunderbird.net/en-US/thunderbird/140.0/apr26-1e/donate/
326•playfultones•8h ago•216 comments

Creating the Futurescape for the Fifth Element (2019)

https://theasc.com/articles/fantastic-voyage-creating-the-futurescape-for-the-fifth-element
83•nixass•6h ago•51 comments

Haunted Paper Toys

http://ravensblight.com/papertoys.html
179•exvi•3d ago•23 comments

Claude mixes up who said what

https://dwyer.co.za/static/claude-mixes-up-who-said-what-and-thats-not-ok.html
276•sixhobbits•6h ago•258 comments

Launch HN: Relvy (YC F24) – On-call runbooks, automated

https://www.relvy.ai
17•behat•3h ago•15 comments

Tree Calculus

https://treecalcul.us/
55•tosh•6d ago•14 comments

Small Engines

https://scottlocklin.wordpress.com/2026/03/25/very-small-engines/
26•surprisetalk•3d ago•6 comments

One Brain to Query: Wiring a 60-Person Company into a Single Slack Bot

https://merylldindin.com/thoughts/company-brain/
4•meryll_dindin•1d ago•1 comments

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

https://braw.dev/blog/2026-04-06-reallocating-100-month-claude-spend/
70•kisamoto•6h ago•87 comments

C# in Unity 2026: Features Most Developers Still Don't Use

https://darkounity.com/blog/c-in-unity-2026-features-most-developers-still-dont-use
52•hacker_13•3d ago•47 comments

Show HN: Moon simulator game, ray-casting

https://mooncraft2000.com
63•JKCalhoun•2d ago•14 comments

Dr. Dobb's Developer Library DVD 6 (2010)

https://archive.org/details/DDJDVD6
105•kristianp•4d ago•40 comments

The Importance of Being Idle

https://theamericanscholar.org/the-importance-of-being-idle/
250•Caiero•2d ago•148 comments

USB for Software Developers: An introduction to writing userspace USB drivers

https://werwolv.net/posts/usb_for_sw_devs/
369•WerWolv•20h ago•41 comments

I ported Mac OS X to the Nintendo Wii

https://bryankeller.github.io/2026/04/08/porting-mac-os-x-nintendo-wii.html
1755•blkhp19•23h ago•296 comments

Understanding the Kalman filter with a simple radar example

https://kalmanfilter.net
395•alex_be•22h ago•54 comments