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.

Ghostty is now non-profit

https://mitchellh.com/writing/ghostty-non-profit
389•vrnvu•2h ago•73 comments

Everyone in Seattle hates AI

https://jonready.com/blog/posts/everyone-in-seattle-hates-ai.html
186•mips_avatar•1h ago•175 comments

Reverse engineering a $1B Legal AI tool exposed 100k+ confidential files

https://alexschapiro.com/security/vulnerability/2025/12/02/filevine-api-100k
292•bearsyankees•3h ago•82 comments

Valve reveals it’s the architect behind a push to bring Windows games to Arm

https://www.theverge.com/report/820656/valve-interview-arm-gaming-steamos-pierre-loup-griffais
148•evolve2k•1d ago•235 comments

1D Conway's Life glider found, 3.7B cells long

https://conwaylife.com/forums/viewtopic.php?&p=222136#p222136
199•nooks•3h ago•63 comments

RCE Vulnerability in React and Next.js

https://github.com/vercel/next.js/security/advisories/GHSA-9qr9-h5gf-34mp
241•rayhaanj•5h ago•74 comments

Lie groups are crucial to some of the most fundamental theories in physics

https://www.quantamagazine.org/what-are-lie-groups-20251203/
40•ibobev•1h ago•12 comments

Micron Announces Exit from Crucial Consumer Business

https://investors.micron.com/news-releases/news-release-details/micron-announces-exit-crucial-con...
82•simlevesque•2h ago•18 comments

Launch HN: Phind 3 (YC S22) – Every answer is a mini-app

51•rushingcreek•3h ago•39 comments

Prompt Injection via Poetry

https://www.wired.com/story/poems-can-trick-ai-into-helping-you-make-a-nuclear-weapon/
34•bumbailiff•3h ago•22 comments

Why are my headphones buzzing whenever I run my game?

https://alexene.dev/2025/12/03/Why-do-my-headphones-buzz-when-i-run-my-game.html
96•pacificat0r•5h ago•87 comments

How to Synthesize a House Loop

https://loopmaster.xyz/tutorials/how-to-synthesize-a-house-loop
119•stagas•6d ago•38 comments

Apple Desktop Bus Protocol (2021)

https://www.lopaciuk.eu/2021/03/26/apple-adb-protocol.html
31•dcminter•3d ago•7 comments

Rocketable (YC W25) is hiring a founding engineer to automate software companies

https://www.ycombinator.com/companies/rocketable/jobs/CArgzmX-founding-engineer-automation-platform
1•alanwells•4h ago

MinIO is now in maintenance-mode

https://github.com/minio/minio/commit/27742d469462e1561c776f88ca7a1f26816d69e2
316•hajtom•5h ago•181 comments

R packages for data science

https://tidyverse.org/
26•cl3misch•1w ago•6 comments

You can't fool the optimizer

https://xania.org/202512/03-more-adding-integers
212•HeliumHydride•8h ago•118 comments

Show HN: Fresh – A new terminal editor built in Rust

https://sinelaw.github.io/fresh/
52•_sinelaw_•6h ago•32 comments

“Captain Gains” on Capitol Hill

https://www.nber.org/papers/w34524
744•mhb•7h ago•456 comments

Anthropic taps IPO lawyers as it races OpenAI to go public

https://www.ft.com/content/3254fa30-5bdb-4c30-8560-7cd7ebbefc5f
214•GeorgeWoff25•11h ago•176 comments

GSWT: Gaussian Splatting Wang Tiles

https://yunfan.zone/gswt_webpage/
69•klaussilveira•6h ago•21 comments

Are we repeating the telecoms crash with AI datacenters?

https://martinalderson.com/posts/are-we-really-repeating-the-telecoms-crash-with-ai-datacenters/
130•davedx•9h ago•89 comments

A Look at Rust from 2012

https://purplesyringa.moe/blog/a-look-at-rust-from-2012/
140•todsacerdoti•1w ago•50 comments

Formally verifying Advent of Code using Dijkstra's program construction

https://haripm.com/blog/aoc-day-3-without-thinking/
7•seafoamteal•2h ago•0 comments

Helldivers 2 devs slash install size from 154GB to 23GB

https://www.tomshardware.com/video-games/pc-gaming/helldivers-2-install-size-slashed-from-154gb-t...
336•doener•7h ago•216 comments

Shrinking While Linking

https://www.tweag.io/blog/2025-11-27-shrinking-static-libs/
15•ingve•3d ago•6 comments

Zig quits GitHub, says Microsoft's AI obsession has ruined the service

https://www.theregister.com/2025/12/02/zig_quits_github_microsoft_ai_obsession/
882•Brajeshwar•13h ago•503 comments

Interview with RollerCoaster Tycoon's Creator, Chris Sawyer (2024)

https://medium.com/atari-club/interview-with-rollercoaster-tycoons-creator-chris-sawyer-684a0efb0f13
263•areoform•16h ago•47 comments

The writing is on the wall for handwriting recognition

https://newsletter.dancohen.org/archive/the-writing-is-on-the-wall-for-handwriting-recognition/
175•speckx•1w ago•97 comments

Teaching an LLM a Niche Diagraming Language

https://www.huy.rocks/everyday/12-01-2025-ai-teaching-an-llm-a-niche-diagraming-language
9•todsacerdoti•2h ago•0 comments