Fork me on GitHub
#calva
<
2019-10-24
>
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?

pez06:10:36

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

pez08:10:15

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.

pez06:10:54

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

👍 4
pez08:10:22

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).

pez08:10:50

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
Sasho12:10:09

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?

pez13:10:30

Do evaluations in general work, but not these?

Sasho13:10:54

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

pez13:10:37

No worries! Glad it works!

thanks3 4
pez19:10:42

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

agold19:10:13

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.

pez19:10:06

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

pez19:10:14

Thanks for helping out testing!

agold19:10:10

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

agold19:10:43

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

borkdude19:10:03

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

borkdude19:10:33

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

agold20:10:32

I tried this:

agold20:10:45

:lint-as {day8.re-frame.tracing/fn-traced cljs.core/fn} Still getting error: unresolved symbol _

borkdude20:10:34

can you try clojure.core/fn?

borkdude20:10:08

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

borkdude19:10:15

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

borkdude19:10:34

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

agold19:10:37

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.

agold19:10:53

Thanks again!

pez19:10:38

It is the same situation today with Joker.

pez19:10:36

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.

fiddlerwoaroof20:10:48

@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.

fiddlerwoaroof20:10:16

Otherwise, it’s a great extension

fiddlerwoaroof20:10:52

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

fiddlerwoaroof20:10:28

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

pez20:10:37

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?

fiddlerwoaroof20:10:09

Reload the window.

pez21:10:22

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

pez21:10:06

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.

pez21:10:53

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?

fiddlerwoaroof22:10:47

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

fiddlerwoaroof22:10:36

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

pez22:10:09

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

pez22:10:59

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