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.

3D-Knitting: The Ultimate Guide

https://www.oliver-charles.com/pages/3d-knitting
88•ChadNauseam•3h ago•31 comments

Avoiding Trigonometry (2013)

https://iquilezles.org/articles/noacos/
45•WithinReason•2h ago•8 comments

Returning to Rails in 2026

https://www.markround.com/blog/2026/03/05/returning-to-rails-in-2026/
167•stanislavb•5h ago•88 comments

Show HN: s@: decentralized social networking over static sites

http://satproto.org/
310•remywang•11h ago•131 comments

SBCL: A Sanely-Bootstrappable Common Lisp (2008) [pdf]

https://research.gold.ac.uk/id/eprint/2336/1/sbcl.pdf
60•pabs3•4h ago•32 comments

Dolphin Progress Release 2603

https://dolphin-emu.org/blog/2026/03/12/dolphin-progress-report-release-2603/
13•BitPirate•2h ago•0 comments

Printf-Tac-Toe

https://github.com/carlini/printf-tac-toe
38•carlos-menezes•3d ago•5 comments

Temporal: The 9-year journey to fix time in JavaScript

https://bloomberg.github.io/js-blog/post/temporal/
700•robpalmer•20h ago•222 comments

Making WebAssembly a first-class language on the Web

https://hacks.mozilla.org/2026/02/making-webassembly-a-first-class-language-on-the-web/
582•mikece•1d ago•207 comments

Datahäxan

https://0dd.company/galleries/witches/7.html
80•akkartik•2d ago•5 comments

Galaxy Zoo

https://www.zooniverse.org/projects/zookeeper/galaxy-zoo
14•mooreds•3d ago•2 comments

1B identity records exposed in ID verification data leak

https://www.aol.com/articles/1-billion-identity-records-exposed-152505381.html
59•robtherobber•1h ago•14 comments

Tested: How Many Times Can a DVD±RW Be Rewritten? Methodology and Results

https://goughlui.com/2026/03/07/tested-how-many-times-can-a-dvd%C2%B1rw-be-rewritten-part-2-metho...
174•giuliomagnifico•3d ago•48 comments

WebPKI and You

https://blog.brycekerley.net/2026/03/08/webpki-and-you.html
65•aragilar•2d ago•5 comments

I was interviewed by an AI bot for a job

https://www.theverge.com/featured-video/892850/i-was-interviewed-by-an-ai-bot-for-a-job
330•speckx•17h ago•309 comments

Don't post generated/AI-edited comments. HN is for conversation between humans

https://news.ycombinator.com/newsguidelines.html#generated
3663•usefulposter•16h ago•1363 comments

Many SWE-bench-Passing PRs would not be merged

https://metr.org/notes/2026-03-10-many-swe-bench-passing-prs-would-not-be-merged-into-main/
245•mustaphah•14h ago•125 comments

NASA's DART spacecraft changed an asteroid's orbit around the sun

https://www.sciencenews.org/article/spacecraft-changed-asteroid-orbit-nasa
38•pseudolus•3d ago•16 comments

Reliable Software in the LLM Era

https://quint-lang.org/posts/llm_era
17•mempirate•3h ago•1 comments

The MacBook Neo

https://daringfireball.net/2026/03/the_macbook_neo
557•etothet•1d ago•889 comments

Show HN: I built a tool that watches webpages and exposes changes as RSS

https://sitespy.app
262•vkuprin•19h ago•64 comments

Google closes deal to acquire Wiz

https://www.wiz.io/blog/google-closes-deal-to-acquire-wiz
301•aldarisbm•20h ago•174 comments

BitNet: Inference framework for 1-bit LLMs

https://github.com/microsoft/BitNet
348•redm•23h ago•163 comments

Faster asin() was hiding in plain sight

https://16bpp.net/blog/post/faster-asin-was-hiding-in-plain-sight/
213•def-pri-pub•21h ago•117 comments

Personal Computer by Perplexity

https://www.perplexity.ai/personal-computer-waitlist
166•josephwegner•17h ago•132 comments

Entities enabling scientific fraud at scale (2025)

https://doi.org/10.1073/pnas.2420092122
293•peyton•22h ago•202 comments

Newcomb's Paradox Needs a Demon

https://samestep.com/blog/newcombs-paradox/
5•sestep•2d ago•2 comments

What Happens After You Die? (2016)

https://lamag.com/news/the-end/
47•NaOH•3d ago•30 comments

About memory pressure, lock contention, and Data-oriented Design

https://mnt.io/articles/about-memory-pressure-lock-contention-and-data-oriented-design/
57•vinhnx•3d ago•7 comments

Show HN: Klaus – OpenClaw on a VM, batteries included

https://klausai.com/
147•robthompson2018•19h ago•84 comments