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.

Agent Safehouse – macOS-native sandboxing for local agents

https://agent-safehouse.dev/
361•atombender•6h ago•85 comments

Microscopes can see video on a laserdisc

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

PCB devboard the size of a USB-C plug

https://github.com/Dieu-de-l-elec/AngstromIO-devboard
72•zachlatta•22h ago•16 comments

We should revisit literate programming in the agent era

https://silly.business/blog/we-should-revisit-literate-programming-in-the-agent-era/
150•horseradish•7h ago•78 comments

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

56•david927•2h ago•156 comments

Every single board computer I tested in 2025

https://bret.dk/every-single-board-computer-i-tested-in-2025/
115•speckx•3d ago•31 comments

Blacksky AppView

https://github.com/blacksky-algorithms/atproto
109•Kye•5h ago•64 comments

FrameBook

https://fb.edoo.gg
366•todsacerdoti•11h ago•65 comments

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

https://offlinemark.com/an-obscure-quirk-of-proc/
37•medbar•4h ago•6 comments

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

https://github.com/Rabrg/artificial-life
73•tosh•6h ago•8 comments

My Homelab Setup

https://bryananthonio.com/blog/my-homelab-setup/
155•photon_collider•10h ago•127 comments

WSL Manager

https://github.com/bostrot/wsl2-distro-manager
75•gballan•8h ago•43 comments

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

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

I made a programming language with M&Ms

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

Pushing and Pulling: Three reactivity algorithms

https://jonathan-frere.com/posts/reactivity-algorithms/
69•frogulis•1d ago•13 comments

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

https://www.youtube.com/watch?v=yRV8fSw6HaE
149•kevinak•11h ago•135 comments

Show HN: Skir – like Protocol Buffer but better

https://skir.build/
60•gepheum•9h ago•41 comments

Show HN: I built a real-time OSINT dashboard pulling 15 live global feeds

https://github.com/BigBodyCobain/Shadowbroker
183•vancecookcobxin•7h ago•84 comments

Log messages are mostly for the people operating your software

https://utcc.utoronto.ca/~cks/space/blog/programming/LogMessagesAreForOperation
112•todsacerdoti•5d ago•57 comments

The legendary Mojave Phone Booth is back (2013)

https://dailydot.com/mojave-phone-booth-back-number
12•1970-01-01•2d ago•3 comments

Case Study: lynnandtonic.com 2025 refresh

https://lynnandtonic.com/thoughts/entries/case-study-2025-refresh/
5•surprisetalk•3d ago•0 comments

Z80 Sans – a disassembler in a font (2024)

https://github.com/nevesnunes/z80-sans
84•pabs3•4d ago•10 comments

My “grand vision” for Rust

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

Last Statements

https://walzr.com/last-statements
10•sethbannon•4h ago•6 comments

Lil Finder Guy

https://basicappleguy.com/basicappleblog/lil-finder-guy
86•frizlab•6h ago•26 comments

Ask HN: How to be alone?

305•sillysaurusx•15h ago•227 comments

Notes on writing Rust-based Wasm

https://notes.brooklynzelenka.com/Blog/Notes-on-Writing-Wasm
207•vinhnx•17h ago•90 comments

LibreOffice Writer now supports Markdown

https://blog.documentfoundation.org/blog/2026/02/04/libreoffice-26-2-is-here/
288•todsacerdoti•10h ago•53 comments

What if the Apple ][ had run on Field-Sequential?

https://nicole.express/2026/the-apple-that-wasnt.html
82•zdw•12h ago•16 comments

SQG (SQL to Code Generator) v0.10: Java Streams and List Type Support

https://sqg.dev/blog/java-streams-and-list-types/
16•uwemaurer•3d ago•4 comments