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•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.

Netflix to Acquire Warner Bros

https://about.netflix.com/en/news/netflix-to-acquire-warner-bros
462•meetpateltech•2h ago•326 comments

Most technical problems are people problems

https://blog.joeschrag.com/2023/11/most-technical-problems-are-really.html
66•mooreds•1h ago•57 comments

Making RSS More Fun

https://matduggan.com/making-rss-more-fun/
35•salmon•1h ago•14 comments

UniFi 5G

https://blog.ui.com/article/introducing-unifi-5g
200•janandonly•7h ago•149 comments

Netflix’s AV1 Journey: From Android to TVs and Beyond

https://netflixtechblog.com/av1-now-powering-30-of-netflix-streaming-02f592242d80
428•CharlesW•14h ago•210 comments

BMW PHEV: Safety fuse replacement is extremely expensive

https://evclinic.eu/2025/12/04/2021-phev-bmw-ibmucp-21f37e-post-crash-recovery-when-eu-engineerin...
318•mikelabatt•13h ago•307 comments

Emerge Career (YC S22) Is Hiring

https://www.ycombinator.com/companies/emerge-career/jobs/qQhLEmC-founding-design-engineer
1•gabesaruhashi•33m ago

Nimony (Nim 3.0) Design Principles

https://nim-lang.org/araq/nimony.html
48•andsoitis•3d ago•16 comments

I have been writing a niche history blog for 15 years

https://resobscura.substack.com/p/why-i-have-been-writing-a-niche-history
170•benbreen•19h ago•26 comments

Trick users and bypass warnings – Modern SVG Clickjacking attacks

https://lyra.horse/blog/2025/12/svg-clickjacking/
253•spartanatreyu•14h ago•36 comments

Ephemeral Infrastructure: Why Short-Lived Is a Good Thing

https://lukasniessen.medium.com/ephemeral-infrastructure-why-short-lived-is-a-good-thing-2cf26afd...
10•birdculture•5d ago•2 comments

After 40 years of adventure games, Ron Gilbert pivots to outrunning Death

https://arstechnica.com/gaming/2025/12/after-40-years-of-adventure-games-ron-gilbert-pivots-to-ou...
126•mikhael•3d ago•51 comments

Sugars, Gum, Stardust Found in NASA's Asteroid Bennu Samples

https://www.nasa.gov/missions/osiris-rex/sugars-gum-stardust-found-in-nasas-asteroid-bennu-samples/
46•jnord•2h ago•9 comments

Show HN: Tacopy – Tail Call Optimization for Python

https://github.com/raaidrt/tacopy
61•raaid-rt•5d ago•23 comments

Stacked Diffs with git rebase —onto

https://dineshpandiyan.com/blog/stacked-diffs-with-rebase-onto/
87•flexdinesh•4d ago•63 comments

Kenyan court declares law banning seed sharing unconstitutional

https://apnews.com/article/kenya-seed-sharing-law-ruling-ad4df5a364299b3a9f8515c0f52d5f80
135•thunderbong•5h ago•45 comments

Influential study on glyphosate safety retracted 25 years after publication

https://www.lemonde.fr/en/environment/article/2025/12/03/influential-study-on-glyphosate-safety-r...
27•isolli•1h ago•3 comments

New 3D scan reveals a hidden network of moai carvers on Easter Island

https://www.sciencedaily.com/releases/2025/11/251130050717.htm
3•saikatsg•4d ago•0 comments

CSS now has an if() conditional function

https://caniuse.com/?search=if
204•aanthonymax•5d ago•155 comments

Transparent leadership beats servant leadership

https://entropicthoughts.com/transparent-leadership-beats-servant-leadership
474•ibobev•1d ago•211 comments

How elites could shape mass preferences as AI reduces persuasion costs

https://arxiv.org/abs/2512.04047
617•50kIters•1d ago•570 comments

Show HN: Kraa – Writing App for Everything

https://kraa.io/about
24•levmiseri•1d ago•16 comments

Multivox: Volumetric Display

https://github.com/AncientJames/multivox
300•jk_tech•21h ago•41 comments

We gave 5 LLMs $100K to trade stocks for 8 months

https://www.aitradearena.com/research/we-ran-llms-for-8-months
270•cheeseblubber•15h ago•224 comments

NeurIPS 2025 Best Paper Awards

https://blog.neurips.cc/2025/11/26/announcing-the-neurips-2025-best-paper-awards/
137•ivansavz•13h ago•20 comments

At IT School with Apple Lisa

https://blisscast.wordpress.com/2024/06/04/apple-lisa-gui-wonderland-3/
37•fabiojava•1w ago•8 comments

Show HN: I was reintroduced to computers: Raspberry Pi

https://airoboticist.blog/2025/12/01/i-was-reintroduced-to-computers-raspberry-pi/
52•observer2022•3d ago•14 comments

StardustOS: Library operating system for building light-weight Unikernels

https://github.com/StardustOS
95•transpute•15h ago•6 comments

CUDA-l2: Surpassing cuBLAS performance for matrix multiplication through RL

https://github.com/deepreinforce-ai/CUDA-L2
121•dzign•17h ago•14 comments

Fighting the age-gated internet

https://www.wired.com/story/age-verification-is-sweeping-the-us-activists-are-fighting-back/
244•geox•1d ago•237 comments