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.

Google plans to invest up to $40B in Anthropic

https://www.bloomberg.com/news/articles/2026-04-24/google-plans-to-invest-up-to-40-billion-in-ant...
513•elffjs•14h ago•502 comments

A 3D Body from Eight Questions – No Photo, No GPU

https://clad.you/blog/posts/questionnaire-mlp/
25•arkadiuss•2d ago•3 comments

Paraloid B-72

https://en.wikipedia.org/wiki/Paraloid_B-72
140•Ariarule•3d ago•23 comments

Turbo Vision 2.0 – a modern port

https://github.com/magiblot/tvision
77•andsoitis•2h ago•11 comments

Humpback whales are forming super-groups

https://www.bbc.com/future/article/20260416-the-humpback-super-groups-swarming-the-seas
80•andsoitis•3d ago•35 comments

Replace IBM Quantum back end with /dev/urandom

https://github.com/yuvadm/quantumslop/blob/25ad2e76ae58baa96f6219742459407db9dd17f5/URANDOM_DEMO.md
116•pigeons•5h ago•16 comments

My audio interface has SSH enabled by default

https://hhh.hn/rodecaster-duo-fw/
216•hhh•11h ago•72 comments

New 10 GbE USB adapters are cooler, smaller, cheaper

https://www.jeffgeerling.com/blog/2026/new-10-gbe-usb-adapters-cooler-smaller-cheaper/
8•calcifer•59m ago•1 comments

"Plain text has been around for decades and it's here to stay." – Unsung

https://unsung.aresluna.org/plain-text-has-been-around-for-decades-and-its-here-to-stay/
59•rbanffy•5h ago•7 comments

Sabotaging projects by overthinking, scope creep, and structural diffing

https://kevinlynagh.com/newsletter/2026_04_overthinking/
407•alcazar•16h ago•105 comments

Iliad fragment found in Roman-era mummy

https://www.thehistoryblog.com/archives/75877
158•wise_blood•2d ago•45 comments

(Blender) Cosmology with Geometry Nodes

https://www.blender.org/user-stories/cosmology-with-geometry-nodes/
34•shankysingh•5h ago•0 comments

The Classic American Diner

https://blogs.loc.gov/picturethis/2026/04/the-classic-american-diner/
201•NaOH•11h ago•122 comments

Education must go beyond the mere production of words

https://www.ncregister.com/commentaries/schnell-repairing-the-ruins
51•signor_bosco•6h ago•13 comments

A disabled kea parrot is the alpha male of his circus

https://www.cell.com/current-biology/fulltext/S0960-9822(26)00259-9
27•zdw•2d ago•7 comments

There Will Be a Scientific Theory of Deep Learning

https://arxiv.org/abs/2604.21691
203•jamie-simon•12h ago•78 comments

Firefox Has Integrated Brave's Adblock Engine

https://itsfoss.com/news/firefox-ships-brave-adblock-engine/
153•nreece•5h ago•67 comments

Work with the garage door up (2024)

https://notes.andymatuschak.org/Work_with_the_garage_door_up
152•jxmorris12•3d ago•111 comments

ENIAC's Architects Wove Stories Through Computing

https://spectrum.ieee.org/eniac-80th-anniversary-weaving
7•sohkamyung•3d ago•0 comments

MacBook Neo and how the iPad should be

https://craigmod.com/essays/ipad_neo/
252•jen729w•2d ago•139 comments

Email could have been X.400 times better

https://buttondown.com/blog/x400-vs-smtp-email
162•maguay•1d ago•148 comments

Show HN: I've built a nice home server OS

https://lightwhale.asklandd.dk/
103•Zta77•9h ago•41 comments

DeepSeek v4

https://api-docs.deepseek.com/news/news260424
1877•impact_sy•1d ago•1459 comments

You don't want long-lived keys

https://argemma.com/blog/long-lived-keys/
48•kkl•3d ago•28 comments

Reverse-engineering infrared-based electronic shelf labels

https://www.furrtek.org/?a=esl
19•pabs3•3d ago•2 comments

Diatec, known for its mechanical keyboard brand FILCO, has ceased operations

https://gigazine.net/gsc_news/en/20260424-filco-diatec/
111•gslin•14h ago•40 comments

Open source memory layer so any AI agent can do what Claude.ai and ChatGPT do

https://alash3al.github.io/stash?_v01
17•alash3al•5h ago•1 comments

Oxford All Souls College General Examination (2025) [pdf]

https://www.asc.ox.ac.uk/sites/default/files/2025-10/General%202025.pdf
37•gregsadetsky•2h ago•26 comments

The Overtom Chess Computer Museum

https://tluif.home.xs4all.nl/chescom/Engindex.html
29•semyonsh•2d ago•4 comments

I'm done making desktop applications (2009)

https://www.kalzumeus.com/2009/09/05/desktop-aps-versus-web-apps/
165•claxo•15h ago•182 comments