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

Comments

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

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

Multiprocessing all the way!

emmelaich•6mo ago
(2021)

Good article!

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

Elites Could Shape Mass Preferences as AI Reduces Persuasion Costs

https://arxiv.org/abs/2512.04047
105•50kIters•1h ago•96 comments

Ghostty is now non-profit

https://mitchellh.com/writing/ghostty-non-profit
1096•vrnvu•15h ago•223 comments

Valve reveals it’s the architect behind a push to bring Windows games to Arm

https://www.theverge.com/report/820656/valve-interview-arm-gaming-steamos-pierre-loup-griffais
751•evolve2k•1d ago•628 comments

Uncloud - Tool for deploying containerised apps across servers without k8s

https://uncloud.run/
105•rgun•3h ago•41 comments

Reverse engineering a $1B Legal AI tool exposed 100k+ confidential files

https://alexschapiro.com/security/vulnerability/2025/12/02/filevine-api-100k
675•bearsyankees•16h ago•223 comments

The Mysterious Realm of JavaScriptCore (2021)

https://www.cyberark.com/resources/threat-research-blog/the-mysterious-realm-of-javascriptcore
8•program•1h ago•0 comments

Average DRAM price in USD over last 18 months

https://pcpartpicker.com/trends/price/memory/
304•zekrioca•9h ago•204 comments

Micron Announces Exit from Crucial Consumer Business

https://investors.micron.com/news-releases/news-release-details/micron-announces-exit-crucial-con...
564•simlevesque•15h ago•270 comments

1D Conway's Life glider found, 3.7B cells long

https://conwaylife.com/forums/viewtopic.php?&p=222136#p222136
443•nooks•16h ago•148 comments

Show HN: I built a dashboard to compare mortgage rates across 120 credit unions

https://finfam.app/blog/credit-union-mortgages
258•mhashemi•13h ago•80 comments

RCE Vulnerability in React and Next.js

https://github.com/vercel/next.js/security/advisories/GHSA-9qr9-h5gf-34mp
530•rayhaanj•17h ago•189 comments

Saturn (YC S24) Is Hiring Senior AI Engineer

https://www.ycombinator.com/companies/saturn/jobs/R9s9o5f-senior-ai-engineer
1•etticat•2h ago

All the Way Down

https://www.futilitycloset.com/2025/11/17/all-the-way-down-2/
8•surprisetalk•5d ago•0 comments

Why WinQuake exists and how it works

https://fabiensanglard.net/winquake/index.html
79•wicket•7h ago•2 comments

Kea DHCP: Modern, open source DHCPv4 and DHCPv6 server

https://www.isc.org/kea/
92•doener•9h ago•29 comments

Acme, a brief history of one of the protocols which has changed the Internet

https://blog.brocas.org/2025/12/01/ACME-a-brief-history-of-one-of-the-protocols-which-has-changed...
117•coffee--•10h ago•45 comments

In Northern Scotland, the Neolithic Age Never Ended

https://www.newyorker.com/magazine/2025/12/01/in-northern-scotland-the-neolithic-age-never-ended
14•samizdis•4d ago•18 comments

8086 Microcode Browser

https://nand2mario.github.io/posts/2025/8086_microcode_browser/
106•zdw•12h ago•0 comments

Show HN: Mirror_bridge – C++ Reflection powered Python binding generation

https://github.com/FranciscoThiesen/mirror_bridge
14•fthiesen•3h ago•2 comments

Euler Conjecture and CDC 6600

https://fortran-lang.discourse.group/t/euler-conjecture-and-cdc-6600/10501
34•zaikunzhang•6h ago•4 comments

Show HN: A Minimal Monthly Task Planner (printable, offline, no signup)

https://printcalendar.top/
43•defcc•4h ago•12 comments

Ethiopian Volcano Erupts for First Time in Nearly 12K Years of Records

https://www.smithsonianmag.com/smart-news/ethiopian-volcano-erupts-for-the-first-time-in-nearly-1...
58•pseudolus•3d ago•13 comments

Launch HN: Phind 3 (YC S22) – Every answer is a mini-app

111•rushingcreek•16h ago•82 comments

Lie groups are crucial to some of the most fundamental theories in physics

https://www.quantamagazine.org/what-are-lie-groups-20251203/
136•ibobev•14h ago•48 comments

Preserving Snow Crystals

https://www.its.caltech.edu/~atomic/snowcrystals/preserve/preserve.htm
43•jameslk•5d ago•13 comments

How to Synthesize a House Loop

https://loopmaster.xyz/tutorials/how-to-synthesize-a-house-loop
224•stagas•6d ago•80 comments

Why are my headphones buzzing whenever I run my game?

https://alexene.dev/2025/12/03/Why-do-my-headphones-buzz-when-i-run-my-game.html
191•pacificat0r•18h ago•128 comments

Everyone in Seattle hates AI

https://jonready.com/blog/posts/everyone-in-seattle-hates-ai.html
798•mips_avatar•14h ago•803 comments

The Differences Between an IndyCar and a F1 Car

https://www.openwheelworld.net/en/indycar101/76/IndyCar_vs_Formula_1_cars
71•1659447091•3d ago•54 comments

You can't fool the optimizer

https://xania.org/202512/03-more-adding-integers
253•HeliumHydride•21h ago•157 comments