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

Comments

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

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

Multiprocessing all the way!

emmelaich•7mo ago
(2021)

Good article!

punnerud•7mo 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•7mo 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•7mo ago
How does the GIL come into play here?
punnerud•7mo 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 ideas to appreciate the art of programming

https://codecrafters.io/blog/programming-project-ideas
173•vitaelabitur•4h ago•48 comments

A faster heart for F-Droid

https://f-droid.org/2025/12/30/a-faster-heart-for-f-droid.html
291•kasabali•8h ago•121 comments

FediMeteo: A €4 FreeBSD VPS Became a Global Weather Service

https://it-notes.dragas.net/2025/02/26/fedimeteo-how-a-tiny-freebsd-vps-became-a-global-weather-s...
232•birdculture•7h ago•56 comments

Quality of drinking water varies significantly by airline

https://foodmedcenter.org/2026-center-for-food-as-medicine-longevity-airline-water-study/
56•azinman2•3h ago•24 comments

Show HN: 22 GB of Hacker News in SQLite

https://hackerbook.dosaygo.com
354•keepamovin•10h ago•112 comments

A Vulnerability in Libsodium

https://00f.net/2025/12/30/libsodium-vulnerability/
220•raggi•9h ago•25 comments

Zpdf: PDF text extraction in Zig – 5x faster than MuPDF

https://github.com/Lulzx/zpdf
128•lulzx•7h ago•47 comments

OpenAI's cash burn will be one of the big bubble questions of 2026

https://www.economist.com/leaders/2025/12/30/openais-cash-burn-will-be-one-of-the-big-bubble-ques...
209•1vuio0pswjnm7•5h ago•279 comments

Electrolysis can solve one of our biggest contamination problems

https://ethz.ch/en/news-and-events/eth-news/news/2025/11/electrolysis-can-solve-one-of-our-bigges...
129•PaulHoule•9h ago•33 comments

L1TF Reloaded

https://github.com/ThijsRay/l1tf_reloaded
3•Fnoord•36m ago•0 comments

Readings in Database Systems (5th Edition)

http://www.redbook.io/
4•teleforce•1h ago•1 comments

Honey's Dieselgate: Detecting and tricking testers

https://vptdigital.com/blog/honey-detecting-testers/
127•AkshatJ27•5h ago•25 comments

Loss32: Let's Build a Win32/Linux

https://loss32.org/
215•akka47•1d ago•311 comments

Animated AI

https://animatedai.github.io/
5•frozenseven•4d ago•0 comments

Mitsubishi Diatone D-160 (1985)

https://audio-database.com/MITSUBISHI-DIATONE/diatonesp/d-160-e.html
22•anigbrowl•2d ago•12 comments

Toro: Deploy Applications as Unikernels

https://github.com/torokernel/torokernel
119•ignoramous•10h ago•105 comments

Non-Zero-Sum Games

https://nonzerosum.games/
334•8organicbits•15h ago•171 comments

Escaping containment: A security analysis of FreeBSD jails [video]

https://media.ccc.de/v/39c3-escaping-containment-a-security-analysis-of-freebsd-jails
60•todsacerdoti•7h ago•1 comments

Reverse Engineering a Mysterious UDP Stream in My Hotel (2016)

https://www.gkbrk.com/hotel-music
172•bayesnet•1w ago•22 comments

Show HN: RAMBnB.xyz P2P marketplace for RAM rentals

https://www.rambnb.xyz
9•olivierroy•3h ago•1 comments

Professional software developers don't vibe, they control

https://arxiv.org/abs/2512.14012
115•dpflan•7h ago•153 comments

The British empire's resilient subsea telegraph network

https://subseacables.blogspot.com/2025/12/the-british-empires-resilient-subsea.html
165•giuliomagnifico•13h ago•42 comments

Times New American: A Tale of Two Fonts

https://hsu.cy/2025/12/times-new-american/
224•firexcy•14h ago•135 comments

Approachable Swift Concurrency

https://fuckingapproachableswiftconcurrency.com/en/
161•wrxd•14h ago•77 comments

Igniting the GPU: From Kernel Plumbing to 3D Rendering on RISC-V

https://mwilczynski.dev/posts/riscv-gpu-zink/
74•michalwilczynsk•13h ago•8 comments

Go away Python

https://lorentz.app/blog-item.html?id=go-shebang
355•baalimago•18h ago•332 comments

What Happened to Abit Motherboards

https://dfarq.homeip.net/what-happened-to-abit-motherboards/
92•zdw•12h ago•65 comments

Everything as code: How we manage our company in one monorepo

https://www.kasava.dev/blog/everything-as-code-monorepo
182•benbeingbin•7h ago•167 comments

Hive (YC S14) Is Hiring a Staff Software Engineer (Data Systems)

https://jobs.ashbyhq.com/hive.co/cb0dc490-0e32-4734-8d91-8b56a31ed497
1•patman_h•12h ago

Five Years of Tinygrad

https://geohot.github.io//blog/jekyll/update/2025/12/29/five-years-of-tinygrad.html
187•iyaja•1d ago•86 comments