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

Comments

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

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

Multiprocessing all the way!

emmelaich•5mo ago
(2021)

Good article!

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

Tiny electric motor outperforms record holder by 40%

https://supercarblondie.com/electric-motor-yasa-more-powerful-tesla-mercedes/
76•chris_overseas•1h ago•32 comments

KaTeX – The fastest math typesetting library for the web

https://katex.org/
36•suioir•4d ago•13 comments

Oxy is Cloudflare's Rust-based next generation proxy framework (2023)

https://blog.cloudflare.com/introducing-oxy/
108•Garbage•7h ago•42 comments

ECL Runs Maxima in a Browser

https://mailman3.common-lisp.net/hyperkitty/list/ecl-devel@common-lisp.net/thread/T64S5EMVV6WHDPK...
38•seansh•4h ago•5 comments

Paris had a moving sidewalk in 1900, and a Thomas Edison film captured it (2020)

https://www.openculture.com/2020/03/paris-had-a-moving-sidewalk-in-1900.html
298•rbanffy•13h ago•138 comments

The Arduino Uno Q is a weird hybrid SBC

https://www.jeffgeerling.com/blog/2025/arduino-uno-q-weird-hybrid-sbc
34•furkansahin•2d ago•14 comments

China intimidated UK university to ditch human rights research, documents show

https://www.bbc.com/news/articles/cq50j5vwny6o
67•giuliomagnifico•2h ago•12 comments

Using FreeBSD to make self-hosting fun again

https://jsteuernagel.de/posts/using-freebsd-to-make-self-hosting-fun-again/
320•todsacerdoti•23h ago•97 comments

When models manipulate manifolds: The geometry of a counting task

https://transformer-circuits.pub/2025/linebreaks/index.html
56•vinhnx•5d ago•5 comments

Alleged Jabber Zeus Coder 'MrICQ' in U.S. Custody

https://krebsonsecurity.com/2025/11/alleged-jabber-zeus-coder-mricq-in-u-s-custody/
140•todsacerdoti•13h ago•46 comments

Tongyi DeepResearch – open-source 30B MoE Model that rivals OpenAI DeepResearch

https://tongyi-agent.github.io/blog/introducing-tongyi-deep-research/
313•meander_water•22h ago•119 comments

Why don't you use dependent types?

https://lawrencecpaulson.github.io//2025/11/02/Why-not-dependent.html
232•baruchel•19h ago•84 comments

URLs are state containers

https://alfy.blog/2025/10/31/your-url-is-your-state.html
416•thm•23h ago•180 comments

How the Mayans were able to accurately predict solar eclipses for centuries

https://phys.org/news/2025-10-mayans-accurately-solar-eclipses-centuries.html
80•pseudolus•6d ago•40 comments

Underdetermined Weaving with Machines (2021) [video]

https://www.youtube.com/watch?v=on_sK8KoObo
30•akkartik•1w ago•7 comments

Terahertz Tech Sets Stage for "Wireless Wired" Chips

https://spectrum.ieee.org/terahertz-chip-room-temperature
23•FromTheArchives•1w ago•1 comments

Syllabi – Open-source agentic AI with tools, RAG, and multi-channel deploy

https://www.syllabi-ai.com/
38•achushankar•8h ago•10 comments

Collatz-Weyl Generators: Pseudorandom Number Generators (2023)

https://arxiv.org/abs/2312.17043
33•danny00•4d ago•0 comments

X.org Security Advisory: multiple security issues X.Org X server and Xwayland

https://lists.x.org/archives/xorg-announce/2025-October/003635.html
175•birdculture•21h ago•138 comments

Notes by djb on using Fil-C

https://cr.yp.to/2025/fil-c.html
335•transpute•1d ago•217 comments

Facts about throwing good parties

https://www.atvbt.com/21-facts-about-throwing-good-parties/
693•cjbarber•12h ago•277 comments

Lisp: Notes on its Past and Future (1980)

https://www-formal.stanford.edu/jmc/lisp20th/lisp20th.html
167•birdculture•15h ago•88 comments

Why does Swiss cheese have holes?

https://www.usdairy.com/news-articles/why-does-swiss-cheese-have-holes
77•QueensGambit•5d ago•179 comments

New prompt injection papers: Agents rule of two and the attacker moves second

https://simonwillison.net/2025/Nov/2/new-prompt-injection-papers/
45•simonw•11h ago•14 comments

Reproducing the AWS Outage Race Condition with a Model Checker

https://wyounas.github.io/aws/concurrency/2025/10/30/reproducing-the-aws-outage-race-condition-wi...
119•simplegeek•16h ago•26 comments

Linux Tidbits and Collecting Pebbles

https://unixbhaskar.wordpress.com/2025/03/02/linux-tidbits-and-collecting-pebbles/
5•Bogdanp•5d ago•0 comments

Is Your Bluetooth Chip Leaking Secrets via RF Signals?

https://www.semanticscholar.org/paper/Is-Your-Bluetooth-Chip-Leaking-Secrets-via-RF-Ji-Dubrova/c1...
115•transpute•16h ago•23 comments

Simple trick to increase coverage: Lying to users about signal strength

https://nickvsnetworking.com/simple-trick-to-increase-coverage-lying-to-users-about-signal-strength/
297•tsujamin•9h ago•113 comments

FurtherAI (YC W24) Is Hiring Across Software and AI

1•sgondala_ycapp•13h ago

Backpropagation is a leaky abstraction (2016)

https://karpathy.medium.com/yes-you-should-understand-backprop-e2f06eab496b
326•swatson741•1d ago•131 comments