squint

m3tti 2024-10-03T09:03:59.388859Z

no clue if thats the right place BUT if i use the compiler on a server could i also start the repl there? and what repls are possible and how?

borkdude 2024-10-03T09:10:14.302909Z

a REPL into the browser you mean?

m3tti 2024-10-03T09:10:33.992079Z

would be even better if thats possible 😄

m3tti 2024-10-03T09:10:54.186299Z

just thinking about how to improve the workflow with my framework regarding squint

borkdude 2024-10-03T09:11:09.531899Z

then what did you mean in your original question if it wasn't what I asked

m3tti 2024-10-03T09:11:51.850919Z

just to have some way of evaluating expressions with emacs/calva you name it against squint. to test some functions

m3tti 2024-10-03T09:12:31.679509Z

i mean if you can do it in the browser that would be even more cooler than i would imagine you can directly modify your code you see right?

borkdude 2024-10-03T09:13:59.354289Z

there's isn't a browser REPL now (TODO) but if you compile with :repl true in the compiler options, then you will get global namespace objects which you can poke around at in the browser console

1
borkdude 2024-10-03T09:14:09.482939Z

e.g.

my_namespace.function()

m3tti 2024-10-03T09:15:01.349449Z

hrm that means another blogpost i guess 😄 and a cool functionality

m3tti 2024-10-03T09:15:29.075049Z

imho only thing that would be nice is to load the file on the fly but i guess that should be totaly doable what do you think @borkdude?

m3tti 2024-10-03T09:15:46.041999Z

like my_namespace.reload() which loads the new code

m3tti 2024-10-03T09:16:06.065099Z

so fetching the javascript from the server and evaling it

borkdude 2024-10-03T09:18:07.963129Z

if you want hot reloading, I think a setup with vite is better. see examples/vite-react

m3tti 2024-10-03T09:18:34.479459Z

yeah i was thinking about adding this feature to borkweb. so you don't need any other tool

borkdude 2024-10-03T09:19:50.014149Z

I guess you could look at figwheel and shadow-cljs how they do it. should be possible, but my take on squint is that it's a light weight tool that translates "CLJS" to JS and then the existing JS tooling should just pick on that, without me having to re-invent "CLJS" specific tooling

m3tti 2024-10-03T09:21:51.473689Z

yaeh i know in my limited brain i was thinking that it would be nice to have some sort of livereloading for js code so it would be easier to test out cljs code. and fiddle around with it while developing. But maybe it is sufficient the way i have it right now lets see 😄

m3tti 2024-10-03T09:22:03.455599Z

i don't to reinvent it too 😄