Fork me on GitHub
Adam Helins12:04:16

Do you ever get out of memory exceptions when running generative tests on node? I am noticing more and more that a generative test than is quite all right on the JVM (eg. runs in 20 seconds without any memory adjustment) becomes really bloated when run on node (eg. now takes several minutes and explicitly needs more memory with --max_old_space_size)


Which version of node are you using? Node 14 solved some memory issues we had


@nilern @thheller Hello 🙂 I went through quickstart guide - as mentioned. But admittedly I am not too sure where I should continue from there 😅, do y'all have any suggestions? If not no worries, I'll try to figure something out!


what in particular are you looking to do? I mean did you chose a libray/framework yet or do you just want to test a few things?


Hmmm, I have a good idea of what libraries I am planning to use already. Have been thinking reagent with re-frame for stability (building a final year project for a company) and most examples/references. I considered rum after looking at it for awhile but seems like both are similarly stable and it wouldn't make a huge difference/benefit to go to rum instead


Am specifically building a frontend interface to input constraints (be it check-boxes or sliders) and based on that state, send it as a query to the clojure backend


the setup videos are free, maybe those help


or maybe use the re-frame template and compare what it generated vs. the raw setup you have now


Hmmm okay okay! I'll start from there 🙂 Thanks!


As I’ve worked on my small reagent/shadow-cljs side-project, I’ve noticed the split between my repl and my actual app more and more, especially while debugging. The repl is fine for testing functions in isolation, but being able to inspect my app’s state (without resorting to prn debugging) would be really nice. Is there a (reasonable) way to connect a repl to an actual app? Or would that take me far off the beaten path?


Also, you can (tap> value) view the data in the shadow-cljs inspector (http://localhost:9630/inspect) which really helps as your app state starts to grow.


the inspector is new to me, that looks really useful!

💯 3

@max.r.rothman pretty much all targets support a REPL? how are you using the REPL now?


shadow-cljs watch app and then separately shadow-cljs cljs-repl app would give you a REPL into the app build for example


I’ve got this in my shadow-cljs.edn:

:dev-http {8080 "public"}

 {:frontend {:target :browser
             :modules {:main {:init-fn myapp.main/init}}}}
I typically launch a repl using Calva, which appears to be running this command:
npx shadow-cljs -d cider/cider-nrepl:0.25.8 watch :frontend
After it completes the build, it asks me which repl to start, giving me an option between node, browser, and my build. Selecting “browser” open a tab that says “Code entered in a browser-repl prompt will be evaluated here.“. I’m very much new to cljs, and definitely don’t understand how all the pieces fit together yet, so I really appreciate the help!


select your build, not browser


browser is just a plain standalone REPL, if you select frontend it'll be your build

Lari Saukkonen16:04:07

Lol I didnt realize this either. Ty vm!


I hadn’t been using that because when I try, my repl says “No available JS runtime” and links to a troubleshooting doc. I read through the doc and didn’t see anything that seemed relevant (to my newbie eyes), figured I had done something wrong, and went back to the plain browser option


is there a way to get that to work?


No available JS runtime means that you need to open in the browser first. it is your app you want to REPL into so you need to load your app in the browser


pretty straightforward 😛


facepalm of course. That works perfectly, thanks for the help!