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

Comments

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

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

Multiprocessing all the way!

emmelaich•11mo ago
(2021)

Good article!

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

HERMES.md: Anthropic bug causes $200 extra charge, refuses refund

https://github.com/anthropics/claude-code/issues/53262
520•homebrewer•1h ago•191 comments

Zed 1.0

https://zed.dev/blog/zed-1-0
1191•salkahfi•5h ago•384 comments

Copy Fail – CVE-2026-31431

https://copy.fail/
219•unsnap_biceps•2h ago•107 comments

Kyoto cherry blossoms now bloom earlier than at any point in 1,200 years

https://jivx.com/kyoto-bloom
55•momentmaker•58m ago•8 comments

FastCGI: 30 years old and still the better protocol for reverse proxies

https://www.agwa.name/blog/post/fastcgi_is_the_better_protocol_for_reverse_proxies
156•agwa•4h ago•38 comments

Cursor Camp

https://neal.fun/cursor-camp/
301•bpierre•4h ago•56 comments

Ramp's Sheets AI Exfiltrates Financials

https://www.promptarmor.com/resources/ramps-sheets-ai-exfiltrates-financials
54•takira•2h ago•17 comments

We need a federation of forges

https://blog.tangled.org/federation/
454•icy•6h ago•279 comments

Laws of UX

https://lawsofux.com/
81•bobbiechen•3h ago•13 comments

Third Editor Fired in Elsevier's Citation Cartel Crackdown

https://www.chrisbrunet.com/p/third-editor-fired-in-elseviers-citation
152•RigbyTaro•4h ago•47 comments

Why I still reach for Lisp and Scheme instead of Haskell

https://jointhefreeworld.org/blog/articles/lisps/why-i-still-reach-for-scheme-instead-of-haskell/...
72•jjba23•11h ago•13 comments

An open-source stethoscope that costs between $2.5 and $5 to produce

https://github.com/GliaX/Stethoscope
117•0x54MUR41•5h ago•54 comments

Soft launch of open-source code platform for government

https://www.nldigitalgovernment.nl/news/soft-launch-for-government-open-source-code-platform/
476•e12e•11h ago•113 comments

Online age verification is the hill to die on

https://x.com/GlennMeder/status/2049088498163216560
513•Cider9986•4h ago•339 comments

OpenTrafficMap

https://opentrafficmap.org/
11•moooo99•41m ago•1 comments

How to Build the Future: Demis Hassabis [video]

https://www.youtube.com/watch?v=JNyuX1zoOgU
45•sandslash•6h ago•21 comments

Bugs Rust won't catch

https://corrode.dev/blog/bugs-rust-wont-catch/
593•lwhsiao•18h ago•322 comments

Maryland becomes first state to ban surveillance pricing in grocery stores

https://www.theguardian.com/technology/2026/apr/29/maryland-grocery-stores-ban-surveillance-pricing
147•01-_-•3h ago•108 comments

Show HN: A new benchmark for testing LLMs for deterministic outputs

https://interfaze.ai/blog/introducing-structured-output-benchmark
37•khurdula•4h ago•14 comments

Mistral Medium 3.5

https://mistral.ai/news/vibe-remote-agents-mistral-medium-3-5
318•meetpateltech•5h ago•173 comments

Letting AI play my game – building an agentic test harness to help play-testing

https://blog.jeffschomay.com/letting-ai-play-my-game
107•jschomay•7h ago•22 comments

Virtualisation on Apple Silicon Macs is different

https://eclecticlight.co/2026/04/29/virtualisation-on-apple-silicon-macs-is-different/
35•zdw•3h ago•8 comments

Stardex Is Hiring a Founding Customer Success Lead

https://www.ycombinator.com/companies/stardex/jobs/6GCK1HC-founding-customer-success-lead
1•sanketc•8h ago

Ghostty is leaving GitHub

https://mitchellh.com/writing/ghostty-leaving-github
3280•WadeGrimridge•1d ago•965 comments

At Protocol: Building the Social Internet

https://atproto.com/
33•resiros•4h ago•12 comments

GitHub – DOS 1.0: Transcription of Tim Paterson's DOS Printouts

https://github.com/DOS-History/Paterson-Listings
97•s2l•9h ago•5 comments

Linux 7.0 Broke PostgreSQL: The Preemption Regression Explained

https://read.thecoder.cafe/p/linux-broke-postgresql
110•0xKelsey•5h ago•54 comments

Pentagon spending on drones jumps from $225M to $55B in one year

https://www.foxnews.com/politics/pentagon-jumps-from-225m-55b-drones-cheap-attacks-overwhelm-us-d...
10•anigbrowl•26m ago•4 comments

Before GitHub

https://lucumr.pocoo.org/2026/4/28/before-github/
632•mlex•23h ago•208 comments

Improving ICU handovers by learning from Scuderia Ferrari F1 team

https://healthmanagement.org/c/icu/IssueArticle/improving-handovers-by-learning-from-scuderia-fer...
53•embedding-shape•7h ago•50 comments