Notes on the new Claude analysis JavaScript code execution tool
simonwillison.net
Notes on the new Claude analysis JavaScript code execution tool
1–10 of 60 posts
Re: Notes on the new Claude analysis JavaScript code execution tool
#2Re: Notes on the new Claude analysis JavaScript code execution tool
#3Re: Notes on the new Claude analysis JavaScript code execution tool
#4I've been trying to figure out the right pattern for running untrusted JavaScript code in a browser sandbox that's controlled by a page for a while now, looks like Anthropic have figured that out. Hoping someone can reverse engineer exactly how they are doing this - their JavaScript code is too obfuscated for me to dig out the tricks, sadly.
Re: Notes on the new Claude analysis JavaScript code execution tool
#5I've been trying to figure out the right pattern for running untrusted JavaScript code in a browser sandbox that's controlled by a page for a while now, looks like Anthropic have figured that out. Hoping someone can reverse engineer exactly how they are doing this - their JavaScript code is too obfuscated for me to dig out the tricks, sadly.
Re: Notes on the new Claude analysis JavaScript code execution tool
#6Re: Notes on the new Claude analysis JavaScript code execution tool
#7JavaScript is the perfect language for this. I can't wait for a sandboxed coding environment to totally set AI loose.
[0] https://e2b.dev
Re: Notes on the new Claude analysis JavaScript code execution tool
#8When working with Python, I've found Sonnet (pre 3.5) to be quite superior to ChatGPT (mostly 4, sometimes 3.5) with regards to verbosity, structure and prompt / instruct comprehension.
I've switched to a JavaScript project two weeks ago and the tables have turned.
Sonnet 3.5 is much more verbose and I need to make corrections a few times, whereas ChatGPTs output is shorter and on point.
I'll closely follow if this improves if Claude are focussing on JS themselves.
Re: Notes on the new Claude analysis JavaScript code execution tool
#9Re: Notes on the new Claude analysis JavaScript code execution tool
#10I've been trying to figure out the right pattern for running untrusted JavaScript code in a browser sandbox that's controlled by a page for a while now, looks like Anthropic have figured that out. Hoping someone can reverse engineer exactly how they are doing this - their JavaScript code is too obfuscated for me to dig out the tricks, sadly.
What I believe they settled on was a JS interpreter compiled to WASM -- it can run arbitrary JS but with very well-defined and restricted interfaces to the outside world (the browser's JS runtime environment).