Fork me on GitHub

Question: Sometimes, I need to restart my REPL because I’ve messed something up. If I rerun the Calva command “Start a Project REPL and Connect” while the broken REPL is still running, will Calva kill the existing REPL and create a new one cleanly? Or will doing so result in an orphaned/dangling REPL process on my system? How can I use Calva to “restart” my REPL correctly?


Running the command again will do it the correct way.

💜 1

Awesome, thanks @U0ETXRFEW! I presumed it would, but I was just curious and wanted to make sure.


I'm thinking we should add some actions to the REPL button, similar to those for the clojure-lsp one, that makes this a bit easier to discover.


Another way to do this is to press ctrl+c in the jack-in terminal. It will disconnect and kill the REPL process.

👍 1

The current functionality where the user doesn’t need to care what goes on under the hood is excellent from a usability perspective. The user can then trust Calva to do the right thing and repeatedly run the same command. I don’t know if many users like me are curious about such “inner workings.”


It basically follows the principle of


Actually… Maybe it isn’t idempotent when I think about it. If the “jack-in commend” is run in a healthy REPL, then I guess Calva will kill and restart the REPL in any case and flush the state in the process?


Yeah, idempotence is rather that you can call it again w/o anything happening. (Or something like that. 😃 )

👍 1

Indeed. I recognized my own flawed thinking shortly after posting that comment 😅


We get enough questions about this to know that it is a bit too ”secret” how things work.


I have forked and cloned the Calva repo, and I’m currently trying to familiarize myself with the codebase. I tried to find the code which handles the REPL “creation” and “connection,” but I haven’t been able to figure it out yet, due to my lack of experience more than anything else.


Due to it being quite messy.

😆 1

There is a file, jack-in-terminal (or some such). If you start from there I think it should be possible to follow the trail.


Thanks, found it! 😄 calva/src/nrepl/jack-in-terminal.ts


I don’t know the particulars of TypeScript, but I’m familiar with C-family languages, and it’s relatively easy to follow what’s going on in the code in the nrepl directory. Looks pretty good if you ask me!


Good to know about first impressions. I guess it is rather around the connect sequences that I've outsmarted myself. Always takes me an effort to re-wrap my mind around it when I need to do work there.

👍 1

I’m scanning through the GitHub issues to see if there’s something I’m capable of fixing, testing some stuff, and adding some comments to the issues as I go.

❤️ 1

Awesome. Thanks for helping!


You could see if there are issues around this with how to restart the REPL. If there is none, please create it. There you have your good-first-issue. 😃 See if you think the documentation could address it as a first step. Then I think I can imagine some other low hang fruit there to improve the situation.

👍 1

Ah! Nice. I found the tag beginner but only one issue tagged with that, which was already fixed. I didn’t notice the good-first-issue tag. I will check that next!


We should put in some work categorizing those, and maybe cleaning up the labels.


It’s pretty good compared to the majority of open source projects. My first instinct was to look for the label beginner. My next instinct was to look for issues labeled with bug.


Credit to @U9A1RLFNV who has been working hard with the issues. All help with improving it further is deeply appreciated.

💜 2

I would love to help bring the organizational aspects, issues, and docs to the next level! Organizing large software projects was my job for six years in the games industry (proprietary MMO game engine with a suite of desktop tools for game content creation, 50 C/C++/C# developers, 6 million LoC). But I also don’t want to mess up what you already have set up or your current way of working. And I also need to acquire more knowledge and a deeper understanding of the product itself to be effective. Perhaps we could have a quick meeting someday to discuss the current state of affairs, needs, and ambitions. I have resigned from a board position to have more free time for fun projects in a few months. 🙂

❤️ 1

Fantastic. Let’s talk tomorrow. We can run a huddle in this channel, maybe?

👍 1

@U0ETXRFEW For sure! I have many meetings at the office, and tomorrow evening, there is #the-clouncil. But on Thursday and Friday evenings after 18:30, I don’t have any special plans.


Perhaps a dumb question… But what is the correct way of grabbing the code to test this?: Should I clone the pull request directly (with gh pr checkout 1606) and test it by running it through the REPL/debugger in Visual Studio Code?


Not a dumb question at all. I have tried to establish the how earlier in the ticket description now. See if it is clearer, please?


But since you have the dev environment set up, please go ahead checkout the PR directly and test it like that. (I think @U037TPXKBGS is about to push the code to a different branch. We will let you know when that is done.)

👍 1

Cool, thanks! Yeah, that edit makes it easier to test. I’ll try to run Calva from source when I use it so that I can report better bugs and improvement suggestions if I stumble upon something.


A nice, and fun, first dip into the codebase could also be to help translate those reports in 1662 to unit tests.


Interesting suggestion! I’ll have a look to see if I’m up for it. Brand new to TypeScript 😅 Saw it for the first time today.


This specific task takes that into account. 😃

partyparrot 1

Fwiw I've already got unit test translations in my local for those reports, but it's still a fun exercise (esp with Copilot hahaha)

Grant Horner18:04:08

I think the “parinfer” toggle is gone, or atleast I can’t seem to find it from following the documentation. Is this just a me/my configuration thing or are the docs out of date?


It's gone for an undetermined length of time. Do we still mention it in the docs?

Grant Horner21:04:07

maybe I misunderstood the docs, but I thought that was how you enabled parinfer from reading


I should remove that page. It's too easy to miss the note at the start of the page.


I've updated that page some now, @U02RXJVMKNE. I don't want to remove it just yet, because in my heart I haven't given up on bringing Parinfer to Calva. That page is my reminder, sort of. 😃

👍 1

I'm very glad to hear you haven't given up on Parinfer in your heart, but I understand it's rather challenging! 🙂 (Actually, I'm rather stuck on v2.0.227 in which I've really been productive these last couple of months; it just works great for me! Now I'm starting to experience an issue (LSP related); but some breakage was bound to occur sooner or later. It's my laziness I know: my infrequent attempts at internalizing paredit keep failing for lack of motivation. So: not complaining or pushing. Just know that I very much appreciate your effort!)


Oh, wow, @URLHASEM6! That is great to hear. The branch is rotting a bit, of course, but it is good to know that it actually works.


I think that with @U037TPXKBGS’s help we might be able to take us on the task again. It was too big to fit in my brain and since I was alone on it, I failed. We'll see, I guess @U037TPXKBGS has a life and might get exhausted with the multi-cursor paredit.

😆 1

IDK what parinfer is but sounds interesting!


That was while I still thought I was succeeding.

😅 1

Hahahah fascinating stream of consciousness. I like big projects that I can chip away at over time, but my addictive tendencies had revealed themselves from binging on multi cursor hahaha - I haven't gone to the gym or made any music in weeks, Ive been having so much fun with it. Though since it's not like we're fixing anything, I think taking time on it prob isn't a big problem, in which I think this would be quite interesting. Parinfer sounds very very interesting and challenging. Will reveal all the tech debt I'm sure lol. Let's do it! (at some point)


That was my conclusion. There is debt to pay before Parinfer can be fit in without me ending up in an asylum.

😆 1