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.

LittleSnitch for Linux

https://obdev.at/products/littlesnitch-linux/index.html
657•pluc•8h ago•192 comments

Open Source Security at Astral

https://astral.sh/blog/open-source-security-at-astral
163•vinhnx•4h ago•25 comments

I ported Mac OS X to the Nintendo Wii

https://bryankeller.github.io/2026/04/08/porting-mac-os-x-nintendo-wii.html
1533•blkhp19•17h ago•266 comments

Haunted Paper Toys

http://ravensblight.com/papertoys.html
58•exvi•2d ago•1 comments

The Importance of Being Idle

https://theamericanscholar.org/the-importance-of-being-idle/
166•Caiero•2d ago•80 comments

Process Manager for Autonomous AI Agents

https://botctl.dev/
25•ankitg12•2h ago•4 comments

USB for Software Developers: An introduction to writing userspace USB drivers

https://werwolv.net/posts/usb_for_sw_devs/
286•WerWolv•13h ago•33 comments

Dr. Dobb's Developer Library DVD 6

https://archive.org/details/DDJDVD6
22•kristianp•4d ago•4 comments

Understanding the Kalman filter with a simple radar example

https://kalmanfilter.net
329•alex_be•15h ago•44 comments

They're made out of meat (1991)

http://www.terrybisson.com/theyre-made-out-of-meat-2/
529•surprisetalk•21h ago•146 comments

Six (and a half) intuitions for KL divergence

https://www.perfectlynormal.co.uk/blog-kl-divergence
74•jxmorris12•1d ago•8 comments

Who is Satoshi Nakamoto? My quest to unmask Bitcoin's creator

https://www.nytimes.com/2026/04/08/business/bitcoin-satoshi-nakamoto-identity-adam-back.html
478•jfirebaugh•1d ago•514 comments

ML promises to be profoundly weird

https://aphyr.com/posts/411-the-future-of-everything-is-lies-i-guess
489•pabs3•19h ago•482 comments

Muse Spark: Scaling towards personal superintelligence

https://ai.meta.com/blog/introducing-muse-spark-msl/?_fb_noscript=1
338•chabons•16h ago•324 comments

Git commands I run before reading any code

https://piechowski.io/post/git-commands-before-reading-code/
2019•grepsedawk•23h ago•428 comments

Ask HN: What are you building that's not AI related?

15•meander_water•1h ago•11 comments

Improving storage efficiency in Magic Pocket, Dropbox's immutable blob store

https://dropbox.tech/infrastructure/improving-storage-efficiency-in-magic-pocket-our-immutable-bl...
6•laluser•5d ago•0 comments

MegaTrain: Full Precision Training of 100B+ Parameter LLMs on a Single GPU

https://arxiv.org/abs/2604.05091
294•chrsw•20h ago•52 comments

I imported the full Linux kernel git history into pgit

https://oseifert.ch/blog/linux-kernel-pgit
123•ImGajeed76•3d ago•15 comments

Expanding Swift's IDE Support

https://swift.org/blog/expanding-swift-ide-support/
112•frizlab•13h ago•52 comments

Map Gesture Controls - Control maps with your hands

https://sanderdesnaijer.github.io/map-gesture-controls/
26•hebelehubele•4d ago•4 comments

Ask HN: Any interesting niche hobbies?

353•e-topy•3d ago•515 comments

Understanding Traceroute

https://tech.stonecharioteer.com/posts/2026/traceroute/
124•stonecharioteer•3d ago•20 comments

Show HN: A (marginally) useful x86-64 ELF executable in 301 bytes

https://github.com/meribold/btry
31•meribold•2d ago•8 comments

John Deere to pay $99M in right-to-repair settlement

https://www.thedrive.com/news/john-deere-to-pay-99-million-in-monumental-right-to-repair-settlement
300•CharlesW•12h ago•89 comments

Teardown of unreleased LG Rollable shows why rollable phones aren't a thing

https://arstechnica.com/gadgets/2026/04/teardown-of-unreleased-lg-rollable-shows-why-rollable-pho...
104•DamnInteresting•1d ago•46 comments

Audio Reactive LED Strips Are Diabolically Hard

https://scottlawsonbc.com/post/audio-led
224•surprisetalk•1d ago•63 comments

Show HN: Is Hormuz open yet?

https://www.ishormuzopenyet.com/
389•anonfunction•11h ago•157 comments

Veracrypt project update

https://sourceforge.net/p/veracrypt/discussion/general/thread/9620d7a4b3/
1209•super256•1d ago•445 comments

Union types in C# 15

https://devblogs.microsoft.com/dotnet/csharp-15-union-types/
197•0x00C0FFEE•4d ago•181 comments