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 Opus 4.7

https://www.anthropic.com/news/claude-opus-4-7
1479•meetpateltech•11h ago•1068 comments

Codex for almost everything

https://openai.com/index/codex-for-almost-everything/
676•mikeevans•8h ago•364 comments

CadQuery is an open-source Python library for building 3D CAD models

https://cadquery.github.io/
30•gregsadetsky•2d ago•0 comments

Guy builds AI driven hardware hacker arm from duct tape, old cam and CNC machine

https://github.com/gainsec/autoprober
93•scaredpelican•4h ago•15 comments

A Better R Programming Experience Thanks to Tree-sitter

https://ropensci.org/blog/2026/04/02/tree-sitter-overview/
81•sebg•4h ago•6 comments

Official Clojure Documentary page with Video, Shownotes, and Links

https://clojure.org/about/documentary
106•adityaathalye•6h ago•24 comments

Android CLI: Build Android apps 3x faster using any agent

https://android-developers.googleblog.com/2026/04/build-android-apps-3x-faster-using-any-agent.html
124•ingve•7h ago•30 comments

Everything we like is a psyop

https://techcrunch.com/2026/04/16/everything-we-like-is-a-psyop/
97•evo_9•2h ago•55 comments

Show HN: Spice simulation → oscilloscope → verification with Claude Code

https://lucasgerads.com/blog/lecroy-mcp-spice-demo/
11•_fizz_buzz_•1h ago•2 comments

New unsealed records reveal Amazon's price-fixing tactics, California AG claims

https://www.theguardian.com/us-news/ng-interactive/2026/apr/16/amazon-price-fixing-california-law...
109•kmfrk•3h ago•19 comments

Qwen3.6-35B-A3B: Agentic coding power, now open to all

https://qwen.ai/blog?id=qwen3.6-35b-a3b
911•cmitsakis•12h ago•418 comments

Cloudflare's AI Platform: an inference layer designed for agents

https://blog.cloudflare.com/ai-platform/
241•nikitoci•12h ago•58 comments

The future of everything is lies, I guess: Where do we go from here?

https://aphyr.com/posts/420-the-future-of-everything-is-lies-i-guess-where-do-we-go-from-here
509•aphyr•12h ago•559 comments

Playdate’s handheld changed how Duke University teaches game design

https://news.play.date/news/duke-playdate-education/
67•Ivoah•6h ago•27 comments

Qwen3.6-35B-A3B on my laptop drew me a better pelican than Claude Opus 4.7

https://simonwillison.net/2026/Apr/16/qwen-beats-opus/
307•simonw•8h ago•70 comments

Join Akkari's Founding Team (YC P26) as an Engineer

1•michael_moore•4h ago

GPT‑Rosalind for life sciences research

https://openai.com/index/introducing-gpt-rosalind/
59•babelfish•6h ago•14 comments

Show HN: Marky – A lightweight Markdown viewer for agentic coding

https://github.com/GRVYDEV/marky
36•GRVYDEV•9h ago•14 comments

Launch HN: Kampala (YC W26) – Reverse-Engineer Apps into APIs

https://www.zatanna.ai/kampala
74•alexblackwell_•10h ago•63 comments

288,493 Requests – How I Spotted an XML-RPC Brute Force from a Weird Cache Ratio

https://marcindudek.dev/blog/xmlrpc-brute-force-cache-rate/
3•taubek•3d ago•0 comments

"Wretches, Speak Evil of Me": Goethe and Schiller's Xenions (1896 Edition)

https://publicdomainreview.org/collection/xenions/
8•benbreen•2d ago•1 comments

Artifacts: Versioned storage that speaks Git

https://blog.cloudflare.com/artifacts-git-for-agents-beta/
158•jgrahamc•12h ago•17 comments

Hospital at centre of child HIV outbreak caught reusing syringes in Pakistan

https://www.bbc.com/news/articles/clyrd818gd2o
117•flykespice•2h ago•71 comments

George Orwell Predicted the Rise of "AI Slop" in Nineteen Eighty-Four

https://www.openculture.com/2026/04/how-george-orwell-predicted-the-rise-of-ai-slop.html
46•doener•2h ago•32 comments

Show HN: CodeBurn – Analyze Claude Code token usage by task

https://github.com/AgentSeal/codeburn
76•agentseal•3d ago•17 comments

The "Passive Income" trap ate a generation of entrepreneurs

https://www.joanwestenberg.com/the-passive-income-trap-ate-a-generation-of-entrepreneurs/
148•devonnull•5h ago•108 comments

IBM AP-101 general-purpose computer [pdf]

https://gandalfddi.z19.web.core.windows.net/Shuttle/IBM%20AP-101S%20General%20Purpose%20Computer%...
19•__patchbit__•3d ago•4 comments

Show HN: MacMind – A transformer neural network in HyperCard on a 1989 Macintosh

https://github.com/SeanFDZ/macmind
120•hammer32•12h ago•34 comments

Circuit Transformations, Loop Fusion, and Inductive Proof

https://natetyoung.github.io/carry_save_fusion/
25•matt_d•3d ago•1 comments

Codex Hacked a Samsung TV

https://blog.calif.io/p/codex-hacked-a-samsung-tv
206•campuscodi•15h ago•119 comments