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

Comments

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

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

Multiprocessing all the way!

emmelaich•6mo ago
(2021)

Good article!

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

Learning Music with Strudel

https://terryds.notion.site/Learning-Music-with-Strudel-2ac98431b24180deb890cc7de667ea92
143•terryds•6d ago•29 comments

Mistral 3 family of models released

https://mistral.ai/news/mistral-3
265•pember•1h ago•77 comments

Addressing the adding situation

https://xania.org/202512/02-adding-integers
194•messe•5h ago•59 comments

Nixtml: Static website and blog generator written in Nix

https://github.com/arnarg/nixtml
37•todsacerdoti•1h ago•6 comments

Advent of Compiler Optimisations 2025

https://xania.org/202511/advent-of-compiler-optimisation
243•vismit2000•7h ago•33 comments

Show HN: Marmot – Single-binary data catalog (no Kafka, no Elasticsearch)

https://github.com/marmotdata/marmot
42•charlie-haley•1h ago•7 comments

Peter Thiel's Apocalyptic Worldview Is a Dangerous Fantasy

https://jacobin.com/2025/11/peter-thiel-palantir-apocalypse-antichrist
79•robtherobber•29m ago•21 comments

Python Data Science Handbook

https://jakevdp.github.io/PythonDataScienceHandbook/
83•cl3misch•4h ago•18 comments

YesNotice

https://infinitedigits.co/docs/software/yesnotice/
43•surprisetalk•1w ago•23 comments

A series of vignettes from my childhood and early career

https://www.jasonscheirer.com/weblog/vignettes/
86•absqueued•4h ago•51 comments

Apple Releases Open Weights Video Model

https://starflow-v.github.io
341•vessenes•11h ago•108 comments

What will enter the public domain in 2026?

https://publicdomainreview.org/features/entering-the-public-domain/2026/
394•herbertl•13h ago•251 comments

YouTube increases FreeBASIC performance (2019)

https://freebasic.net/forum/viewtopic.php?t=27927
120•giancarlostoro•2d ago•23 comments

Comparing AWS Lambda ARM64 vs. x86_64 Performance Across Runtimes in Late 2025

https://chrisebert.net/comparing-aws-lambda-arm64-vs-x86_64-performance-across-multiple-runtimes-...
91•hasanhaja•7h ago•40 comments

I Designed and Printed a Custom Nose Guard to Help My Dog with DLE

https://snoutcover.com/billie-story
12•ragswag•2d ago•1 comments

DeepSeek-v3.2: Pushing the frontier of open large language models [pdf]

https://huggingface.co/deepseek-ai/DeepSeek-V3.2/resolve/main/assets/paper.pdf
906•pretext•1d ago•432 comments

India orders smartphone makers to preload state-owned cyber safety app

https://www.reuters.com/sustainability/boards-policy-regulation/india-orders-mobile-phones-preloa...
828•jmsflknr•1d ago•609 comments

Beej's Guide to Learning Computer Science

https://beej.us/guide/bglcs/
266•amruthreddi•2d ago•96 comments

Fallout 2's Chris Avellone describes his game design philosophy

https://arstechnica.com/gaming/2025/12/fallout-2-designer-chris-avellone-recalls-his-first-forays...
20•LaSombra•56m ago•3 comments

Zig's new plan for asynchronous programs

https://lwn.net/SubscriberLink/1046084/4c048ee008e1c70e/
69•messe•2h ago•53 comments

An LED panel that shows the aviation around you

https://github.com/AxisNimble/TheFlightWall_OSS
58•yzydserd•5d ago•11 comments

How Brian Eno Created Ambient 1: Music for Airports (2019)

https://reverbmachine.com/blog/deconstructing-brian-eno-music-for-airports/
138•dijksterhuis•9h ago•73 comments

Proximity to coworkers increases long-run development, lowers short-term output (2023)

https://pallais.scholars.harvard.edu/publications/power-proximity-coworkers-training-tomorrow-or-...
107•delichon•2h ago•73 comments

Show HN: RunMat – runtime with auto CPU/GPU routing for dense math

https://github.com/runmat-org/runmat
9•nallana•1h ago•2 comments

Lazier Binary Decision Diagrams for set-theoretic types

https://elixir-lang.org/blog/2025/12/02/lazier-bdds-for-set-theoretic-types/
21•tvda•4h ago•2 comments

Rootless Pings in Rust

https://bou.ke/blog/rust-ping/
95•bouk•9h ago•68 comments

Tom Stoppard has died

https://www.bbc.com/news/articles/c74xe49q7vlo
149•mstep•2d ago•46 comments

Reverse math shows why hard problems are hard

https://www.quantamagazine.org/reverse-mathematics-illuminates-why-hard-problems-are-hard-20251201/
147•gsf_emergency_6•14h ago•30 comments

After Windows Update, Password icon invisible, click where it used to be

https://support.microsoft.com/en-us/topic/august-29-2025-kb5064081-os-build-26100-5074-preview-3f...
142•zdw•14h ago•148 comments

Man unexpectedly cured of HIV after stem cell transplant

https://www.newscientist.com/article/2506595-man-unexpectedly-cured-of-hiv-after-stem-cell-transp...
130•doener•6h ago•25 comments