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.

Ghostty is leaving GitHub

https://mitchellh.com/writing/ghostty-leaving-github
2308•WadeGrimridge•11h ago•685 comments

Bugs Rust won't catch

https://corrode.dev/blog/bugs-rust-wont-catch/
184•lwhsiao•5h ago•56 comments

HardenedBSD Is Now Officially on Radicle

https://hardenedbsd.org/article/shawn-webb/2026-04-26/hardenedbsd-officially-radicle
12•lftherios•47m ago•2 comments

How ChatGPT serves ads

https://www.buchodi.com/how-chatgpt-serves-ads-heres-the-full-attribution-loop/
276•lmbbuchodi•7h ago•190 comments

Before GitHub

https://lucumr.pocoo.org/2026/4/28/before-github/
402•mlex•10h ago•120 comments

Show HN: Auto-Architecture: Karpathy's Loop, pointed at a CPU

https://github.com/FeSens/auto-arch-tournament/blob/main/docs/auto-arch-tournament-blog-post.md
96•fesens•14h ago•23 comments

Withnail's Coat and I

https://ontherow.substack.com/p/withnails-coat-and-i
31•apollinaire•1d ago•0 comments

We still don't have a more precise value for "Big G"

https://arstechnica.com/science/2026/04/we-still-dont-have-a-more-precise-value-for-big-g/
39•rbanffy•1d ago•18 comments

OpenAI models coming to Amazon Bedrock: Interview with OpenAI and AWS CEOs

https://stratechery.com/2026/an-interview-with-openai-ceo-sam-altman-and-aws-ceo-matt-garman-abou...
230•translocator•12h ago•81 comments

Gallium oxide electronics withstand extreme cold

https://discovery.kaust.edu.sa/en/article/26858/gallium-oxide-electronics-withstand-extreme-cold/
14•giuliomagnifico•1d ago•0 comments

I won a championship that doesn't exist

https://ron.stoner.com/How_I_Won_a_Championship_That_Doesnt_Exist/
134•SEJeff•10h ago•75 comments

Regression: malware reminder on every read still causes subagent refusals

https://github.com/anthropics/claude-code/issues/49363
197•thomashobohm•7h ago•95 comments

GitHub RCE Vulnerability: CVE-2026-3854 Breakdown

https://www.wiz.io/blog/github-rce-vulnerability-cve-2026-3854
317•bo0tzz•15h ago•74 comments

Apple CMF (Color-Matching Functions) 2026

https://www.lttlabs.com/articles/2026/04/11/apple-studio-display-xdr-display-testing-results
50•HeyMeco•7h ago•1 comments

Behavioral timescale synaptic plasticity rewires the brain after an experience

https://www.quantamagazine.org/a-new-type-of-neuroplasticity-rewires-the-brain-after-a-single-exp...
89•ibobev•1d ago•2 comments

Who owns the code Claude Code wrote?

https://legallayer.substack.com/p/who-owns-the-claude-code-wrote
351•senaevren•20h ago•355 comments

Germany Overtakes US in Ammunition Production Capacity

https://www.newsweek.com/germany-overtakes-us-in-ammunition-production-capacity-11886409
13•vrganj•39m ago•3 comments

Intel Arc Pro B70 Review

https://www.pugetsystems.com/labs/articles/intel-arc-pro-b70-review/
139•zdw•5d ago•85 comments

Your phone is about to stop being yours

https://keepandroidopen.org/en/
1258•doener•16h ago•575 comments

When the Internet Was a Place

https://www.frontporchrepublic.com/2025/09/when-the-internet-was-a-place/
34•herbertl•5h ago•7 comments

Warp is now open-source

https://www.warp.dev/blog/warp-is-now-open-source
237•meetpateltech•15h ago•68 comments

Talkie: a 13B vintage language model from 1930

https://talkie-lm.com/introducing-talkie
668•jekude•1d ago•274 comments

Nonlinearity Affects a Pendulum

https://www.johndcook.com/blog/2026/04/24/nonlinear-pendulum/
26•ibobev•1d ago•4 comments

Localsend: An open-source cross-platform alternative to AirDrop

https://github.com/localsend/localsend
798•bilsbie•19h ago•244 comments

Show HN: Drive any macOS app in the background without stealing the cursor

https://github.com/trycua/cua
90•frabonacci•15h ago•28 comments

I have officially retired from Emacs

https://nullprogram.com/blog/2026/04/26/
207•Fudgel•3d ago•146 comments

An update on GitHub availability

https://github.blog/news-insights/company-news/an-update-on-github-availability/
358•salkahfi•21h ago•228 comments

UAE to leave OPEC

https://www.ft.com/content/8c354f2d-3e66-47f1-aad4-9b4aa30e386d
400•bazzmt•18h ago•539 comments

CJIT: C, Just in Time

https://dyne.org/cjit/
113•smartmic•12h ago•29 comments

VibeVoice: Open-source frontier voice AI

https://github.com/microsoft/VibeVoice
348•tosh•19h ago•169 comments