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.

Claude Design

https://www.anthropic.com/news/claude-design-anthropic-labs
891•meetpateltech•12h ago•588 comments

A simplified model of Fil-C

https://www.corsix.org/content/simplified-model-of-fil-c
126•aw1621107•5h ago•65 comments

All 12 moonwalkers had "lunar hay fever" from dust smelling like gunpowder (2018)

https://www.esa.int/Science_Exploration/Human_and_Robotic_Exploration/The_toxic_side_of_the_Moon
256•cybermango•9h ago•146 comments

Towards Trust in Emacs

https://eshelyaron.com/posts/2026-04-15-towards-trust-in-emacs.html
38•eshelyaron•2d ago•1 comments

Isaac Asimov: The Last Question (1956)

https://hex.ooo/library/last_question.html
648•ColinWright•15h ago•266 comments

Measuring Claude 4.7's tokenizer costs

https://www.claudecodecamp.com/p/i-measured-claude-4-7-s-new-tokenizer-here-s-what-it-costs-you
556•aray07•12h ago•387 comments

Are the costs of AI agents also rising exponentially? (2025)

https://www.tobyord.com/writing/hourly-costs-for-ai-agents
123•louiereederson•2d ago•21 comments

Show HN: Smol machines – subsecond coldstart, portable virtual machines

https://github.com/smol-machines/smolvm
249•binsquare•10h ago•90 comments

Show HN: PanicLock – Close your MacBook lid disable TouchID –> password unlock

https://github.com/paniclock/paniclock/
147•seanieb•10h ago•61 comments

NASA Force

https://nasaforce.gov/
239•LorenDB•11h ago•252 comments

Slop Cop

https://awnist.com/slop-cop
99•ericHosick•12h ago•70 comments

Hyperscalers have already outspent most famous US megaprojects

https://twitter.com/finmoorhouse/status/2044933442236776794
141•nowflux•11h ago•121 comments

Middle schooler finds coin from Troy in Berlin

https://www.thehistoryblog.com/archives/75848
210•speckx•12h ago•94 comments

Casus Belli Engineering

https://marcosmagueta.com/blog/casus-belli-engineering/
10•b-man•2h ago•1 comments

NIST gives up enriching most CVEs

https://risky.biz/risky-bulletin-nist-gives-up-enriching-most-cves/
184•mooreds•12h ago•40 comments

Introducing: ShaderPad

https://rileyjshaw.com/blog/introducing-shaderpad/
55•evakhoury•2d ago•7 comments

Generating a color spectrum for an image

https://amandahinton.com/blog/generating-a-color-spectrum-for-an-image
25•evakhoury•2d ago•4 comments

I built a 3D printing business and ran it for 8 months

https://www.wespiser.com/posts/2026-04-12-3D-Printing-Biz.html
89•wespiser_2018•2d ago•83 comments

Arc Prize Foundation (YC W26) Is Hiring a Platform Engineer for ARC-AGI-4

https://www.ycombinator.com/companies/arc-prize-foundation/jobs/AKZRZDN-platform-engineer-benchma...
1•gkamradt_•6h ago

Ben Lerner's Big Feelings

https://www.vulture.com/article/ben-lerner-transcription-interview.html
3•prismatic•1d ago•0 comments

Ban the sale of precise geolocation

https://www.lawfaremedia.org/article/it-is-time-to-ban-the-sale-of-precise-geolocation
628•hn_acker•13h ago•168 comments

The Unix Executable as a Smalltalk Method [video]

https://www.youtube.com/watch?v=sZjPQ7vtLNA
31•surprisetalk•1d ago•1 comments

The GNU libc atanh is correctly rounded

https://inria.hal.science/hal-05591661
55•matt_d•3d ago•8 comments

Even "cat readme.txt" is not safe

https://blog.calif.io/p/mad-bugs-even-cat-readmetxt-is-not
108•arkadiyt•8h ago•60 comments

Show HN: Stage – Putting humans back in control of code review

https://stagereview.app/
104•cpan22•1d ago•93 comments

Spending 3 months coding by hand

https://miguelconner.substack.com/p/im-coding-by-hand
152•evakhoury•11h ago•155 comments

Nintendo's Empire of Secrets with Keza MacDonald – Factually with Adam Conover

https://art19.com/shows/factually--with-adam-conover/episodes/5154e9af-8885-4149-9721-173c02c46bb7/
20•tpoindex•1d ago•3 comments

Connie Converse was a folk-music genius. Then she vanished

https://www.bbc.com/culture/article/20260413-the-mystery-of-a-missing-folk-music-pioneer
79•mellosouls•2d ago•18 comments

Experiment with ICEYE Open Data

https://www.iceye.com/open-data-initiative
107•marklit•12h ago•14 comments

Healthchecks.io now uses self-hosted object storage

https://blog.healthchecks.io/2026/04/healthchecks-io-now-uses-self-hosted-object-storage/
151•zdw•13h ago•64 comments