calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
hoppy 2020-08-20T00:52:55.056300Z

absolutely keep up the great work.

👍 1
Jack Arrington 2020-08-20T01:33:04.057100Z

Would be nice if Calva could display a line number when an error is thrown while evaluating a form. Either in the file itself or in the REPL output

Jack Arrington 2020-08-20T01:33:38.057700Z

I'm working on a shadow-cljs project and I have to tab over to my browser console to see the error info

bringe 2020-08-20T01:47:25.059500Z

There may actually be an recent issue with that. I noticed today I'm not seeing stacktraces, which should be printed with errors afaik.

1
bringe 2020-08-20T01:48:06.060600Z

Please file an issue. I'll be able to look into it likely tomorrow

Jack Arrington 2020-08-20T01:49:10.061100Z

On a different note, is it currently possible to pretty-print REPL output? Currently I have a lot of outputs like the first image, which is obviously a little hard to parse at a glance, so I wind up editing it to look like the second photo so I can confirm I have the right output. Not a big deal, but the cumulative effort adds up

Jack Arrington 2020-08-20T01:49:22.061600Z

Awesome, thanks!

👍 1
Jack Arrington 2020-08-20T01:52:23.061900Z

https://github.com/BetterThanTomorrow/calva/issues/758 If you need a more detailed bug report or repro steps I can edit it tomorrow, I am too tired tonight lol

bringe 2020-08-20T01:52:45.062500Z

Indeed, this button in the bottom right of the status bar toggles pretty printing of output

bringe 2020-08-20T01:52:47.062600Z

bringe 2020-08-20T01:53:13.063300Z

There is also a command that toggles it

Jack Arrington 2020-08-20T01:53:33.063700Z

Okay, I thought that might be what that's for. But my pretty-printing is turned on

Jack Arrington 2020-08-20T01:53:39.063900Z

Just not working 😕

bringe 2020-08-20T01:55:43.000200Z

Are you using shadow-cljs?

bringe 2020-08-20T01:57:05.000300Z

