Fork me on GitHub
#calva
<
2024-03-23
>
pez13:03:42

Dear Calva-friends: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.427 • Fix: https://github.com/BetterThanTomorrow/calva/issues/2450 • Fix: https://github.com/BetterThanTomorrow/calva/issues/2444 So, fixing the regression with loading a file in the repl failing when the output-channel destination is configured, as reported by @lspector. And making the Clojure output a tad less verbose by relaxing the code fencing for “simple” values such as numbers, strings, keywords, symbols, etcetera. (For data structures we still code fence it as clojure so that the output channel will syntax highlight the code.)

🎉 1
lspector13:03:50

Might it be possible to turn off code fencing entirely, so that the output is just the output?

pez13:03:37

It’s possible, but I’m always on the fence (sorry) against settings if I can avoid them. Since we are planning to add more output destinations, that won’t call for fencing, this will probably be how we cater to this issue.

👍 1
lspector13:03:07

I appreciate avoiding settings, and especially that you are keeping your eye on the long game! FWIW though, "the output is the output" would seem to me to be the nicest default behavior.

pez13:03:16

That’s a thing with avoiding settings. People will have different opinions on what’s nicest. I think it’s nicer with syntax highlighted results than with plain text.

lspector13:03:11

Yes, and understood. FWIW I think my bias is rooted in a love of homoiconicity, or something like that. Lots of my workflows feed printed output and/or returned results back into Clojure as code and/or data, and cluttering it up with extraneous stuff seems like a violation.

pez14:03:32

Gotcha. There is a command for copying the last result to the clipboard. Sounds like that would fit your workflow? No code fencing or anything like that copied, cross my heart and hope to die.

lspector14:03:25

Thanks! I could see that being helpful, but not the answer if you want a lot of results rather than just the last one. For the moment I've switched to using a mix of Calva for editing and testing small things and the CLI for actually running my main processes, since that sends printed output and results unadulterated to my Terminal window. Possibly I'll stick to something like this going forward, which may be fine.

pez14:03:58

We’ll see how you like the next output destination options.

❤️ 1
pez14:03:30

Would you like an option to have the evaluated expression printed, btw?

lspector14:03:07

No, I don't think so. My ideal is that all that shows up in the output is things that I explicitly print with println or the like, along with results of expressions that I evaluate with option-return. All unadulterated.

👍 1
pez23:03:29

A new Calva is out.

Karol Wójcik13:03:05

This is amazing! Is it possible to add an optional dependency on clj-commons.pretty to make the default errors more human readable?

pez14:03:52

What we could do is to check if there are already ansi escapes in the output and skip adding any in that case. Then if you are using whatever in your project, the terminal output will honor it.

pez23:03:55

Dear Calva-friends: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.428https://github.com/BetterThanTomorrow/calva/issues/2452 Now you can configure all output categories (results, stderr, stdout, other output) to go to the Calva Output (pseudo) T*erminal*. I think it is nicer than both the REPL Window and the Output Channel for this purpose. The output isn’t marked up in any way, just plain text as it is returned from the REPL, only with some coloring to make it easy to read. And the terminal panes can be dragged to a sidebar, or the Output terminal itself can be dragged into the editor area.

clojure 4
❤️ 5