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

Comments

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

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

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

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

Discord will require a face scan or ID for full access next month

https://www.theverge.com/tech/875309/discord-age-verification-global-roll-out
1168•x01•10h ago•1162 comments

What Functional Programmers Get Wrong About Systems

https://www.iankduncan.com/engineering/2026-02-09-what-functional-programmers-get-wrong-about-sys...
25•subset•1h ago•3 comments

The shadowy world of abandoned oil tankers

https://www.bbc.com/news/articles/cddg885344do
43•1659447091•2h ago•9 comments

Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

https://github.com/jim11662418/ESP8266_WiFi_Analog_Clock
387•tokyobreakfast•9h ago•132 comments

Why is the sky blue?

https://explainers.blog/posts/why-is-the-sky-blue/
400•udit99•9h ago•145 comments

Stop Using Icons in Data Tables

https://medium.com/@codythistleward/stop-using-icons-in-data-tables-7537af18ea0d
59•ctward•4d ago•18 comments

Hard-braking events as indicators of road segment crash risk

https://research.google/blog/hard-braking-events-as-indicators-of-road-segment-crash-risk/
199•aleyan•8h ago•308 comments

LiftKit – UI where "everything derives from the golden ratio"

https://www.chainlift.io/liftkit
46•peter_d_sherman•3h ago•16 comments

How I've run major projects (2025)

https://www.benkuhn.net/pjm/
96•thomascountz•6d ago•12 comments

Game Theory Patterns at Work (2016)

https://daeus.blog/2026/01/18/game-theory-patterns-at-work/
22•kurinikku•5h ago•1 comments

Expansion Microscopy Has Transformed How We See the Cellular World

https://www.quantamagazine.org/expansion-microscopy-has-transformed-how-we-see-the-cellular-world...
43•sohkamyung•4d ago•3 comments

Everyone’s building “async agents,” but almost no one can define them

https://www.omnara.com/blog/what-is-an-async-agent-really
19•kmansm27•7h ago•18 comments

UEFI Bindings for JavaScript

https://codeberg.org/smnx/promethee
199•ananas-dev•11h ago•100 comments

Sandboxels

https://neal.fun/sandboxels/
148•2sf5•10h ago•27 comments

Game Boy Advance Audio Interpolation

https://jsgroth.dev/blog/posts/gba-audio-interpolation/
67•ibobev•7h ago•28 comments

F# 10

https://devblogs.microsoft.com/dotnet/introducing-fsharp-10/
63•tosh•5d ago•10 comments

Thoughts on Generating C

https://wingolog.org/archives/2026/02/09/six-thoughts-on-generating-c
195•ingve•11h ago•60 comments

Show HN: Algorithmically finding the longest line of sight on Earth

https://alltheviews.world
370•tombh•15h ago•150 comments

Information Is Beautiful

https://informationisbeautiful.net/
108•surprisetalk•6d ago•11 comments

Data exfil from agents in messaging apps

https://www.promptarmor.com/resources/llm-data-exfiltration-via-url-previews-(with-openclaw-examp...
10•sarelta•5h ago•4 comments

Sleeper Shells: Attackers Are Planting Dormant Backdoors in Ivanti EPMM

https://defusedcyber.com/ivanti-epmm-sleeper-shells-403jsp
126•waihtis•10h ago•45 comments

Show HN: VillageSQL = MySQL and Extensions

https://github.com/villagesql/villagesql-server
12•metzby•4d ago•1 comments

America has a tungsten problem

https://www.noleary.com/blog/posts/1
118•noleary•4h ago•120 comments

Ask HN: What are you working on? (February 2026)

256•david927•1d ago•872 comments

The Traffic Mimes of Bogotá

https://www.atlasobscura.com/articles/traffic-mimes-of-colombia
90•IgorPartola•4d ago•20 comments

Pg-dev-container is a ready-to-run VS Code development container for PostgreSQL

https://github.com/jnidzwetzki/pg-dev-container
29•mariuz•4d ago•6 comments

Like Game-of-Life, but on Growing Graphs, with WASM and WebGL

https://znah.net/graphs/
169•znah•1d ago•24 comments

What's the Entropy of a Random Integer?

https://quomodocumque.wordpress.com/2026/02/03/whats-the-entropy-of-a-random-integer/
38•sebg•4d ago•6 comments

Another GitHub outage in the same day

https://www.githubstatus.com/incidents/lcw3tg2f6zsd
263•Nezteb•6h ago•195 comments

Super Bowl Ad for Ring Cameras Touted AI Surveillance Network

https://truthout.org/articles/super-bowl-ad-for-ring-cameras-touted-ai-surveillance-network/
155•cdrnsf•4h ago•84 comments