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.

When internal hostnames are leaked to the clown

https://rachelbythebay.com/w/2026/02/03/badnas/
121•zdw•2h ago•55 comments

Don't rent the cloud, own instead

https://blog.comma.ai/datacenter/
93•Torq_boi•1h ago•28 comments

Voxtral Transcribe 2

https://mistral.ai/news/voxtral-transcribe-2
860•meetpateltech•16h ago•211 comments

Postgres Postmaster does not scale

https://www.recall.ai/blog/postgres-postmaster-does-not-scale
81•davidgu•15h ago•26 comments

Sqldef: Idempotent schema management tool for MySQL, PostgreSQL, SQLite

https://sqldef.github.io/
136•Palmik•3d ago•33 comments

ICE seeks industry input on ad tech location data for investigative use

https://www.biometricupdate.com/202602/ice-seeks-industry-input-on-ad-tech-location-data-for-inve...
150•WaitWaitWha•2h ago•68 comments

A few CPU hardware bugs

https://www.taricorp.net/2026/a-few-cpu-bugs/
33•signa11•4h ago•5 comments

Claude Code: connect to a local model when your quota runs out

https://boxc.net/blog/2026/claude-code-connecting-to-local-models-when-your-quota-runs-out/
257•fugu2•3d ago•131 comments

Wirth's Revenge

https://jmoiron.net/blog/wirths-revenge/
21•signa11•4h ago•0 comments

The TV industry concedes that the future may not be in 8K

https://arstechnica.com/gadgets/2026/01/lg-joins-the-rest-of-the-world-accepts-that-people-dont-w...
6•cxrlosfx•4d ago•6 comments

OpenClaw is what Apple intelligence should have been

https://www.jakequist.com/thoughts/openclaw-is-what-apple-intelligence-should-have-been
283•jakequist•7h ago•249 comments

AI is killing B2B SaaS

https://nmn.gl/blog/ai-killing-b2b-saas
319•namanyayg•14h ago•496 comments

Claude Code for Infrastructure

https://www.fluid.sh/
201•aspectrr•13h ago•147 comments

A case study in PDF forensics: The Epstein PDFs

https://pdfa.org/a-case-study-in-pdf-forensics-the-epstein-pdfs/
283•DuffJohnson•17h ago•156 comments

I built a search engine to index the un-indexable parts of Telegram

https://telehunt.org
12•alenmangattu•3d ago•2 comments

Microsoft's Copilot chatbot is running into problems

https://www.wsj.com/tech/ai/microsofts-pivotal-ai-product-is-running-into-big-problems-ce235b28
196•fortran77•15h ago•215 comments

Remarkable Pro Colors

https://www.thregr.org/wavexx/rnd/20260201-remarkable_pro_colors/
95•ffaser5gxlsll•3d ago•33 comments

Building a 24-bit arcade CRT display adapter from scratch

https://www.scd31.com/posts/building-an-arcade-display-adapter
152•evakhoury•14h ago•43 comments

Why S7 Scheme? (2020)

https://iainctduncan.github.io/scheme-for-max-docs/s7.html
15•bmacho•4d ago•3 comments

An interactive version of Byrne's The Elements of Euclid (1847)

https://c82.net/euclid/
20•tzury•2d ago•2 comments

Listen to Understand

https://talk.bradwoods.io/blog/listen-to-understand/
34•bradwoodsio•3d ago•6 comments

Lily Programming Language

https://lily-lang.org
34•FascinatedBox•3d ago•27 comments

Why more companies are recognizing the benefits of keeping older employees

https://longevity.stanford.edu/why-more-companies-are-recognizing-the-benefits-of-keeping-older-e...
110•andsoitis•8h ago•39 comments

Tractor

https://incoherency.co.uk/blog/stories/tractor.html
173•surprisetalk•1d ago•55 comments

The Great Unwind

https://occupywallst.com/yen
245•jart•14h ago•212 comments

Study: Older Cannabis Users Have Larger Brains, Better Cognition

https://news.cuanschutz.edu/news-stories/study-finds-cannabis-usage-in-middle-aged-and-older-adul...
5•emptybits•2h ago•2 comments

Child prodigies rarely become elite performers

https://www.economist.com/science-and-technology/2026/01/14/why-child-prodigies-rarely-become-eli...
106•i7l•5h ago•83 comments

How not to securely erase a NVME drive (2022)

https://peterbabic.dev/blog/how-not-to-securely-erase-nvme-drive/
49•transpute•4d ago•35 comments

Claude is a space to think

https://www.anthropic.com/news/claude-is-a-space-to-think
434•meetpateltech•19h ago•235 comments

RS-SDK: Drive RuneScape with Claude Code

https://github.com/MaxBittker/rs-sdk
108•evakhoury•15h ago•41 comments