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`.
Eric Uitbeijerse 2021-03-06T07:12:17.151800Z

Yesterday I got an update of VSC (on Windows 10) and clojure-lsp would not get past the initialization phase anymore. Following the recent instructions from @borkdude fix the issue!. Thx @borkdude šŸ˜„. (Perhaps you should add this to the Calva doc because now I only remembered because it was mentioned so recently)

rm -rf .lsp/sqlite.db
rm -rf .clj-kondo/.cache
mv .clj-kondo/config.edn .clj-kondo/config.backup.edn

ā¤ļø 3
pez 2021-03-06T08:58:43.152100Z

PR welcome! šŸ˜

Eric Uitbeijerse 2021-03-06T10:56:50.152400Z

@pez, I'm not sure how this works, can/should I raise the PR myself (happy to do it, just want to be sure that it is ok for me to do that)?

pez 2021-03-06T11:01:20.152600Z

Not sure what you mean by raising the PR. But what we usually do is to first create an issue, then file a PR addressing that issue. In this case the issue is extra good because it will serve as documentation as well, for people checking issues when running into problems. See How to Hack on Calva on the wiki if you are unfamiliar with the ceremony involved. Though I seem to recall you have filed PRs before?

pez 2021-03-06T11:03:54.152800Z

I think the descriptions around how to hack on the docs is a bit lacking. So if you set things up such that you can run the docs web server locally, please consider updating the wiki with what might be missing.

bringe 2021-03-06T19:54:37.196700Z

Made the issue here: https://github.com/BetterThanTomorrow/calva/issues/1056.

Jan Ignatius 2021-03-06T12:34:46.156200Z

Hi. I'm a beginner and followed a https://www.notion.so/Beginner-Clojure-Environment-Setup-Windows-36f70c16b9a7420da3cd797a3eb712fa#6a53854de58d4f07ba6319d868fba29c to get my VSCode+Calva+Win10+WSL2(Ubuntu20.04) dev environment up and running. Everything seems to be running and I can evaluate my code via REPL, but I noticed that in my setup, I'm missing the "CLJ REPL" named editor (as visible https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F69456039-0a80-40fa-8f64-ad8f0371348f%2FUntitled.png?table=block&id=3d9da936-6132-488e-857d-0f603526f679&width=3670&userId=&cache=v2), instead I have the "output.calva-repl" open. Did I mess up the setup somehow or is the guide out-of-date?

pez 2021-03-06T14:27:53.161300Z

Hello and welcome, @email113! That guide is a bit out of date. We have replaced that REPL window with the output repl you see now. Since you are a beginner I want to give you the tips of not using the output repl window so much as a repl. Most often it is more effective to type that kind of code into (comment ā€¦) forms in the clojure files and evaluate them from there (`alt+enter`).

Jan Ignatius 2021-03-06T14:28:58.162400Z

Right, using the alt+enter was the way that I verified that at least something worked with the setup. šŸ™‚

pez 2021-03-06T14:29:03.162500Z

Also, you donā€™t need to install the clj-kondo extension. It is included in Calva (sort of).

Jan Ignatius 2021-03-06T14:29:19.163100Z

ah, it did complain about the existence of kondo

pez 2021-03-06T14:29:28.163500Z

I wasnā€™t aware of that setup guide, btw. Nice find!

Jan Ignatius 2021-03-06T14:29:29.163600Z

I'll remove the extension to avoid surprises.

pez 2021-03-06T14:30:07.164100Z

Are you a beginner to Clojure too, maybe?

Jan Ignatius 2021-03-06T14:30:49.165Z

I almost gave up on the setup when I started reading http://clojure.org. That page leaves the impression that Windows is not a viable dev platform at all. Unless one is willing to use alpha-grade sw.

Jan Ignatius 2021-03-06T14:31:34.166400Z

I haven't touched programming in almost 20 years, not counting some small VB stuff with office suite.

pez 2021-03-06T14:31:59.166900Z

It is a bit of a bother to set things up on Windows. I think most Clojure people use WSL there.

Jan Ignatius 2021-03-06T14:32:31.167400Z

WSL should get a mention on http://clojure.org, I feel.

pez 2021-03-06T14:33:30.168200Z

I need testers on a beginnerā€™s feature I am working with. Up for it? šŸ˜ƒ

Jan Ignatius 2021-03-06T14:33:49.168600Z

Sure, I certainly fit the bill

agold 2021-03-06T14:34:17.169300Z

For Clojure/Calva use with WSL, see this by Borkdude: https://blog.michielborkent.nl/2020/07/26/remote-wsl2-clojure/

pez 2021-03-06T14:34:24.169600Z

Cool! Just a sec.

borkdude 2021-03-06T14:34:38.169800Z

@email113 There is also #clj-on-windows

Jan Ignatius 2021-03-06T14:35:08.170400Z

Thanks, I'll join the channel.

borkdude 2021-03-06T14:35:33.171200Z

Windows is very much a second grade citizen when it comes to tooling in Clojure, but there are options. E.g. I made https://github.com/borkdude/deps.clj which offers a binary which is a drop-in replacement for the clojure CLI which works in cmd.exe

Jan Ignatius 2021-03-06T14:35:48.171900Z

I was going through the available channels on this Slack but I stopped after the first five pages and still being on the "C"s šŸ˜‰

borkdude 2021-03-06T14:35:58.172200Z

And there is #scoop with lots of nice Clojure utils for the (Windows) command line

borkdude 2021-03-06T14:36:16.172500Z

And there is #babashka for Clojure scripting which also works on Windows

pez 2021-03-06T14:38:00.174200Z

@email113 If you install this VSIX in vscode (Extensions pane -> meatballs menu -> Install from VSIX), there is a new command there: Fire up the Getting Started REPL. https://11740-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.177-1040-getting-started-repl-365e39c5.vsix

Jan Ignatius 2021-03-06T14:38:08.174600Z

@borkdude I'll go through you repo with interest

pez 2021-03-06T14:38:42.175200Z

You might need to rename the downloaded file from .zip to .vsix.

Jan Ignatius 2021-03-06T14:39:15.175500Z

@pez Yeah, I can't point it directly to the url

ā“ 1
pez 2021-03-06T14:41:17.176500Z

Ah, now I understand. Would be cool to be able to install from a URL, but youā€™ll need to first download.

pez 2021-03-06T14:42:11.177200Z

Itā€™s very much work in progress. You can read a tad more about it here: https://clojureverse.org/t/dram-is-an-interactive-beginners-clojure-guide-in-the-making/7268/

Jan Ignatius 2021-03-06T14:42:12.177300Z

Ok, I have it installed

pez 2021-03-06T14:44:07.179200Z

Awesome. Run that command and wait a few seconds and you should have a REPL started and three files to REPL your way through. The third one is pretty big, and will grow even more as I finish up some kind of v1.

Jan Ignatius 2021-03-06T14:45:41.180100Z

Very cool, I'll dig in and report back

Jan Ignatius 2021-03-06T14:46:13.180600Z

Would you prefer comments/questions as PMs or just directly on this channel?

Jan Ignatius 2021-03-06T14:46:45.181200Z

Or to the Forum thread?

pez 2021-03-06T14:46:57.181400Z

Super duper. I totally appreciate it!

pez 2021-03-06T14:47:29.182100Z

Forum thread, here, and as issues on this repo: https://github.com/BetterThanTomorrow/dram You can mix it up, whatever makes sense. šŸ˜ƒ

pez 2021-03-06T14:50:12.182900Z

Gotta admit Iā€™d love me at least one comment on that forum post. Awfully silent there. šŸ˜ƒ

Jan Ignatius 2021-03-06T15:00:03.185800Z

Already found a typo and an area that should get a clarification .. just give me while

pez 2021-03-06T15:14:08.187200Z

If you like you can fix the typoā€™s by PR. But Iā€™ll take the feedback in any form with great gratitude šŸ˜ƒ

Ilan Uzan 2021-03-06T15:31:13.189Z

hi guys, for some reason the "ctrl+alt+c i" shortcut does not appear to have any affect. "alt + enter" works, setting breakpoints with #break or debugging with #dbg works - only this shortcut doesn't work.. I am working on kubuntu 20.04 - will appreciate any help:)

Eric Uitbeijerse 2021-03-06T15:48:39.189900Z

Same here after the last VSC update (on Windows). "ctrl+alt+c i" still works but it is not decorated anymore

bringe 2021-03-08T17:26:21.208300Z

Hey Eric, would you mind chiming in on this issue with more details, such as Windows version (like 10 home/pro, etc), and whether it happens with lein or deps projects. https://github.com/BetterThanTomorrow/calva/issues/1055 I'm not certain they're related but want to investigate more before making separate issues. I can't reproduce this issue on Windows 10 Pro or Manjaro Linux with VS Code 1.54.1. Both decorations and the debugger work as expected in both.

Eric Uitbeijerse 2021-03-09T07:57:25.225300Z

@brandon.ringe sorry for the delay, it's windows 10 enterprise using Lein. Happy to provide more details but please allow for some delay as Clojure is a hobby project for me so I'm not working on it every day. Version: 1.54.1 (user setup) Commit: f30a9b73e8ffc278e71575118b6bf568f04587c8 Date: 2021-03-04T22:38:31.419Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19041

bringe 2021-03-09T16:29:03.227500Z

No worries for any delays! Thanks for the info

pez 2021-03-06T15:51:32.190200Z

Sounds like a bug. Please report! šŸ˜ƒ

šŸ‘ 1
Ilan Uzan 2021-03-06T17:38:30.192400Z

https://github.com/BetterThanTomorrow/calva/issues/1055 done:) thanks!

šŸ™ 1
pez 2021-03-06T17:40:32.194400Z

Dear Calva friends. Hereā€™s a new VSIX for the Getting Started REPL feature for you to test. The update here is that if you have tried the feature before with earlier dev builds, youā€™ll get prompted about wether to create a new temp dir or reuse the existing one + files. This since the guides might have been updated, but you might want to keep any experiments youā€™ve conducted in the already downloaded files. https://11848-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.177-1040-getting-started-repl-87bf4858.vsix The prompt looks like so:

pez 2021-03-06T17:41:25.194700Z

SockworkOrgange, haha. Guessing you might be my age? šŸ˜ƒ

Ilan Uzan 2021-03-06T17:54:21.195Z

don't know, are you also 27 years old?:)

pez 2021-03-06T18:30:07.195600Z

Haha. Double that!

Ilan Uzan 2021-03-06T18:40:57.195800Z

@pez the name isn't a reference to Clockwork Orange, it's a reference to an homage to Clockwork Orange done in "Me, Earl and the Dying Girl"

pez 2021-03-06T19:25:40.196400Z

Amazing. šŸ˜Ž

Jan Ignatius 2021-03-06T20:14:04.198600Z

Is it possible to see the intermediate results of a evaluation with Calva. E.g. I would like to better understand what happens on each step of: (as->Ā 15Ā $ Ā Ā Ā Ā `(rangeĀ 1Ā $Ā 3)` Ā Ā Ā Ā `(interposeĀ ":"Ā $))` Can I somehow inspect e.g. the output of range?

bringe 2021-03-06T20:17:33.200100Z

You may be able to use the debugger by placing #dbg before that top level form, if it is a top level form:Ā https://calva.io/debugger/

Jan Ignatius 2021-03-06T20:17:48.200400Z

Thank you, I'll look into it.

bringe 2021-03-06T20:18:08.200600Z

You could also use a spy function as seen here: https://clojure.github.io/tools.logging/#clojure.tools.logging/spy. Just need to add clojure.tools.logging as a dep in your project

bringe 2021-03-06T20:18:22.200800Z

https://github.com/clojure/tools.logging

bringe 2021-03-06T20:20:14.201100Z

Many times for small experiments like this though, you can copy an expression out into a comment form, replace variables, and run it there. Or, if there aren't variables in it you can run it directly from where it exists by placing the cursor before or after it and running the command to evaluate the current form

bringe 2021-03-06T20:21:06.201300Z

Another method is to def the variables in the expression, then run it in place as I mentioned above

bringe 2021-03-06T20:21:49.201500Z

So you could eval (def $ 100) then place your cursor here:

(as->Ā 15Ā $
Ā Ā Ā Ā (rangeĀ 1Ā $Ā 3)|
Ā Ā Ā Ā (interposeĀ ":"Ā $)) 
And evaluate the current form (not top level) - ctrl+enter

bringe 2021-03-06T20:22:19.201700Z

This is part of the beauty of clojure repl dev

pez 2021-03-06T21:05:04.202Z

I think CIDER has an Evaluate up to (or some such) command. It evaluates the thread up to where the cursor is. Please file an issue with that feature request on Calva, @email113.