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
54•pluc•50m ago•19 comments

I ported Mac OS X to the Nintendo Wii

https://bryankeller.github.io/2026/04/08/porting-mac-os-x-nintendo-wii.html
1224•blkhp19•9h ago•213 comments

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

https://werwolv.net/posts/usb_for_sw_devs/
173•WerWolv•5h ago•24 comments

Git commands I run before reading any code

https://piechowski.io/post/git-commands-before-reading-code/
1787•grepsedawk•16h ago•383 comments

Understanding the Kalman filter with a simple radar example

https://kalmanfilter.net
210•alex_be•8h ago•32 comments

They're made out of meat (1991)

http://www.terrybisson.com/theyre-made-out-of-meat-2/
404•surprisetalk•13h ago•113 comments

Muse Spark: Scaling towards personal superintelligence

https://ai.meta.com/blog/introducing-muse-spark-msl/?_fb_noscript=1
259•chabons•9h ago•283 comments

Expanding Swift's IDE Support

https://swift.org/blog/expanding-swift-ide-support/
74•frizlab•5h ago•38 comments

ML promises to be profoundly weird

https://aphyr.com/posts/411-the-future-of-everything-is-lies-i-guess
366•pabs3•12h ago•400 comments

Škoda DuoBell: A bicycle bell that penetrates noise-cancelling headphones

https://www.skoda-storyboard.com/en/skoda-world/skoda-duobell-a-bicycle-bell-that-outsmarts-even-...
523•ra•16h ago•533 comments

What does it mean to “write like you talk”?

https://arjunpanickssery.substack.com/p/what-does-it-mean-to-write-like-you
11•surprisetalk•2d ago•8 comments

Pgit: I Imported the Linux Kernel into PostgreSQL

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

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

https://arxiv.org/abs/2604.05091
255•chrsw•12h ago•48 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
163•CharlesW•4h ago•44 comments

Show HN: Is Hormuz open yet?

https://www.ishormuzopenyet.com/
237•anonfunction•3h ago•106 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
293•jfirebaugh•20h ago•215 comments

Understanding Traceroute

https://tech.stonecharioteer.com/posts/2026/traceroute/
83•stonecharioteer•2d ago•10 comments

Trump administration orders dismantling of the U.S. Forest Service

https://www.hatchmag.com/articles/trump-administration-orders-dismantling-us-forest-service/7716263
16•dxs•14m ago•1 comments

Show HN: Orange Juice – Small UX improvements that make HN easier to read

http://oj-hn.com/
83•latchkey•7h ago•115 comments

Show HN: Tired of logic in useEffect, I built a class-based React state manager

https://thales.me/posts/why-i-built-snapstate/
16•thalesfp•3h ago•27 comments

Ask HN: Any interesting niche hobbies?

250•e-topy•3d ago•386 comments

I've been waiting over a month for Anthropic to respond to my billing issue

https://nickvecchioni.github.io/thoughts/2026/04/08/anthropic-support-doesnt-exist/
260•nickvec•7h ago•138 comments

We moved Railway's frontend off Next.js. Builds went from 10+ mins to under 2

https://blog.railway.com/p/moving-railways-frontend-off-nextjs
175•bundie•19h ago•162 comments

US cities are axing Flock Safety surveillance technology

https://www.cnet.com/home/security/when-flock-comes-to-town-why-cities-are-axing-the-controversia...
625•giuliomagnifico•12h ago•363 comments

What does ⍋⍋ even mean? (2023)

https://blog.wilsonb.com/posts/2023-08-04-what-does-grade-grade-even-mean.html
36•tosh•3d ago•18 comments

Microsoft terminates VeraCrypt account, halting Windows updates

https://www.404media.co/microsoft-abruptly-terminates-veracrypt-account-halting-windows-updates/
464•donohoe•10h ago•181 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...
79•DamnInteresting•1d ago•37 comments

Show HN: Skrun – Deploy any agent skill as an API

https://github.com/skrun-dev/skrun
43•frizull•12h ago•9 comments

Audio Reactive LED Strips Are Diabolically Hard

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

Veracrypt project update

https://sourceforge.net/p/veracrypt/discussion/general/thread/9620d7a4b3/
1132•super256•17h ago•424 comments