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...
1141•haunter•11h ago•371 comments

Appearing productive in the workplace

https://nooneshappy.com/article/appearing-productive-in-the-workplace/
790•diebillionaires•11h ago•311 comments

Permacomputing Principles

https://permacomputing.net/principles/
16•andsoitis•1h ago•0 comments

The Vatican's Website in Latin

https://www.vatican.va/latin/latin_index.html
66•ks2048•2h ago•43 comments

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

https://simonwillison.net/2026/May/6/vibe-coding-and-agentic-engineering/
444•e12e•12h ago•488 comments

Finding the differences in a series of power supplies

https://www.lttlabs.com/articles/2026/05/05/testing-psu-series
24•LabsLucas•1d ago•1 comments

Pen pal programs endure in a digital age

https://apnews.com/article/pen-pals-letters-comeback-bc87e1b9c229665bafd368e19751d6ca
8•petethomas•23h ago•0 comments

From Supabase to Clerk to Better Auth

https://blog.val.town/better-auth
219•stevekrouse•10h ago•148 comments

SQLite Is a Library of Congress Recommended Storage Format

https://sqlite.org/locrsf.html
47•whatisabcdefgh•5h ago•14 comments

Google Cloud fraud defense, the next evolution of reCAPTCHA

https://cloud.google.com/blog/products/identity-security/introducing-google-cloud-fraud-defense-t...
232•unforgivenpasta•9h ago•220 comments

How do I inform Windows that I'm writing a binary file?

https://devblogs.microsoft.com/oldnewthing/20260504-00/?p=112296
33•ingve•1d ago•29 comments

Programming Still Sucks

https://www.stvn.sh/writing/programming-still-sucks-fqffhyp
162•jeromechoo•8h ago•31 comments

Show HN: Hallucinopedia

http://halupedia.com/
167•bstrama•11h ago•158 comments

Learning the Integral of a Diffusion Model

https://sander.ai/2026/05/06/flow-maps.html
110•benanne•8h ago•18 comments

Building my own Vi text editor in BASIC

https://leetusman.com/nosebook/yvi
32•zeech•1d ago•16 comments

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

https://tilde.run/
130•ozkatz•11h ago•99 comments

A Theory of Deep Learning

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

Community firmware for the Xteink X4 e-paper reader

https://github.com/crosspoint-reader/crosspoint-reader
59•dmos62•1d ago•20 comments

What I Learned Making an App for My Family

https://mendelgreenberg.com/posts/ourcar/
3•chabad360•13h ago•1 comments

What British people mean when they say 'sorry'

https://www.bbc.com/travel/article/20260506-what-british-people-really-mean-when-they-say-sorry
24•BiraIgnacio•4h ago•10 comments

Ted Turner has died

https://www.cnn.com/2026/05/06/us/ted-turner-death
245•pseudolus•12h ago•192 comments

Inkscape 1.4.4

https://inkscape.org/doc/release_notes/1.4.4/Inkscape_1.4.4.html
238•s1291•8h ago•66 comments

Show HN: I built an open-source email builder, alternative to Beefree/Unlayer

https://play.templatical.com
111•oahmadov•11h ago•26 comments

SoundOff: Low-Cost Passive Ultrasound Tags

https://yibo-fu.com/SoundOff-Low-cost-Passive-Ultrasound-Tags-for-Non-invasive-and-Non
47•jonbaer•10h ago•1 comments

The bottleneck was never the code

https://www.thetypicalset.com/blog/thoughts-on-coding-agents
527•Anon84•2d ago•344 comments

Show HN: PHP-fts – Full-text search engine in pure PHP, no extensions

https://github.com/olivier-ls/php-fts
37•asmodios•7h ago•8 comments

Setting up a Sun Ray server on OpenIndiana Hipster 2025.10

https://catstret.ch/202605/srss-hipster202510/
129•jandeboevrie•16h ago•46 comments

Higher usage limits for Claude and a compute deal with SpaceX

https://www.anthropic.com/news/higher-limits-spacex
410•meetpateltech•11h ago•360 comments

Perturb-MARS: Reading mouse experiments through a human lens

https://www.noetik.blog/p/perturb-mars-reading-mouse-experiments
7•crescit_eundo•2d ago•0 comments

What makes a good smartphone camera?

https://cadence.moe/blog/2026-05-05-what-makes-a-good-smartphone-camera
92•zdw•1d ago•56 comments