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

Comments

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

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

Multiprocessing all the way!

emmelaich•12mo ago
(2021)

Good article!

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

Valve releases Steam Controller CAD files under Creative Commons license

https://www.digitalfoundry.net/news/2026/05/valve-releases-steam-controller-cad-files-under-creat...
701•haunter•4h ago•227 comments

Appearing productive in the workplace

https://nooneshappy.com/article/appearing-productive-in-the-workplace/
377•diebillionaires•4h ago•128 comments

Ted Turner has died

https://www.cnn.com/2026/05/06/us/ted-turner-death
153•pseudolus•5h ago•114 comments

From Supabase to Clerk to Better Auth

https://blog.val.town/better-auth
122•stevekrouse•3h ago•61 comments

Google Cloud fraud defense, the next evolution of reCAPTCHA

https://cloud.google.com/blog/products/identity-security/introducing-google-cloud-fraud-defense-t...
68•unforgivenpasta•2h ago•60 comments

A Theory of Deep Learning

https://elonlit.com/scrivings/a-theory-of-deep-learning/
63•elonlit•1d ago•14 comments

The bottleneck was never the code

https://www.thetypicalset.com/blog/thoughts-on-coding-agents
423•Anon84•2d ago•282 comments

Learning the Integral of a Diffusion Model

https://sander.ai/2026/05/06/flow-maps.html
26•benanne•1h ago•5 comments

Inkscape 1.4.4

https://inkscape.org/doc/release_notes/1.4.4/Inkscape_1.4.4.html
74•s1291•1h ago•8 comments

Show HN: I built an open-source email builder, alternative to Beefree/Unlayer

https://play.templatical.com
61•oahmadov•4h ago•16 comments

CARA 2.0 – “I Built a Better Robot Dog”

https://www.aaedmusa.com/projects/cara2
421•hakonjdjohnsen•2d ago•51 comments

Life During Class Wartime

https://www.tbray.org/ongoing/When/202x/2026/05/03/Life-During-Class-Wartime
68•AndrewDucker•4h ago•25 comments

MIT’s virtual violin offers luthiers a new design tool

https://arstechnica.com/science/2026/05/mits-virtual-violin-offers-luthiers-a-new-design-tool/
3•smushy•39m ago•0 comments

McDonald's is a premium product now (2024)

https://greyenlightenment.com/2024/07/31/mcdonalds-is-a-premium-product-now/
22•paulpauper•56m ago•22 comments

Setting up a Sun Ray server on OpenIndiana Hipster 2025.10

https://catstret.ch/202605/srss-hipster202510/
111•jandeboevrie•9h ago•36 comments

What makes a good smartphone camera?

https://cadence.moe/blog/2026-05-05-what-makes-a-good-smartphone-camera
55•zdw•1d ago•39 comments

Knitting bullshit

https://katedaviesdesigns.com/2026/04/29/knitting-bullshit/
387•ColinEberhardt•15h ago•161 comments

Reverse-engineering the 1998 Ultima Online demo server

https://draxinar.github.io/articles/2026-05-01-uodemo-reverse-engineering.html
214•notsentient•14h ago•53 comments

Multi-stroke text effect in CSS

https://yuanchuan.dev/multi-stroke-text-effect-in-css
296•cheeaun•15h ago•39 comments

Google tools for customizing searches

https://cardcatalogforlife.substack.com/p/google-has-a-secret-reference-desk
55•maxutility•16h ago•15 comments

Going Full Time on Open Source

https://jdx.dev/posts/2026-04-17-going-full-time-on-open-source/
104•thunderbong•3h ago•11 comments

Coverage Cat (YC S22) Seeks Fractional Engineer to Build AI Growth Toolkit

https://www.coveragecat.com/careers/engineering/fractional-growth-engineer
1•botacode•8h ago

Batteries Not Included, or Required, for These Smart Home Sensors

https://coe.gatech.edu/news/2026/04/batteries-not-included-or-required-these-smart-home-sensors
177•gnabgib•3d ago•72 comments

Proton Meet

https://proton.me/business/blog/introducing-proton-meet
68•Einenlum•2h ago•18 comments

245TB Micron 6600 ION Data Center SSD Now Shipping

https://investors.micron.com/news-releases/news-release-details/industry-leading-245tb-micron-660...
232•neilfrndes•17h ago•169 comments

Colombia hosts talks on exiting fossil fuels as global energy crisis deepens

https://www.latimes.com/environment/story/2026-04-26/colombia-hosts-talks-on-exiting-fossil-fuels...
104•PaulHoule•3h ago•81 comments

BYD overtakes Tesla and Kia as the best-selling EV brand in key overseas markets

https://electrek.co/2026/05/05/byd-overtakes-tesla-kia-best-selling-ev-brand-key-overseas-markets/
169•doener•2h ago•227 comments

YouTube, your RSS feeds are broken

https://openrss.org/blog/youtube-your-feeds-are-broken
309•veeti•19h ago•102 comments

Wolfenstein 3D for Gameboy Color on custom cartridge (2016)

https://www.happydaze.se/wolf/
120•ksymph•2d ago•26 comments

SoundOff: Low-Cost Passive Ultrasound Tags

https://yibo-fu.com/SoundOff-Low-cost-Passive-Ultrasound-Tags-for-Non-invasive-and-Non
11•jonbaer•3h ago•1 comments