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•6mo ago

Comments

quentinp•6mo 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•6mo ago
Page didnt load for me.

https://realpython.com/async-io-python/

Multiprocessing all the way!

emmelaich•6mo ago
(2021)

Good article!

punnerud•6mo 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•6mo 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•6mo ago
How does the GIL come into play here?
punnerud•6mo 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.

A Love Letter to FreeBSD

https://www.tara.sh/posts/2025/2025-11-25_freebsd_letter/
207•rbanffy•5h ago•118 comments

Algorithms for Optimization [pdf]

https://algorithmsbook.com/optimization/files/optimization.pdf
111•Anon84•4h ago•7 comments

Advent of Sysadmin 2025

https://sadservers.com/advent
59•lazyant•2h ago•14 comments

Writing a good Claude.md

https://www.humanlayer.dev/blog/writing-a-good-claude-md
359•objcts•9h ago•112 comments

Advent of Code 2025

https://adventofcode.com/2025/about
759•vismit2000•14h ago•260 comments

Windows drive letters are not limited to A-Z

https://www.ryanliptak.com/blog/windows-drive-letters-are-not-limited-to-a-z/
389•LorenDB•13h ago•193 comments

Bricklink suspends Marketplace operations in 35 countries

https://jaysbrickblog.com/news/bricklink-suspends-marketplace-operations-in-35-countries/
77•makeitdouble•4h ago•30 comments

Migrating Dillo from GitHub

https://dillo-browser.org/news/migration-from-github/
289•todsacerdoti•13h ago•168 comments

LLVM-MOS – Clang LLVM fork targeting the 6502

https://llvm-mos.org/wiki/Welcome
115•jdmoreira•10h ago•41 comments

GitHub to Codeberg: my experience

https://eldred.fr/blog/forge-migration/
166•todsacerdoti•11h ago•67 comments

ESA Sentinel-1D delivers first high-resolution images

https://www.esa.int/Applications/Observing_the_Earth/Copernicus/Sentinel-1/Sentinel-1D_delivers_f...
86•giuliomagnifico•9h ago•26 comments

Seeing a Molecule's Quantum Shadow

https://physics.aps.org/articles/v18/s149
6•lc0_stein•6d ago•0 comments

Program-of-Thought Prompting Outperforms Chain-of-Thought by 15% (2022)

https://arxiv.org/abs/2211.12588
83•mkagenius•8h ago•23 comments

Is America's jobs market nearing a cliff?

https://www.economist.com/finance-and-economics/2025/11/30/is-americas-jobs-market-nearing-a-cliff
61•harambae•2h ago•94 comments

CachyOS: Fast and Customizable Linux Distribution

https://cachyos.org/
267•doener•16h ago•242 comments

ETH-Zurich: Digital Design and Computer Architecture; 227-0003-10L, Spring, 2025

https://safari.ethz.ch/ddca/spring2025/doku.php?id=start
118•__rito__•9h ago•17 comments

How to run phones while being struck by suicide drones

https://nasa.cx/hn/posts/how-to-run-hundreds-of-phones-while-being-struck-by-suicide-drones/
45•nasaok•6h ago•13 comments

AI just proved Erdos Problem #124

https://www.erdosproblems.com/forum/thread/124#post-1892
122•nl•22h ago•31 comments

Show HN: Fixing Google Nano Banana Pixel Art with Rust

https://github.com/Hugo-Dz/spritefusion-pixel-snapper
136•HugoDz•4d ago•22 comments

Show HN: Real-time system that tracks how news spreads across 200k websites

https://yandori.io/news-flow/
232•antiochIst•5d ago•56 comments

Mike Gordon and hardware verification (2023)

https://lawrencecpaulson.github.io/2023/01/04/Hardware_Verification.html
7•sebg•6d ago•0 comments

Stereo Images of Giant Galaxies

https://www.bbc.com/future/article/20251121-sir-brian-mays-stereo-vision-of-galaxies
13•benbreen•5d ago•4 comments

The Thinking Game Film – Google DeepMind documentary

https://thinkinggamefilm.com
155•ChrisArchitect•11h ago•108 comments

“Boobs check” – Technique to verify if sites behind CDN are hosted in Iran

https://twitter.com/hkashfi/status/1995109785679573167
227•defly•6h ago•77 comments

In Re: 23andMe, Inc. Customer Data Security Breach Litigation

https://www.23andmedatasettlement.com/
51•toomuchtodo•1h ago•27 comments

Paul Hegarty's updated CS193p SwiftUI course released by Stanford

https://cs193p.stanford.edu/
154•yehiaabdelm•5d ago•35 comments

RetailReady (YC W24) Is Hiring Associate Product Manager

https://www.ycombinator.com/companies/retailready/jobs/KPKDu3D-associate-product-manager
1•sarah74•10h ago

Malware embedded into audio driver is silently recording from system mic

https://twitter.com/Officialwhyte22/status/1995024999934001602
34•CGMthrowaway•2h ago•9 comments

There is No Quintic Formula [video]

https://www.youtube.com/watch?v=9HIy5dJE-zQ
61•DamnInteresting•9h ago•24 comments

Langjam Gamejam: Build a programming language then make a game with it

https://langjamgamejam.com/
62•birdculture•11h ago•40 comments