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.

I failed to recreate the 1996 Space Jam Website with Claude

https://j0nah.com/i-failed-to-recreate-the-1996-space-jam-website-with-claude/
246•thecr0w•6h ago•213 comments

Evidence from the One Laptop per Child Program in Rural Peru

https://www.nber.org/papers/w34495
74•danso•4h ago•30 comments

The C++ standard for the F-35 Fighter Jet [video]

https://www.youtube.com/watch?v=Gv4sDL9Ljww
158•AareyBaba•5h ago•155 comments

Mechanical power generation using Earth's ambient radiation

https://www.science.org/doi/10.1126/sciadv.adw6833
18•defrost•2h ago•7 comments

Google Titans architecture, helping AI have long-term memory

https://research.google/blog/titans-miras-helping-ai-have-long-term-memory/
361•Alifatisk•11h ago•116 comments

Dollar-stores overcharge cash-strapped customers while promising low prices

https://www.theguardian.com/us-news/2025/dec/03/customers-pay-more-rising-dollar-store-costs
198•bookofjoe•9h ago•297 comments

A two-person method to simulate die rolls

https://blog.42yeah.is/algorithm/2023/08/05/two-person-die.html
41•Fraterkes•2d ago•23 comments

An Interactive Guide to the Fourier Transform

https://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/
124•pykello•5d ago•15 comments

Bag of words, have mercy on us

https://www.experimental-history.com/p/bag-of-words-have-mercy-on-us
11•ntnbr•1h ago•3 comments

Minimum Viable Arduino Project: Aeropress Timer

https://netninja.com/2025/12/01/minimum-viable-arduino-project-aeropress-timer/
10•surprisetalk•5d ago•4 comments

Build a DIY magnetometer with a couple of seasoning bottles

https://spectrum.ieee.org/listen-to-protons-diy-magnetometer
55•nullbyte808•1w ago•15 comments

The Anatomy of a macOS App

https://eclecticlight.co/2025/12/04/the-anatomy-of-a-macos-app/
171•elashri•11h ago•44 comments

XKeyscore

https://en.wikipedia.org/wiki/XKeyscore
87•belter•3h ago•64 comments

The state of Schleswig-Holstein is consistently relying on open source

https://www.heise.de/en/news/Goodbye-Microsoft-Schleswig-Holstein-relies-on-Open-Source-and-saves...
502•doener•10h ago•234 comments

Nested Learning: A new ML paradigm for continual learning

https://research.google/blog/introducing-nested-learning-a-new-ml-paradigm-for-continual-learning/
61•themgt•9h ago•2 comments

Scala 3 slowed us down?

https://kmaliszewski9.github.io/scala/2025/12/07/scala3-slowdown.html
161•kmaliszewski•8h ago•95 comments

Java Hello World, LLVM Edition

https://www.javaadvent.com/2025/12/java-hello-world-llvm-edition.html
160•ingve•12h ago•54 comments

Proxmox delivers its software-defined datacenter contender and VMware escape

https://www.theregister.com/2025/12/05/proxmox_datacenter_manager_1_stable/
36•Bender•2h ago•1 comments

Context Plumbing (Interconnected)

https://interconnected.org/home/2025/11/28/plumbing
7•gmays•5d ago•1 comments

Semantic Compression (2014)

https://caseymuratori.com/blog_0015
48•tosh•7h ago•5 comments

Z2 – Lithographically fabricated IC in a garage fab

https://sam.zeloof.xyz/second-ic/
331•embedding-shape•20h ago•74 comments

Over fifty new hallucinations in ICLR 2026 submissions

https://gptzero.me/news/iclr-2026/
440•puttycat•10h ago•342 comments

Estimates are difficult for developers and product owners

https://thorsell.io/2025/12/07/estimates.html
130•todsacerdoti•4h ago•154 comments

Building a Toast Component

https://emilkowal.ski/ui/building-a-toast-component
80•FragrantRiver•4d ago•30 comments

Syncthing-Android have had a change of owner/maintainer

https://github.com/researchxxl/syncthing-android/issues/16
105•embedding-shape•3h ago•24 comments

The past was not that cute

https://juliawise.net/the-past-was-not-that-cute/
391•mhb•1d ago•483 comments

iced 0.14 has been released (Rust GUI library)

https://github.com/iced-rs/iced/releases/tag/0.14.0
46•airstrike•2h ago•23 comments

Screenshots from developers: 2002 vs. 2015 (2015)

https://anders.unix.se/2015/12/10/screenshots-from-developers--2002-vs.-2015/
438•turrini•1d ago•216 comments

The programmers who live in Flatland

https://blog.redplanetlabs.com/2025/11/24/the-programmers-who-live-in-flatland/
74•winkywooster•1w ago•89 comments

How the Disappearance of Flight 19 Fueled the Legend of the Bermuda Triangle

https://www.smithsonianmag.com/history/how-the-disappearance-of-flight-19-a-navy-squadron-lost-in...
47•pseudolus•11h ago•12 comments