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•1y ago

Comments

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

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

Multiprocessing all the way!

emmelaich•1y ago
(2021)

Good article!

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

Kioxia and Dell cram 10 PB into slim 2RU server

https://www.blocksandfiles.com/flash/2026/05/14/kioxia-and-dell-cram-10-pb-into-slim-2ru-server/5...
86•rbanffy•4h ago•58 comments

Windows 9x Subsystem for Linux

https://codeberg.org/hails/wsl9x
172•ibobev•3d ago•72 comments

SANA-WM, a 2.6B open-source world model for 1-minute 720p video

https://nvlabs.github.io/Sana/WM/
275•mjgil•9h ago•109 comments

A molecule with half-Möbius topology

https://www.science.org/doi/10.1126/science.aea3321
30•bryanrasmussen•4d ago•0 comments

Accelerando (2005)

https://www.antipope.org/charlie/blog-static/fiction/accelerando/accelerando.html
221•eamag•10h ago•122 comments

Halt and Catch Fire

https://unstack.io/halt-and-catch-fire
23•ScottWRobinson•3h ago•2 comments

Moving away from Tailwind, and learning to structure my CSS

https://jvns.ca/blog/2026/05/15/moving-away-from-tailwind--and-learning-to-structure-my-css-/
358•mpweiher•12h ago•237 comments

Δ-Mem: Efficient Online Memory for Large Language Models

https://arxiv.org/abs/2605.12357
178•44za12•12h ago•47 comments

Frontier AI has broken the open CTF format

https://kabir.au/blog/the-ctf-scene-is-dead
314•frays•15h ago•280 comments

Fame! A Misunderstanding: A new translation of Albert Camus's complete notebooks

https://lareviewofbooks.org/article/albert-camus-complete-notebooks-ryan-bloom-existentialism-abs...
28•Caiero•2d ago•4 comments

Project Gutenberg – keeps getting better

https://www.gutenberg.org/
1129•JSeiko•1d ago•266 comments

Show HN: Rocksky – Music scrobbling and discovery on the AT Protocol

https://tangled.org/rocksky.app/rocksky
37•tsiry•5h ago•13 comments

Japan’s robot wolf sells out as record bear attacks drive demand

https://www.independent.co.uk/asia/japan/japan-robot-wolf-bear-attacks-ohta-seiki-b2975670.html
51•bookofjoe•2h ago•27 comments

We've made the world too complicated

https://user8.bearblog.dev/the-world-is-too-complicated/
123•James72689•13h ago•120 comments

Greek Alphabet Cards

https://labs.randomquark.com/alphabet_cards/
87•ricochet11•10h ago•35 comments

3D Gaussian Splatting in a Weekend

https://bfeldman.me/3dgs-weekend/
17•b__feldman•3d ago•1 comments

HTML Lists

https://blog.frankmtaylor.com/2026/05/13/you-dont-know-html-lists/
261•speckx•5h ago•52 comments

Recreation of the 1956 IPL-I version of the Logic Theorist theorem prover

https://github.com/dmoews/logic-theorist
11•abrax3141•3d ago•1 comments

DeepSeek-V4-Flash means LLM steering is interesting again

https://www.seangoedecke.com/steering-vectors/
182•Brajeshwar•7h ago•64 comments

Futhark by example

https://futhark-lang.org/examples.html
103•tosh•12h ago•26 comments

Accelerate – Embedded language for high-performance array computations

https://github.com/AccelerateHS/accelerate
68•tosh•8h ago•16 comments

Nearly 50 Years Later, WKRP in Cincinnati Becomes a Real Radio Station

https://www.openculture.com/2026/05/nearly-50-years-later-wkrp-in-cincinnati-becomes-a-real-radio...
89•bookofjoe•4d ago•54 comments

After 8 years, I rewrote my open-source PyTorch curvature library

https://github.com/noahgolmant/pytorch-hessian-eigenthings
56•noahgolmant•2d ago•1 comments

I believe there are entire companies right now under AI psychosis

https://twitter.com/mitchellh/status/2055380239711457578
1812•reasonableklout•1d ago•1012 comments

Fecal transplants for autism deliver success in clinical trials (2019)

https://refractor.io/adhd-autism/fecal-transplants-for-autism-delivers-success-in-clinical-trials/
274•breve•12h ago•191 comments

Kyber (YC W23) Is Hiring a Founding Marketer

https://www.ycombinator.com/companies/kyber/jobs/1rLQAro-founding-marketer-content-community
1•asontha•10h ago

Points are a weird and inconsistent unit of measure

https://buttondown.com/hillelwayne/archive/points-are-a-weird-and-inconsistent-unit-of/
65•danborn26•2d ago•58 comments

PART Telescopes – Bringing radio astronomy within reach of rural schools

https://parttelescopes.web.app/
99•openrockets•6h ago•27 comments

The bird eye was pushed to an evolutionary extreme

https://www.quantamagazine.org/how-the-bird-eye-was-pushed-to-an-evolutionary-extreme-20260513/
203•sohkamyung•2d ago•67 comments

Orthrus-Qwen3: up to 7.8×tokens/forward on Qwen3, identical output distribution

https://github.com/chiennv2000/orthrus
211•FranckDernoncou•23h ago•43 comments