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

Comments

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

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

Multiprocessing all the way!

emmelaich•11mo ago
(2021)

Good article!

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

Claude.ai is unavailable

https://status.claude.com/incidents/9l93x2ht4s5w
72•shorsher•35m ago•38 comments

Localsend: An open-source cross-platform alternative to AirDrop

https://github.com/localsend/localsend
583•bilsbie•6h ago•196 comments

Microsoft VibeVoice: Open-Source Frontier Voice AI

https://github.com/microsoft/VibeVoice
250•tosh•6h ago•149 comments

AISLE Discovers 38 CVEs in OpenEMR Healthcare Software

https://aisle.com/blog/aisle-discovers-38-critical-security-vulnerabilities-in-healthcare-softwar...
133•mmsc•2h ago•81 comments

Laguna XS.2 and M.1

https://poolside.ai/blog/laguna-a-deeper-dive
52•tosh•2h ago•25 comments

GitHub RCE Vulnerability: CVE-2026-3854 Breakdown

https://www.wiz.io/blog/github-rce-vulnerability-cve-2026-3854
40•bo0tzz•2h ago•16 comments

Show HN: Live Sun and Moon Dashboard with NASA Footage

https://www.lumara-space.app/
111•beeswaxpat•5h ago•34 comments

Things C++26 define_static_array can't do

https://quuxplusone.github.io/blog/2026/04/24/define-static-array/
19•jandeboevrie•2d ago•1 comments

Infisical (YC W23) Is Hiring Full Stack Software Engineers (Remote)

https://jobs.ashbyhq.com/infisical/782b9da8-20e1-48b2-919e-6c5430c58628
1•vmatsiiako•1h ago

Who owns the code Claude Code wrote?

https://legallayer.substack.com/p/who-owns-the-claude-code-wrote
122•senaevren•7h ago•128 comments

I have officially retired from Emacs

https://nullprogram.com/blog/2026/04/26/
79•Fudgel•2d ago•45 comments

Waymo in Portland

https://waymo.com/blog/shorts/waymo-in-portland/
7•xnx•28m ago•0 comments

FCC Funding Application Notes Paramount Will Be 49.5% Foreign-Owned Post-Merger

https://deadline.com/2026/04/paramount-fcc-request-wbd-merger-middle-east-1236873732/
122•throw0101c•2h ago•64 comments

GitHub Actions is the weakest link

https://nesbitt.io/2026/04/28/github-actions-is-the-weakest-link.html
128•dochtman•6h ago•25 comments

Google and Pentagon reportedly agree on deal for 'any lawful' use of AI

https://www.theverge.com/ai-artificial-intelligence/919494/google-pentagon-classified-ai-deal
183•granzymes•2h ago•178 comments

GitHub Copilot code review will start consuming GitHub Actions minutes

https://github.blog/changelog/2026-04-27-github-copilot-code-review-will-start-consuming-github-a...
172•whtsky•9h ago•125 comments

Deep under Antarctic ice, a long-predicted cosmic whisper breaks through

https://phys.org/news/2026-04-deep-antarctic-ice-cosmic-strange.html
86•rbanffy•1d ago•35 comments

Talkie: a 13B vintage language model from 1930

https://talkie-lm.com/introducing-talkie
575•jekude•20h ago•234 comments

ASML became the chokepoint for cutting-edge chips

https://worksinprogress.co/issue/the-worlds-most-complex-machine/
267•mellosouls•3d ago•156 comments

AI's Economics Don't Make Sense

https://www.wheresyoured.at/ais-economics-dont-make-sense/
109•spking•1h ago•63 comments

Verantyx – A native IDE that obfuscates code before sending it to Cloud LLMs

https://github.com/Ag3497120/verantyx
4•kofdai•2d ago•4 comments

Anthropic Joins the Blender Development Fund as Corporate Patron

https://www.blender.org/press/anthropic-joins-the-blender-development-fund-as-corporate-patron/
186•Philpax•2h ago•158 comments

PyWry: Cross-Platform Rendering Engine in Python

https://deeleeramone.github.io/PyWry/
23•filipovic•1d ago•7 comments

UAE Leaves OPEC and OPEC+

https://www.reuters.com/markets/commodities/uae-says-it-quits-opec-opec-statement-2026-04-28/
277•TechTechTech•5h ago•142 comments

Can You Find the Comet?

https://apod.nasa.gov/apod/ap260427.html
123•ColinWright•1d ago•76 comments

Cybersec is a thankless job: expanding workload and shrinking pay packet

https://www.theregister.com/2026/04/27/from_a_massive_skills_gap/
50•rustoo•2h ago•21 comments

I Spent My Sabbatical Building a Power Meter for Sledgehammers

https://leblancfg.com/intensity-pad-founder-story.html
69•alin23•1d ago•49 comments

After Spain's blackout, its shift to renewables and grid evolution power on

https://www.theguardian.com/world/2026/apr/28/blackout-spain-renewable-energy-grid-solar-wind
46•lentil_soup•2h ago•9 comments

Voice Modems

https://computer.rip/2026-04-26-voice-modems.html
57•K7PJP•1d ago•7 comments

BookStack Moves from GitHub to Codeberg

https://github.com/BookStackApp/BookStack/issues/4551
49•RadiozRadioz•1h ago•7 comments