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

Comments

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

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

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

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

I'm helping my dog vibe code games

https://www.calebleak.com/posts/dog-game/
765•cleak•12h ago•216 comments

Show HN: Moonshine Open-Weights STT models – higher accuracy than WhisperLargev3

https://github.com/moonshine-ai/moonshine
196•petewarden•8h ago•37 comments

Mercury 2: The fastest reasoning LLM, powered by diffusion

https://www.inceptionlabs.ai/blog/introducing-mercury-2
151•fittingopposite•7h ago•78 comments

Mac mini will be made at a new facility in Houston

https://www.apple.com/newsroom/2026/02/apple-accelerates-us-manufacturing-with-mac-mini-production/
443•haunter•8h ago•433 comments

Pi – A minimal terminal coding harness

https://pi.dev
264•kristianpaul•8h ago•111 comments

Amazon accused of widespread scheme to inflate prices across the economy

https://www.thebignewsletter.com/p/amazon-busted-for-widespread-price
277•toomuchtodo•4h ago•89 comments

Justifying Text-Wrap: Pretty

https://matklad.github.io/2026/02/14/justifying-text-wrap-pretty.html
75•surprisetalk•5d ago•27 comments

Hacking an old Kindle to display bus arrival times

https://www.mariannefeng.com/portfolio/kindle/
207•mengchengfeng•10h ago•46 comments

Georgian wine culture dates back, uninterrupted, approximately 8k years

https://www.wsetglobal.com/knowledge-centre/blog/2023/july/05/exploring-georgian-wine-history-gra...
23•Anon84•4d ago•4 comments

Nearby Glasses

https://github.com/yjeanrenaud/yj_nearbyglasses
280•zingerlio•12h ago•110 comments

I pitched a roller coaster to Disneyland at age 10 in 1978

https://wordglyph.xyz/one-piece-at-a-time
424•wordglyph•16h ago•160 comments

Steel Bank Common Lisp

https://www.sbcl.org/
180•tosh•11h ago•65 comments

Hugging Face Skills

https://github.com/huggingface/skills
149•armcat•12h ago•42 comments

Aesthetics of single threading

https://ta.fo/aesthetics-of-single-threading/
53•todsacerdoti•3d ago•12 comments

Anthropic Drops Flagship Safety Pledge

https://time.com/7380854/exclusive-anthropic-drops-flagship-safety-pledge/
159•cwwc•4h ago•54 comments

Corgi Labs (YC W23) Is Hiring

https://www.ycombinator.com/companies/corgi-labs/jobs/ZiEIf7a-founders-associate
1•leastsquares•4h ago

Show HN: Emdash – Open-source agentic development environment

https://github.com/generalaction/emdash
124•onecommit•11h ago•54 comments

Stripe valued at $159B, 2025 annual letter

https://stripe.com/newsroom/news/stripe-2025-update
186•jez•15h ago•199 comments

We installed a single turnstile to feel secure

https://idiallo.com/blog/installed-single-turnstile-for-security-theater
305•firefoxd•2d ago•143 comments

Optophone

https://en.wikipedia.org/wiki/Optophone
60•Hooke•4d ago•10 comments

Show HN: Recursively apply patterns for pathfinding

https://pattern-pathfinder.vercel.app/?fixtureId=%7B%22path%22%3A%22site%2Fexamples%2F_intro.fixt...
20•seveibar•8h ago•4 comments

Scheme on Java on Common Lisp

https://github.com/atgreen/cl-kawa
3•varjag•2d ago•0 comments

Looks like it is happening

https://www.math.columbia.edu/~woit/wordpress/?p=15500
150•jjgreen•8h ago•103 comments

IRS Tactics Against Meta Open a New Front in the Corporate Tax Fight

https://www.nytimes.com/2026/02/24/business/irs-meta-corporate-taxes.html
198•mitchbob•16h ago•202 comments

IDF killed Gaza aid workers at point blank range in 2025 massacre: Report

https://www.dropsitenews.com/p/israeli-soldiers-tel-sultan-gaza-red-crescent-civil-defense-massac...
1548•Qem•17h ago•582 comments

What Happened to Fry's Electronics

https://dfarq.homeip.net/what-happened-to-frys-electronics/
55•jnord•1h ago•48 comments

Build Your Own Forth Interpreter

https://codingchallenges.fyi/challenges/challenge-forth/
64•AlexeyBrin•3d ago•19 comments

OpenAI, the US government and Persona built an identity surveillance machine

https://vmfunc.re/blog/persona/
528•rzk•11h ago•163 comments

Why the KeePass format should be based on SQLite

https://mketab.org/blog/sqlite_kdbx/
104•wps•16h ago•74 comments

Ask HN: Share your productive usage of OpenClaw

16•aavci•1h ago•2 comments