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

Comments

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

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

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

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

US Court of Appeals: TOS may be updated by email, use can imply consent [pdf]

https://cdn.ca9.uscourts.gov/datastore/memoranda/2026/03/03/25-403.pdf
319•dryadin•7h ago•232 comments

Fontcrafter: Turn Your Handwriting into a Real Font

https://arcade.pirillo.com/fontcrafter.html
139•rendx•4h ago•58 comments

Ireland shuts last coal plant, becomes 15th coal-free country in Europe (2025)

https://www.pv-magazine.com/2025/06/20/ireland-coal-free-ends-coal-power-generation-moneypoint/
286•robin_reala•3h ago•129 comments

Show HN: VS Code Agent Kanban: Task Management for the AI-Assisted Developer

https://www.appsoftware.com/blog/introducing-vs-code-agent-kanban-task-management-for-the-ai-assi...
25•gbro3n•3h ago•10 comments

Owner of ICE detention facility sees big opportunity in AI man camps

https://techcrunch.com/2026/03/08/owner-of-ice-detention-facility-sees-big-opportunity-in-ai-man-...
59•monkeydust•52m ago•31 comments

Unlocking Python's Cores:Energy Implications of Removing the GIL

https://arxiv.org/abs/2603.04782
51•runningmike•3d ago•24 comments

Agent Safehouse – macOS-native sandboxing for local agents

https://agent-safehouse.dev/
669•atombender•17h ago•159 comments

Microscopes can see video on a laserdisc

https://www.youtube.com/watch?v=qZuR-772cks
516•zdw•1d ago•68 comments

Segagaga Has Been Translated into English

https://www.thedreamcastjunkyard.co.uk/2026/02/segagaga-has-finally-been-translated.html
28•nanna•1d ago•4 comments

PCB devboard the size of a USB-C plug

https://github.com/Dieu-de-l-elec/AngstromIO-devboard
212•zachlatta•1d ago•51 comments

Ask HN: What Are You Working On? (March 2026)

203•david927•13h ago•717 comments

The Window Chrome of Our Discontent

https://pxlnv.com/blog/window-chrome-of-our-discontent/
21•zdw•2d ago•4 comments

Every single board computer I tested in 2025

https://bret.dk/every-single-board-computer-i-tested-in-2025/
186•speckx•4d ago•60 comments

FrameBook

https://fb.edoo.gg
471•todsacerdoti•22h ago•79 comments

FFmpeg at Meta: Media Processing at Scale

https://engineering.fb.com/2026/03/02/video-engineering/ffmpeg-at-meta-media-processing-at-scale/
26•sudhakaran88•8h ago•6 comments

My Homelab Setup

https://bryananthonio.com/blog/my-homelab-setup/
276•photon_collider•21h ago•181 comments

We Stopped Using the Mathematics That Works

https://gfrm.in/posts/why-decision-theory-lost/index.html
57•slygent•5h ago•22 comments

Python's Lazy Imports: Why It Took Three Years and Two Attempts

https://techlife.blog/posts/the-story-of-pythons-lazy-imports-why-it-took-three-years-and-two-att...
4•tsenturk•1d ago•1 comments

Linux Internals: How /proc/self/mem writes to unwritable memory (2021)

https://offlinemark.com/an-obscure-quirk-of-proc/
103•medbar•15h ago•23 comments

Nvidia backs AI data center startup Nscale as it hits $14.6B valuation

https://www.cnbc.com/2026/03/09/nscale-ai-data-center-nvidia-raise.html
32•voxadam•2h ago•28 comments

Artificial-life: A simple (300 lines of code) reproduction of Computational Life

https://github.com/Rabrg/artificial-life
131•tosh•17h ago•18 comments

I love email (2023)

https://blog.xoria.org/email/
68•surprisetalk•3d ago•29 comments

We should revisit literate programming in the agent era

https://silly.business/blog/we-should-revisit-literate-programming-in-the-agent-era/
262•horseradish•17h ago•182 comments

Why can't you tune your guitar? (2019)

https://www.ethanhein.com/wp/2019/why-cant-you-tune-your-guitar/
226•digitallogic•4d ago•159 comments

My “grand vision” for Rust

https://blog.yoshuawuyts.com/a-grand-vision-for-rust/
224•todsacerdoti•4d ago•218 comments

I made a programming language with M&Ms

https://mufeedvh.com/posts/i-made-a-programming-language-with-mnms/
97•tosh•19h ago•37 comments

Living human brain cells play DOOM on a CL1 [video]

https://www.youtube.com/watch?v=yRV8fSw6HaE
218•kevinak•22h ago•208 comments

How the Sriracha guys screwed over their supplier

https://old.reddit.com/r/KitchenConfidential/comments/1ro61g2/how_the_sriracha_guys_screwed_over_...
282•thunderbong•9h ago•113 comments

Ask HN: How to be alone?

547•sillysaurusx•1d ago•408 comments

Show HN: Mcp2cli – One CLI for every API, 96-99% fewer tokens than native MCP

https://github.com/knowsuchagency/mcp2cli
120•knowsuchagency•8h ago•72 comments