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.

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...
432•helsinkiandrew•4h ago•364 comments

“Why not just use Lean?”

https://lawrencecpaulson.github.io//2026/04/23/Why_not_Lean.html
161•ibobev•3h ago•86 comments

Open-Source KiCad PCBs for Common Arduino, ESP32, RP2040 Boards

https://github.com/Hanqaqa/Easyduino
19•Hanqaqa•30m ago•0 comments

Networking changes coming in macOS 27

https://eclecticlight.co/2026/04/23/networking-changes-coming-in-macos-27/
98•pvtmert•2h ago•79 comments

The woes of sanitizing SVGs

https://muffin.ink/blog/scratch-svg-sanitization/
93•varun_ch•2h ago•37 comments

GitHub Copilot is moving to usage-based billing

https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/
232•frizlab•2h ago•175 comments

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

https://app.oravys.com/blog/mercor-breach-2026
291•Oravys•8h ago•113 comments

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

https://github.com/dirac-run/dirac
224•GodelNumbering•5h ago•80 comments

Pgbackrest is no longer being maintained

https://github.com/pgbackrest/pgbackrest
347•c0l0•7h ago•176 comments

Dutch central bank ditches AWS and chooses Lidl for European Cloud

https://www.techzine.eu/news/infrastructure/140634/dutch-central-bank-chooses-lidl-for-european-c...
203•benterix•3h ago•73 comments

Canada's first sovereign wealth fund

https://www.cbc.ca/news/politics/sovereign-wealth-fund-carney-major-projects-9.7178238
77•geox•1h ago•31 comments

Fully Featured Audio DSP Firmware for the Raspberry Pi Pico

https://github.com/WeebLabs/DSPi
201•BoingBoomTschak•2d ago•40 comments

Men who stare at walls

https://www.alexselimov.com/posts/men_who_stare_at_walls/
255•aselimov3•7h ago•134 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...
148•JeanKage•8h ago•56 comments

Decoupled DiLoCo: Resilient, Distributed AI Training at Scale

https://deepmind.google/blog/decoupled-diloco/
14•metadat•1h ago•2 comments

Boats crash/break and can kill their passengers when falling certain distances

https://bugs.mojang.com/browse/MC/issues/MC-119369
28•zdw•1d ago•7 comments

Adding a team was the wrong strategic decision

https://learnings.aleixmorgadas.dev/p/adding-a-team-was-the-wrong-strategic
20•milkglass•1d ago•6 comments

Show HN: Utilyze – an open source GPU monitoring tool more accurate than nvtop

https://www.systalyze.com/utilyze
33•ManyaGhobadi•4h ago•8 comments

Tendril – a self-extending agent that builds and registers its own tools

https://github.com/serverless-dna/tendril
48•walmsles•4h ago•18 comments

Flipdiscs

https://flipdisc.io
481•skogstokig•4d ago•80 comments

I bought Friendster for $30k – Here's what I'm doing with it

https://ca98am79.medium.com/i-bought-friendster-for-30k-heres-what-i-m-doing-with-it-d5e8ddb3991d
1035•ca98am79•21h ago•550 comments

US Supreme Court reviews police use of cell location data

https://www.nytimes.com/2026/04/27/us/politics/supreme-court-cell-data-geofence.html
106•unethical_ban•2h ago•63 comments

GitHub is having issues now

https://www.githubstatus.com
12•SenHeng•33m ago•2 comments

Quarkdown – Markdown with Superpowers

https://quarkdown.com/
169•amai•9h ago•42 comments

Den stora Älgvandringen – The great moose migration (live)

https://www.svtplay.se/video/jXv3A5G/den-stora-algvandringen/idag-00-00
52•donjoe•3d ago•4 comments

Managing the Unmanaged Switch

https://watchmysys.com/blog/2026/03/managing-the-unmanaged-switch/
37•luu•2d ago•17 comments

Supreme Court to Hear Arguments in Landmark Roundup Weedkiller Case

https://www.nytimes.com/2026/04/26/climate/supreme-court-bayer-monsanto-roundup-glyphosate.html
55•mikhael•2h ago•31 comments

AI should elevate your thinking, not replace it

https://www.koshyjohn.com/blog/ai-should-elevate-your-thinking-not-replace-it/
769•koshyjohn•22h ago•550 comments

Show HN: A terminal spreadsheet editor with Vim keybindings

https://github.com/garritfra/cell
61•garritfra•6h ago•28 comments

Getting my daily news from a dot matrix printer 2024

https://aschmelyun.com/blog/getting-my-daily-news-from-a-dot-matrix-printer/
74•xupybd•2d ago•11 comments