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.

Talk like caveman

https://github.com/JuliusBrussee/caveman
103•tosh•2h ago•68 comments

Lisette a little language inspired by Rust that compiles to Go

https://lisette.run/
99•jspdown•4h ago•43 comments

The threat is comfortable drift toward not understanding what you're doing

https://ergosphere.blog/posts/the-machines-are-fine/
22•zaikunzhang•1h ago•6 comments

Show HN: A game where you build a GPU

https://jaso1024.com/mvidia/
787•Jaso1024•18h ago•161 comments

German implementation of eIDAS will require an Apple/Google account to function

https://bmi.usercontent.opencode.de/eudi-wallet/wallet-development-documentation-public/latest/ar...
328•DyslexicAtheist•12h ago•291 comments

OpenScreen is an open-source alternative to Screen Studio

https://github.com/siddharthvaddem/openscreen
323•jskopek•4d ago•57 comments

Introduction to Computer Music (2009) [pdf]

https://composerprogrammer.com/introductiontocomputermusic.pdf
169•luu•9h ago•53 comments

Scientists Figured Out How Eels Reproduce (2022)

https://www.intelligentliving.co/scientists-finally-figured-out-how-eels-reproduce/
43•thunderbong•3d ago•1 comments

Aegis – open-source FPGA silicon

https://github.com/MidstallSoftware/aegis
44•rosscomputerguy•5h ago•5 comments

LLM Wiki – example of an "idea file"

https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
216•tamnd•18h ago•66 comments

Zml-smi: universal monitoring tool for GPUs, TPUs and NPUs

https://zml.ai/posts/zml-smi/
53•steeve•4d ago•8 comments

Costco sued for seeking refunds on tariffs customers paid

https://arstechnica.com/tech-policy/2026/03/costco-sued-for-seeking-refunds-on-tariffs-customers-...
11•AdmiralAsshat•4d ago•2 comments

Ask HN: Is there any interest in a native Qt/C++ Discord client?

12•txtsd•3d ago•19 comments

Rubysyn: Clarifying Ruby's Syntax and Semantics

https://github.com/squadette/rubysyn/blob/master/README.md
54•petalmind•4d ago•5 comments

How many products does Microsoft have named 'Copilot'?

https://teybannerman.com/strategy/2026/03/31/how-many-microsoft-copilot-are-there.html
676•gpi•16h ago•318 comments

Show HN: OsintRadar – Curated directory for osint tools

https://osintradar.com/
16•lexalizer•5h ago•1 comments

Show HN: I built a small app for FSI German Course

https://detawk.com/
39•syedmsawaid•3d ago•13 comments

AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy

https://www.phoronix.com/news/Linux-7.0-AWS-PostgreSQL-Drop
319•crcastle•11h ago•93 comments

Demonstrating Real Time AV2 Decoding on Consumer Laptops

http://aomedia.org/blog%20posts/Demonstrating-Real-Time-AV2-Decoding-on-Consumer-Laptops/
37•breve•10h ago•6 comments

Show HN: I made open source, zero power PCB hackathon badges

https://github.com/KaiPereira/Overglade-Badges
115•kaipereira•21h ago•11 comments

Show HN: sllm – Split a GPU node with other developers, unlimited tokens

https://sllm.cloud
164•jrandolf•20h ago•79 comments

The Indie Internet Index – submit your favorite sites

https://iii.social
156•freshman_dev•21h ago•30 comments

Show HN: Contrapunk – Real-time counterpoint harmony from guitar input, in Rust

https://contrapunk.com/
78•waveywaves•11h ago•33 comments

Components of a Coding Agent

https://magazine.sebastianraschka.com/p/components-of-a-coding-agent
248•MindGods•22h ago•78 comments

Unverified: What Practitioners Post About OCR, Agents, and Tables

https://idp-software.com/news/idp-accuracy-reckoning-2026/
12•chelm•5h ago•1 comments

Modern Generic SVGA driver for Windows 3.1

https://github.com/PluMGMK/vbesvga.drv
50•userbinator•6h ago•14 comments

Ruckus: Racket for iOS

https://ruckus.defn.io/
136•nsm•2d ago•12 comments

Show HN: M. C. Escher spiral in WebGL inspired by 3Blue1Brown

https://static.laszlokorte.de/escher/
95•laszlokorte•16h ago•15 comments

Electrical transformer manufacturing is throttling the electrified future

https://www.bloomberg.com/features/2025-bottlenecks-transformers/
93•toomuchtodo•3d ago•84 comments

Apple approves driver that lets Nvidia eGPUs work with Arm Macs

https://www.theverge.com/tech/907003/apple-approves-driver-that-lets-nvidia-egpus-work-with-arm-macs
441•naves•19h ago•197 comments