Playing around with http://Claude.ai which has a build in js repl that it uses to do calculations and such. Was trying to see if I can make it eval the squint transpiler such that I can ask claude to write in cljs... Claude was able to read the squint.core.umd.js (https://cdn.jsdelivr.net/npm/squint-cljs@latest/lib/squint.core.umd.js) and kind of call the js functions in there, but was missing access to compileString I found that fn in the compiler file (https://cdn.jsdelivr.net/npm/squint-cljs@latest/lib/compiler.js) but that was to big too load also. Is there maybe a single minimum sized umd file that I could upload in its repl that provides a basic squint/cljs interpreter? Any suggestions?
Why aren't you just using the ES6 import for compileString and the stdlib?
What do you mean with "too big to load"
This is an example of a node REPL session with squint using ES6:
$ node
Welcome to Node.js v20.11.1.
Type ".help" for more information.
> const { compileString } = await import('squint-cljs')
> const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
> var code = compileString('(+ 1 2 3)', {repl: true, context: 'return'})
undefined
> f = new AsyncFunction(code)
[AsyncFunction: anonymous]
> await f()
6
This works with js-await etc tooThe js repl environment seems to be very restricted and sandboxed - no dynamic ES6 imports - no cdn imports - but it can read and eval uploaded js-files as long as those are not too big - it reads the squint.core.umd.js, but then complains about the size of compiler.js - the idea was to maybe load&eval all that is needed to eval cljs expressions with enough squint js code preloaded. I'm out of my depth here... it felt kind of cool to let claude code in cljs to test things out - right now it uses only js and for python it pretends that it works but cannot really test it.
some people have used scittle in combination with clojure-mcp, you can search the #ai-assisted-coding channel for this
scittle isn't squint, but maybe comes close to what you want
#scittle
ok - i'll have a look - thanks