monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
1–10 of 15 posts
Re: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
#2The Monty name was a perfect choice, Yakety Sax was playing in the distance as I read through the readme.
Jokes aside, I do love seeing WASM as a bridge to enable cool stuff like this.
Re: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
#3Re: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
#4Re: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
#5Re: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
#6If you're going to run Python code inside a WebAssembly container anyway why go with the Monty subset when you could use full CPython (or MicroPython) compiled to WASM instead?
Re: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
#7Re: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
#8https://github.com/CamdenClark/monty-go
It implements the new subprocess model for spawning Monty VMs that help keep your main thread isolated if one of the VMs crashes.
Because Monty is packaged as a binary now, you don't need to do the WASM embedding stuff, you just need to make sure you have the binary. (Similar to how you would run playwright in Go, for example)
Re: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
#9Re: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter
#10If you're going to run Python code inside a WebAssembly container anyway why go with the Monty subset when you could use full CPython (or MicroPython) compiled to WASM instead?
2. Suspension and resumption. Monty's VM state is fully serializable so I can run the VM until it gets to a tool call and persist the VM state. I could resume it days later with the results of the tool call with no issues. Doing that guaranteed with CPython is really tricky (tools like Pickle can get you close but if you have open sockets or other weird stuff you're in a world of hurt).