Fork me on GitHub
#calva
<
2023-03-11
>
lspector15:03:00

Should Disconnect from the REPL do the same thing as (System/exit 0) -- that is, should it kill the Java process in addition to disconnecting from it? Some of my students are reporting seemingly-inconsistent behavior when trying to start over with a fresh REPL, sometimes in the middle of a long-running computation. I have been recommending that they evaluate (System/exit 0) and then restart the REPL, but the integration of Disconnect from the REPL into the "REPL " item in the status bar makes it nicer and easier to remember. However, a student thought this hadn't killed their Java process, which was still maxing out their CPU... but when I try it, it does seem to kill the Java process, as desired. With the "disconnect" terminology, I'm not sure what's really intended, and if it might kill it only in some circumstances. FWIW all of us have had mixed results trying to kill things with key sequences like ^C or ^D. Also relatedly, Calva: Interrupt Running Evaluations is super handy for us, and although I realize that others may find different things to be super handy and only so much can be built into the GUI without making a mess, from my perspective it would be lovely to have this behind the "REPL " button too.

pez15:03:31

Thanks for bringing these items back to us! 🙏

pez15:03:29

Disconnect also kills the repl process if the process has been started by Calva. The naming is confusing, I agree. I wonder if it would be better to not kill the process when disconnecting and have a separate Stop/kill REPL command that is active if Calva has started the repl. There is a secret such a command of sorts, by pressing ctrl+c in the Jack-in pseudo-terminal. You seem to have found it.

pez15:03:22

I guess that there are cases when Calva fails to kill the process fully. Especially on Windows, where we have special code trying to fire all cannons we can find on it.

lspector15:03:52

It may indeed have been on Windows that students have seen this!

pez15:03:52

> Calva: Interrupt Running Evaluations is super handy for us, and although I realize that others may find different things to be super handy and only so much can be built into the GUI without making a mess, from my perspective it would be lovely to have this behind the "REPL " button too. Sounds so obvious, now that you mention it. Please file an issue.

❤️ 2
pez15:03:14

BTW, jacking in again actually kills the repl first.

lspector15:03:26

Nice to hear that "Disconnect" should indeed kill Calva-started processes, which is what we're always working with in the situations that I'm writing about here.

lspector15:03:49

"BTW, jacking in again actually kills the repl first." [slack editing issues...] Good to know, but for people who start the REPL with the REPL button, they won't have a jack in option if the old one is still running, right?

pez15:03:28

We could add a Restart the REPL option there.

lspector15:03:50

That would be beautiful!

lspector15:03:50

Filed an issue for this too.

🙏 2
skylize17:03:22

Would it be worthwhile to make the statusbar button customizable? I don't use it, so I have no opinion. (If I don't know a shortcut, I press Ctrl+Shift+P and type what I think the command is probably called into the Command Palette.)

lspector19:03:05

I don't think customization would much help the users I'm focused on either.

pez22:03:14

I think that customizing that menu could be quite useful in many cases. E.g. teams sharing some common REPL tasks, and template/example projects.

skylize22:03:11

Yeah. If you start from the premise that the button is useful, then "useful to customize it" pretty much falls out of that. The question is whether it's useful enough for the increased complexity, both for maintenance and for the end user. I wouldn't use it much, if at all, either way. So I can't help you much with that calculation. 🤷

pez22:03:51

Some of it is a matter of how people are introduced. If the readme or a teacher/colleague instructs to use the REPL button for some things, people tend to stick with it for those things.

lspector01:03:26

I think the button is definitely useful because it's a great place to put fundamental things, like starting/restarting the REPL and aborting long-running computations, so that beginners or occasional users don't have to know or remember words in commands to find them. For example, if you want to abort/stop a process you may not know that the magic word is "interrupt." You may not even know that interrupting is possible (I didn't, for a while), and I think it's fundamental enough that exposing it via the button is a good idea. Beginners and occasional users probably won't be customizing their interfaces, though, which is why I said I don't think it'd be particularly helpful for the users I'm considering. I can imagine customization being useful in some contexts, but I wonder if the command palette is a perfectly fine interface in those contexts too... I don't know!

skylize01:03:19

> If the readme or a teacher/colleague instructs to use the REPL button for some things, people tend to stick with it for those things. > That still would not apply for me. I do like having a strong mouse interface available to me, but still always looking for reasons not to use it. Hunting for a tiny button at the bottom of the screen when I could use fuzzy search instead is not a habit that would stick.

pez01:03:41

I’m not trying to make you use that button, @U90R0EPHA.

skylize01:03:15

Lol. Of course not.

skylize01:03:19

Just comparing myself to these people I don't understand at all that seem to be the majority. And since I don't understand them, I cannot judge the usefulness of the customization idea, even though I'm the one who came up with it. 😄