logoalt Hacker News

simonwlast Friday at 11:13 PM8 repliesview on HN

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/


Replies

jstanleyyesterday at 11:38 AM

> 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.

This is true in a sense, but every little papercut at the lower levels of abstraction degrades performance at higher levels as the LLM needs to spend its efforts on hacking around jank in the Python interpreter instead of solving the real problem.

show 1 reply
vghaisasyesterday at 9:34 AM

This is very cool, but I'm having some trouble understanding the use cases.

Is this mostly just for codemode where the MCP calls instead go through a Monty function call? Is it to do some quick maths or pre/post-processing to answer queries? Or maybe to implement CaMeL?

It feels like the power of terminal agents is partly because they can access the network/filesystem, and so sandboxed containers are a natural extension?

show 1 reply
saberienceyesterday at 11:25 AM

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?

show 3 replies
otabdeveloper4yesterday at 11:20 AM

> and rewrite their code to not use classes instead

Only if the training data has enough Python code that doesn't use classes.

(We're in luck that these things are trained on Stackoverflow code snippets.)

yikebfhwyesterday at 2:18 AM

[flagged]

dhdjfhfjfnyesterday at 3:34 AM

[flagged]

show 1 reply
ujjaog72yesterday at 12:44 PM

[flagged]

show 1 reply
issat982yesterday at 2:53 AM

[flagged]