frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
50•dmpetrov•3h ago

Comments

zahlman•14h ago
> Instead, it let's you run safely run Python code written by an LLM embedded in your agent, with startup times measured in single digit microseconds not hundreds of milliseconds.

Perhaps if the interpreter is in turn embedded in the executable and runs in-process, but even a do-nothing `uv` invocation takes ~10ms on my system.

I like the idea of a minimal implementation like this, though. I hadn't even considered it from an AI sandboxing perspective; I just liked the idea of a stdlib-less alternative upon which better-thought-out "core" libraries could be stacked, with less disk footprint.

Have to say I didn't expect it to come out of Pydantic.

preciousoo•52m ago
Pydantic + FastAPI are my two favorite python shops right now, they’re always dropping fun new projcts
kodablah•9h ago
I'm of the mind that it will be better to construct more strict/structured languages for AI use than to reuse existing ones.

My reasoning is 1) AIs can comprehend specs easily, especially if simple, 2) it is only valuable to "meet developers where they are" if really needing the developers' history/experience which I'd argue LLMs don't need as much (or only need because lang is so flexible/loose), and 3) human languages were developed to provide extreme human subjectivity which is way too much wiggle-room/flexibility (and is why people have to keep writing projects like these to reduce it).

We should be writing languages that are super-strict by default (e.g. down to the literal ordering/alphabetizing of constructs, exact spacing expectations) and only having opt-in loose modes for humans and tooling to format. I admit I am toying w/ such a lang myself, but in general we can ask more of AI code generations than we can of ourselves.

dmpetrov•2h ago
I like the idea a lot but it's still unclear from the docs what the hard security boundary is once you start calling LLMs - can it avoid "breaking out" into the host env in practice?
simonw•1h ago
I got a WebAssembly build of this working and fired up a web playground for trying it out: https://simonw.github.io/research/monty-wasm-pyodide/demo.ht...

It doesn't have class support yet!

But it doesn't matter, because LLMs that try to use a class will get an error message and rewrite their code to not use classes instead.

Notes on how I got the WASM build working here: https://simonwillison.net/2026/Feb/6/pydantic-monty/

_joel•56m ago
Well I love the name, so definitely trying this out later, but first...

And now for something, completely different.

avaer•45m ago
This feels like the time I was a Mercurial user before I moved to Git.

Everyone was using git for reasons to me that seemed bandwagon-y, when Mercurial just had such a better UX and mental model to me.

Now, everyone is writing agent `exec`s in Python, when I think TypeScript/JS is far better suited for the job (it was always fast + secure, not to mention more reliable and information dense b/c of typing).

But I think I'm gonna lose this one too.

piskov•35m ago
Can we please make as little js as possible?

Why would one drag this god forsaken abomination on server-side is beyond me.

Even effing C# nowdays can be run in script-like manner from a single file.

—

Even the latest Codex UI app is Electron. The one that is supposed to write itself with AI wonders but couldn’t manage native swiftui, winui, and qt or whatever is on linux this days.

IshKebab•13m ago
I would say the same about Python, a language that has clearly got far too big for its boots.
rienbdj•45m ago
If we’re going to have LLMs write the code, why not something more performant? Like pages and pages of Java maybe?
OutOfHere•43m ago
It is absurd for any user to use a half baked Python interpreter, also one that will always majorly lag behind CPython in its support. I advise sandboxing CPython instead using OS features.
avaer•42m ago
The repo does make a case for this, namely speed, which does make sense.
sd2k•21m ago
True, but while CPython does have a reputation for slow startup, completely re-implementing isn't the only way to work around it - e.g. with eryx [1] I've managed to pre-initialize and snapshots the Wasm and pre-compile it, to get real CPython starting in ~15ms, without compromising on language features. It's doable!

[1] https://github.com/eryx-org/eryx

falcor84•24m ago
Wow, a start latency of 0.06ms

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
244•klaussilveira•2h ago•38 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
655•xnx•8h ago•422 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
80•isitcontent•2h ago•10 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
51•dmpetrov•3h ago•15 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
29•phreda4•2h ago•3 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
278•aktau•9h ago•140 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
276•ostacke•8h ago•65 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
200•vecti•4h ago•97 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
136•i5heu•5h ago•98 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
338•todsacerdoti•10h ago•195 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
81•vmatsiiako•7h ago•23 comments

Early Christian Writings

https://earlychristianwritings.com/
101•dsego•2h ago•36 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
122•limoce•3d ago•64 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
260•lstoll•9h ago•191 comments

FORTH? Really!?

https://rescrv.net/w/2026/02/06/associative
17•rescrv•10h ago•2 comments

Evaluating and mitigating the growing risk of LLM-discovered 0-days

https://red.anthropic.com/2026/zero-days/
21•lebovic•1d ago•5 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
209•surprisetalk•3d ago•26 comments

The Oklahoma Architect Who Turned Kitsch into Art

https://www.bloomberg.com/news/features/2026-01-31/oklahoma-architect-bruce-goff-s-wild-home-desi...
8•MarlonPro•3d ago•1 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
912•cdrnsf•12h ago•398 comments

The Beauty of Slag

https://mag.uchicago.edu/science-medicine/beauty-slag
18•sohkamyung•3d ago•2 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
73•antves•1d ago•56 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
27•nwparker•1d ago•5 comments

How virtual textures work

https://www.shlom.dev/articles/how-virtual-textures-really-work/
16•betamark•9h ago•11 comments

Masked namespace vulnerability in Temporal

https://depthfirst.com/post/the-masked-namespace-vulnerability-in-temporal-cve-2025-14986
27•bmit•4h ago•2 comments

Show HN: Horizons – OSS agent execution engine

https://github.com/synth-laboratories/Horizons
14•JoshPurtell•23h ago•3 comments

Evolution of car door handles over the decades

https://newatlas.com/automotive/evolution-car-door-handle/
33•andsoitis•3d ago•50 comments

Planetary Roller Screws

https://www.humanityslastmachine.com/#planetary-roller-screws
25•everlier•3d ago•6 comments

The mystery of the mole playing rough (2019) [video]

https://www.youtube.com/watch?v=nwQmwT1ULMU
9•archagon•17h ago•1 comments

Show HN: Gigacode – Use OpenCode's UI with Claude Code/Codex/Amp

https://github.com/rivet-dev/sandbox-agent/tree/main/gigacode
7•NathanFlurry•10h ago•4 comments

A new bill in New York would require disclaimers on AI-generated news content

https://www.niemanlab.org/2026/02/a-new-bill-in-new-york-would-require-disclaimers-on-ai-generate...
498•giuliomagnifico•14h ago•209 comments