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

Comments

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

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

Multiprocessing all the way!

emmelaich•8mo ago
(2021)

Good article!

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

Cowork: Claude Code for the rest of your work

https://claude.com/blog/cowork-research-preview
531•adocomplete•4h ago•268 comments

TimeCapsuleLLM: LLM trained only on data from 1800-1875

https://github.com/haykgrigo3/TimeCapsuleLLM
449•admp•8h ago•188 comments

Fabrice Bellard's TS Zip (2024)

https://www.bellard.org/ts_zip/
88•everlier•3h ago•30 comments

Postal Arbitrage

https://walzr.com/postal-arbitrage
228•The28thDuck•6h ago•113 comments

Unauthenticated remote code execution in OpenCode

https://cy.md/opencode-rce/
202•CyberShadow•1d ago•49 comments

The chess bot on Delta Air Lines will destroy you (2024) [video]

https://www.youtube.com/watch?v=c0mLhHDcY3I
128•cjaackie•4h ago•75 comments

Date is out, Temporal is in

https://piccalil.li/blog/date-is-out-and-temporal-is-in/
292•alexanderameye•8h ago•92 comments

LLVM: The bad parts

https://www.npopov.com/2026/01/11/LLVM-The-bad-parts.html
269•vitaut•9h ago•52 comments

F2 (YC S25) Is Hiring

https://www.ycombinator.com/companies/f2/jobs/cJsc7Fe-product-designer
1•arctech•1h ago

Show HN: AI in SolidWorks

https://www.trylad.com
116•WillNickols•7h ago•55 comments

'I rarely get outside': scientists ditch fieldwork in the age of AI

https://www.nature.com/articles/d41586-025-04150-w
17•Growtika•4d ago•5 comments

Floppy disks turn out to be the greatest TV remote for kids

https://blog.smartere.dk/2026/01/floppy-disks-the-best-tv-remote-for-kids/
470•mchro•11h ago•281 comments

Show HN: Agent-of-empires: OpenCode and Claude Code session manager

https://github.com/njbrake/agent-of-empires
51•river_otter•9h ago•13 comments

Perlsecret – Perl secret operators and constants

https://metacpan.org/dist/perlsecret/view/lib/perlsecret.pod
49•mjs•6d ago•10 comments

What old tennis players teach us (2017)

https://www.raphkoster.com/2017/09/22/31098/
28•surprisetalk•4d ago•18 comments

Message Queues: A Simple Guide with Analogies (2024)

https://www.cloudamqp.com/blog/message-queues-exaplined-with-analogies.html
70•byt3h3ad•6h ago•21 comments

Apple picks Google's Gemini to power Siri

https://www.cnbc.com/2026/01/12/apple-google-ai-siri-gemini.html
605•stygiansonic•8h ago•337 comments

GitHub: A case study in link maintenance and 404 pages (2013)

https://chrismorgan.info/blog/github-links-case-study/
9•roryokane•5d ago•2 comments

Anthropic made a mistake in cutting off third-party clients

https://archaeologist.dev/artifacts/anthropic
200•codesparkle•13h ago•170 comments

Show HN: Fall asleep by watching JavaScript load

https://github.com/sarusso/bedtime
42•sarusso•5h ago•14 comments

Non-Essential French Embassy Staff Have Left Iran

https://www.barrons.com/news/non-essential-french-embassy-staff-have-left-iran-sources-d84d1f51
23•mhb•1h ago•8 comments

Ai, Japanese chimpanzee who counted and painted dies at 49

https://www.bbc.com/news/articles/cj9r3zl2ywyo
171•reconnecting•15h ago•58 comments

Ansible battle tested hardening for Linux, SSH, Nginx, MySQL

https://github.com/dev-sec/ansible-collection-hardening
43•walterbell•5d ago•10 comments

Building a 25 Gbit/s workstation for the SCION Association

https://github.com/scionassociation/blog-25gbit-workstation
62•romshark•7h ago•23 comments

Zen-C: Write like a high-level language, run like C

https://github.com/z-libs/Zen-C
148•simonpure•11h ago•90 comments

Reproducing DeepSeek's MHC: When Residual Connections Explode

https://taylorkolasinski.com/notes/mhc-reproduction/
96•taykolasinski•10h ago•30 comments

Launch a Debugging Terminal into GitHub Actions

https://blog.gripdev.xyz/2026/01/10/actions-terminal-on-failure-for-debugging/
128•martinpeck•11h ago•53 comments

Personal thoughts/notes from working on Zootopia 2

https://blog.yiningkarlli.com/2025/12/zootopia-2.html
291•pantalaimon•5d ago•62 comments

Google removes AI health summaries after investigation finds dangerous flaws

https://arstechnica.com/ai/2026/01/google-removes-some-ai-health-summaries-after-investigation-fi...
12•barishnamazov•1h ago•2 comments

Computers that used to be human

https://digitalseams.com/blog/computers-that-used-to-be-human
54•bobbiechen•9h ago•12 comments