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.

Building a SaaS in 2026 Using Only EU Infrastructure

https://eualternative.eu/guides/building-saas-eu-stack/
13•sparkling•15m ago•1 comments

Bring Back Idiomatic Design

https://essays.johnloeber.com/p/4-bring-back-idiomatic-design
153•phil294•4h ago•72 comments

Show HN: Oberon System 3 runs natively on Raspberry Pi 3 (with ready SD card)

https://github.com/rochus-keller/OberonSystem3Native/releases
73•Rochus•3h ago•7 comments

Seven countries now generate 100% of their electricity from renewable energy

https://www.the-independent.com/tech/renewable-energy-solar-nepal-bhutan-iceland-b2533699.html
216•mpweiher•3h ago•80 comments

Tell HN: docker pull fails in spain due to football cloudflare block

256•littlecranky67•4h ago•110 comments

JVM Options Explorer

https://chriswhocodes.com/vm-options-explorer.html
117•0x54MUR41•6h ago•54 comments

Eternity in six hours: Intergalactic spreading of intelligent life (2013)

https://www.researchgate.net/publication/256935390_Eternity_in_six_hours_Intergalactic_spreading_...
21•wallflower•2h ago•11 comments

AI Will Be Met with Violence, and Nothing Good Will Come of It

https://www.thealgorithmicbridge.com/p/ai-will-be-met-with-violence-and
270•gHeadphone•7h ago•456 comments

Phyphox – Physical Experiments Using a Smartphone

https://phyphox.org/
115•_Microft•8h ago•23 comments

Anthropic downgraded cache TTL on March 6th

https://github.com/anthropics/claude-code/issues/46829
292•lsdmtme•11h ago•209 comments

Happy Map

https://pudding.cool/2026/02/happy-map/
116•surprisetalk•5d ago•18 comments

A Tour of Oodi

https://blinry.org/oodi/
54•zdw•2d ago•12 comments

I run multiple $10K MRR companies on a $20/month tech stack

https://stevehanov.ca/blog/how-i-run-multiple-10k-mrr-companies-on-a-20month-tech-stack
580•tradertef•10h ago•340 comments

The Physics of GPS

https://perthirtysix.com/how-does-gps-work
44•maouida•5h ago•8 comments

We have a 99% email reputation. Gmail disagrees

https://blogfontawesome.wpcomstaging.com/we-have-a-99-email-reputation-gmail-disagrees/
123•em-bee•4h ago•113 comments

Doom, Played over Curl

https://github.com/xsawyerx/curl-doom
46•creaktive•6h ago•5 comments

Floyd's Sampling Algorithm

https://buttondown.com/jaffray/archive/floyds-sampling-algorithm/
15•ibobev•5d ago•0 comments

Compute iOS XNU offset from kernel cache

https://blog.reversesociety.co/blog/2026/kernel-rw-not-enough-extract-offsets-from-xnu-kernelcaches
9•tonygo•2d ago•0 comments

Tell HN: OpenAI silently removed Study Mode from ChatGPT

128•smokel•3h ago•36 comments

Pro Max 5x quota exhausted in 1.5 hours despite moderate usage

https://github.com/anthropics/claude-code/issues/45756
433•cmaster11•3h ago•381 comments

How We Broke Top AI Agent Benchmarks: And What Comes Next

https://rdi.berkeley.edu/blog/trustworthy-benchmarks-cont/
454•Anon84•21h ago•111 comments

The Miller Principle (2007)

https://puredanger.github.io/tech.puredanger.com/2007/07/11/miller-principle/
57•FelipeCortez•5d ago•45 comments

An Interview with Pat Gelsinger

https://morethanmoore.substack.com/p/an-interview-with-pat-gelsinger-2026
84•zdw•2d ago•52 comments

Tofolli gates are all you need

https://www.johndcook.com/blog/2026/04/06/tofolli-gates/
104•ibobev•5d ago•31 comments

Small models also found the vulnerabilities that Mythos found

https://aisle.com/blog/ai-cybersecurity-after-mythos-the-jagged-frontier
1186•dominicq•1d ago•318 comments

Internet outage in Iran reaches 1,008 hours

https://mastodon.social/@netblocks/116384935123261912
104•miadabdi•5h ago•63 comments

447 TB/cm² at zero retention energy – atomic-scale memory on fluorographane

https://zenodo.org/records/19513269
243•iliatoli•20h ago•133 comments

Dark Castle

https://darkcastle.co.uk/
225•evo_9•20h ago•30 comments

How Complex is my Code?

https://philodev.one/posts/2026-04-code-complexity/
155•speckx•5d ago•40 comments

Pijul a FOSS distributed version control system

https://pijul.org/
186•kouosi•5d ago•28 comments