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

Comments

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

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

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

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

Ministry of Justice orders deletion of the UK's largest court reporting database

https://www.legalcheek.com/2026/02/ministry-of-justice-orders-deletion-of-the-uks-largest-court-r...
386•harel•5h ago•256 comments

WebMCP Proposal

https://webmachinelearning.github.io/webmcp/
57•Alifatisk•1h ago•21 comments

What Your Bluetooth Devices Reveal About You

https://blog.dmcc.io/journal/2026-bluetooth-privacy-bluehood/
145•ssgodderidge•4h ago•53 comments

Use Protocols, Not Services

https://notnotp.com/notes/use-protocols-not-services/
11•enz•19m ago•1 comments

Ghidra by NSA

https://github.com/NationalSecurityAgency/ghidra
208•handfuloflight•2d ago•99 comments

Running My Own XMPP Server

https://blog.dmcc.io/journal/xmpp-turn-stun-coturn-prosody/
161•speckx•5h ago•91 comments

Privilege Is Bad Grammar

https://tadaima.bearblog.dev/privilege-is-bad-grammar/
72•surprisetalk•59m ago•41 comments

Qwen3.5: Towards Native Multimodal Agents

https://qwen.ai/blog?id=qwen3.5
288•danielhanchen•9h ago•127 comments

Show HN: Simple org-mode web adapter

https://github.com/SpaceTurth/Org-Web-Adapter
36•turth•2h ago•0 comments

Looks: A Halide Mark III Preview

https://www.lux.camera/mark-iii-looks/
36•patrikcsak•2d ago•2 comments

How to take a photo with scotch tape (lensless imaging) [video]

https://www.youtube.com/watch?v=97f0nfU5Px0
27•surprisetalk•2h ago•1 comments

I’m joining OpenAI

https://steipete.me/posts/2026/openclaw
1331•mfiguiere•21h ago•1011 comments

I want to wash my car. The car wash is 50 meters away. Should I walk or drive?

https://mastodon.world/@knowmadd/116072773118828295
1222•novemp•12h ago•758 comments

The Sideprocalypse

https://johan.hal.se/wrote/2026/02/03/the-sideprocalypse/
121•headalgorithm•4h ago•104 comments

Rolling your own serverless OCR in 40 lines of code

https://christopherkrapu.com/blog/2026/ocr-textbooks-modal-deepseek/
86•mpcsb•4d ago•43 comments

planckforth: Bootstrapping a Forth interpreter from hand-written tiny ELF binary

https://github.com/nineties/planckforth
46•tosh•7h ago•9 comments

UK Discord users were part of a Peter Thiel-linked data collection experiment

https://www.rockpapershotgun.com/good-news-uk-discord-users-were-part-of-a-peter-thiel-linked-dat...
180•righthand•4h ago•39 comments

MessageFormat: Unicode standard for localizable message strings

https://github.com/unicode-org/message-format-wg
138•todsacerdoti•8h ago•57 comments

History of AT&T Long Lines

https://telephoneworld.org/long-distance-companies/att-long-distance-network/history-of-att-long-...
16•p_ing•2h ago•4 comments

Show HN: Maths, CS and AI Compendium

https://github.com/HenryNdubuaku/maths-cs-ai-compendium
22•HenryNdubuaku•3h ago•1 comments

Anthropic tries to hide Claude's AI actions. Devs hate it

https://www.theregister.com/2026/02/16/anthropic_claude_ai_edits/
290•beardyw•7h ago•168 comments

Modern CSS Code Snippets: Stop writing CSS like it's 2015

https://modern-css.com
637•eustoria•1d ago•270 comments

Robert Duvall Dead at 95

https://www.newsweek.com/entertainment/hollywood-legend-robert-duvall-dead-at-95-11531295
9•glimshe•11m ago•1 comments

Vim-pencil: Rethinking Vim as a tool for writing

https://github.com/preservim/vim-pencil
115•gurjeet•3d ago•43 comments

Richard Carrington's first portrait has been found

https://www.cnn.com/2026/02/12/science/solar-storm-richard-carrington-photo
16•YeGoblynQueenne•3d ago•3 comments

Magnus Carlsen Wins the Freestyle (Chess960) World Championship

https://www.fide.com/magnus-carlsen-wins-2026-fide-freestyle-world-championship/
352•prophylaxis•20h ago•237 comments

Castlevania and Bloodstained developer Shutaro Ida dies aged 52

https://www.dexerto.com/gaming/castlevania-and-bloodstained-developer-shutaro-ida-dies-aged-52-33...
17•magoghm•1h ago•1 comments

I guess I kinda get why people hate AI

https://anthony.noided.media/blog/ai/programming/2026/02/14/i-guess-i-kinda-get-why-people-hate-a...
102•NM-Super•1h ago•139 comments

Expensively Quadratic: The LLM Agent Cost Curve

https://blog.exe.dev/expensively-quadratic
112•luu•3d ago•67 comments

STM32G431 Analogue TV Transmitter

https://slyka.net/blog/2026/tinyvision/
9•e145bc455f1•2h ago•0 comments