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.

Railway Blocked by Google Cloud

https://status.railway.com/?date=20260519
465•aarondf•8h ago•216 comments

FiveThirtyEight articles on the Internet Archive

https://fivethirtyeightindex.com/
173•ChocMontePy•6h ago•39 comments

Everything in C is undefined behavior

https://blog.habets.se/2026/05/Everything-in-C-is-undefined-behavior.html
128•lycopodiopsida•2h ago•95 comments

Gemini 3.5 Flash

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-5/
757•spectraldrift•14h ago•531 comments

There's no earthly way of knowing which direction we are going

https://kottke.org/26/05/theres-no-earthly-way-of-knowing-which-direction-we-are-going
23•tobr•2h ago•8 comments

I’ve built a virtual museum with nearly every operating system you can think of

https://virtualosmuseum.org/
751•andreww591•16h ago•167 comments

Infomaniak transitions to a foundation model to protect user data privacy

https://news.infomaniak.com/en/infomaniak-foundation-sovereign-cloud/
30•darktoto•2h ago•0 comments

Remove–AI–Watermarks – CLI and library for removing AI watermarks from images

https://github.com/wiltodelta/remove-ai-watermarks
261•janalsncm•9h ago•145 comments

Google changes its search box

https://blog.google/products-and-platforms/products/search/search-io-2026/
510•berkeleyjunk•13h ago•694 comments

Show HN: Forge – Guardrails take an 8B model from 53% to 99% on agentic tasks

https://github.com/antoinezambelli/forge
448•zambelli•20h ago•171 comments

Japan is gripped by mass allergies. A 1950s project is to blame

https://www.bbc.com/future/article/20260515-the-1950s-blunder-which-causes-mass-hay-fever-in-japan
59•ranit•6h ago•10 comments

CopyFail: From Pod to Host

https://xint.io/blog/copy-fail-pod-to-host
8•tptacek•15h ago•0 comments

Nostalgic Kits Central (2024)

https://www.nostalgickitscentral.com/
22•cf100clunk•2d ago•9 comments

OpenAI Adopts Google's SynthID Watermark for AI Images with Verification Tool

https://openai.com/index/advancing-content-provenance/
273•smooke•12h ago•140 comments

Apple unveils new accessibility features

https://www.apple.com/newsroom/2026/05/apple-unveils-new-accessibility-features-and-updates-with-...
667•interpol_p•20h ago•342 comments

Mistral AI acquires Emmi AI

https://www.emmi.ai/news/mistral-ai-acquires-emmi-ai
250•doener•13h ago•70 comments

Gemini CLI will stop working from June 18, 2026

https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/
184•primaprashant•14h ago•97 comments

In 1979 engineer Hugh Padgham discovered "gated reverb" – by accident

https://producelikeapro.com/blog/how-one-recording-mistake-created-a-musical-phenomenon-in-the-80s/
36•bookofjoe•2d ago•5 comments

Testing MiniMax M2.7 via API on three real ML and coding workflows

https://andlukyane.com//blog/minimax-m27-workflows
15•Artgor•3h ago•0 comments

Simulated Evolution on the PICO-8

https://bumbershootsoft.wordpress.com/2026/05/16/simulated-evolution-on-the-pico-8/
3•ibobev•1d ago•0 comments

GitHub is investigating unauthorized access to their internal repositories

https://twitter.com/github/status/2056884788179726685
401•splenditer•8h ago•209 comments

Skills in Web, iOS, and Android

https://x.ai/news/grok-skills
21•surprisetalk•1d ago•2 comments

Minnesota becomes first state to ban prediction markets

https://www.npr.org/2026/05/19/nx-s1-5821265/minnesota-ban-prediction-markets
637•ortusdux•13h ago•197 comments

The Mercury logic programming system

https://github.com/Mercury-Language/mercury
60•Antibabelic•2d ago•15 comments

RISC-V and Floating Point

https://fprox.substack.com/p/risc-v-and-floating-point
12•hasheddan•1d ago•3 comments

I’ve joined Anthropic

https://twitter.com/karpathy/status/2056753169888334312
1300•dmarcos•17h ago•538 comments

Growing Neural Cellular Automata

https://distill.pub/2020/growing-ca/
105•pulkitsh1234•2d ago•12 comments

Lisp in Web-Based Applications (2001)

https://sep.turbifycdn.com/ty/cdn/paulgraham/bbnexcerpts.txt
73•bschne•1d ago•6 comments

HTML-in-Canvas Demos

https://github.com/GoogleChromeLabs/css-web-ui-demos/blob/main/html-in-canvas/awesome-html-in-can...
36•simonpure•8h ago•9 comments

Why is almost everyone right-handed? A new study connects it to bipedalism

https://www.ox.ac.uk/news/2026-05-15-why-is-almost-everyone-right-handed-the-answer-may-lie-in-ho...
122•gmays•17h ago•192 comments