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

Comments

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

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

Multiprocessing all the way!

emmelaich•7mo ago
(2021)

Good article!

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

Is Mozilla trying hard to kill itself?

https://infosec.press/brunomiguel/is-mozilla-trying-hard-to-kill-itself
193•pabs3•1h ago•137 comments

AI will make formal verification go mainstream

https://martin.kleppmann.com/2025/12/08/ai-formal-verification.html
643•evankhoury•13h ago•333 comments

TLA+ Modeling Tips

http://muratbuffalo.blogspot.com/2025/12/tla-modeling-tips.html
34•birdculture•2h ago•2 comments

alpr.watch

https://alpr.watch/
794•theamk•18h ago•373 comments

No Graphics API

https://www.sebastianaaltonen.com/blog/no-graphics-api
659•ryandrake•15h ago•115 comments

Announcing the Beta release of ty

https://astral.sh/blog/ty
612•gavide•14h ago•114 comments

Playing Santa Does Things to a Man. What It Did to Bob Rutan Was Even Stranger

https://www.esquire.com/lifestyle/a69597294/santaland-bob-rutan/
6•Lightbody•3d ago•0 comments

No AI* Here – A Response to Mozilla's Next Chapter

https://www.waterfox.com/blog/no-ai-here-response-to-mozilla/
352•MrAlex94•12h ago•206 comments

GPT Image 1.5

https://openai.com/index/new-chatgpt-images-is-here/
444•charlierguo•16h ago•206 comments

Pricing Changes for GitHub Actions

https://resources.github.com/actions/2026-pricing-changes-for-github-actions/
665•kevin-david•17h ago•728 comments

AI's real superpower: consuming, not creating

https://msanroman.io/blog/ai-consumption-paradigm
10•firefoxd•2h ago•3 comments

Annual Production of 1/72 (22mm) scale plastic soldiers, 1958-2025

https://plasticsoldierreview.com/ShowFeature.aspx?id=27
39•YeGoblynQueenne•3d ago•23 comments

Show HN: I built a WebMIDI sequencer to control my hardware synths

https://www.simplychris.ai/droplets
20•simplychris•5d ago•6 comments

Subsets (YC S23) is hiring engineers in Copenhagen, Denmark

https://www.workatastartup.com/companies/subsets
1•Oliverbrandt•4h ago

VA Linux: The biggest dotcom IPO

https://dfarq.homeip.net/va-linux-the-biggest-dotcom-ipo/
63•giuliomagnifico•5d ago•22 comments

40 percent of fMRI signals do not correspond to actual brain activity

https://www.tum.de/en/news-and-events/all-news/press-releases/details/40-percent-of-mri-signals-d...
450•geox•21h ago•179 comments

Thin desires are eating life

https://www.joanwestenberg.com/thin-desires-are-eating-your-life/
516•mitchbob•1d ago•185 comments

Mozilla appoints new CEO Anthony Enzor-Demeo

https://blog.mozilla.org/en/mozilla/leadership/mozillas-next-chapter-anthony-enzor-demeo-new-ceo/
517•recvonline•21h ago•773 comments

I ported JustHTML from Python to JavaScript with Codex CLI and GPT-5.2 in hours

https://simonwillison.net/2025/Dec/15/porting-justhtml/
169•pbowyer•12h ago•101 comments

P: Formal Modeling and Analysis of Distributed (Event-Driven) Systems

https://github.com/p-org/P
10•Davidbrcz•3h ago•1 comments

Introduction to Software Development Tooling (2024)

https://bernsteinbear.com/isdt/
78•vismit2000•9h ago•10 comments

Japan to revise romanization rules for first time in 70 years

https://www.japantimes.co.jp/news/2025/08/21/japan/panel-hepburn-style-romanization/
204•rgovostes•1d ago•180 comments

Show HN: Titan – JavaScript-first framework that compiles into a Rust server

https://www.npmjs.com/package/@ezetgalaxy/titan
38•soham_byte•6d ago•21 comments

Living Particle System

https://creative-art-points.vercel.app/
7•lovegrenoble•4d ago•0 comments

Sega Channel: VGHF Recovers over 100 Sega Channel ROMs (and More)

https://gamehistory.org/segachannel/
257•wicket•21h ago•41 comments

The World Happiness Report is beset with methodological problems

https://yaschamounk.substack.com/p/the-world-happiness-report-is-a-sham
134•thatoneengineer•1d ago•167 comments

Dafny: Verification-Aware Programming Language

https://dafny.org/
78•handfuloflight•12h ago•27 comments

Nvidia Nemotron 3 Family of Models

https://research.nvidia.com/labs/nemotron/Nemotron-3/
214•ewt-nv•1d ago•41 comments

A Guide to Magnetizing N48 Magnets in Ansys Maxwell

https://blog.ozeninc.com/resources/from-datasheet-to-demagnetization-a-guide-to-magnetizing-n48-m...
25•peter_d_sherman•7h ago•1 comments

Various locale mismatch scenarios in Windows clipboard text format synthesis

https://devblogs.microsoft.com/oldnewthing/20251211-37/?p=111858
18•ibobev•4d ago•7 comments