This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-20
Channels
- # announcements (5)
- # aws (15)
- # babashka (12)
- # beginners (87)
- # calva (13)
- # cider (16)
- # clj-kondo (4)
- # clojure (22)
- # clojure-argentina (1)
- # clojure-europe (9)
- # clojure-houston (1)
- # clojure-nl (2)
- # clojure-norway (25)
- # clojure-uk (5)
- # clojurescript (12)
- # core-typed (37)
- # cursive (15)
- # datomic (40)
- # editors (8)
- # emacs (4)
- # events (1)
- # hyperfiddle (29)
- # keechma (8)
- # leiningen (6)
- # lsp (7)
- # malli (25)
- # off-topic (26)
- # pathom (10)
- # portal (3)
- # re-frame (22)
- # reitit (1)
- # releases (1)
- # ring (2)
- # shadow-cljs (18)
- # yamlscript (1)
does someone else gets some dangling repl processes when using Calva? I start using my machine and opening/closing vscode sometimes leaves java processes running until my machine is burning hot. How does one avoid this?
Jack-in can sometimes leave the REPL process dangling. Not sure why that would heat up your machine though. But it depends on what your app is doing when it is left hanging, of course.
I do things like this to list java processes for the current directory:
lsof -a -c java | grep ${PWD}
And to get rid of them:
kill -9 $(lsof -a -c java | grep ${PWD} | awk '{print $2}')
I've lately been finding my closed laptop to be wicked hot with the fan running when I take it out of my backpack after doing work with long, computationally intensive runs in a Calva REPL, even though I've done "Interrupt running evaluations" before closing the lid. Most curiously, when I look at Activity Monitor (this is a Mac) when I open it up, I don't see a rogue Java process. So it's unclear what was going on. But I've only experienced this when doing this kind of work with Calva, so I think it's somehow related. The only cure I've found is a system shutdown and restart.
If killing the Java processes doesn’t help, then it’s something else heating up your machine. Could be Calva itself, but closing the VS Code window should fix that heat source as well. The only thing that should be able to survive that would be clojure-lsp (though, unlikely, because VS Code should shut it down, because it’s responsible for the life cycle of that process). But maybe you can check if you have clojure-lsp processes running. system shutdown seems very drastic to me, who often have 100+ days of system uptime and often have 20 VS Code windows open and something like 500 browser tabs in total in three-four different browsers. I’ve only heard the fans of my computer twice or so (when playing Minecraft).
Thanks. I also rarely do a shutdown, except for this. The weirdest thing is that I see nothing using a lot of CPU in Activity Monitor when I pull the hot, fan-cranking machine out of my backpack. Possibly it's something else wrong with the machine, and the apparent connection to Calva is a coincidence. But on the other hand these processes that I run are intensive in CPU and memory, and I can believe that the load somehow causes mischief that persists even when we try to kill processes.
another question: is there any difference between starting a repl through calva and jack-in vs starting a repl through the cli and connecting to a running repl using calva?
You end up in the same place either way. The important difference, to me, is I can restart or reload VSCode and it doesn’t affect my running, CLI-launched REPL.
Jack-in mainly contributes a way to satisfy Calva’s dependencies on the repl process. There’s a bit more to it (see https://calva.io/jack-in-guide/ for details) but if you start the repl yourself with the dependencies satisfied, you should be good. There’s a command for copying the command line that Calva Jack-in would use.
You know what to do, Calva friends. 😃 ❤️ 🙏 https://github.com/BetterThanTomorrow/calva