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.

John Ternus to become Apple CEO

https://www.apple.com/newsroom/2026/04/tim-cook-to-become-apple-executive-chairman-john-ternus-to...
1156•schappim•4h ago•599 comments

How to Make a Fast Dynamic Language Interpreter

https://zef-lang.dev/implementation
15•pizlonator•49m ago•0 comments

Jujutsu megamerges for fun and profit

https://isaaccorbrey.com/notes/jujutsu-megamerges-for-fun-and-profit
120•icorbrey•4h ago•30 comments

Qwen3.6-Max-Preview: Smarter, Sharper, Still Evolving

https://qwen.ai/blog?id=qwen3.6-max-preview
531•mfiguiere•11h ago•282 comments

Kimi vendor verifier – verify accuracy of inference providers

https://www.kimi.com/blog/kimi-vendor-verifier
157•Alifatisk•6h ago•17 comments

Soul Player C64 – A real transformer running on a 1 MHz Commodore 64

https://github.com/gizmo64k/soulplayer-c64
72•adunk•5h ago•19 comments

Ternary Bonsai: Top Intelligence at 1.58 Bits

https://prismml.com/news/ternary-bonsai
38•nnx•2d ago•8 comments

ggsql: A Grammar of Graphics for SQL

https://opensource.posit.co/blog/2026-04-20_ggsql_alpha_release/
348•thomasp85•12h ago•72 comments

Quantum Computers Are Not a Threat to 128-Bit Symmetric Keys

https://words.filippo.io/128-bits/
129•hasheddan•8h ago•55 comments

OpenAI ad partner now selling ChatGPT ad placements based on “prompt relevance”

https://www.adweek.com/media/exclusive-leaked-deck-reveals-stackadapts-playbook-for-chatgpt-ads/
163•jlark77777•4h ago•78 comments

All phones sold in the EU to have replaceable batteries from 2027

https://www.theolivepress.es/spain-news/2026/04/20/eu-to-force-replaceable-batteries-in-phones-an...
952•ramonga•11h ago•790 comments

Deezer says 44% of songs uploaded to its platform daily are AI-generated

https://techcrunch.com/2026/04/20/deezer-says-44-of-songs-uploaded-to-its-platform-daily-are-ai-g...
289•FiddlerClamp•9h ago•272 comments

Modern Rendering Culling Techniques

https://krupitskas.com/posts/modern_culling_techniques/
77•krupitskas•1d ago•16 comments

Kefir C17/C23 Compiler

https://sr.ht/~jprotopopov/kefir/
122•conductor•3d ago•5 comments

Brussels launched an age checking app. Hackers took 2 minutes to break it

https://www.politico.eu/article/eu-brussels-launched-age-checking-app-hackers-say-took-them-2-min...
137•axbyte•16h ago•71 comments

Monero Community Crowdfunding System

https://ccs.getmonero.org/ideas/
54•OsrsNeedsf2P•4h ago•32 comments

Zero-Copy Pages in Rust: Or How I Learned to Stop Worrying and Love Lifetimes

https://redixhumayun.github.io/databases/2026/04/14/zero-copy-pages-in-rust.html
39•ingve•4d ago•4 comments

Year of the IPv6 Overlay Network

https://www.defined.net/blog/year-of-the-ipv6-overlay-network/
8•stock_toaster•3d ago•1 comments

WebUSB Extension for Firefox

https://github.com/ArcaneNibble/awawausb
197•tuananh•13h ago•179 comments

M 7.4 earthquake – 100 km ENE of Miyako, Japan

https://earthquake.usgs.gov/earthquakes/eventpage/us6000sri7/
260•Someone•15h ago•121 comments

F-35 is built for the wrong war

https://warontherocks.com/cogs-of-war/the-f-35-is-a-masterpiece-built-for-the-wrong-war/
188•anjel•5h ago•366 comments

Even 'uncensored' models can't say what they want

https://morgin.ai/articles/even-uncensored-models-cant-say-what-they-want.html
92•llmmadness•2h ago•74 comments

Bloom (YC P26) Is Hiring

https://www.ycombinator.com/companies/trybloom/jobs
1•RayFitzgerald•8h ago

10 years ago, someone wrote a test for Servo that included an expiry in 2026

https://mastodon.social/@jdm_/116429380667467307
188•luu•1d ago•103 comments

Atlassian enables default data collection to train AI

https://letsdatascience.com/news/atlassian-enables-default-data-collection-to-train-ai-f71343d8
498•kevcampb•13h ago•113 comments

Sauna effect on heart rate

https://tryterra.co/research/sauna-effect-on-heart-rate
364•kyriakosel•11h ago•206 comments

Kimi K2.6: Advancing open-source coding

https://www.kimi.com/blog/kimi-k2-6
568•meetpateltech•10h ago•288 comments

Writing string.h functions using string instructions in asm x86-64 (2025)

https://pmasschelier.github.io/x86_64_strings/
43•thaisstein•3d ago•4 comments

Show HN: Holos – QEMU/KVM with a compose-style YAML, GPUs and health checks

https://github.com/zeroecco/holos
27•zeroecco•4h ago•17 comments

I learned Unity the wrong way

https://darkounity.com/blog/how-i-learned-unity-the-wrong-way
133•lelanthran•4d ago•77 comments