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.

Live: Artemis II Launch Day Updates

https://www.nasa.gov/blogs/missions/2026/04/01/live-artemis-ii-launch-day-updates/
893•apitman•15h ago•765 comments

Email obfuscation: What works in 2026?

https://spencermortensen.com/articles/email-obfuscation/
84•jaden•4h ago•18 comments

Steam on Linux Use Skyrocketed Above 5% in March

https://www.phoronix.com/news/Steam-On-Linux-Tops-5p
298•hkmaxpro•5h ago•118 comments

Quantum computing bombshells that are not April Fools

https://scottaaronson.blog/?p=9665
147•Strilanc•8h ago•46 comments

A new C++ back end for ocamlc

https://github.com/ocaml/ocaml/pull/14701
170•glittershark•8h ago•14 comments

EmDash – A spiritual successor to WordPress that solves plugin security

https://blog.cloudflare.com/emdash-wordpress/
554•elithrar•16h ago•399 comments

Mercor says it was hit by cyberattack tied to compromise LiteLLM

https://techcrunch.com/2026/03/31/mercor-says-it-was-hit-by-cyberattack-tied-to-compromise-of-ope...
29•jackson-mcd•1d ago•7 comments

Telli (YC F24) is hiring engineers, designers, and more [on-site, Berlin]

http://hi.telli.com/join-us
1•sebselassie•1h ago

DRAM pricing is killing the hobbyist SBC market

https://www.jeffgeerling.com/blog/2026/dram-pricing-is-killing-the-hobbyist-sbc-market/
457•ingve•10h ago•378 comments

Subscription bombing and how to mitigate it

https://bytemash.net/posts/subscription-bombing-your-signup-form-is-a-weapon/
128•homelessdino•4h ago•94 comments

AI Perfected Chess. Humans Made It Unpredictable Again

https://www.bloomberg.com/news/articles/2026-03-27/ai-changed-chess-grandmasters-now-win-with-unp...
29•GMoromisato•4d ago•16 comments

Fast and Gorgeous Erosion Filter

https://blog.runevision.com/2026/03/fast-and-gorgeous-erosion-filter.html
148•runevision•1d ago•14 comments

Show HN: NASA Artemis II Mission Timeline Tracker

https://www.sunnywingsvirtual.com/artemis2/timeline.html
43•AustinDev•4h ago•6 comments

Show HN: Git bayesect – Bayesian Git bisection for non-deterministic bugs

https://github.com/hauntsaninja/git_bayesect
269•hauntsaninja•4d ago•40 comments

AI for American-produced cement and concrete

https://engineering.fb.com/2026/03/30/data-center-engineering/ai-for-american-produced-cement-and...
189•latchkey•15h ago•110 comments

What Gödel Discovered (2020)

https://stopa.io/post/269
41•qnleigh•2d ago•7 comments

The future of code search is not regex – 100x faster than ripgrep

https://fff.dmtrkovalenko.dev/
42•neogoose•4h ago•18 comments

The Claude Code Leak

https://build.ms/2026/4/1/the-claude-code-leak/
136•mergesort•6h ago•110 comments

Ask HN: Who is hiring? (April 2026)

234•whoishiring•17h ago•196 comments

Signing data structures the wrong way

https://blog.foks.pub/posts/domain-separation-in-idl/
100•malgorithms•12h ago•44 comments

Weather.com/Retro

https://weather.com/retro/
165•typeofhuman•6h ago•26 comments

Show HN: Dull – Instagram Without Reels, YouTube Without Shorts (iOS)

https://getdull.app
78•kasparnoor•11h ago•62 comments

The Windows equivalents of the most used Linux commands

http://techkettle.blogspot.com/2026/04/the-windows-equivalents-of-most-used.html
54•elsadek•10h ago•38 comments

The revenge of the data scientist

https://hamel.dev/blog/posts/revenge/
138•hamelsmu•4d ago•27 comments

Built a cheap DIY fan controller because my motherboard never had working PWM

https://www.himthe.dev/blog/msi-forgot-my-fans
3•bobsterlobster•2d ago•1 comments

SpaceX files to go public

https://www.nytimes.com/2026/04/01/technology/spacex-ipo-elon-musk.html
303•nutjob2•14h ago•397 comments

Trinity Large Thinking

https://openrouter.ai/arcee-ai/trinity-large-thinking
34•kristianp•6h ago•13 comments

Reverse Engineering Crazy Taxi, Part 2

https://wretched.computer/post/crazytaxi2
30•wgreenberg•2d ago•2 comments

StepFun 3.5 Flash is #1 cost-effective model for OpenClaw tasks (300 battles)

https://app.uniclaw.ai/arena?tab=costEffectiveness&via=hn
158•skysniper•16h ago•72 comments

Set the Line Before It's Crossed

https://nomagicpill.substack.com/p/set-the-line-before-its-crossed
61•surprisetalk•2d ago•31 comments