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.

Project Glasswing: Securing critical software for the AI era

https://www.anthropic.com/glasswing
654•Ryan5453•4h ago•279 comments

System Card: Claude Mythos Preview [pdf]

https://www-cdn.anthropic.com/53566bf5440a10affd749724787c8913a2ae0841.pdf
430•be7a•3h ago•293 comments

S3 Files and the changing face of S3

https://www.allthingsdistributed.com/2026/04/s3-files-and-the-changing-face-of-s3.html
117•werner•2h ago•32 comments

Lunar Flyby

https://www.nasa.gov/gallery/lunar-flyby/
78•kipi•7h ago•12 comments

GLM-5.1: Towards Long-Horizon Tasks

https://z.ai/blog/glm-5.1
353•zixuanlimit•5h ago•105 comments

Bitcoin and Quantum Computing

https://nehanarula.org/2026/04/03/bitcoin-and-quantum-computing.html
42•nehan•1h ago•17 comments

How to get better at guitar

https://www.jakeworth.com/posts/how-to-get-better-at-guitar/
97•jwworth•2d ago•37 comments

Show HN: Gemma 4 Multimodal Fine-Tuner for Apple Silicon

https://github.com/mattmireles/gemma-tuner-multimodal
85•MediaSquirrel•2h ago•7 comments

Cambodia unveils a statue of famous landmine-sniffing rat Magawa

https://www.bbc.com/news/articles/c0rx7xzd10xo
218•speckx•4h ago•46 comments

A truck driver spent 20 years making a scale model of every building in NYC

https://www.smithsonianmag.com/smart-news/a-truck-drive-spent-20-years-making-this-astonishing-sc...
195•1659447091•1d ago•31 comments

Move Detroit

https://www.movedetroit.com/program
18•rmason•1h ago•12 comments

Show HN: Brutalist Concrete Laptop Stand (2024)

https://sam-burns.com/posts/concrete-laptop-stand/
669•sam-bee•11h ago•207 comments

Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

https://printervention.app/details
129•gmac•5h ago•46 comments

Cloudflare targets 2029 for full post-quantum security

https://blog.cloudflare.com/post-quantum-roadmap/
242•ilreb•8h ago•79 comments

A whole boss fight in 256 bytes

https://hellmood.111mb.de//A_whole_boss_fight_in_256_bytes.html
20•HellMood•1d ago•4 comments

Show HN: An interactive map of Tolkien's Middle-earth

https://middle-earth-interactive-map.web.app/
20•frasermarlow•1h ago•1 comments

The Image Boards of Hayao Miyazaki

https://animationobsessive.substack.com/p/the-image-boards-of-hayao-miyazaki
60•vinhnx•1d ago•7 comments

Assessing Claude Mythos Preview's cybersecurity capabilities

https://red.anthropic.com/2026/mythos-preview/
213•sweis•4h ago•28 comments

AI helps add 10k more photos to OldNYC

https://www.danvk.org/2026/03/08/oldnyc-updates.html
100•evakhoury•1d ago•35 comments

Google open-sources experimental agent orchestration testbed Scion

https://www.infoq.com/news/2026/04/google-agent-testbed-scion/
131•timbilt•8h ago•41 comments

Cells for NetBSD: kernel-enforced, jail-like isolation

https://netbsd-cells.petermann-digital.de/
25•akagusu•2h ago•6 comments

A blind man made it possible for others with low vision to build Lego sets

https://apnews.com/article/lego-bricks-for-blind-audio-braille-instructions-5a2a27de4354a0b144317...
29•speckx•7h ago•5 comments

9 Mothers (YC P26) Is Hiring – Lead Robotics and More

https://jobs.ashbyhq.com/9-mothers?utm_source=x8pZ4B3P3Q
1•ukd1•8h ago

John Coltrane Illustrates the Mathematics of Jazz

https://www.americanjazzmusicsociety.com/blog/john-coltrane-draws
89•luu•16h ago•7 comments

We found an undocumented bug in the Apollo 11 guidance computer code

https://www.juxt.pro/blog/a-bug-on-the-dark-side-of-the-moon/
363•henrygarner•11h ago•179 comments

Taste in the age of AI and LLMs

https://rajnandan.com/posts/taste-in-the-age-of-ai-and-llms/
195•speckx•6h ago•174 comments

Boneyard: Generate pixel-perfect skeleton screens from your real DOM

https://github.com/0xGF/boneyard
22•steveharing1•4d ago•8 comments

Tailslayer: Library for reducing tail latency in RAM reads

https://github.com/LaurieWired/tailslayer
31•hasheddan•3h ago•9 comments

Show HN: Unicode Steganography

https://steganography.patrickvuscan.com
7•PatrickVuscan•9h ago•1 comments

RSoC 2026: A new CPU scheduler for Redox OS

https://www.redox-os.org/news/rsoc-dwrr/
5•akyuu•35m ago•0 comments