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.

A website to destroy all websites

https://henry.codes/writing/a-website-to-destroy-all-websites/
285•g0xA52A2A•4h ago•170 comments

Can Bundler be as fast as uv?

https://tenderlovemaking.com/2025/12/29/can-bundler-be-as-fast-as-uv/
119•ibobev•3h ago•47 comments

Finland detains ship and its crew after critical undersea cable damaged

https://www.cnn.com/2025/12/31/europe/finland-estonia-undersea-cable-ship-detained-intl
242•wslh•6h ago•194 comments

Cameras and Lenses (2020)

https://ciechanow.ski/cameras-and-lenses/
336•sebg•7h ago•40 comments

Linux is good now

https://www.pcgamer.com/software/linux/im-brave-enough-to-say-it-linux-is-good-now-and-if-you-wan...
424•Vinnl•4h ago•363 comments

WebAssembly as a Python Extension Platform

https://nullprogram.com/blog/2026/01/01/
23•ArmageddonIt•3h ago•0 comments

Show HN: OpenWorkers – Self-hosted Cloudflare workers in Rust

https://openworkers.com/introducing-openworkers
361•max_lt•10h ago•112 comments

Show HN: Enroll, a tool to reverse-engineer servers into Ansible config mgmt

https://enroll.sh
23•_mig5•1d ago•5 comments

Dell's version of the DGX Spark fixes pain points

https://www.jeffgeerling.com/blog/2025/dells-version-dgx-spark-fixes-pain-points
87•thomasjb•5h ago•33 comments

BYD Sells 4.6M Vehicles in 2025, Meets Revised Sales Goal

https://www.bloomberg.com/news/articles/2026-01-01/byd-sells-4-6-million-vehicles-in-2025-meets-r...
161•toomuchtodo•9h ago•232 comments

Python numbers every programmer should know

https://mkennedy.codes/posts/python-numbers-every-programmer-should-know/
269•WoodenChair•10h ago•122 comments

2025 Letter

https://danwang.co/2025-letter/
245•Amorymeltzer•10h ago•150 comments

Moving Images Related to the Apollo Missions, 1967–1969

https://catalog.archives.gov/id/133360601
28•handfuloflight•6d ago•2 comments

Bluetooth Headphone Jacking: A Key to Your Phone [video]

https://media.ccc.de/v/39c3-bluetooth-headphone-jacking-a-key-to-your-phone
423•AndrewDucker•13h ago•143 comments

Straussian Memes

https://www.lesswrong.com/posts/CAwnnKoFdcQucq4hG/straussian-memes-a-lens-on-techniques-for-mass-...
15•kp1197•3h ago•22 comments

Why Prefer Textfiles? (2010)

http://textfiles.com/uploads/textfiles.txt
8•kmstout•1h ago•1 comments

50% of U.S. vinyl buyers don't own a record player

https://lightcapai.medium.com/the-great-return-from-digital-abundance-to-analog-meaning-cfda9e428752
101•ResisBey•9h ago•127 comments

Quickemu: Quickly create and run optimised Windows, macOS and Linux VMs

https://github.com/quickemu-project/quickemu
108•teekert•2d ago•20 comments

Bypassing a Clever CD-Check

https://www.davidschlachter.com/misc/no-cd-patch
8•dddddaviddddd•4d ago•1 comments

I rebooted my social life

https://takes.jamesomalley.co.uk/p/this-might-be-oversharing
331•edent•14h ago•271 comments

C-events, yet another event loop, simpler, smaller, faster, safer

https://zelang-dev.github.io/c-events/
55•thetechstech•6d ago•11 comments

All my Deutschlandtickets gone: Fraud at an industrial scale [video]

https://media.ccc.de/v/39c3-all-my-deutschlandtickets-gone-fraud-at-an-industrial-scale
94•Kyro38•4d ago•39 comments

iOS allows alternative browser engines in Japan

https://developer.apple.com/support/alternative-browser-engines-jp/
347•eklavya•11h ago•294 comments

Build a Deep Learning Library

https://zekcrates.quarto.pub/deep-learning-library/
97•butanyways•10h ago•13 comments

Common Lisp SDK for the Datastar Hypermedia Framework

https://github.com/fsmunoz/datastar-cl
65•fsmunoz•9h ago•7 comments

Building an internal agent: Code-driven vs. LLM-driven workflows

https://lethain.com/agents-coordinators/
47•pavel_lishin•6h ago•17 comments

Love your customers

https://bcantrill.dtrace.org/2025/12/31/love-your-customers/
92•chmaynard•1d ago•23 comments

How to construct complex data declaratively and progressively?

https://github.com/allmonday/pydantic-resolve
18•tank-34•5d ago•0 comments

If you care about security you might want to move the iPhone Camera app

https://blog.jgc.org/2025/12/if-you-care-about-security-you-might.html
151•jgrahamc•4d ago•64 comments

Memory Subsystem Optimizations

https://johnnysswlab.com/memory-subsystem-optimizations/
39•mfiguiere•7h ago•8 comments