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.

DeepSeek v4

https://api-docs.deepseek.com/
953•impact_sy•6h ago•594 comments

S. Korea police arrest man over AI image of runaway wolf that misled authorities

https://www.bbc.com/news/articles/c4gx1n0dl9no
11•giuliomagnifico•36m ago•0 comments

Why I Write (1946)

https://www.orwellfoundation.com/the-orwell-foundation/orwell/essays-and-other-works/why-i-write/
164•RyanShook•7h ago•43 comments

Spinel: Ruby AOT Native Compiler

https://github.com/matz/spinel
36•dluan•1h ago•9 comments

Composition Shouldn't be this Hard

https://www.cambra.dev/blog/announcement/
49•larelli•2h ago•32 comments

An update on recent Claude Code quality reports

https://www.anthropic.com/engineering/april-23-postmortem
741•mfiguiere•16h ago•555 comments

Show HN: How LLMs Work – Interactive visual guide based on Karpathy's lecture

https://ynarwal.github.io/how-llms-work/
35•ynarwal__•3h ago•5 comments

GPT-5.5

https://openai.com/index/introducing-gpt-5-5/
1373•rd•15h ago•902 comments

US special forces soldier arrested after allegedly winning $400k on Maduro raid

https://www.cnn.com/2026/04/23/politics/us-special-forces-soldier-arrested-maduro-raid-trade
247•nkrisc•11h ago•292 comments

Bitwarden CLI compromised in ongoing Checkmarx supply chain campaign

https://socket.dev/blog/bitwarden-cli-compromised
752•tosh•19h ago•365 comments

Show HN: Gova – The declarative GUI framework for Go

https://github.com/NV404/gova
28•aliezsid•3h ago•9 comments

Why Not Venus?

https://mceglowski.substack.com/p/why-not-venus
49•zdw•4h ago•24 comments

Familiarity is the enemy: On why Enterprise systems have failed for 60 years

https://felixbarbalet.com/familiarity-is-the-enemy/
43•adityaathalye•5h ago•18 comments

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

https://blog.meshcore.io/2026/04/23/the-split
219•wielebny•16h ago•116 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...
603•Vaslo•14h ago•581 comments

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

https://github.com/refactoringhq/tolaria
203•lucaronin•11h ago•77 comments

Habitual coffee intake shapes the microbiome, modifies physiology and cognition

https://www.nature.com/articles/s41467-026-71264-8
149•scubakid•5h ago•83 comments

Using the internet like it's 1999

https://joshblais.com/blog/using-the-internet-like-its-1999/
162•joshuablais•13h ago•99 comments

TorchTPU: Running PyTorch Natively on TPUs at Google Scale

https://developers.googleblog.com/torchtpu-running-pytorch-natively-on-tpus-at-google-scale/
137•mji•13h ago•9 comments

UK Biobank health data keeps ending up on GitHub

https://biobank.rocher.lc
130•Cynddl•19h ago•33 comments

Ubuntu 26.04

https://lwn.net/Articles/1069399/
211•lxst•5h ago•119 comments

My phone replaced a brass plug

https://drobinin.com/posts/my-phone-replaced-a-brass-plug/
137•valzevul•17h ago•31 comments

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

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

A programmable watch you can actually wear

https://www.hackster.io/news/a-diy-watch-you-can-actually-wear-8f91c2dac682
188•sarusso•3d ago•88 comments

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

https://github.com/russellromney/honker
259•russellthehippo•22h ago•63 comments

Astronomers find the edge of the Milky Way

https://skyandtelescope.org/astronomy-news/astronomers-find-the-edge-of-the-milky-way/
126•bookofjoe•15h ago•27 comments

Alberta startup sells no-tech tractors for half price

https://wheelfront.com/this-alberta-startup-sells-no-tech-tractors-for-half-price/
2194•Kaibeezy•1d ago•746 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
71•mitchbob•3d ago•129 comments

Incident with multple GitHub services

https://www.githubstatus.com/incidents/myrbk7jvvs6p
246•bwannasek•17h ago•118 comments

Writing a C Compiler, in Zig (2025)

https://ar-ms.me/thoughts/c-compiler-1-zig/
163•tosh•1d ago•46 comments