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.

Valve releases Steam Controller CAD files under Creative Commons license

https://www.digitalfoundry.net/news/2026/05/valve-releases-steam-controller-cad-files-under-creat...
1451•haunter•19h ago•469 comments

Appearing productive in the workplace

https://nooneshappy.com/article/appearing-productive-in-the-workplace/
1199•diebillionaires•18h ago•461 comments

Permacomputing Principles

https://permacomputing.net/principles/
150•andsoitis•8h ago•67 comments

SQLite Is a Library of Congress Recommended Storage Format

https://sqlite.org/locrsf.html
265•whatisabcdefgh•12h ago•73 comments

Diskless Linux boot using ZFS, iSCSI and PXE

https://aniket.foo/posts/20260505-netboot/
98•stereo-highway•7h ago•49 comments

Photoshop's challenges with focus, pt. 2

https://unsung.aresluna.org/photoshops-challenges-with-focus-pt-2/
44•frizlab•2d ago•15 comments

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

https://www.ticalc.org/programming/columns/83plus-bas/cherny/
15•suoken•2d ago•8 comments

Vibe coding and agentic engineering are getting closer than I'd like

https://simonwillison.net/2026/May/6/vibe-coding-and-agentic-engineering/
617•e12e•19h ago•668 comments

Chevrolet Performance eCrate package (400v/200hp)

https://www.chevrolet.com/performance-parts/crate-engines/ecrate
52•mindcrime•2d ago•23 comments

RSS feeds send me more traffic than Google

https://shkspr.mobi/blog/2026/05/rss-feeds-send-me-more-traffic-than-google/
123•SpyCoder77•10h ago•25 comments

ProgramBench: Can Language Models Rebuild Programs from Scratch?

https://arxiv.org/abs/2605.03546
56•jonbaer•7h ago•32 comments

ZAYA1-8B: An 8B Moe Model with 760M Active Params Matching DeepSeek-R1 on Math

https://firethering.com/zaya1-8b-open-source-math-coding-model/
13•steveharing1•1h ago•10 comments

Making LLM Training Faster with Unsloth and NVIDIA

https://unsloth.ai/blog/nvidia-collab
48•segmenta•3h ago•8 comments

SingleRide: Longest route on NYC Subway without visiting the same station twice

https://singleride.nyc/
17•TMWNN•1d ago•8 comments

Show HN: Agent-skills-eval – Test whether Agent Skills improve outputs

https://github.com/darkrishabh/agent-skills-eval
23•darkrishabh•4h ago•5 comments

Google Cloud fraud defense, the next evolution of reCAPTCHA

https://cloud.google.com/blog/products/identity-security/introducing-google-cloud-fraud-defense-t...
312•unforgivenpasta•16h ago•319 comments

The Brave Souls Who Bought a Used, 340k-Mile Rental Camper Van

https://www.thedrive.com/news/meet-the-brave-souls-who-bought-a-used-340000-mile-rental-camper-van
4•PaulHoule•1d ago•0 comments

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

https://github.com/wojtczyk/trust
25•wojtczyk•4h ago•10 comments

From Supabase to Clerk to Better Auth

https://blog.val.town/better-auth
260•stevekrouse•17h ago•192 comments

What I learned making an app for my family

https://mendelgreenberg.com/posts/ourcar/
58•chabad360•21h ago•23 comments

The Mathematical Dance Inside Plant Cells

https://www.quantamagazine.org/the-hidden-mathematical-dance-inside-plant-cells-20260504/
47•isaacfrond•2d ago•2 comments

Show HN: Hallucinopedia

http://halupedia.com/
235•bstrama•18h ago•211 comments

Pen pal programs endure in a digital age

https://apnews.com/article/pen-pals-letters-comeback-bc87e1b9c229665bafd368e19751d6ca
52•petethomas•1d ago•11 comments

Show HN: Social Network for Corporate Cringe

https://CringeOut.com
21•CringeOut•2h ago•17 comments

Community firmware for the Xteink X4 e-paper reader

https://github.com/crosspoint-reader/crosspoint-reader
108•dmos62•1d ago•33 comments

Show HN: Tilde.run – Agent sandbox with a transactional, versioned filesystem

https://tilde.run/
166•ozkatz•18h ago•118 comments

The Vatican's Website in Latin

https://www.vatican.va/latin/latin_index.html
154•ks2048•9h ago•92 comments

Building my own Vi text editor in BASIC

https://leetusman.com/nosebook/yvi
62•zeech•1d ago•29 comments

Learning the Integral of a Diffusion Model

https://sander.ai/2026/05/06/flow-maps.html
139•benanne•16h ago•21 comments

A Theory of Deep Learning

https://elonlit.com/scrivings/a-theory-of-deep-learning/
200•elonlit•1d ago•46 comments