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

Comments

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

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

Multiprocessing all the way!

emmelaich•8mo ago
(2021)

Good article!

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

The Book of PF, 4th edition

https://nostarch.com/book-of-pf-4th-edition
24•0x54MUR41•1h ago•1 comments

Sometimes Your Job Is to Stay the Hell Out of the Way

https://randsinrepose.com/archives/sometimes-your-job-is-to-stay-the-hell-out-of-the-way/
29•ohjeez•4d ago•11 comments

Mobile carriers can get your GPS location

https://an.dywa.ng/carrier-gnss.html
646•cbeuw•15h ago•393 comments

The history of C# and TypeScript with Anders Hejlsberg | GitHub

https://www.youtube.com/watch?v=uMqx8NNT4xY
51•doppp•4d ago•10 comments

List animals until failure

https://rose.systems/animalist/
146•l1n•8h ago•79 comments

In praise of –dry-run

https://henrikwarne.com/2026/01/31/in-praise-of-dry-run/
160•ingve•12h ago•89 comments

pg_tracing: Distributed Tracing for PostgreSQL

https://github.com/DataDog/pg_tracing
50•tanelpoder•3d ago•9 comments

Drawings of the elements of CMS detector, in the style of Leonardo da Vinci

https://cds.cern.ch/record/1157741/
17•nill0•3d ago•1 comments

Generative AI and Wikipedia editing: What we learned in 2025

https://wikiedu.org/blog/2026/01/29/generative-ai-and-wikipedia-editing-what-we-learned-in-2025/
141•ColinWright•12h ago•58 comments

Opentrees.org (2024)

https://opentrees.org/#pos=1/-37.8/145
73•surprisetalk•4d ago•7 comments

Cells use 'bioelectricity' to coordinate and make group decisions

https://www.quantamagazine.org/cells-use-bioelectricity-to-coordinate-and-make-group-decisions-20...
57•marojejian•9h ago•16 comments

Scientist who helped eradicate smallpox dies at age 89

https://www.scientificamerican.com/article/smallpox-eradication-champion-william-foege-dies-at-89/
213•CrossVR•3d ago•52 comments

Outsourcing thinking

https://erikjohannes.no/posts/20260130-outsourcing-thinking/index.html
139•todsacerdoti•12h ago•122 comments

EV-1 for Lease (1996)

https://www.loe.org/shows/shows.html?programID=96-P13-00047#feature4
25•1970-01-01•2d ago•5 comments

Data Processing Benchmark Featuring Rust, Go, Swift, Zig, Julia etc.

https://github.com/zupat/related_post_gen
95•behnamoh•12h ago•47 comments

Show HN: Moltbook – A social network for moltbots (clawdbots) to hang out

https://www.moltbook.com/
205•schlichtm•3d ago•826 comments

When will CSS Grid Lanes arrive?

https://webkit.org/blog/17758/when-will-css-grid-lanes-arrive-how-long-until-we-can-use-it/
28•feross•10h ago•17 comments

Sparse File LRU Cache

http://ternarysearch.blogspot.com/2026/01/sparse-file-lru-cache.html
27•paladin314159•8h ago•2 comments

Nvidia's 10-year effort to make the Shield TV the most updated Android device

https://arstechnica.com/gadgets/2026/01/inside-nvidias-10-year-effort-to-make-the-shield-tv-the-m...
148•qmr•18h ago•133 comments

Finland looks to introduce Australia-style ban on social media

https://yle.fi/a/74-20207494
607•Teever•16h ago•427 comments

Nintendo DS code editor and scriptable game engine

https://crl.io/ds-game-engine/
127•Antibabelic•14h ago•32 comments

Show HN: Minimal – Open-Source Community driven Hardened Container Images

https://github.com/rtvkiz/minimal
87•ritvikarya98•13h ago•26 comments

Apple Platform Security (Jan 2026) [pdf]

https://help.apple.com/pdf/security/en_US/apple-platform-security-guide.pdf
166•pieterr•17h ago•121 comments

Demystifying ARM SME to Optimize General Matrix Multiplications

https://arxiv.org/abs/2512.21473
70•matt_d•13h ago•16 comments

The Saddest Moment (2013) [pdf]

https://www.usenix.org/system/files/login-logout_1305_mickens.pdf
113•tosh•13h ago•23 comments

Nonograms: a practical guide with interactive examples

https://lab174.com/blog/202601-nonograms/
31•merelysounds•4d ago•6 comments

Swift is a more convenient Rust (2023)

https://nmn.sh/blog/2023-10-02-swift-is-the-more-convenient-rust
280•behnamoh•11h ago•260 comments

CPython Internals Explained

https://github.com/zpoint/CPython-Internals
196•yufiz•4d ago•45 comments

Giving up upstream-ing my patches and feel free to pick them up

https://mail.openjdk.org/pipermail/hotspot-dev/2026-January/118080.html
157•csmantle•22h ago•94 comments

Noctia: A sleek and minimal desktop shell thoughtfully crafted for Wayland

https://github.com/noctalia-dev/noctalia-shell
67•doener•13h ago•28 comments