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•1y ago

Comments

quentinp•1y 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•1y ago
Page didnt load for me.

https://realpython.com/async-io-python/

Multiprocessing all the way!

emmelaich•1y ago
(2021)

Good article!

punnerud•1y 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•1y 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•1y ago
How does the GIL come into play here?
punnerud•1y 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.

OpenRouter raises $113M Series B

https://openrouter.ai/announcements/series-b
104•freeCandy•1h ago•33 comments

Zig ELF Linker Improvements Devlog

https://ziglang.org/devlog/2026/#2026-05-30
51•kristoff_it•59m ago•8 comments

Voxel Space

https://s-macke.github.io/VoxelSpace/
162•davikr•4h ago•35 comments

Microcode inside the Intel 8087 floating-point chip: register exchange

https://www.righto.com/2026/05/microcode-inside-intel-8087-floating.html
23•pwg•1h ago•3 comments

Openrsync: An implementation of rsync, by the OpenBSD team

https://github.com/kristapsdz/openrsync
225•sph•7h ago•98 comments

Werner Herzog in conversation with Paul Cronin (2014)

https://fsgworkinprogress.com/2014/09/26/insignificant-bullets-evil-poachers-and-l-a-culture/
33•Michelangelo11•2h ago•11 comments

Pandoc Templates

https://pandoc-templates.org/
291•ankitg12•8h ago•41 comments

Navier-Stokes fluid simulation explained with Godot game engine

https://myzopotamia.dev/navier-stokes-fluid-simulation-explained-with-godot
120•myzek•3d ago•21 comments

It Takes Two Neurons to Ride a Bicycle

https://fermatslibrary.com/s/it-takes-two-neurons-to-ride-a-bicycle#email-newsletter
54•malshe•4d ago•15 comments

Downdetector and Speedtest sold to Accenture for $1.2B

https://www.theverge.com/tech/889234/downdetector-ookla-speedtest-sold-accenture
72•Garbage•2h ago•43 comments

IXI's autofocusing lenses are almost ready to replace multifocal glasses

https://www.engadget.com/wearables/ixis-autofocusing-lenses-multifocal-glasses-ces-2026-212608427...
108•amichail•2d ago•45 comments

Zig: Build System Reworked

https://ziglang.org/devlog/2026/#2026-05-26
277•tosh•9h ago•175 comments

Show HN: Helios – what plug-in solar could generate for any address in Britain

https://helios.southlondonscientific.com/
83•ruaraidh•7h ago•28 comments

What Happened to the Locusts?

https://explosion-scratch.github.io/locusts/
147•explosion-s•4d ago•31 comments

SQLite is all you need for durable workflows

https://obeli.sk/blog/sqlite-is-all-you-need-for-durable-workflows/
642•tomasol•1d ago•341 comments

Testing the WWI concrete ships and WWII concrete barges

https://thecretefleet.com/blog/f/testing-the-wwi-concrete-ships-and-wwii-concrete-barges
30•surprisetalk•1d ago•7 comments

Stateless Actors

https://www.massicotte.org/stateless-actors/
7•frizlab•1d ago•1 comments

Memory decline after menopause linked to loss of estrogen production in brain

https://news.northwestern.edu/stories/2026/05/memory-decline-after-menopause-linked-to-loss-of-es...
98•gmays•4h ago•39 comments

A Probabilistic Algorithm for Repairing All Roads in Lebanon via Papal Visits

https://sigbovik.org/2026/proceedings.pdf#%5B%7B%22num%22%3A13%2C%22gen%22%3A0%7D%2C%7B%22name%22...
54•kmstout•3h ago•2 comments

Notes from the Mistral AI Now Summit

https://koenvangilst.nl/lab/mistral-ai-now-summit
435•vnglst•1d ago•188 comments

Ask HN: What Is the State of App Development in 2026?

38•karakoram•2h ago•24 comments

MCP is dead?

https://www.quandri.io/engineering-blog/mcp-is-dead
356•nadis•19h ago•340 comments

Snowboard Kids 2 is 100% Decompiled

https://blog.chrislewis.au/snowboard-kids-2-is-100-decompiled/
263•GaggiX•3d ago•100 comments

Macsurf, "modern" web browser for macOS 9

https://github.com/mplsllc/macsurf
86•gattilorenz•11h ago•20 comments

The Last Technical Interview

https://steve-yegge.medium.com/the-last-technical-interview-bc13ddcf4564
207•headalgorithm•22h ago•199 comments

Print with dozens of colors: Our new open-source ColorMix for PrusaSlicer

https://blog.prusa3d.com/our-new-open-source-colormix-model-in-prusaslicer-and-easyprint_136079/
208•rented_mule•4d ago•66 comments

The dead economy theory

https://www.owenmcgrann.com/p/the-dead-economy-theory
1199•WillDaSilva•1d ago•1316 comments

Floor and Ceil versus Denormals on CPU and GPU

https://asawicki.info/news_1802_floor_and_ceil_versus_denormals_on_cpu_and_gpu
40•ibobev•4d ago•15 comments

It's hard to justify buying a Framework 12

https://www.jeffgeerling.com/blog/2026/its-hard-to-justify-framework-12/
365•watermelon0•1d ago•585 comments

Shift will clean homes for free to train future robots

https://www.theverge.com/ai-artificial-intelligence/939765/ai-training-data-startup-shift-free-cl...
176•evilsimon•23h ago•237 comments