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.

Why I Write (1946)

https://www.orwellfoundation.com/the-orwell-foundation/orwell/essays-and-other-works/why-i-write/
29•RyanShook•49m ago•2 comments

GPT-5.5

https://openai.com/index/introducing-gpt-5-5/
1148•rd•9h ago•791 comments

Bitwarden CLI compromised in ongoing Checkmarx supply chain campaign

https://socket.dev/blog/bitwarden-cli-compromised
669•tosh•12h ago•333 comments

Show HN: Tolaria – Open-source macOS app to manage Markdown knowledge bases

https://github.com/refactoringhq/tolaria
120•lucaronin•5h ago•38 comments

Meta tells staff it will cut 10% of jobs

https://www.bloomberg.com/news/articles/2026-04-23/meta-tells-staff-it-will-cut-10-of-jobs-in-pus...
425•Vaslo•8h ago•404 comments

MeshCore development team splits over trademark dispute and AI-generated code

https://blog.meshcore.io/2026/04/23/the-split
165•wielebny•10h ago•97 comments

I am building a cloud

https://crawshaw.io/blog/building-a-cloud
1022•bumbledraven•22h ago•498 comments

TorchTPU: Running PyTorch Natively on TPUs at Google Scale

https://developers.googleblog.com/torchtpu-running-pytorch-natively-on-tpus-at-google-scale/
73•mji•6h ago•2 comments

An update on recent Claude Code quality reports

https://www.anthropic.com/engineering/april-23-postmortem
592•mfiguiere•9h ago•460 comments

My phone replaced a brass plug

https://drobinin.com/posts/my-phone-replaced-a-brass-plug/
91•valzevul•10h ago•15 comments

Your hex editor should color-code bytes

https://simonomi.dev/blog/color-code-your-bytes/
519•tobr•2d ago•144 comments

UK Biobank health data keeps ending up on GitHub

https://biobank.rocher.lc
84•Cynddl•13h ago•22 comments

Show HN: Agent Vault – Open-source credential proxy and vault for agents

https://github.com/Infisical/agent-vault
80•dangtony98•1d ago•29 comments

Astronomers find the edge of the Milky Way

https://skyandtelescope.org/astronomy-news/astronomers-find-the-edge-of-the-milky-way/
90•bookofjoe•9h ago•14 comments

A programmable watch you can actually wear

https://www.hackster.io/news/a-diy-watch-you-can-actually-wear-8f91c2dac682
148•sarusso•2d ago•76 comments

Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite

https://github.com/russellromney/honker
239•russellthehippo•15h ago•58 comments

Incident with multple GitHub services

https://www.githubstatus.com/incidents/myrbk7jvvs6p
218•bwannasek•10h ago•107 comments

Used La Marzocco machines are coveted by cafe owners and collectors

https://www.nytimes.com/2026/04/20/dining/la-marzocco-espresso-machine.html
44•mitchbob•2d ago•79 comments

French government agency confirms breach as hacker offers to sell data

https://www.bleepingcomputer.com/news/security/french-govt-agency-confirms-breach-as-hacker-offer...
362•robtherobber•11h ago•122 comments

I spent years trying to make CSS states predictable

https://tenphi.me/blog/why-i-spent-years-trying-to-make-css-states-predictable/
53•tenphi•14h ago•17 comments

Arch Linux Now Has a Bit-for-Bit Reproducible Docker Image

https://antiz.fr/blog/archlinux-now-has-a-reproducible-docker-image/
317•maxloh•1d ago•106 comments

Advanced Packaging Limits Come into Focus

https://semiengineering.com/advanced-packaging-limits-come-into-focus/
31•PaulHoule•2d ago•5 comments

Alberta startup sells no-tech tractors for half price

https://wheelfront.com/this-alberta-startup-sells-no-tech-tractors-for-half-price/
2156•Kaibeezy•1d ago•738 comments

Girl, 10, finds rare Mexican axolotl under Welsh bridge

https://www.bbc.com/news/articles/c9d4zgnqpqeo
186•codezero•8h ago•152 comments

Writing a C Compiler, in Zig (2025)

https://ar-ms.me/thoughts/c-compiler-1-zig/
141•tosh•17h ago•41 comments

Using the internet like it's 1999

https://joshblais.com/blog/using-the-internet-like-its-1999/
108•joshuablais•7h ago•68 comments

2026 Ruby on Rails Community Survey

https://railsdeveloper.com/survey/
7•mooreds•15m ago•0 comments

WireGuard for Windows Reaches v1.0

https://lists.zx2c4.com/pipermail/wireguard/2026-April/009580.html
122•zx2c4•2d ago•7 comments

Isopods of the world

https://isopod.site/
156•debesyla•3d ago•58 comments

Palantir employees are starting to wonder if they're the bad guys

https://www.wired.com/story/palantir-employees-are-starting-to-wonder-if-theyre-the-bad-guys/
780•pavel_lishin•9h ago•530 comments