This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-15
Channels
- # adventofcode (46)
- # announcements (3)
- # aws (7)
- # babashka (47)
- # beginners (86)
- # calva (40)
- # cider (8)
- # clj-kondo (22)
- # clojure (63)
- # clojure-europe (16)
- # clojure-hungary (3)
- # clojure-nl (1)
- # clojure-norway (46)
- # clojure-sweden (1)
- # clojure-uk (3)
- # clojuredesign-podcast (2)
- # conjure (4)
- # datalevin (1)
- # events (1)
- # fulcro (5)
- # graalvm (4)
- # honeysql (8)
- # hyperfiddle (15)
- # music (1)
- # off-topic (5)
- # pathom (7)
- # pedestal (1)
- # polylith (3)
- # portal (19)
- # quil (1)
- # re-frame (36)
- # releases (1)
- # specter (3)
- # sql (3)
- # timbre (11)
- # tools-deps (4)
- # xtdb (55)
hey - curious if there’s any new thoughts on this issue given the Calva eval API? https://github.com/BetterThanTomorrow/calva/issues/76 I have a project that spins up a JVM for a server process and a separate JVM for shadow-cljs, right now I do the two workspace method
Hi! With the Calva eval API, do you mean this? https://calva.io/api/#repl
Hey @pez - yeah was wondering if something could be built on the eval API that would let me connect to two different REPLs. I have a project that is running Clojure on the server and Clojure/ClojureScript to generate a React Native client. Right now I have to jack-in to two different projects using two different VS Code windows
The evaluation API suffers from the same limitations as Calva here, unfortunately. Can we have a look at your project setup and see if we can get the Clojure server to host the ClojureScript repl? I’m available for a huddle, if you like.
sure - that’d be much appreciated!
is a huddle like avoice chat? or just a separate channel?
weird question: does anyone know if it's possible to embed images into the code in vscode/calva? (likely in comments)
just doing a fair bit of UI work, so would be nice to add a thumbnail floating right of the function definition (or even above) to give a bit more visual cue to the code I'm working with.. heck, first prize would be to render the rum component to html and inline it there.. but that sounds like quite the project :face_with_peeking_eye:
Maybe @U1G869VNV has some pointers on how to leverage #C0185BFLLSE for things like this.
Only ever used ascii drawings and emojies myself. Have you considered to just write a url or relative file path and then look for a VS Code plugin that will show the contents?
ye, that would work fine except that I can't really find anything except a tooltip one 🙈
There’s an old VS Code API proposal that would give us more tools for doing this, but there are no current plans to finalize it. https://github.com/microsoft/vscode/issues/85682
https://marketplace.visualstudio.com/items?itemName=kisstkondoros.vscode-gutter-preview gets gutter images at least - not perfect, but workable
Hey @pez - yeah was wondering if something could be built on the eval API that would let me connect to two different REPLs. I have a project that is running Clojure on the server and Clojure/ClojureScript to generate a React Native client. Right now I have to jack-in to two different projects using two different VS Code windows
Just a random thank you -- can't use WSL on my new computer at work, msys2 emacs is fighting me, so after a decade finally taking the plunge of trying to use clojure without linux/emacs, and calva got me up and running very smoothly
New job, city govt, no one in my department does programming. Getting a JDK was already out of the ordinary. Maybe once I’ve been there a while I can ask to install something more wacky. No formal policy!
Dear Calva friends: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.402 • Fix npm audit warnings, bump some deps, clean out some deps • https://github.com/BetterThanTomorrow/calva/issues/2365 • Fix: https://github.com/BetterThanTomorrow/calva/issues/2368 The bump to latest cljfmt should help in projects suffering from formatting missmatch between Cursive and other editors.
Thanks for the reminder about selecting words inside line comments, @U034568PWRW. Now you should not need those custom settings you showed me. Let me know how you fare!
Awesome! Thanks @pez
Is there any way to easily interrupt a long or infinite loop that's constantly printing things to the REPL? Calva: Interrupt Running Evaluations
works great if things aren't printing, but if things are printing, this doesn't work and jacking out doesn't either. I even get this problem in CPU-intensive tasks that only print once every few seconds -- if I interrupt the task, it seems to keep evaluating for many seconds (or minutes) afterward.
Hi! I was not aware of this problem. Can you create a reproduction project that we can have a look at?
Sure, I'll give it a shot later today.
I was just about to ask the same thing! I don't have a good example project since it's my first day in calva...
You can enable the nrepl message log (there’s a command for that) and see if messages are being printed with lag to the output window.
So, something as simple as this just won't interrupt:
(doseq [x (range)]
(println x))
Even if I disconnect from the REPL, it keeps going. The only way I can get it to stop (on MacOS) is to open Activity Monitor, find a process called Code Helper (plugin)
, and force quit it.
Where, if I open a REPL in my Terminal and run that code, I can quit it instantly with ctrl-C
With emacs, I'm pretty sure I could ctrl-c
the repl window and it would interrupt, but not kill the repl.
The ctrl+c
mentioned above is not in the repl window, but the jack-in terminal. You can bind interrupt to ctrl-c
in the REPL window with Calva too. But on Windows and Linux that may be a bit inconvenient, since ctrl+c is supposed to copy stuff.
yeah, but I assumed that it would kill the repl process? Or does it just send a signal and the repl just interrupts? I'll test it!
it kills! I'd like to interrupt, if possible. I wonder if the repl supports different signals for different things.
I think we are talking about different things. The repl window in Calva is not the same as the jack-in terminal.
Yeah, I think I misunderstood something along the way thinking that someone was saying that ctrl-c
'ing the jack-in window would interrupt. Looking above, nobody said that!
To summarize:
• ctrl-c
in the jack-in window will kill the repl
• The Calva: Interrupt Running Evaluations
command will do what it says.
• ctrl-c
in the repl window can be bound to the-above.
Above, you said:
> As for stopping the thread started by that doseq
call there… I don’t think you can.
The Calva: Interrupt Running Evaluations
command interrupted the doseq for me. Am I missing something? Thanks for your patience with me!
Your summary shows that we are on the same page now. 😃
> The Calva: Interrupt Running Evaluations
command interrupted the doseq for me. Am I missing something?
I actually have the same observation. Asked about it here:
https://clojurians.slack.com/archives/C17JYSA3H/p1702810229980689
Not sure where this leaves us.