All good! I noticed earlier too and sent to @pez, but he is in a very different time zone and therefore sleep schedule, so waiting on his reply (and I'm "off" for the evening). If I'm not missing something there is something definitely wrong

Jack Arrington 2020-08-20T01:57:53.000700Z

Yep!

bringe 2020-08-20T01:59:34.002100Z

Aha! This is something I noticed recently and was confused about. shadow does pprinting differently for reasons. I added this to the docs to clarify: https://calva.io/pprint/#pprint-is-not-working-for-clojurescript

bringe 2020-08-20T02:00:22.002900Z

So, essentially you can change your pprint engine to "calva" in your settings, or you can set :repl-pprint to true in :devtools of your shadow-cljs build

Jack Arrington 2020-08-20T11:12:32.021500Z

Seems like for me switching the pprint engine to "calva" worked, but setting :repl-pprint in my settings had no effect. Might be worth adding a note about in the docs

bringe 2020-08-20T16:11:04.028Z

:repl-pprint works for me. Make sure it was added correctly and that you restarted your shadow repl / build

bringe 2020-08-20T16:11:50.028200Z

This is from the shadow docs: https://shadow-cljs.github.io/docs/UsersGuide.html#_repl_3

Jack Arrington 2020-08-20T21:58:34.032400Z

I did restart it pretty sure. I will double check that it doesn't work later. I didn't have :repl-init-ns set, which I saw before is mentioned in that link, but I figured that shouldn't affect it

👍 1
Jack Arrington 2020-08-20T02:02:16.003600Z

Ah, I see. Thanks for the help!

👍 1
bringe 2020-08-20T02:43:08.003800Z

@pez maybe we should dig up the reasons we stopped defaulting to the calva pprint engine :thinking_face: . If we can switch back, then we can avoid this confusion at least in the default case.

gmercer 2020-08-20T06:25:38.006700Z

Hi, has something changed recently in either latest Calva or latest VSCode update .. I cannot open the REPL window (had a nice orange logo inside the window and on the title bar), I am only getting the output.repl window - I used to do Command-Shift-P .. Open REPL Window (from memory)

pez 2020-08-20T06:30:46.009600Z

@gmercer, yes, a recent Calva update replaced that window with the output.repl window. I do miss those sweet logos, but it is about the only thing I (as a maintainer) miss about it. The default shortcut for opening the new repl window is ctrl+alt+c o. (And it can be opened via the command palette, like you used to do with the old window, as well.)

gmercer 2020-08-20T06:32:33.010100Z

ctrl+alt+c o gives key combination not a command

gmercer 2020-08-20T06:33:57.010500Z

sorry - from project.clj it works 😉

gmercer 2020-08-20T06:35:08.011200Z

the old window also coped with Enter to execute command but we must use Ctrl-Enter now 😞

gmercer 2020-08-20T06:37:20.011900Z

Calva is an amazing tool - thanks to all contributors

pez 2020-08-20T06:38:33.012600Z

Use alt+enter, for now.

gmercer 2020-08-20T06:39:07.013600Z

ooh .. for now - sounds intriguing

gmercer 2020-08-20T06:40:09.015Z

The 'new' window seems amazingly snappy at code completion

pez 2020-08-20T06:40:30.015400Z

We could consider making enter work in this window as well. 😃 But a big part of the point with the new window is that it works very much like a regular file, so alt+enter should feel quite natural after a while.

pez 2020-08-20T06:41:33.016500Z

See https://clojureverse.org/t/calva-summer-of-bugs-2020/6303 for a bit of the rationale with the shift.

gmercer 2020-08-20T06:43:11.017500Z

Not a biggie - but I was using VSCode Live Share with someone .. and it was not happy about the new style .. but the old window was not shareable either .. just thought it was worth mentioning

pez 2020-08-20T06:43:46.017900Z

What was not happy about the new style?

pez 2020-08-20T06:44:37.018800Z

Live Share is one of the reasons for the shift. Since it wasn't really feasibly to make the old window work with Live Share.

gmercer 2020-08-20T06:48:05.020600Z

File was unwriteable .. from memory .. I will wait for my co-conspirator to get well and try again .. might be next week .. I may have incorrectly tried to start my own repl session

pez 2020-08-20T06:50:03.021300Z

Interesting, hoping for a quick recovery there then. This sounds important.

2020-08-20T15:34:37.022Z

@pez what’s the consequences if I close the new repl and evaluate inline? 🙂

2020-08-20T15:35:00.022300Z

doesn’t seem like there’s anything atm

2020-08-20T15:35:10.022700Z

but I just noticed the line “please keep open, because quirks” 😂

pez 2020-08-20T15:43:09.025100Z

Might be that there are none. I had some troubles with that in the first versions, but might have fixed it. Please fly like that a while and let us know. Ie would be most happy to remove that line.

bringe 2020-08-20T16:09:45.027500Z

I've been operating mostly without the output window open, lol. I thought the quirks were with the command to focus/open it, sometimes opening multiple editors for it in different view columns, and then having inconsistent behavior with where output goes. I never experienced this though, and maybe this was just an issue before we made calva save the file after writing to it. I think if multiple editors are open with the same doc now, if the doc is saved it should be reflected across all editors

bringe 2020-08-20T16:09:57.027800Z

Just a theory though, have not tested that assumption

bringe 2020-08-20T17:06:53.029200Z

Calva v2.0.122 is out and stacktraces are fixed (now showing again in the output window) @mail985

❤️ 2
🦜 1
grounded_sage 2020-08-20T18:41:06.029700Z

Does calva use the same rules as cljfmt for it’s formatting?

pez 2020-08-20T18:45:08.030900Z

Yes. In fact Calva is using cljfmt. And you are in charge is the rules. https://calva.io/formatting/

❤️ 1
borkdude 2020-08-20T20:00:32.031600Z

Just dropping that here for whoever wants to take it

❤️ 1
bringe 2020-08-20T23:08:44.036Z

Calva friends and testers: I could use some help testing this vsix: https://7808-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.123-fix-interrupted-evaluation-output-91674a90.vsix Some minor changes were made to error printing both as annotations and in the output window, mainly to print an error when evaluations are interrupted. I've tested myself on linux, but more testing would be good, especially on Mac and Windows. Basically, install it and test out interrupting evaluations, like this (using Calva's interrupt command)

(loop [i 1000]
    (println i)
    (Thread/sleep 3000)
    (if (zero? i)
      i
      (recur (dec i))))
And generally just see that no other output looks weird or is missing :man-shrugging:

Cris B 2020-08-21T07:40:37.037600Z

Been running this today (on Win). Nothing interesting to report. I've been getting the '; Evaluation was interrupted' when expected

❤️ 1
bringe 2020-08-21T17:13:08.038100Z

Awesome!

bringe 2020-08-20T23:10:35.036500Z

As far as what to expect with interrupted evals - something like this:

🤘 1
bringe 2020-08-20T23:11:30.037500Z

Sometimes that "Execution error"/"sleep interrupted" is thrown and sometimes not, but nevermind that.