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•7mo ago

Comments

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

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

Multiprocessing all the way!

emmelaich•7mo ago
(2021)

Good article!

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

Flock and Cyble Inc. Weaponize "Cybercrime" Takedowns to Silence Critics

https://haveibeenflocked.com/news/cyble-downtime
363•_a9•6h ago•65 comments

Show HN: Jmail – Google Suite for Epstein files

https://www.jmail.world
653•lukeigel•10h ago•129 comments

Backing Up Spotify

https://annas-archive.li/blog/backing-up-spotify.html
1095•vitplister•13h ago•366 comments

Measuring AI Ability to Complete Long Tasks: Opus 4.5 has 50% horizon of 4h49M

https://metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasks/
100•spicypete•3h ago•70 comments

Indoor Tanning Makes Youthful Skin Much Older on a Genetic Level

https://www.ucsf.edu/news/2025/12/431206/indoor-tanning-makes-youthful-skin-much-older-genetic-level
18•SanjayMehta•2h ago•2 comments

Ireland’s Diarmuid Early wins world Microsoft Excel title

https://www.bbc.com/news/articles/cj4qzgvxxgvo
223•1659447091•12h ago•78 comments

Claude in Chrome

https://claude.com/chrome
181•ianrahman•10h ago•86 comments

Pure Silicon Demo Coding: No CPU, No Memory, Just 4k Gates

https://www.a1k0n.net/2025/12/19/tiny-tapeout-demo.html
334•a1k0n•15h ago•48 comments

Log level 'error' should mean that something needs to be fixed

https://utcc.utoronto.ca/~cks/space/blog/programming/ErrorsShouldRequireFixing
366•todsacerdoti•3d ago•229 comments

Isengard in Oxford

https://lareviewofbooks.org/article/isengard-in-oxford/
7•lermontov•2h ago•0 comments

Big GPUs don't need big PCs

https://www.jeffgeerling.com/blog/2025/big-gpus-dont-need-big-pcs
188•mikece•14h ago•62 comments

Go ahead, self-host Postgres

https://pierce.dev/notes/go-ahead-self-host-postgres#user-content-fn-1
489•pavel_lishin•16h ago•302 comments

Chomsky and the Two Cultures of Statistical Learning

https://norvig.com/chomsky.html
49•atomicnature•4d ago•29 comments

From devastation to wonder as Kangaroo Island bushfires lead to cave discoveries

https://www.abc.net.au/news/2025-12-13/more-than-150-caves-discovered-in-ki-after-devastating-bus...
44•speckx•5d ago•6 comments

What's New in Python 3.15

https://docs.python.org/3.15/whatsnew/3.15.html
47•azhenley•3d ago•6 comments

Italian bears living near villages have evolved to be smaller and less agressive

https://phys.org/news/2025-12-italian-villages-evolved-smaller-aggressive.html
83•wjSgoWPm5bWAhXB•5d ago•44 comments

Gemini 3 Pro vs. 2.5 Pro in Pokemon Crystal

https://blog.jcz.dev/gemini-3-pro-vs-25-pro-in-pokemon-crystal
271•alphabetting•4d ago•82 comments

Waymo halts service during S.F. blackout after causing traffic jams

https://missionlocal.org/2025/12/sf-waymo-halts-service-blackout/
55•rwoll•2h ago•39 comments

I spent a week without IPv4 (2023)

https://www.apalrd.net/posts/2023/network_ipv6/
137•mahirsaid•13h ago•235 comments

Show HN: HN Wrapped 2025 - an LLM reviews your year on HN

https://hn-wrapped.kadoa.com?year=2025
180•hubraumhugo•18h ago•101 comments

OpenSCAD is kinda neat

https://nuxx.net/blog/2025/12/20/openscad-is-kinda-neat/
234•c0nsumer•14h ago•166 comments

Biscuit is a specialized PostgreSQL index for fast pattern matching LIKE queries

https://github.com/CrystallineCore/Biscuit
101•eatonphil•4d ago•14 comments

Show HN: ZXC – Asymmetric, +40% decode vs. LZ4 on ARM (C, BSD-3, Fuzzed)

https://github.com/hellobertrand/zxc
14•pollop_•3d ago•3 comments

You have reached the end of the internet (2006)

https://hmpg.net/
143•raytopia•14h ago•36 comments

Make the Eyes Go Away

https://hexeditreality.com/posts/make-the-eyes-go-away/
3•llllm•3d ago•0 comments

PG&E outages in S.F. leave 130k without electricity

https://www.sfchronicle.com/sf/article/pg-e-outage-40-000-customers-without-power-21254326.php
61•hamandcheese•4h ago•34 comments

Why do people leave comments on OpenBenches?

https://shkspr.mobi/blog/2025/12/why-do-people-leave-comments-on-openbenches/
139•sedboyz•15h ago•13 comments

MIRA – An open-source persistent AI entity with memory

https://github.com/taylorsatula/mira-OSS
98•taylorsatula•11h ago•41 comments

Skills Officially Comes to Codex

https://developers.openai.com/codex/skills/
272•rochansinha•23h ago•124 comments

Depot (YC W23) Is Hiring an Enterprise Support Engineer (Remote/US)

https://www.ycombinator.com/companies/depot/jobs/jhGxVjO-enterprise-support-engineer
1•jacobwg•13h ago