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.

Talkie: a 13B vintage language model from 1930

https://talkie-lm.com/introducing-talkie
268•jekude•8h ago•77 comments

Pgrx: Build Postgres Extensions with Rust

https://github.com/pgcentralfoundation/pgrx
41•luu•2d ago•1 comments

Microsoft and OpenAI end their exclusive and revenue-sharing deal

https://www.bloomberg.com/news/articles/2026-04-27/microsoft-to-stop-sharing-revenue-with-main-ai...
830•helsinkiandrew•16h ago•710 comments

Mo RAM, Mo Problems (2025)

https://fabiensanglard.net/curse/
90•blfr•2d ago•7 comments

LingBot-Map: Streaming 3D reconstruction with geometric context transformer

https://technology.robbyant.com/lingbot-map
17•nateb2022•2h ago•1 comments

High Performance Git

https://gitperf.com/
82•gnabgib•5h ago•12 comments

Vibe Coding Will Break Your Company

https://www.forbes.com/sites/jasonwingard/2026/04/23/vibe-coding-will-break-your-company/
29•sminchev•41m ago•10 comments

Three men are facing charges in Toronto SMS Blaster arrests

https://www.tps.ca/media-centre/stories/unprecedented-sms-blaster-arrests/
139•gnabgib•9h ago•64 comments

Integrated by Design

https://vivianvoss.net/blog/integrated-by-design-launch
91•vermaden•7h ago•36 comments

4TB of voice samples just stolen from 40k AI contractors at Mercor

https://app.oravys.com/blog/mercor-breach-2026
498•Oravys•20h ago•176 comments

How I leared what a decoupling capacitor is for, the hard way

https://nbelakovski.substack.com/p/how-i-learned-what-a-decoupling-capacitor
63•actinium226•2d ago•20 comments

Men who stare at walls

https://www.alexselimov.com/posts/men_who_stare_at_walls/
519•aselimov3•19h ago•228 comments

The quiet resurgence of RF engineering

https://atempleton.bearblog.dev/quiet-resurgence-of-rf-engineering/
178•merlinq•2d ago•92 comments

Is my blue your blue?

https://ismy.blue/
441•theogravity•9h ago•304 comments

Easyduino: Open Source PCB Devboards for KiCad

https://github.com/Hanqaqa/Easyduino
195•Hanqaqa•12h ago•31 comments

Meetings are forcing functions

https://www.mooreds.com/wordpress/archives/3734
98•zdw•2d ago•46 comments

Show HN: AgentSwift – Open-source iOS builder agent

https://github.com/hpennington/agentswift
30•hpen•5h ago•7 comments

Networking changes coming in macOS 27

https://eclecticlight.co/2026/04/23/networking-changes-coming-in-macos-27/
222•pvtmert•14h ago•192 comments

Lessons from building multiplayer browsers

https://www.alejandro.pe/writing/sail-muddy-lessons
40•alejandrohacks•1d ago•14 comments

The woes of sanitizing SVGs

https://muffin.ink/blog/scratch-svg-sanitization/
204•varun_ch•14h ago•84 comments

Radar Laboratory – Interactive Radar Phenomenology

https://radarlaboratory.com/
48•jonbaer•2d ago•2 comments

Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

https://github.com/WeebLabs/DSPi
278•BoingBoomTschak•2d ago•77 comments

Spanish archaeologists discover trove of ancient shipwrecks in Bay of Gibraltar

https://www.theguardian.com/science/2026/apr/15/hidden-treasures-spanish-archaeologists-discover-...
90•1659447091•2d ago•20 comments

FDA approves first gene therapy for treatment of genetic hearing loss

https://www.fda.gov/news-events/press-announcements/fda-approves-first-ever-gene-therapy-treatmen...
231•JeanKage•20h ago•86 comments

Pgbackrest is no longer being maintained

https://github.com/pgbackrest/pgbackrest
410•c0l0•19h ago•218 comments

GitHub Copilot is moving to usage-based billing

https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/
615•frizlab•14h ago•450 comments

China blocks Meta's acquisition of AI startup Manus

https://www.cnbc.com/2026/04/27/meta-manus-china-blocks-acquisition-ai-startup.html
353•yakkomajuri•18h ago•250 comments

“Why not just use Lean?”

https://lawrencecpaulson.github.io//2026/04/23/Why_not_Lean.html
272•ibobev•15h ago•188 comments

Super ZSNES – GPU Powered SNES Emulator

https://zsnes.com/
272•haunter•12h ago•78 comments

Show HN: OSS Agent I built topped the TerminalBench on Gemini-3-flash-preview

https://github.com/dirac-run/dirac
329•GodelNumbering•17h ago•120 comments