Fork me on GitHub
#calva
<
2019-09-13
>
bringe00:09:26

@pez any updates on #218? (https://github.com/BetterThanTomorrow/calva/issues/218) I've been updating/packaging a custom build for my team since the logging helps us during development of our data streams (which log inside go-loops).

pez04:09:11

No progress yet.

👍 4
pez06:09:51

Thanks, @alex-eberts. And thanks for giving it context. That makes it much easier for people to figure out if they can help with fixing the issue.

Clément09:09:52

Is there a way to get the "Evaluate current form/selection and pretty print to output" command to print in real time?

Clément09:09:54

for example,

Clément09:09:59

(doseq [x (range 5)]
  (println "starting")
  (Thread/sleep 1000)
  (println "ending"))

Clément09:09:46

would take 5 seconds to print this all at once:

stdout:
starting
ending
starting
ending
starting
ending
starting
ending
starting
ending

Clément09:09:28

while evaluating this expression in the basic clojure terminal REPL would live-print the printlns

pez10:09:33

Not yet, @salaun.clement, but there are others asking for it, so I will probably pick it up soon. Cheer it on here: https://github.com/BetterThanTomorrow/calva/issues/218

pez11:09:35

As is mentioned in that issue, a workaround is to run a command like lein repl :connect (or the CLI or shadow equivalents) in a VS Code terminal window and eval in that repl prompt.

pez11:09:12

(Also note that Calva will not pretty print stdout output.)

Clément13:09:35

Didn't see the issue, thanks for the heads up and the workaround :thumbsup:

pez13:09:46

It is not exactly the same issue. But technically I think they rely on the same changes.

gerred11:09:00

2.0.36 works great 👍

aw_yeah 8
alex-eberts15:09:59

@pez I verified https://github.com/BetterThanTomorrow/calva/issues/314#issuecomment-531281592 and the issue appears to be fixed at a high level by Calva v2.0.37. Please see the "Additional Notes" section for a spurious warning regarding cider-nrepl. Also, pretty printed output is not appearing in the Calva REPL but I see that there are other issues regarding pretty printing and nrepl so maybe it's related to the cider-nrepl warning? Happy to open new issues and continue to test.

alex-eberts15:09:38

@pez Great work by the way! :the_horns:

bringe16:09:19

https://gist.github.com/bpringe/4f1d07f98633a956a8b33af572e7b810 I wrote this semi-concise guide to getting started with Clojure on Windows (with Calva 🎉), for a friend and anyone else who might find it useful. There are a few other similar ones out there, but one more (possibly more straightforward) couldn't hurt.

pez16:09:31

That’s some serious testing, @alex-eberts. I love it. The output issue is because shadow-cljs sends output out of band, and Calva expects it to come along with the evaluation results. It is worth an issue of its own, actually. I’ll file one if I remember to tonight. The cider-nrepl warnings are strange
 What version of shadow-cljs are you using?

alex-eberts04:09:41

That’s interesting re: shadow-cljs. I agree that it’s a worthy issue because not having the output in the REPL breaks one of the core benefits of a REPL-driven workflow IMHO.

alex-eberts04:09:48

Re: shadow-cljs version I have [thheller/shadow-cljs "2.8.52"] in my test project.

alex-eberts18:09:21

@pez I'm looking into the cider-nrepl requires Leiningen 2.8.3 or greater issue. The message appears to be coming from the cider-nrepl lib: https://github.com/clojure-emacs/cider-nrepl/blob/64694d98e15a48ffd294b0902d90bba5966b21c1/src/cider_nrepl/plugin.clj#L49.

alex-eberts18:09:08

I will explore why leiningen.core.main/version-satisfies? reports a different version than the leiningen installed on my mac via brew.

metal 4
pez16:09:57

Wonderful, @brandon.ringe! I wish more people would write Clojure tutorials involving Calva. 😃 Right now my family expects me to deliver Ramsey quality burgers, so will have to read later. Will get back to you with feedback when I have read it.

pez16:09:46

Re: those burgers. My oldest son and I team up and do as Ramsey says. It is a hit every time. If you like burgers and grilling, I recommend watching and getting inspired: https://www.youtube.com/watch?v=iM_KMYulI_s

bringe17:09:36

Ha! Will have to try that. I know of him, but haven't tried anything from him