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

Comments

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

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

Multiprocessing all the way!

emmelaich•8mo ago
(2021)

Good article!

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

GPTZero finds 100 new hallucinations in NeurIPS 2025 accepted papers

https://gptzero.me/news/neurips/
686•segmenta•9h ago•375 comments

Show HN: isometric.nyc – giant isometric pixel art map of NYC

https://cannoneyed.com/isometric-nyc/
622•cannoneyed•8h ago•152 comments

Capital One to acquire Brex for $5.15B

https://www.reuters.com/legal/transactional/capital-one-buy-fintech-firm-brex-515-billion-deal-20...
97•personjerry•3h ago•62 comments

Why does SSH send 100 packets per keystroke?

https://eieio.games/blog/ssh-sends-100-packets-per-keystroke/
267•eieio•5h ago•178 comments

I was banned from Claude for scaffolding a Claude.md file?

https://hugodaniel.com/posts/claude-code-banned-me/
324•hugodan•6h ago•260 comments

Why medieval city-builder video games are historically inaccurate (2020)

https://www.leidenmedievalistsblog.nl/articles/why-medieval-city-builder-video-games-are-historic...
30•benbreen•56m ago•7 comments

100x (YC S22) Is Hiring a Technical Content Creator

https://100x.bot/creator-program
1•shardullavekar•18m ago

Qwen3-TTS family is now open sourced: Voice design, clone, and generation

https://qwen.ai/blog?id=qwen3tts-0115
459•Palmik•11h ago•138 comments

Improving the usability of C libraries in Swift

https://www.swift.org/blog/improving-usability-of-c-libraries-in-swift/
27•timsneath•1h ago•0 comments

Turso is an in-process SQL database, compatible with SQLite

https://github.com/tursodatabase/turso
23•marklit•3d ago•8 comments

Anthropic Economic Index economic primitives

https://www.anthropic.com/research/anthropic-economic-index-january-2026-report
45•malshe•3h ago•34 comments

Composing APIs and CLIs in the LLM era

https://walters.app/blog/composing-apis-clis
27•zerf•8h ago•4 comments

My first year in sales as technical founder

https://www.fabiandietrich.com/blog/first-year-in-sales.html
66•f3b5•5d ago•24 comments

Douglas Adams on the English–American cultural divide over "heroes"

https://shreevatsa.net/post/douglas-adams-cultural-divide/
314•speckx•11h ago•342 comments

Compiling Scheme to WebAssembly

https://eli.thegreenplace.net/2026/compiling-scheme-to-webassembly/
64•chmaynard•5d ago•10 comments

Vibe a Guitar Pedal

https://polyend.com/endless/
7•mulhoon•49m ago•4 comments

CSS Optical Illusions

https://alvaromontoro.com/blog/68091/css-optical-illusions
132•ulrischa•7h ago•12 comments

'Active' sitting is better for brain health: review of studies

https://www.sciencealert.com/not-all-sitting-is-equal-one-type-was-just-linked-to-better-brain-he...
67•mikhael•6h ago•29 comments

Your app subscription is now my weekend project

https://rselbach.com/your-sub-is-now-my-weekend-project
203•robteix•4d ago•159 comments

Recent discoveries on the acquisition of the highest levels of human performance

https://www.science.org/doi/abs/10.1126/science.adt7790
100•colincooke•7h ago•46 comments

Metastable Failures and Interactions Between Systems

https://charap.co/on-metastable-failures-and-interactions-between-systems/
5•PaulHoule•1h ago•0 comments

FIPS dependencies and prebuilt binaries

https://www.docker.com/blog/fips-dependencies-and-prebuilt-binaries/
20•LaurentGoderre•2h ago•4 comments

Rate Limiting, Cells, and GCRA

https://brandur.org/rate-limiting
4•panic•6d ago•0 comments

'Askers' vs. 'Guessers' (2010)

https://www.theatlantic.com/national/2010/05/askers-vs-guessers/340891/
78•BoorishBears•13h ago•53 comments

Extracting a UART Password via SPI Flash Instruction Tracing

https://zuernerd.github.io/blog/2026/01/07/switch-password.html
34•Eduard•3h ago•6 comments

Tree-sitter vs. Language Servers

https://lambdaland.org/posts/2026-01-21_tree-sitter_vs_lsp/
207•ashton314•10h ago•55 comments

In Europe, wind and solar overtake fossil fuels

https://e360.yale.edu/digest/europe-wind-solar-fossil-fuels
473•speckx•11h ago•492 comments

ICE detains five-year-old Minnesota boy arriving home, say school officials

https://www.theguardian.com/us-news/2026/jan/21/ice-arrests-five-year-old-boy-minnesota
11•0x54MUR41•16m ago•0 comments

Keeping 20k GPUs healthy

https://modal.com/blog/gpu-health
85•jxmorris12•4d ago•37 comments

A Year of 3D Printing

https://brookehatton.com/blog/making/a-year-of-3d-printing/
86•nindalf•5d ago•87 comments