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`.
Hukka 2021-06-02T05:19:04.091800Z

I see. I'll make a not to make a case. Should be simple enough as I was processing a huge CSV file, so just need to get a public huge file and do it on top of that

👍 1
Hukka 2021-06-02T05:20:19.093Z

Is there a calva specific way to rename a binding, so it knows what the scope is, not just a regular, global find and replace?

pez 2021-06-02T10:57:51.101Z

Indeed. It’s a bit of a paradox that the VS Code commands sometimes get a bit less discoverable.

pez 2021-06-02T10:59:12.101200Z

Consider saying hello in the #lsp channel as well and tell them you’re happy with the rename command, It is the power of clojure-lsp that Calva sources for this.

2021-06-02T05:21:31.093100Z

I think “Rename Symbol” setting in VSCode does that

Hukka 2021-06-02T05:44:59.093300Z

Ah, excellent! I was just going through the calva commands. Thanks

👍 1
anssikin 2021-06-02T08:08:17.100500Z

hi! thank you for this super extension, it has helped me a ton working with Clojure in VSCode. i have had one issue that i've been unable to resolve regarding Calva Jack-In REPL and Figwheel Main, namely that i cannot get Calva REPL to connect. it gets stuck in ; Hooking up nREPL sessions... and all i can see in VSCode Calva Connection Log is Socket closed. i have tried this both with Jack-In and connecting to running REPL server (copied REPL dependencies to deps.edn and started app manually). i'm not sure what the problem could be related to, and i started learning Clojure just two months ago, so i might be missing a bunch of knowledge here. any pointers are much appreciated. 🙂

pez 2021-06-02T10:06:10.100800Z

Hello. Glad Calva is of help! And sad that sad that jack-in fails for that project. Can you test with a fresh Figwheel Main project and see if you have the issue then? I should try it myself, but am tight on time right now. Also, describe your process for jacking in. What menus you get, what you select in them, and such. Maybe we can figure out what goes wrong easier then.

anssikin 2021-06-02T12:43:14.101400Z

hi! i looked into generating a fresh Figwheel Main app from the template and it indeed worked as expected. i checked out the difference between it and my current project and noticed that i was launching the Calva REPL with alias that had :main-opts defined. as this was an "inherited" project i did not know that it could be removed and the build would still work when using Calva REPL, so i tried it and it did the trick! i now got the REPL working with my project. thank you for the help!

pez 2021-06-02T13:49:30.101600Z

🎉

lspector 2021-06-02T20:02:50.104600Z

Returning to Calva after a long gap and excited to see all of the improvements!

pez 2021-06-02T20:07:52.108700Z

Welcome back, @lspector! I’ve been missing you here. May I be curious and ask if you’ve just paused Clojure or if some other editor/ide worked better for you?

lspector 2021-06-02T20:09:00.109600Z

I've mostly been using Cursive, in part because I've also been using IntelliJ for teaching Java.

lspector 2021-06-02T20:10:28.110900Z

It seems that Calva has progressed a lot and I may switch back for my summer research students, who will be new to Clojure, and if I do I'll switch back for my own work since I like to use the same environment as my students.

lspector 2021-06-02T20:16:21.114800Z

FWIW we still don't agree about strict mode 😩. I was confused and stuck for about 1/2 hr yesterday before I remembered that that might be the problem, and re-figured out how to turn it off. I dig the humor of calling non-strict mode Cave Man in the docs, but FYI in my instructions for my students I will show them how to turn off "Infuriating Mode" (strict mode) before even evaluating their first expression 🙂.

pez 2021-06-02T20:34:43.121100Z

Yeah, I remember we see this very differently. I’d like to propose that you try running with strict mode on a bit and use alt+backspace whenever you need brute force. It is really the major difference between strict and Cave Man that alt reaches over from one mode to the other.

pez 2021-06-02T20:35:29.121900Z

But anyway, we have tried to make it easy to switch between the modes. There’s a button in the status bar for it even.

bringe 2021-06-02T21:12:18.126600Z

I do like strict mode being the default, but I wonder if we could/should notify the user better about the prevention of removing characters that would cause an unbalance (if this is what @lspector means is infuriating - if not, or if there's more, I'm curious). To elaborate on the above, we could pop up a notification on the first time backspace or delete moves past a character instead of deleting it, explaining that strict mode is enabled and this is why they just witnessed what they did. This message could have a check box to not show it again. Just throwing out ideas. I personally have not been infuriated by strict mode. 😄

pez 2021-06-02T21:21:03.129300Z

We could consider renaming strict mode to Infuriating Mode. 😀 Only half kidding.

🙃 1
lspector 2021-06-02T21:27:42.135500Z

FYI the thing that sent me down the spiral of confusion this time was pasting in some unbalanced code from elsewhere (I didn't realize it was unbalanced), which led down a path that I would rather not relive in full detail 🙂. As I was beginning to figure things out I tried to change () to [] as I would in any other text editing environment and after a few seconds of fighting with it I remembered about infuriating mode. Then some googling and reading and I remembered about that little button on the lower left that can turn it off. At root I think is the fact that I interact with text editing in ways that strict mode wasn't designed for, and even if it tries to be more clever as @brandon.ringe suggests, it will always do confusing things that I don't want in many cases. I want it to show how brackets match and re-indent correctly, but aside from that I want it to act like any other text editor. My students, I'm pretty confident, will also have their expectations thwarted and that's bad news when they're also trying to learn Clojure, etc. And it's bad news for me even though I've been lisping since around 1985. But including instructions to turn this off in my first presentation and notes, etc., is a very small price to pay! So I don't want to make too big a deal of it.

bringe 2021-06-02T21:31:54.137300Z

Fair enough. > I want it to show how brackets match and re-indent correctly, but aside from that I want it to act like any other text editor. Does this happen with strict mode off?

bringe 2021-06-02T21:34:02.139Z

I wonder what the majority of Calva users think about this (especially newcomers). I've seen very few complaints about strict mode being the default, and I feel it probably helps more than it hurts, but I could be wrong.

lspector 2021-06-02T21:39:59.139800Z

It mostly happens -- acting like any other text editor except for showing bracket matching and auto-reindenting -- with strict mode off. Closing brackets are still inserted and that's a minus rather than a plus, but it's not too hard to deal with.

lspector 2021-06-02T21:43:32.142700Z

There may be a bias in the feedback you see, because people who are thwarted at typing and simple editing are unlikely to hang around long enough to give feedback. If they already have programming experience, especially clojure experience, they may be fine or fine with figuring out how to turn it off. I think I may be in the unusual position of working with lots of people, over a long time who are coming from very different places.

lspector 2021-06-02T21:47:04.145100Z

And plus, for my own coding, the thwarting of my ordinary typing/copying/pasting habits is bad, but if I can turn it off I'll be fine.

bringe 2021-06-02T23:32:40.147800Z

> There may be a bias in the feedback you see, because people who are thwarted at typing and simple editing are unlikely to hang around long enough to give feedback. Indeed this could be the case more often than we know, but it's hard to know for sure, and either way we go we are making assumptions on some level. You bring up good points, though. I'm not totally sure what is best here, but I wouldn't want to change things too quickly based on assumptions (not that it's just up to me, of course). This is good food for thought, in any case.