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.

Clay PCB Tutorial

https://feministhackerspaces.cargo.site/Clay-PCB-Tutorial
60•j0r0b0•1h ago•19 comments

Asahi Linux Progress Linux 7.0

https://asahilinux.org/2026/04/progress-report-7-0/
397•elisaado•6h ago•163 comments

Statecharts: hierarchical state machines

https://statecharts.dev/
200•sph•7h ago•58 comments

Amateur armed with ChatGPT solves an Erdős problem

https://www.scientificamerican.com/article/amateur-armed-with-chatgpt-vibe-maths-a-60-year-old-pr...
603•pr337h4m•23h ago•425 comments

Why SWE-bench Verified no longer measures frontier coding capabilities

https://openai.com/index/why-we-no-longer-evaluate-swe-bench-verified/
91•kmdupree•3h ago•69 comments

The Nintendo Switch Switch (2019)

https://blog.cynthia.re/post/nintendo-switch-ethernet-switch
53•zdw•1d ago•7 comments

Free Textbook on Engineering Thermodynamics

https://thermodynamicsbook.com/
11•2DcAf•1h ago•2 comments

Databases Were Not Designed for This

https://arpitbhayani.me/blogs/defensive-databases/
30•mooreds•1d ago•19 comments

Show HN: Turning a Gaussian Splat into a videogame

https://blog.playcanvas.com/turning-a-gaussian-splat-into-a-videogame/
130•yak32•3d ago•25 comments

Why has there been so little progress on Alzheimer's disease?

https://freakonomics.com/podcast/why-has-there-been-so-little-progress-on-alzheimers-disease/
337•chiefalchemist•16h ago•225 comments

The West forgot how to make things, now it’s forgetting how to code

https://techtrenches.dev/p/the-west-forgot-how-to-make-things
886•milkglass•10h ago•556 comments

GitHub unwanted UX change: issue links now open in a popup

https://github.com/orgs/community/discussions/192666
88•luckman212•2h ago•38 comments

USB Cheat Sheet (2022)

https://fabiensanglard.net/usbcheat/index.html
426•gwerbret•19h ago•78 comments

Tell HN: An app is silently installing itself on my iPhone every day

435•_-x-_•16h ago•164 comments

Cheating at Tetris

https://chalkdustmagazine.com/features/cheating-at-tetris/
49•t-3•4d ago•15 comments

GnuPG – post-quantum crypto landing in mainline

https://lists.gnupg.org/pipermail/gnupg-announce/2026q2/000504.html
134•zdkaster•13h ago•39 comments

QNX on the Commodore 900 – Raiders of the lost hard drive [video]

https://archive.fosdem.org/2025/schedule/event/fosdem-2025-5479-raiders-of-the-lost-hard-drive/
16•rbanffy•4h ago•0 comments

Exposing Floating Point – Bartosz Ciechanowski (2019)

https://ciechanow.ski/exposing-floating-point/
62•subset•9h ago•9 comments

Mahjong: A Visual Guide

https://themahjong.guide/
167•iamwil•2d ago•48 comments

Mine, a Coalton and Common Lisp IDE

https://coalton-lang.github.io/20260424-mine/
66•Jach•1d ago•2 comments

Flickr: The first and last great photo platform

https://petapixel.com/2026/04/22/flickr-the-first-and-last-great-photo-platform/
239•Nrbelex•3d ago•132 comments

An AI agent deleted our production database. The agent's confession is below

https://twitter.com/lifeof_jer/status/2048103471019434248
25•jeremyccrane•44m ago•23 comments

Terra API (YC W21) Hiring: Applied AI Strategist(Health Intelligence)

https://www.ycombinator.com/companies/terra-api/jobs/DY7BCZU-applied-ai-strategist-market-intelli...
1•kyriakosel•10h ago

OpenAI Privacy Filter

https://openai.com/index/introducing-openai-privacy-filter/
263•tanelpoder•3d ago•53 comments

Using coding assistance tools to revive projects you never were going to finish

https://blog.matthewbrunelle.com/its-ok-to-use-coding-assistance-tools-to-revive-the-projects-you...
319•speckx•1d ago•203 comments

The Free Universal Construction Kit

https://fffff.at/free-universal-construction-kit/
356•robinhouston•4d ago•81 comments

The route from Prussian military headquarters to Gary Gygax’s basement

https://asteriskmag.com/issues/14/shall-we-play-a-game
61•jger15•3d ago•10 comments

The Super Nintendo Cartridges (2024)

https://fabiensanglard.net/snes_carts/
132•offbyone42•16h ago•19 comments

My .config Ship of Theseus

https://shift1w.com/blog/config-of-theseus/
26•jacobwiseberg•2d ago•11 comments

The Joy of Folding Bikes

https://blog.korny.info/2026/04/19/the-joy-of-folding-bikes
231•pavel_lishin•4d ago•160 comments