The fewest step you can achieve is by defining a custom connect sequence, then it becomes ctrl+alt+c ctrl+alt+j enter
.
A minimum config looks something like so:
"calva.replConnectSequences": [
{
"name": "my-app",
"projectType": "Leiningen",
"cljsType": "none",
"menuSelections": {
"leinAlias": null,
"leinProfiles": ["test", "dev"]
}
}
]
Depending on what profiles you have and such.Stupid question here: How can I stop a nREPL? (and/or disconnect?)
Have you started it using Calva, @bastilla?
I did. And when I right-click the option to stop is disabled. Thing is, I obviously programmed an endless loop. So I have constant output and cannot stop it. So I closed Calva altogether. But I guess there must be a better solution.
^ That was the best solution I found. Or to kill the underlying render proceses
I think pez said if your loop is printing, then it’ll build up so much in the buffer that interrupting doesn’t do much
🙂 Thanks. Ok, so I better care for that endless loop to get things going again. Merci.
Hehe that’ll teach ya’ 😜
So, if you start the REPL using Jack-in, the preferred way to kill it is to hit ctrl+c
in the jack-in terminal. Also re-running jack-in will work. But as @ryan072 says, if there is a lot of stuff buffered for the output window, a reload of the vscode window will be necessary. The vscode command Developer: Reload Window should work for that.
Thanks @pez. I didn't realize there was a command for that.
@bastilla fwiw, for advent of code, I would put short sleeps in my code so that I could watch it run and kill it when I had seen enough steps. Depending on your use case, that may or may not help
@ryan072 Sounds very professional. Alas I do not have that level of experience to realize your technique. In fact, I still struggle with the whole REPL approach, which isn't a productive tool to me yet. (Often times it simply doesn't work/connect.) I dearly miss debugging (debugger) in Clojureworld. Sad to say after 2 years of Clojure I still depend on:
let [... log (str "my-var-to-check: " my-var-to-check ...]
Pathetic. But the barriers to Clojureworld (to me) are not the language. It's the ecosystem. In fact, I have no problems traversing tree structures via stack algorithm and loop/recur. No problem to my brain. But the whole tooling in Clojure is still a mystery to me.
That was my experience too. And then at some point, something changed and everything became easier. I do think calva getting more stable was a part of that. So best of luck!
Also Sean corfield is giving a talk today on repl driven development. So that may be worth watching (I’ll be watching)
@ryan072 Excellent! where could I catch that? (as a side note, the Clojure community is just aweseome!)
it's in an hour. and sean said the vod will be posted somewhere
ah. I just signed up to meetup, then was given the link. Alas I don't do zoom. (Simply no camera nor microphone on my linux laptop here.) If there will be a VOD afterwards I better take that option. (Otherwise I pose an irritation to the rest of you guys. A thousand thanks for the link+opportunity!)
it has the advantage of not blowing out the calva buffer with mass text tho
Hello Calva users and maintainers! As you may be aware, I'm currently engaged in a project called Startup in a Month, which is a project I'm embarking on for all of 2021 to make 12 startup in 12 months, all with Clojure and ClojureScript. I'm practically brand new to the language, but I'm banking on the quick learning curve and all the benefits of the language to give me a big productivity boost. You can learn more about it here: https://startupinamonth.net Anyway, being new to the language, I'm also new to the tools and REPL. I'm a first-time Calva user, and the maintainers of the library (looking at you @pez) may be interested to watch me make my first steps with it. These two stream recordings in particular have a lot of footage of me hitting my head in the dark as I try to figure things out 😅 • https://www.twitch.tv/videos/864853522 • https://www.twitch.tv/videos/865807336 Hope you find this useful for user-testing research! And hope to see you in the stream 🙂
Thanks! ❤️ Haven’t checked it out yet, but generally this is stuff that is hard to get at for finding out where the Ux problems are. Will definitely look at these!
hey just wanted to say I looked at Calva today for the first time in a long time and wanted to say kudos - super easy to install and get started
Oh, thanks, @alexmiller! It is super great to hear this from someone who really knows what makes a good Clojure dev environment. Yesterday I watched you demo Clojure to a bunch of Java devs and you mentioned Calva in the passing, also revealing that you hadn’t tried it. So I was about to reach out asking that you give it a spin so that we can get your input. Quite amazing that you beat me to it. 😃
I was connected to a repl in <10 minutes, so that was pretty easy
I hope you don’t mind: https://calva.io ❤️
I'd prefer not to have that on the page if you don't mind :)
Oh noes! But I’ll remove it then, of course.
Done!
thx
As Peter said, thanks! It always feels good to hear the effort put into something is really paying off.