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.

Lego's 0.002 mm Specification and Its Implications for Manufacturing (2025)

https://www.thewave.engineer/articles.html/productivity/legos-0002mm-specification-and-its-implic...
162•scrlk•2h ago•99 comments

The entities enabling scientific fraud at scale are large, resilient and growing

https://doi.org/10.1073/pnas.2420092122
74•peyton•1h ago•22 comments

Faster Asin() Was Hiding in Plain Sight

https://16bpp.net/blog/post/faster-asin-was-hiding-in-plain-sight/
50•def-pri-pub•48m ago•7 comments

Microsoft BitNet: 100B Param 1-Bit model for local CPUs

https://github.com/microsoft/BitNet
143•redm•2h ago•81 comments

Whistleblower: DOGE member took Social Security data to new job

https://www.washingtonpost.com/politics/2026/03/10/social-security-data-breach-doge-2/
267•raldi•1h ago•109 comments

PeppyOS: A simpler alternative to ROS 2 (now with containers support)

https://peppy.bot/
44•Ekami•3d ago•14 comments

Building a TB-303 from Scratch

https://loopmaster.xyz/tutorials/tb303-from-scratch
156•stagas•3d ago•57 comments

AI Agent Hacks McKinsey

https://codewall.ai/blog/how-we-hacked-mckinseys-ai-platform
101•mycroft_4221•5h ago•33 comments

Zig – Type Resolution Redesign and Language Changes

https://ziglang.org/devlog/2026/#2026-03-10
340•Retro_Dev•14h ago•176 comments

Cloudflare crawl endpoint

https://developers.cloudflare.com/changelog/post/2026-03-10-br-crawl-endpoint/
399•jeffpalmer•16h ago•153 comments

Create value for others and don’t worry about the returns

https://geohot.github.io//blog/jekyll/update/2026/03/11/running-69-agents.html
546•ppew•9h ago•378 comments

U+237C ⍼ Is Azimuth

https://ionathan.ch/2026/02/16/angzarr.html
364•cokernel_hacker•16h ago•62 comments

Yann LeCun raises $1B to build AI that understands the physical world

https://www.wired.com/story/yann-lecun-raises-dollar1-billion-to-build-ai-that-understands-the-ph...
545•helloplanets•1d ago•448 comments

Tony Hoare has died

https://blog.computationalcomplexity.org/2026/03/tony-hoare-1934-2026.html
1912•speckx•1d ago•251 comments

TADA: Fast, Reliable Speech Generation Through Text-Acoustic Synchronization

https://www.hume.ai/blog/opensource-tada
80•smusamashah•9h ago•20 comments

Julia Snail – An Emacs Development Environment for Julia Like Clojure's Cider

https://github.com/gcv/julia-snail
123•TheWiggles•3d ago•16 comments

Agents that run while I sleep

https://www.claudecodecamp.com/p/i-m-building-agents-that-run-while-i-sleep
380•aray07•20h ago•429 comments

UK MPs give ministers powers to restrict Internet for under 18s

https://www.openrightsgroup.org/press-releases/mps-give-ministers-powers-to-restrict-entire-inter...
60•robtherobber•1h ago•39 comments

SSH Secret Menu

https://twitter.com/rebane2001/status/2031037389347406054
290•piccirello•1d ago•129 comments

RISC-V Is Sloooow

https://marcin.juszkiewicz.com.pl/2026/03/10/risc-v-is-sloooow/
287•todsacerdoti•19h ago•304 comments

When the chain becomes the product: Seven years inside a token-funded venture

https://markmhendrickson.com/posts/when-the-chain-becomes-the-product/
39•mhendric•3d ago•14 comments

Writing my own text editor, and daily-driving it

https://blog.jsbarretto.com/post/text-editor
158•todsacerdoti•13h ago•74 comments

Debian decides not to decide on AI-generated contributions

https://lwn.net/SubscriberLink/1061544/125f911834966dd0/
357•jwilk•1d ago•269 comments

Let yourself fall down more

https://ntietz.com/blog/let-yourself-fall-down-more/
7•Brajeshwar•20m ago•2 comments

Levels of Agentic Engineering

https://www.bassimeledath.com/blog/levels-of-agentic-engineering
243•bombastic311•1d ago•116 comments

Roblox is minting teen millionaires

https://www.bloomberg.com/news/articles/2026-03-06/roblox-s-teen-millionaires-are-disrupting-the-...
197•petethomas•3d ago•238 comments

Launch HN: RunAnywhere (YC W26) – Faster AI Inference on Apple Silicon

https://github.com/RunanywhereAI/rcli
230•sanchitmonga22•22h ago•142 comments

Standardizing source maps

https://bloomberg.github.io/js-blog/post/standardizing-source-maps/
62•Timothee•10h ago•6 comments

Where did you think the training data was coming from?

https://idiallo.com/blog/where-did-the-training-data-come-from-meta-ai-rayban-glasses
28•speckx•1h ago•3 comments

Universal vaccine against respiratory infections and allergens

https://med.stanford.edu/news/all-news/2026/02/universal-vaccine.html
325•phony-account•16h ago•115 comments