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•7mo ago

Comments

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

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

Multiprocessing all the way!

emmelaich•7mo ago
(2021)

Good article!

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

Show HN: Gemini Pro 3 hallucinates the HN front page 10 years from now

https://dosaygo-studio.github.io/hn-front-page-2035/news
2919•keepamovin•22h ago•840 comments

Revisiting "Let's Build a Compiler"

https://eli.thegreenplace.net/2025/revisiting-lets-build-a-compiler/
142•cui•7h ago•21 comments

Rust in the kernel is no longer experimental

https://lwn.net/Articles/1049831/
686•rascul•10h ago•467 comments

Map of All the Buildings in the World

https://gizmodo.com/literally-a-map-showing-all-the-buildings-in-the-world-2000694696
22•dr_dshiv•5d ago•6 comments

PeerTube is recognized as a digital public good by Digital Public Goods Alliance

https://www.digitalpublicgoods.net/r/peertube
581•fsflover•20h ago•114 comments

Putting email in its place with Emacs and Mu4e

https://eamonnsullivan.co.uk/posts-output/email-setup/2025-12-3-putting-email-in-its-place/
65•eamonnsullivan•6d ago•14 comments

When a video codec wins an Emmy

https://blog.mozilla.org/en/mozilla/av1-video-codec-wins-emmy/
190•todsacerdoti•4d ago•36 comments

Amazon EC2 M9g Instances

https://aws.amazon.com/ec2/instance-types/m9g/
77•AlexClickHouse•4d ago•23 comments

Bruno Simon – 3D Portfolio

https://bruno-simon.com/
643•razzmataks•21h ago•149 comments

Mistral releases Devstral2 and Mistral Vibe CLI

https://mistral.ai/news/devstral-2-vibe-cli
654•pember•23h ago•307 comments

If you're going to vibe code, why not do it in C?

https://stephenramsay.net/posts/vibe-coding.html
537•sramsay•20h ago•497 comments

Django: what’s new in 6.0

https://adamj.eu/tech/2025/12/03/django-whats-new-6.0/
314•rbanffy•17h ago•95 comments

Cloth Simulation

https://cloth.mikail-khan.com/
62•adamch•1w ago•11 comments

McDonald's pulls AI Christmas ad after backlash

https://www.bbc.co.uk/news/articles/czdgrnvp082o
27•mindracer•51m ago•19 comments

Running Linux on a RiscPC – why is it so hard?

https://thejpster.org.uk/blog/blog-2025-12-02/
21•zdw•1w ago•7 comments

Pebble Index 01 – External memory for your brain

https://repebble.com/blog/meet-pebble-index-01-external-memory-for-your-brain
520•freshrap6•22h ago•503 comments

Italy's longest-serving barista reflects on six decades behind the counter

https://www.reuters.com/lifestyle/culture-current/anna-possi-six-decades-behind-counter-italys-ba...
223•NaOH•5d ago•119 comments

10 Years of Let's Encrypt

https://letsencrypt.org/2025/12/09/10-years
706•SGran•18h ago•289 comments

Passing the Torch: James Gross on the Next Chapter of Micromobility Industries

https://micromobility.io/news/how-charging-is-reshaping-the-business-of-shared-scooters-and-e-bikes
15•prabinjoel•6d ago•0 comments

Are the Three Musketeers allergic to muskets? (2014)

https://www.ox.ac.uk/news/arts-blog/are-three-musketeers-allergic-muskets
44•rolph•7h ago•27 comments

Donating the Model Context Protocol and establishing the Agentic AI Foundation

https://www.anthropic.com/news/donating-the-model-context-protocol-and-establishing-of-the-agenti...
252•meetpateltech•20h ago•111 comments

So you want to speak at software conferences?

https://dylanbeattie.net/2025/12/08/so-you-want-to-speak-at-software-conferences.html
195•speckx•19h ago•100 comments

Writing our own Cheat Engine in Rust

https://lonami.dev/blog/woce-1/
90•hu3•5d ago•12 comments

Cloudflare error page generator

https://github.com/donlon/cloudflare-error-page
71•sawirricardo•11h ago•11 comments

A supersonic engine core makes the perfect power turbine

https://boomsupersonic.com/flyby/ai-needs-more-power-than-the-grid-can-deliver-supersonic-tech-ca...
131•simonebrunozzi•21h ago•213 comments

The stack circuitry of the Intel 8087 floating point chip, reverse-engineered

https://www.righto.com/2025/12/8087-stack-circuitry.html
122•elpocko•19h ago•54 comments

Linux CVEs, more than you ever wanted to know

http://www.kroah.com/log/blog/2025/12/08/linux-cves-more-than-you-ever-wanted-to-know/
74•voxadam•15h ago•34 comments

Kaiju – General purpose 3D/2D game engine in Go and Vulkan with built in editor

https://github.com/KaijuEngine/kaiju
199•discomrobertul8•22h ago•91 comments

30 Year Anniversary of WarCraft II: Tides of Darkness

https://www.jorsys.org/archive/december_2025.html#newsitem_2025-12-09T07:42:19Z
247•sjoblomj•1d ago•168 comments

Qt, Linux and everything: Debugging Qt WebAssembly

http://qtandeverything.blogspot.com/2025/12/debugging-qt-webassembly-dwarf.html
79•speckx•16h ago•24 comments