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

Comments

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

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

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

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

LiteLLM Python package compromised by supply-chain attack

https://github.com/BerriAI/litellm/issues/24512
632•theanonymousone•5h ago•255 comments

Run a 1T parameter model on a 32gb Mac by streaming tensors from NVMe

https://github.com/t8/hypura
82•tatef•1h ago•43 comments

Hypothesis, Antithesis, Synthesis

https://antithesis.com/blog/2026/hegel/
84•alpaylan•2h ago•43 comments

No Terms. No Conditions

https://notermsnoconditions.com
112•bayneri•1h ago•34 comments

Show HN: Gemini can now natively embed video, so I built sub-second video search

https://github.com/ssrajadh/sentrysearch
69•sohamrj•2h ago•27 comments

Lago (YC S21) Is Hiring

https://getlago.notion.site/Lago-Product-Engineer-AI-Agents-for-Growth-327ef63110d280cdb030ccf429...
1•AnhTho_FR•3m ago

Show HN: Email.md – Markdown to responsive, email-safe HTML

https://www.emailmd.dev/
29•dancablam•1h ago•4 comments

Tony Hoare and His Imprint on Computer Science

https://cacm.acm.org/blogcacm/tony-hoare-and-his-imprint-on-computer-science/
26•matt_d•3d ago•3 comments

Testing the Swift C compatibility with Raylib (+WASM)

https://carette.xyz/posts/swift_c_compatibility_with_raylib/
32•LucidLynx•2d ago•10 comments

Microsoft's "Fix" for Windows 11: Flowers After the Beating

https://www.sambent.com/microsofts-plan-to-fix-windows-11-is-gaslighting/
776•h0ek•8h ago•557 comments

Nanobrew: The fastest macOS package manager compatible with brew

https://nanobrew.trilok.ai/
102•syrusakbary•6h ago•60 comments

LaGuardia pilots raised safety alarms months before deadly runway crash

https://www.theguardian.com/us-news/2026/mar/24/laguardia-airplane-pilots-safety-concerns-crash
182•m_fayer•2h ago•145 comments

Debunking Zswap and Zram Myths

https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html
131•javierhonduco•7h ago•31 comments

Ripgrep is faster than grep, ag, git grep, ucg, pt, sift (2016)

https://burntsushi.net/ripgrep/
259•jxmorris12•11h ago•105 comments

Secure Domain Name System (DNS) Deployment 2026 Guide [pdf]

https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-81r3.pdf
71•XzetaU8•5h ago•7 comments

curl > /dev/sda: How I made a Linux distro that runs wget | dd

https://astrid.tech/2026/03/24/0/curl-to-dev-sda/
119•astralbijection•7h ago•49 comments

WolfGuard: WireGuard with FIPS 140-3 cryptography

https://github.com/wolfssl/wolfguard
39•789c789c789c•1h ago•24 comments

Opera: Rewind The Web to 1996 (Opera at 30)

https://www.web-rewind.com
162•thushanfernando•9h ago•99 comments

Apple Business

https://www.apple.com/newsroom/2026/03/introducing-apple-business-a-new-all-in-one-platform-for-b...
131•soheilpro•2h ago•115 comments

So where are all the AI apps?

https://www.answer.ai/posts/2026-03-12-so-where-are-all-the-ai-apps.html
247•tanelpoder•3h ago•248 comments

io_uring, libaio performance across Linux kernels and an unexpected IOMMU trap

https://blog.ydb.tech/how-io-uring-overtook-libaio-performance-across-linux-kernels-and-an-unexpe...
35•tanelpoder•4h ago•13 comments

Box of Secrets: Discreetly modding an apartment intercom to work with Apple Home

https://www.jackhogan.me/blog/box-of-secrets/
242•jackhogan11•1d ago•92 comments

Log File Viewer for the Terminal

https://lnav.org/
270•wiradikusuma•12h ago•42 comments

The Jellies That Evolved a Different Way to Keep Time

https://www.quantamagazine.org/the-jellies-that-evolved-a-different-way-to-keep-time-20260320/
21•jyunwai•4d ago•5 comments

LLM Neuroanatomy II: Modern LLM Hacking and Hints of a Universal Language?

https://dnhkng.github.io/posts/rys-ii/
76•realberkeaslan•7h ago•27 comments

Country that put backdoors in Cisco routers to spy on world bans foreign routers

https://www.theregister.com/2026/03/24/fcc_foreign_routers/
17•beardyw•18m ago•2 comments

MSA: Memory Sparse Attention

https://github.com/EverMind-AI/MSA
76•chaosprint•3d ago•5 comments

iPhone 17 Pro Demonstrated Running a 400B LLM

https://twitter.com/anemll/status/2035901335984611412
689•anemll•1d ago•314 comments

Autoresearch on an old research idea

https://ykumar.me/blog/eclip-autoresearch/
407•ykumards•23h ago•90 comments

NanoClaw Adopts OneCLI Agent Vault

https://nanoclaw.dev/blog/nanoclaw-agent-vault/
99•turntable_pride•5h ago•29 comments