Fork me on GitHub
Roman Tsopin06:10:56

Hi there, I’m having problem with lots of output to new repl window, it starts to be very slow with time. Is there any workarounds to this?


I wasn’t aware of this slowdown. Does it help to clear the REPL window? (It’s ctrl+l)

Roman Tsopin08:10:16

I meant when I eval something like (run! #(println {:a :b :c :d :e :f :g %}) (range 1000)) a few times in a row new repl becomes unresponsive, but if I eval it using terminal repl (using eval inline and Calva says) it’s working much faster


OK. So that slowdown I am aware of. I've filed an issue about it. But there is no remedy yet. I recommend using the editor to evaluate most things, rather than the REPL prompt.


Many thanks for the shoutout in the ClojureScript Podcast, @dominicm! Wow!

👍 4

Dear Calva-friends: There is a new linting extension in town. It bundles clj-kondo so there is zero install except the extension itself. Seems to work fabulously with Calva and I'd like to bundle it and remove the linting support from the Calva code. Today Calva uses Joker and process its output. But with this new extension Calva wouldn't have to do anything, so much more bliss. The clj-kondo extension is published by @borkdude (yes, the same dude as with clj-kondo itself).


Please help with giving the clj-kondo extension some testing, so that we find and can fix any quirks before releasing a Calva that bundles it.

clj-kondo 12
calva 12

Hello. 🙂 Today I discovered the commands Print to comment and Print to result. However, when I try to execute them with a simple expression (+ 1 2), I get a notification, that the command is not enabled in the current context. Could anyone point me to the root of this?


Do evaluations in general work, but not these?


😞 Sorry, @pez, again a confusion on my end. Everything works as expected. Sorry for waiting your time.


No worries! Glad it works!

thanks3 4

Lots of new people in the channel lately. Welcome of you! 😃 ❤️


I tried this out with Calva on WSL and got some odd errors, such as "unresolved symbol _." I tried suppressing this with a config.edn file in .clj-kondo subdir of project directory, but it didn't help (not sure I got the config right though). I get the same error when using clj-kondo --lint from the command prompt.


@agold, is it macros getting you those “unresolved” reports?


Thanks for helping out testing!


It's this form in a re-frame app: (rf/reg-event-db ::initialize-db (fn-traced [ ] db/default-db))


The first _ in the vector arg to fn-traced is reported as "unresolved"


ah, this is because clj-kondo doesn't know what fn-traced means


but you can try a configuration: {:lint-as { clojure.core/fn}}


I tried this:


:lint-as { cljs.core/fn} Still getting error: unresolved symbol _


can you try clojure.core/fn?


what does your namespace require of fn-traced look like?


in .clj-kondo/config.edn in the root of your workspace/project


where is the namespace where fn-traced comes from (I suspect re-frame.core or something)


Thanks, I'll try that when I get a chance. I think we ordinary mortals will need more guidance on configuring the clj-kondo extension if this becomes the Calva default. This is a somewhat mysterious incantation.


Thanks again!


It is the same situation today with Joker.


Doesn’t mean I don’t think we should provide guidance (we do, a bit, with Joker today), just that the situation wouldn’t be introduced by switching the default.


@pez I’ve been trying to use this extension with coworkers who refuse to learn emacs (we do pair programming at work) and have been running into a bunch of mysterious problems. First, sometimes when the connected repl quits, it seems to be impossible to restart it (I.e. jack in does nothing and clicking the status bar icon doesn’t pop up the menu). Second, occasionally the automatic indentation stops working and every new line is sent all the way back to the left margin.


Otherwise, it’s a great extension


If it makes any difference I’m seeing this in a Leiningen project.


My team doesn’t use the new deps.edn stuff yet.


Sorry to hear that it is acting up for you, @fiddlerwoaroof. I don’t recognize any of the problems. Please keep us updated with any clues about when this happens. When the indentation stops working. What do you need to do to make it work again?


Reload the window.


Thanks. That makes you able to jack-in again as well, I’d guess?


I’m thinking the errors could be related. It sounds like Calva gets a bit disabled for you and that it makes the command for jack-in not being there and the formatter to stop helping.


If that is so, it leaves us with the questions: 1. Why would Calva get disabled? And, 2. Why does your REPL quit at times?


Independently, I noticed that if I use VScode’s task management features to kill the repl, Calva doesn’t realize its repl has died.


I wonder if Calva isn’t receiving task status notifications correctly?


That could be. But the REPL Window should notice that the connection dies…


We have some work to do with using Tasks properly for jack in, that’s for sure.