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.

Gemma 4 12B: A unified, encoder-free multimodal model

https://blog.google/innovation-and-ai/technology/developers-tools/introducing-gemma-4-12b/
444•rvz•3h ago•158 comments

Elixir v1.20 released: now a gradually typed language

https://elixir-lang.org/blog/2026/06/03/elixir-v1-20-0-released/
71•cloud8421•34m ago•13 comments

I was recently diagnosed with anti-NMDA receptor encephalitis

https://burntsushi.net/encephalitis/
239•Tomte•5h ago•52 comments

ESP32-S31

https://www.espressif.com/en/products/socs/esp32-s31
175•volemo•3h ago•84 comments

DaVinci Resolve 21

https://www.blackmagicdesign.com/products/davinciresolve/whatsnew
269•pentagrama•5h ago•131 comments

Gooey: A GPU-accelerated UI framework for Zig

https://github.com/duanebester/gooey
66•ksec•2h ago•8 comments

Stop Killing Games

https://jxself.org/stop-killing-games.shtml
38•amcclure•2d ago•20 comments

Hacking your PC using your speaker without ever touching it

https://blog.nns.ee/2026/06/03/katana-badusb/
540•xx_ns•8h ago•92 comments

Launch HN: Hyper (YC P26) – Company brain to power agentic development

26•shalinshah•1h ago•21 comments

A Post-Quantum Future for Let's Encrypt

https://letsencrypt.org/2026/06/03/pq-certs
146•SGran•4h ago•78 comments

Skyvern (YC S23) Is Hiring Open-Source Loving DevRel Engineers

https://www.ycombinator.com/companies/skyvern/jobs/1qRTlVx-founding-developer-marketing-open-sour...
1•suchintan•2h ago

Uber's $1,500/month AI limit is a useful signal for AI tool pricing

https://simonwillison.net/2026/Jun/3/uber-caps-usage/
151•pdyc•7h ago•175 comments

Angular v22

https://blog.angular.dev/announcing-angular-v22-c52bb83a4664
48•Klaster_1•2h ago•21 comments

MacBook Neo Is So Popular That Apple Doubled Production

https://www.macrumors.com/2026/06/03/macbook-neo-production-doubled-says-kuo/
158•tosh•3h ago•118 comments

Fluid Simulation for Dummies

https://www.mikeash.com/pyblog/fluid-simulation-for-dummies.html
39•sebg•4d ago•10 comments

Embryos shape their limbs: a key discovery of "genetic brakes"

https://nouvelles.umontreal.ca/en/article/2026/06/02/how-embryos-shape-their-limbs-a-key-discover...
14•gmays•1h ago•0 comments

Rootshell: A new E2EE email service hosted in Iceland

https://rootshell.is
7•sc0rt•38m ago•3 comments

Every Byte Matters

https://fzakaria.com/2026/06/01/every-byte-matters
201•ingve•8h ago•99 comments

Meta workers can opt out of being tracked at work up to 30 min

https://www.bbc.com/news/articles/c93x0k194yno
554•reconnecting•6h ago•520 comments

Bot vs human traffic

https://radar.cloudflare.com/traffic#bot-vs-human
100•jmsflknr•1h ago•42 comments

PlayStation Architecture

https://www.copetti.org/writings/consoles/playstation/
202•gregsadetsky•9h ago•41 comments

Mathematicians issue warning as AI rapidly gains ground

https://www.science.org/content/article/mathematicians-issue-warning-ai-rapidly-gains-ground
92•pseudolus•9h ago•121 comments

What I've learned about the trombone

http://bryanhu.com/blog/posts/what-ive-learned-about-the-trombone/
66•bookofjoe•8h ago•55 comments

1-Click GitHub Token Stealing via a VSCode Bug

https://blog.ammaraskar.com/github-token-stealing/
614•ammar2•1d ago•95 comments

32GB of DDR5 now costs $375 – AI shortage continues to squeeze PC building

https://www.tomshardware.com/pc-components/ddr5/32gb-of-ddr5-now-costs-usd375-minimum-ai-shortage...
311•papersail•6h ago•285 comments

New Texas Instruments 5532 chips are not the 5532's we've used for decades

https://groupdiy.com/threads/the-new-ti-5532-chips-are-not-5532s-weve-used-for-decades.93707/
16•SpikedCola•3h ago•1 comments

Show HN: Edsger – A handwritten Clojure REPL for the reMarkable 2

https://handwritten.danieljanus.pl/2026-06-01-edsger.html
212•nathell•1d ago•28 comments

Nabokov's pale fire: the lost 'father of all hypertext demos'? (2011)

https://dl.acm.org/doi/pdf/10.1145/1995966.1996008
108•aragonite•2d ago•25 comments

Show HN: Nutrepedia – nutrition info in 29 locales built with Clojure and Htmx

https://nutrepedia.com/en-us/
40•llovan•3h ago•17 comments

How turkey hacked the hair-transplant industry

https://www.wired.com/story/how-turkey-hacked-the-hair-transplant-industry/
82•joozio•2d ago•117 comments