Fork me on GitHub
#calva
<
2022-04-05
>
leifericf10:04:20

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?

pez10:04:51

Running the command again will do it the correct way.

💜 1
leifericf10:04:33

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

pez10:04:01

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.

1
pez10:04:14

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

👍 1
leifericf10:04:06

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.”

leifericf10:04:59

It basically follows the principle of https://en.wikipedia.org/wiki/Idempotence.

leifericf10:04:55

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?

pez10:04:46

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

👍 1
leifericf10:04:14

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

pez10:04:17

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

leifericf10:04:05

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.

pez10:04:01

Due to it being quite messy.

😆 1
pez10:04:42

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.

leifericf11:04:20

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

leifericf11:04:44

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!

pez11:04:08

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
1
leifericf11:04:25

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
pez11:04:27

Awesome. Thanks for helping!

pez12:04:07

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
leifericf12:04:18

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!

pez12:04:49

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

leifericf12:04:56

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.

pez12:04:23

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

💜 2
leifericf16:04:20

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
pez18:04:08

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

👍 1
leifericf20:04:43

@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.

leifericf12:04:52

Perhaps a dumb question… But what is the correct way of grabbing the code to test this?: https://github.com/BetterThanTomorrow/calva/issues/1662 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?

pez12:04:44

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?

pez12:04:16

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
leifericf12:04:55

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.

pez12:04:50

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

leifericf12:04:07

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.

pez12:04:35

This specific task takes that into account. 😃

partyparrot 1
rayat19:04:33

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?

pez18:04:15

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 https://calva.io/parinfer/#parinfer-status-bar-items

pez21:04:40

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

pez07:04:25

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
jurjanpaul14:04:23

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!)

pez14:04:42

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.

pez14:04:40

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
rayat16:04:14

IDK what parinfer is but sounds interesting!

pez17:04:43

That was while I still thought I was succeeding.

😅 1
rayat17:04:35

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)

pez18:04:50

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

😆 1