frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: I got tired of print(x.shape) so I built runtime type hints for Python

https://github.com/yiheinchai/trickle
4•chaiyihein•1h ago
As a beginner learning to build ML models, I found it annoying to have to keep printing tensor shapes every other line, having to step through the debugger to check where did I mess up the shapes again.

So I built Trickle, it takes the data that flows through your code, caches the types and display them inline (as if you have type annotations).

The idea is: "Let types trickle from runtime into your IDE". You get types in Python without having the write them manually.

It works by rewriting your Python AST at import time — after every variable assignment, it inserts a lightweight call that records the type and value. No decorators, no code changes. Just run your script through trickle run python train.py and every variable gets its type visible.

One cool feature is Error snapshots, by toggling it in VSCode status bar, you can see the exact data that is in each variable when the error happened.

For AI agents, trickle-cli outputs the inline runtime types together with the source code so agent can better diagnose the issue.

For Jupyter notebooks: %load_ext trickle as your first cell, and every cell after is traced.

Quick try: pip install trickle-observe npm install -g trickle-cli code --install-extension yiheinchai.trickle-vscode

   trickle run python demo/demo.py
   trickle hints demo/demo.py
Limitations: - Expect 2-5x slowdown — designed for development, not production.

Also supports JavaScript/TypeScript (Express, Fastify, Koa, Hono) though the Python/ML side is where I've focused most effort.

In the future, I imagine there to be potential for using this as runtime observability in production via probabilistic sampling of types. Now, we know the code, we know the data, which is all the information we need to debug.

Happy to answer questions

Comments

chaiyihein•1h ago
It's basically automated typing in Python using information about the types and data at runtime.

We ran 600 agent evals – steering hooks hit 100% accuracy, prompts hit 82%

https://strandsagents.com/blog/steering-accuracy-beats-prompts-workflows/
1•aspittel•34s ago•0 comments

Elon Musk's X teases new dislike button on replies

https://mashable.com/article/x-teases-new-dislike-button-on-replies
1•fortran77•1m ago•1 comments

Ask HN: Are algorithmic feeds fundamentally misaligned with user intent?

1•civichalls•2m ago•0 comments

Drone company backed by Erik Prince surges 500% in Wall Street debut

https://www.ft.com/content/fe8898aa-cc23-40a7-a366-157cac697767
1•bookofjoe•3m ago•1 comments

Fact Check: Alec and Kaleb Are Alive and Well

https://www.shrinerschildrens.org/en/news-and-media/news/2026/03/fact-check-alec-and-kaleb-are-al...
1•rolph•5m ago•0 comments

Browser extension that makes LLMs appear to run slowly (ChatGPT and Claude)

https://slowllm.lav.io/
2•teetaa•8m ago•0 comments

Show HN: What if AI agents can trade with each other

https://openstall.ai
2•ljhnick•9m ago•0 comments

Gitmore – Real-time engineering visibility from Git activity

https://gitmore.io
1•amitousablitou•12m ago•1 comments

I Built a Spy Satellite Simulator in a Browser. Here's What I Learned

https://www.spatialintelligence.ai/p/i-built-a-spy-satellite-simulator
3•cyrc•12m ago•1 comments

Ask HN: How do you manage your relationships?

1•anqer•13m ago•2 comments

The Situation Room by Polymarket Is Opening This Friday in DC

https://www.popville.com/2026/03/the-situation-room-polymarket-bar-washington-dc/
1•ryan_j_naughton•15m ago•0 comments

Ask HN: Can we please stop with the posts about Claude outages?

3•romanhn•16m ago•3 comments

A Mermaid Planning Tool for AI

https://relistan.com/mermaid-tool-for-ai
1•relistan•17m ago•0 comments

Towards a Physics Foundation Model

https://flowsnr.github.io/blog/physics-foundation-model/
1•e-topy•17m ago•0 comments

Procedural Planets

https://franpiaggio.github.io/planets/
1•memalign•17m ago•0 comments

The GPT Sexbot

https://tapestry.news/tech/chatgpt-adult-mode/
2•sygona•18m ago•0 comments

DOGE canceled NC Museum grant for HVAC systems after ChatGPT flagged it as DEI

https://myfox8.com/news/north-carolina/high-point/doge-canceled-high-point-museum-grant-for-hvac-...
19•cldwalker•19m ago•3 comments

Writing for Developers

https://www.manning.com/books/writing-for-developers
1•cyndunlop•20m ago•1 comments

And no more Copyleft, either

https://davegriffith.substack.com/p/the-one-thing-that-ai-generated-code
2•dxs•20m ago•0 comments

Computers Don't Argue (1965) [pdf]

https://nob.cs.ucdavis.edu/classes/ecs153-2019-04/readings/computers.pdf
1•gfitz•20m ago•0 comments

Ask HN: What is your way to go for serious iOS bugs?

1•Lausbert•21m ago•0 comments

Android, Epic, and what's behind Google's 'existential' threat to F-Droid

https://news.slashdot.org/story/26/03/16/0255231/android-epic-and-whats-really-behind-googles-exi...
2•MilnerRoute•22m ago•0 comments

Abusing Customizable Selects

https://css-tricks.com/abusing-customizable-selects/
1•speckx•22m ago•0 comments

Leadership Begins with Trust

https://mcleanonline.medium.com/set-your-people-free-bd112b2da904
2•sabinews•22m ago•0 comments

Federal Reserve Maintains Rates

https://www.federalreserve.gov/newsevents/pressreleases/monetary20260318a.htm
2•zelias•26m ago•0 comments

Why your brain has to work harder in an open-plan office than private offices

https://theconversation.com/why-your-brain-has-to-work-harder-in-an-open-plan-office-than-private...
2•PaulHoule•26m ago•0 comments

US Military confirms use of 'advanced AI tools' in war against Iran

https://www.aljazeera.com/news/2026/3/11/us-military-confirms-use-of-advanced-ai-tools-in-war-aga...
4•_____k•26m ago•0 comments

AI firm Anthropic seeks weapons expert to stop users from 'misuse'

https://www.bbc.co.uk/news/articles/c74721xyd1wo
1•_____k•27m ago•0 comments

Security Teams Waste 43% of Response Time on Manual Context Gathering

https://www.upguard.com/press/new-upguard-research-security-teams-waste-43-of-response-time-on-ma...
1•upguardnews•28m ago•0 comments

Show HN: Store and reuse your Claude Code plans

https://github.com/ChernovAndrey/Planectra
1•ChernovAndrei•28m ago•0 comments