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.

Netflix to Acquire Warner Bros

https://about.netflix.com/en/news/netflix-to-acquire-warner-bros
1512•meetpateltech•15h ago•1165 comments

Self-hosting my photos with Immich

https://michael.stapelberg.ch/posts/2025-11-29-self-hosting-photos-with-immich/
74•birdculture•5d ago•27 comments

I cracked a $200 software protection with xcopy

https://www.ud2.rip/blog/enigma-protector/
28•vmfunc•1h ago•13 comments

Cloudflare outage on December 5, 2025

https://blog.cloudflare.com/5-december-2025-outage/
579•meetpateltech•12h ago•441 comments

Leaving Intel

https://www.brendangregg.com/blog//2025-12-05/leaving-intel.html
145•speckx•6h ago•60 comments

Albert Michelson's Harmonic Analyzer (2014) [pdf]

https://engineerguy.com/fourier/pdfs/albert-michelsons-harmonic-analyzer.pdf
8•o4c•55m ago•2 comments

Extra Instructions Of The 65XX Series CPU (1996)

http://www.ffd2.com/fridge/docs/6502-NMOS.extra.opcodes
32•embedding-shape•3h ago•5 comments

Nook Browser

https://browsewithnook.com
7•ray__•44m ago•3 comments

Gemini 3 Pro: the frontier of vision AI

https://blog.google/technology/developers/gemini-3-pro-vision/
378•xnx•12h ago•195 comments

Adenosine on the common path of rapid antidepressant action: The coffee paradox

https://genomicpress.kglmeridian.com/view/journals/brainmed/aop/article-10.61373-bm025c.0134/arti...
92•PaulHoule•6h ago•44 comments

YouTube caught making AI-edits to videos and adding misleading AI summaries

https://www.ynetnews.com/tech-and-digital/article/bj1qbwcklg
166•mystraline•3h ago•92 comments

Frinkiac – 3M "The Simpsons" Screencaps

https://frinkiac.com/
43•GlumWoodpecker•3d ago•14 comments

Perpetual futures, explained

https://www.bitsaboutmoney.com/archive/perpetual-futures-explained/
71•sirodoht•6h ago•26 comments

Most technical problems are people problems

https://blog.joeschrag.com/2023/11/most-technical-problems-are-really.html
353•mooreds•15h ago•257 comments

Ivan Sutherland Sketchpad Demo 1963 [video]

https://www.youtube.com/watch?v=6orsmFndx_o
24•fs_software•3d ago•0 comments

Patterns for Defensive Programming in Rust

https://corrode.dev/blog/defensive-programming/
230•PaulHoule•11h ago•43 comments

Idempotency keys for exactly-once processing

https://www.morling.dev/blog/on-idempotency-keys/
102•defly•4d ago•40 comments

Fizz Buzz in CSS

https://susam.net/fizz-buzz-in-css.html
74•froober•7h ago•20 comments

I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA

177•proberts•12h ago•222 comments

Have I been Flocked? – Check if your license plate is being watched

https://haveibeenflocked.com/
16•pkaeding•1h ago•2 comments

Show HN: HCB Mobile – financial app built by 17 y/o, processing $6M/month

https://hackclub.com/fiscal-sponsorship/mobile/
121•mohamad08•2d ago•50 comments

Tides are weirder than you think

https://signoregalilei.com/2025/11/12/tides-are-weirder-than-you-think/
85•surprisetalk•4d ago•20 comments

Frank Gehry has died

https://www.bbc.co.uk/news/articles/c5y2p22z9gno
147•ksajadi•6h ago•54 comments

EU hits X with €120M fine for breaching the Digital Services Act

https://www.dw.com/en/eu-imposes-120-million-fine-on-elon-musks-x-for-breaking-digital-rules/a-75...
29•vincvinc•1h ago•14 comments

Sam Altman’s DRAM Deal

https://www.mooreslawisdead.com/post/sam-altman-s-dirty-dram-deal
191•pabs3•3h ago•153 comments

Spectral rendering, part 3: Spectral vs. RGB

https://momentsingraphics.de/SpectralRendering3Results.html
6•ibobev•3d ago•0 comments

The missing standard library for multithreading in JavaScript

https://github.com/W4G1/multithreading
45•W4G1•7h ago•12 comments

Onlook (YC W25) the Cursor for Designers Is Hiring a Founding Fullstack Engineer

1•D_R_Farrell•11h ago

Making RSS More Fun

https://matduggan.com/making-rss-more-fun/
192•salmon•15h ago•94 comments

How fast can browsers process base64 data?

https://lemire.me/blog/2025/11/29/how-fast-can-browsers-process-base64-data/
31•mfiguiere•6d ago•20 comments