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.

Maybe the default settings are too high

https://www.raptitude.com/2025/12/maybe-the-default-settings-are-too-high/
433•htk•7h ago•132 comments

Show HN: GeneGuessr – a daily biology web puzzle

https://geneguessr.brinedew.bio/
7•brinedew•2d ago•1 comments

MiniMax M2.1: Built for Real-World Complex Tasks, Multi-Language Programming

https://www.minimaxi.com/news/minimax-m21
97•110•6h ago•32 comments

Show HN: Gaming Couch – a local multiplayer party game platform for 8 players

https://gamingcouch.com
110•ChaosOp•4d ago•20 comments

Ultimate-Linux: Userspace for Linux in Pure JavaScript

https://github.com/popovicu/ultimate-linux
34•radeeyate•4h ago•7 comments

Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster

https://fidget-spinner.github.io/posts/no-longer-sorry.html
352•lumpa•18h ago•114 comments

Rob Pike Goes Nuclear over GenAI

https://imgur.com/nUJCI3o
218•signa11•1h ago•121 comments

Tiled Art

https://tiled.art/en/home/?id=SilverAndGold
89•meander_water•6d ago•3 comments

TurboDiffusion: 100–200× Acceleration for Video Diffusion Models

https://github.com/thu-ml/TurboDiffusion
24•meander_water•3h ago•3 comments

Fahrplan – 39C3

https://fahrplan.events.ccc.de/congress/2025/fahrplan/
188•rurban•12h ago•21 comments

The entire New Yorker archive is now digitized

https://www.newyorker.com/news/press-room/the-entire-new-yorker-archive-is-now-fully-digitized
391•thm•5d ago•54 comments

Tachyon: High frequency statistical sampling profiler

https://docs.python.org/3.15/library/profiling.sampling.html
28•vismit2000•3d ago•1 comments

CUDA Tile Open Sourced

https://github.com/NVIDIA/cuda-tile
167•JonChesterfield•6d ago•71 comments

When a driver challenges the kernel's assumptions

http://miod.online.fr/software/openbsd/stories/udl.html
46•todsacerdoti•6h ago•10 comments

Seven Diabetes Patients Die Due to Undisclosed Bug in Abbott's Glucose Monitors

https://sfconservancy.org/blog/2025/dec/23/seven-abbott-freestyle-libre-cgm-patients-dead/
189•pabs3•6h ago•67 comments

Ask HN: What skills do you want to develop or improve in 2026?

64•meridion•14h ago•70 comments

Paperbacks and TikTok

https://calnewport.com/on-paperbacks-and-tiktok/
106•zdw•3d ago•64 comments

Asahi Linux with Sway on the MacBook Air M2 (2024)

https://daniel.lawrence.lu/blog/2024-12-01-asahi-linux-with-sway-on-the-macbook-air-m2/
221•andsoitis•16h ago•208 comments

The Program 2025 annual review: How much money does an audio drama podcast make?

https://programaudioseries.com/the-program-results-7/
64•I-M-S•3d ago•16 comments

Archiving Git branches as tags

https://etc.octavore.com/2025/12/archiving-git-branches-as-tags/
103•octavore•3d ago•30 comments

Lessons from a year of Postgres CDC in production

https://clickhouse.com/blog/postgres-cdc-year-in-review-2025
9•saisrirampur•6d ago•0 comments

I sell onions on the Internet (2019)

https://www.deepsouthventures.com/i-sell-onions-on-the-internet/
417•sogen•14h ago•122 comments

Show HN: Lamp Carousel – DIY kinetic sculpture powered by lamp heat (2024)

https://evan.widloski.com/posts/spinners/
72•Evidlo•1d ago•13 comments

Google is 'gradually rolling out' option to change your gmail.com address

https://9to5google.com/2025/12/24/google-change-gmail-addresses/
183•geox•9h ago•147 comments

Critical vulnerability in LangChain – CVE-2025-68664

https://cyata.ai/blog/langgrinch-langchain-core-cve-2025-68664/
94•shahartal•12h ago•61 comments

We invited a man into our home at Christmas and he stayed with us for 45 years

https://www.bbc.co.uk/news/articles/cdxwllqz1l0o
1007•rajeshrajappan•20h ago•238 comments

Fabrice Bellard Releases MicroQuickJS

https://github.com/bellard/mquickjs/blob/main/README.md
1447•Aissen•2d ago•542 comments

Alzheimer’s disease can be reversed in animal models? Study

https://case.edu/news/new-study-shows-alzheimers-disease-can-be-reversed-achieve-full-neurologica...
448•thunderbong•15h ago•110 comments

Who Watches the Waymos? I do [video]

https://www.youtube.com/watch?v=oYU2hAbx_Fc
284•notgloating•1d ago•105 comments

Clearspace (YC W23) Is Hiring a Founding Network Engineer (VPN and Proxy)

https://www.ycombinator.com/companies/clearspace/jobs/5LtM86I-founding-network-engineer-at-clears...
1•anteloper•14h ago