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

Comments

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

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

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

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

I don't know how you get here from "predict the next word."

https://www.grumpy-economist.com/p/refine
64•qsi•1h ago•48 comments

Google API keys weren't secrets, but then Gemini changed the rules

https://trufflesecurity.com/blog/google-api-keys-werent-secrets-but-then-gemini-changed-the-rules
294•hiisthisthingon•10h ago•65 comments

Jimi Hendrix was a systems engineer

https://spectrum.ieee.org/jimi-hendrix-systems-engineer
414•tintinnabula•10h ago•135 comments

First Website (1992)

https://info.cern.ch
173•shrikaranhanda•7h ago•36 comments

The Pleasures and Pains of Coffee (1830)

https://quod.lib.umich.edu/m/mqrarchive/act2080.0035.002/10
47•jxmorris12•3d ago•17 comments

RAM now represents 35 percent of bill of materials for HP PCs

https://arstechnica.com/gadgets/2026/02/ram-now-represents-35-percent-of-bill-of-materials-for-hp...
169•jnord•3h ago•104 comments

How will OpenAI compete?

https://www.ben-evans.com/benedictevans/2026/2/19/how-will-openai-compete-nkg2x
150•iamskeole•8h ago•159 comments

Making MCP cheaper via CLI

https://kanyilmaz.me/2026/02/23/cli-vs-mcp.html
179•thellimist•10h ago•81 comments

Windows 11 Notepad to support Markdown

https://blogs.windows.com/windows-insider/2026/01/21/notepad-and-paint-updates-begin-rolling-out-...
248•andreynering•13h ago•388 comments

Artist who “paints” portraits on glass by hitting it with a hammer

https://simonbergerart.com
114•cs702•3d ago•42 comments

Bus stop balancing is fast, cheap, and effective

https://worksinprogress.co/issue/the-united-states-needs-fewer-bus-stops/
337•surprisetalk•14h ago•492 comments

Writers and Their Day Jobs

https://lithub.com/the-work-behind-the-writing-on-writers-and-their-day-jobs/
8•simplegeek•3d ago•1 comments

Show HN: ZSE – Open-source LLM inference engine with 3.9s cold starts

https://github.com/Zyora-Dev/zse
40•zyoralabs•5h ago•1 comments

Self-improving software won't produce Skynet

https://contalign.jefflunt.com/self-improving-software/
16•normalocity•3h ago•8 comments

Large-Scale Online Deanonymization with LLMs

https://simonlermen.substack.com/p/large-scale-online-deanonymization
237•DalasNoin•1d ago•180 comments

Show HN: Respectify – A comment moderator that teaches people to argue better

https://respectify.org/
139•vintagedave•16h ago•135 comments

Gauss's Weekday Algorithm, Visualized

https://lukasmetzner.github.io/blog/gauss-weekday.html
26•lukasmetzner•4d ago•3 comments

The First Fully General Computer Action Model

https://si.inc/posts/fdm1/
209•nee1r•2d ago•59 comments

PA bench: Evaluating web agents on real world personal assistant workflows

https://vibrantlabs.com/blog/pa-bench
27•shahules•10h ago•2 comments

Tech companies shouldn't be bullied into doing surveillance

https://www.eff.org/deeplinks/2026/02/tech-companies-shouldnt-be-bullied-doing-surveillance
190•pseudolus•6h ago•52 comments

An autopsy of AI-generated 3D slop

https://aircada.com/blog/ai-vs-human-3d-ecommerce
54•sech8420•9h ago•38 comments

The Om Programming Language

https://www.om-language.com/
249•tosh•12h ago•61 comments

Show HN: OpenSwarm – Multi‑Agent Claude CLI Orchestrator for Linear/GitHub

https://github.com/Intrect-io/OpenSwarm
19•unohee•4h ago•3 comments

Learnings from 4 months of Image-Video VAE experiments

https://www.linum.ai/field-notes/vae-reconstruction-vs-generation
98•schopra909•1d ago•14 comments

Dissecting the CPU-memory relationship in garbage collection (OpenJDK 26)

https://norlinder.nu/posts/GC-Cost-CPU-vs-Memory/
71•jonasn•1d ago•19 comments

What Pressure Does to an Athlete's Body

https://www.theatlantic.com/culture/2026/02/pressure-olympics-malinin-shiffrin/686097/
11•bookofjoe•4d ago•2 comments

Launch HN: TeamOut (YC W22) – AI agent for planning company retreats

https://app.teamout.com/ai
49•vincentalbouy•16h ago•56 comments

GNU Texmacs

https://www.texmacs.org/tmweb/home/welcome.en.html
149•remywang•15h ago•44 comments

Quasi-Zenith Satellite System

https://en.wikipedia.org/wiki/Quasi-Zenith_Satellite_System
15•teleforce•3d ago•4 comments

Never buy a .online domain

https://www.0xsid.com/blog/online-tld-is-pain
701•ssiddharth•17h ago•431 comments