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•1y ago

Comments

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

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

Multiprocessing all the way!

emmelaich•1y ago
(2021)

Good article!

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

Restore full BambuNetwork support for Bambu Lab printers

https://github.com/FULU-Foundation/OrcaSlicer-bambulab
291•Murfalo•7h ago•121 comments

Googlebook

https://googlebook.google/
683•tambourine_man•11h ago•1160 comments

Show HN: Needle: We Distilled Gemini Tool Calling into a 26M Model

https://github.com/cactus-compute/needle
352•HenryNdubuaku•11h ago•125 comments

How to make your text look futuristic (2016)

https://typesetinthefuture.com/2016/02/18/futuristic/
271•_vaporwave_•8h ago•33 comments

Kraftwerk's radical 1976 track

https://www.bbc.com/culture/article/20260511-kraftwerks-radical-1976-track-radioactivity-became-a...
101•tcp_handshaker•5h ago•40 comments

My graduation cap runs Rust

https://ericswpark.com/blog/2026/2026-05-12-my-graduation-cap-runs-rust/
114•ericswpark•5h ago•29 comments

CERT is releasing six CVEs for serious security vulnerabilities in dnsmasq

https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2026q2/018471.html
273•chizhik-pyzhik•10h ago•125 comments

Why senior developers fail to communicate their expertise

https://www.nair.sh/guides-and-opinions/communicating-your-expertise/why-senior-developers-fail-t...
465•nilirl•14h ago•205 comments

The vi family

https://lpar.ATH0.com/posts/2026/05/the-vi-family/
48•hggh•6d ago•13 comments

Deterministic Fully-Static Whole-Binary Translation Without Heuristics

https://arxiv.org/abs/2605.08419
10•matt_d•46m ago•0 comments

When "idle" isn't idle: how a Linux kernel optimization became a QUIC bug

https://blog.cloudflare.com/quic-death-spiral-fix/
49•sbulaev•5h ago•1 comments

Traceway: MIT-licensed observability stack you can self-host in ~90s

https://github.com/tracewayapp/traceway
40•sebakubisz•1d ago•3 comments

Referer Reality

https://www.robinsloan.com/lab/referer/
22•tobr•2d ago•4 comments

Tell NYT, Atlantic, USA Today to keep Wayback Machine

https://www.savethearchive.com/newsleaders/
250•doener•5h ago•61 comments

Rendering the Sky, Sunsets, and Planets

https://blog.maximeheckel.com/posts/on-rendering-the-sky-sunsets-and-planets/
437•ibobev•15h ago•38 comments

Quack: The DuckDB Client-Server Protocol

https://duckdb.org/2026/05/12/quack-remote-protocol
231•aduffy•11h ago•49 comments

The Future of Obsidian Plugins

https://obsidian.md/blog/future-of-plugins/
336•xz18r•13h ago•133 comments

Zero-native – Build native desktop apps with web UI

https://zero-native.dev
13•gedy•3h ago•2 comments

Reimagining the mouse pointer for the AI era

https://deepmind.google/blog/ai-pointer/
172•devhouse•11h ago•143 comments

Fc, a lossless compressor for floating-point streams

https://github.com/xtellect/fc
37•enduku•2d ago•8 comments

Scrcpy v4.0

https://github.com/Genymobile/scrcpy/releases/tag/v4.0
85•xnx•8h ago•15 comments

What can singing mice say about human speech?

https://phys.org/news/2026-05-mice-human-speech.html
5•gmays•2d ago•0 comments

Lanzaboote – NixOS Secure Boot

https://x86.lol/generic/2022/11/26/lanzaboote.html
66•evilmonkey19•3d ago•6 comments

Show HN: Agentic interface for mainframes and COBOL

https://www.hypercubic.ai/hopper
66•sai18•12h ago•39 comments

Launch HN: Voker (YC S24) – Analytics for AI Agents

https://voker.ai
47•ttpost•13h ago•19 comments

Foucault's Order of Things Explained with Trading Cards [video]

https://www.youtube.com/watch?v=1TbHYjGvS68
27•surprisetalk•1d ago•18 comments

Bambu Lab is abusing the open source social contract

https://www.jeffgeerling.com/blog/2026/bambu-lab-abusing-open-source-social-contract/
1164•rubenbe•14h ago•377 comments

EFF to 4th Circuit: Electronic Device Searches at the Border Require a Warrant

https://www.eff.org/deeplinks/2026/05/eff-fourth-circuit-electronic-device-searches-border-requir...
158•hn_acker•7h ago•23 comments

Starship V3

https://www.spacex.com/updates#starship-v3
169•fprog•3h ago•163 comments

When life gives you lemons, write better error messages

https://wix-ux.com/when-life-gives-you-lemons-write-better-error-messages-46c5223e1a2f
127•luispa•4d ago•47 comments