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

Comments

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

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

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

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

Cohere Transcribe: Speech Recognition

https://cohere.com/blog/transcribe
43•gmays•1h ago•9 comments

Axios compromised on NPM – Malicious versions drop remote access trojan

https://www.stepsecurity.io/blog/axios-compromised-on-npm-malicious-versions-drop-remote-access-t...
1597•mtud•14h ago•626 comments

Open source CAD in the browser (Solvespace)

https://solvespace.com/webver.pl
163•phkahler•4h ago•52 comments

GitHub Monaspace Case Study

https://lettermatic.com/custom/monaspace-case-study
54•homebrewer•2h ago•18 comments

A Love Letter to 'Girl Games'

https://aftermath.site/a-love-letter-to-girl-games/
78•zdw•5d ago•53 comments

Ollama is now powered by MLX on Apple Silicon in preview

https://ollama.com/blog/mlx
551•redundantly•13h ago•273 comments

Artemis II is not safe to fly

https://idlewords.com/2026/03/artemis_ii_is_not_safe_to_fly.htm
732•idlewords•15h ago•463 comments

Oracle slashes 30k jobs

https://rollingout.com/2026/03/31/oracle-slashes-30000-jobs-with-a-cold-6/
578•pje•3h ago•478 comments

Show HN: Forkrun – NUMA-aware shell parallelizer (50×–400× faster than parallel)

https://github.com/jkool702/forkrun
18•jkool702•4d ago•5 comments

Claude Code's source code has been leaked via a map file in their NPM registry

https://twitter.com/Fried_rice/status/2038894956459290963
1214•treexs•8h ago•653 comments

Combinators

https://tinyapl.rubenverg.com/docs/info/combinators
91•tosh•5h ago•25 comments

Good code will still win

https://www.greptile.com/blog/ai-slopware-future
14•dakshgupta•3h ago•18 comments

Audio tapes reveal mass rule-breaking in Milgram's obedience experiments

https://www.psypost.org/audio-tapes-reveal-mass-rule-breaking-in-milgram-s-obedience-experiments-...
139•lentoutcry•3d ago•85 comments

RubyGems Fracture Incident Report

https://rubycentral.org/news/rubygems-fracture-incident-report/
42•schneems•3h ago•4 comments

Securing Elliptic Curve Cryptocurrencies Against Quantum Vulnerabilities [pdf]

https://quantumai.google/static/site-assets/downloads/cryptocurrency-whitepaper.pdf
10•jandrewrogers•1h ago•3 comments

Microsoft: Copilot is for entertainment purposes only

https://www.microsoft.com/en-us/microsoft-copilot/for-individuals/termsofuse
187•lpcvoid•3h ago•65 comments

Tell HN: Chrome says "suspicious download" when trying to download yt-dlp

177•joering2•2h ago•57 comments

Accidentally created my first fork bomb with Claude Code

https://www.droppedasbaby.com/posts/2602-01/
4•offbyone42•9h ago•0 comments

Ask HN: Academic study on AI's impact on software development – want to join?

9•research2026•39m ago•3 comments

What major works of literature were written after age of 85? 75? 65?

https://statmodeling.stat.columbia.edu/2026/03/25/what-major-works-of-literature-were-written-aft...
81•paulpauper•3d ago•52 comments

Show HN: Loreline, narrative language transpiled via Haxe: C++/C#/JS/Java/Py/Lua

https://loreline.app/en/docs/technical-overview/
23•jeremyfa•3d ago•8 comments

Multiple Sclerosis

https://subfictional.com/multiple-sclerosis/
45•luu•4d ago•20 comments

Scotty: A beautiful SSH task runner

https://freek.dev/3064-scotty-a-beautiful-ssh-task-runner
9•speckx•1h ago•1 comments

Fedware: Government apps that spy harder than the apps they ban

https://www.sambent.com/the-white-house-app-has-huawei-spyware-and-an-ice-tip-line/
643•speckx•23h ago•253 comments

From 300KB to 69KB per Token: How LLM Architectures Solve the KV Cache Problem

https://news.future-shock.ai/the-weight-of-remembering/
6•future-shock-ai•2d ago•0 comments

Universal Claude.md – cut Claude output tokens

https://github.com/drona23/claude-token-efficient
418•killme2008•16h ago•150 comments

Google's 200M-parameter time-series foundation model with 16k context

https://github.com/google-research/timesfm
262•codepawl•12h ago•97 comments

RamAIn (YC W26) Is Hiring

https://www.ycombinator.com/companies/ramain/jobs/jezgwo5-ai-ml-research-engineer
1•svee•10h ago

Do your own writing

https://alexhwoods.com/dont-let-ai-write-for-you/
691•karimf•1d ago•222 comments

Good CTE, Bad CTE

https://boringsql.com/posts/good-cte-bad-cte/
146•radimm•1d ago•34 comments