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

Comments

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

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

Multiprocessing all the way!

emmelaich•7mo ago
(2021)

Good article!

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

Advertising as a major source of human dissatisfaction (2019) [pdf]

https://www.andrewoswald.com/docs/AdvertisingMicheletal2019EasterlinVolume.pdf
87•anigbrowl•36m ago•33 comments

Synadia and TigerBeetle Pledge $512,000 to the Zig Software Foundation

https://tigerbeetle.com/blog/2025-10-25-synadia-and-tigerbeetle-pledge-512k-to-the-zig-software-f...
129•cratermoon•4h ago•51 comments

Netflix to Acquire Warner Bros

https://about.netflix.com/en/news/netflix-to-acquire-warner-bros
1185•meetpateltech•8h ago•973 comments

Gemini 3 Pro: the frontier of vision AI

https://blog.google/technology/developers/gemini-3-pro-vision/
139•xnx•4h ago•57 comments

Patterns for Defensive Programming in Rust

https://corrode.dev/blog/defensive-programming/
118•PaulHoule•4h ago•21 comments

I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA

131•proberts•4h ago•142 comments

Show HN: HCB Mobile – financial app built by 17 y/o, processing $6M/month

https://hackclub.com/fiscal-sponsorship/mobile/
47•mohamad08•2d ago•9 comments

Cloudflare outage on December 5, 2025

https://blog.cloudflare.com/5-december-2025-outage/
389•meetpateltech•5h ago•264 comments

Why we built Lightpanda in Zig

https://lightpanda.io/blog/posts/why-we-built-lightpanda-in-zig
80•ashvardanian•2h ago•39 comments

Framework Sponsors CachyOS

https://discuss.cachyos.org/t/framework-sponsorship-for-cachyos/19376
7•d3Xt3r•51m ago•1 comments

Making RSS More Fun

https://matduggan.com/making-rss-more-fun/
152•salmon•7h ago•77 comments

Idempotency Keys for Exactly-Once Processing

https://www.morling.dev/blog/on-idempotency-keys/
8•defly•4d ago•0 comments

Compassionate Curmudgeon: Why we must root ourselves in the real world

https://theamericanscholar.org/compassionate-curmudgeon/
15•lermontov•3d ago•1 comments

Onlook (YC W25) the Cursor for Designers Is Hiring a Founding Fullstack Engineer

1•D_R_Farrell•3h ago

UniFi 5G

https://blog.ui.com/article/introducing-unifi-5g
319•janandonly•13h ago•257 comments

Zellij: A terminal workspace with batteries included

https://zellij.dev
32•ndr•4h ago•34 comments

Framework Laptop 13 gets ARM processor with 12 cores via upgrade kit

https://www.notebookcheck.net/Framework-Laptop-13-gets-ARM-processor-with-12-cores-via-upgrade-ki...
230•woodrowbarlow•5h ago•106 comments

The Forgotten Roman Ruins of the ‘Pompeii of the Middle East’

https://news.artnet.com/art-world/huge-jerash-jordan-pompeii-middle-easy-2708480
38•pseudolus•6d ago•9 comments

Netflix’s AV1 Journey: From Android to TVs and Beyond

https://netflixtechblog.com/av1-now-powering-30-of-netflix-streaming-02f592242d80
476•CharlesW•20h ago•251 comments

Show HN: SerpApi MCP Server

https://github.com/serpapi/serpapi-mcp
12•thefoolofdaath•2h ago•2 comments

Building a Copying GC for the Plush Programming Language

https://pointersgonewild.com/2025-11-29-building-a-copying-gc-for-the-plush-programming-language/
17•ibobev•4d ago•1 comments

BMW PHEV: Safety fuse replacement is extremely expensive

https://evclinic.eu/2025/12/04/2021-phev-bmw-ibmucp-21f37e-post-crash-recovery-when-eu-engineerin...
399•mikelabatt•19h ago•442 comments

Most technical problems are people problems

https://blog.joeschrag.com/2023/11/most-technical-problems-are-really.html
244•mooreds•7h ago•211 comments

Judge Signals Win for Software Freedom Conservancy in Vizio GPL Case

https://fossforce.com/2025/12/judge-signals-win-for-software-freedom-conservancy-in-vizio-gpl-case/
8•speckx•12m ago•0 comments

Shingles vaccination prevented or delayed dementia

https://www.cell.com/cell/fulltext/S0092-8674(25)01256-5
174•Archelaos•3h ago•108 comments

WikiFlix: Full Movies Hosted on Wikimedia Commons

https://commons.wikimedia.org/wiki/User:Spinster/WikiFlix
51•netule•2h ago•9 comments

I have been writing a niche history blog for 15 years

https://resobscura.substack.com/p/why-i-have-been-writing-a-niche-history
238•benbreen•1d ago•42 comments

Influential study on glyphosate safety retracted 25 years after publication

https://www.lemonde.fr/en/environment/article/2025/12/03/influential-study-on-glyphosate-safety-r...
209•isolli•7h ago•191 comments

Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds

https://pbnj.sh/
40•bhavnicksm•7h ago•12 comments

Jony Ive's OpenAI Device Barred from Using 'Io' Name

https://www.macrumors.com/2025/12/05/openai-device-barred-from-io-name/
70•thm•4h ago•43 comments