zlacker

[return to "Monty: A minimal, secure Python interpreter written in Rust for use by AI"]
1. simonw+fj[view] [source] 2026-02-06 23:13:00
>>dmpetr+(OP)
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/

◧◩
2. saberi+ie1[view] [source] 2026-02-07 11:25:02
>>simonw+fj
I really don't understand the use-case here.

My models are writing code all day in 3/4 different languages, why would I want to:

a) Restrict them to Python

b) Restrict them to a cutdown, less-useful version of Python?

My models write me Typescript and C# and Python all day with zero issues. Why do I need this?

◧◩◪
3. falcor+IE1[view] [source] 2026-02-07 15:30:22
>>saberi+ie1
For extremely rapid iteration - they can run a quick script with this in under 1ms - it removes a significant bottleneck, especially for math-heavy reasoning
◧◩◪◨
4. bonobo+zY1[view] [source] 2026-02-07 17:50:50
>>falcor+IE1
Not sure if I get it, but it seems to me that this is not for "producing code" eg for your projects or doing things on your computer but essentially for supplementing its own thinking process. It runs this python code to count how many letters R in strawberry if you ask that, or does quick math, quick sorting and simple well defined tasks like this that are needed for answering the query or doing the job you asked to do. It's not indended to be read by the user and it's not a "deliverable" for the user.
◧◩◪◨⬒
5. falcor+a32[view] [source] 2026-02-07 18:19:42
>>bonobo+zY1
I'm working on a system where user requests queue up agentic runs that do a bit of analytical reasoning and then return a response to the user, and this interpreter can possibly help me significantly reduce the runtime of these jobs.
[go to top]