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

Comments

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

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

Multiprocessing all the way!

emmelaich•12mo ago
(2021)

Good article!

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

Dirtyfrag: Universal Linux LPE

https://www.openwall.com/lists/oss-security/2026/05/07/8
316•flipped•4h ago•150 comments

Canvas (Instructure) LMS Down in Ongoing Ransomware Attack

https://www.theverge.com/tech/926458/canvas-shinyhunters-breach
41•stefanpie•1h ago•2 comments

The Burning Man MOOP Map

https://www.not-ship.com/burning-man-moop/
504•speckx•9h ago•271 comments

Agents need control flow, not more prompts

https://bsuh.bearblog.dev/agents-need-control-flow/
275•bsuh•6h ago•152 comments

Natural Language Autoencoders: Turning Claude's Thoughts into Text

https://www.anthropic.com/research/natural-language-autoencoders
155•instagraham•5h ago•50 comments

AlphaEvolve: Gemini-powered coding agent scaling impact across fields

https://deepmind.google/blog/alphaevolve-impact/
232•berlianta•8h ago•91 comments

AI slop is killing online communities

https://rmoff.net/2026/05/06/ai-slop-is-killing-online-communities/
366•thm•4h ago•341 comments

DeepSeek 4 Flash local inference engine for Metal

https://github.com/antirez/ds4
250•tamnd•7h ago•74 comments

OpenClaw Had a Rough Week

https://openclaw.ai/blog/openclaw-rough-week
7•kevincortes•49m ago•0 comments

Draw Marc Andreessen on an Egg

https://eieio.games/blog/marc-andreessen-egg-game/
42•LorenDB•3h ago•8 comments

Two Home Affairs officials suspended after AI 'hallucinations' found

https://www.citizen.co.za/news/home-affairs-officials-suspended-ai-hallucinations/
25•jruohonen•3h ago•2 comments

I want to live like Costco people

https://tastecooking.com/i-want-to-live-like-costco-people/
186•speckx•8h ago•417 comments

Chrome removes claim of On-device Al not sending data to Google Servers

https://old.reddit.com/r/chrome/comments/1t5qayz/chrome_removes_claim_of_ondevice_al_not_sending/
412•newsoftheday•7h ago•156 comments

Rolling the Root Key

https://blog.apnic.net/2026/05/05/rolling-the-root-key/
6•jandeboevrie•2d ago•0 comments

Colored Shadow Penumbra

https://chosker.github.io/blog/colored-shadow-penumbra
30•ibobev•4h ago•11 comments

Principles for agent-native CLIs

https://twitter.com/trevin/status/2051316002730991795
48•blumpy22•5h ago•28 comments

Easy Random Trees

https://blog.wilsonb.com/posts/2026-02-27-easy-random-trees.html
16•aebtebeten•2d ago•1 comments

PySimpleGUI 6

https://github.com/PySimpleGUI/PySimpleGUI
84•geophph•2d ago•40 comments

Creating for a niche

https://www.davesnider.com/posts/working-in-a-niche
20•snide•3h ago•1 comments

RaTeX: KaTeX-compatible LaTeX rendering engine in pure Rust

https://ratex.lites.dev/
154•atilimcetin•3d ago•86 comments

Child marriages plunged when girls stayed in school in Nigeria

https://www.nature.com/articles/d41586-026-00720-8
324•surprisetalk•9h ago•245 comments

The Self-Cancelling Subscription

https://predr.ag/blog/the-self-cancelling-subscription/
137•surprisetalk•9h ago•60 comments

OpenBSD Stories: The closest thing to cute kittens (OpenBSD/zaurus)

http://miod.online.fr/software/openbsd/stories/zaurus1.html
58•zdw•1d ago•7 comments

OurCar: What I learned making an app for my family

https://mendelgreenberg.com/posts/ourcar/
96•chabad360•1d ago•69 comments

Show HN: TRUST – Coding Rust like it's 1989

https://github.com/wojtczyk/trust
109•wojtczyk•17h ago•70 comments

Boris Cherny: TI-83 Plus Basic Programming Tutorial (2004)

https://www.ticalc.org/programming/columns/83plus-bas/cherny/
180•suoken•3d ago•80 comments

I switched from Mac to a Lenovo Chromebook

https://blog.johnozbay.com/i-left-apples-ecosystem-for-a-lenovo-chromebook-and-you-can-too.html
103•speckx•7h ago•135 comments

GovernGPT (YC W24) Is Hiring Engineers to Build Thinking Systems in Montreal

https://www.ycombinator.com/companies/governgpt/jobs/hRyltS0-backend-engineer-thinking-systems
1•owalerys•11h ago

Mozilla says 271 vulnerabilities found by Mythos and "almost no false positives"

https://arstechnica.com/information-technology/2026/05/mozilla-says-271-vulnerabilities-found-by-...
74•epistasis•3h ago•29 comments

ZAYA1-8B matches DeepSeek-R1 on math with less than 1B active parameters

https://firethering.com/zaya1-8b-open-source-math-coding-model/
87•steveharing1•14h ago•50 comments