I just now discovered that Calva automatically shows example function usages from what you've written in 😎:calva:(comment)
forms. Very cool! Nevermind I'm just dumb
Ah, I'm totally wrong actually. I have a habit of writing examples for a function in a (comment)
form right below the definition, so that someone can come in and play with them if they're trying to figure out the code...Anyway, I had just written out a couple of examples for a function like this, and when I pulled up the quick documentation it showed them, and I thought "Wow, the editor is so smart it's picking up an example use in that (comment)
and displaying it automatically!" Did not realize I had just written those exact same 2 examples in my docstring 🤦
TL;DR I am dumb and thought Calva was reading my mind. Nothing to see here, move along...
Sounds cool, agreed. But I'm not following. 😀 Can you elaborate?
Morning, is there any way to expand the ...
truncating in the Calva REPL output?
I now see there’s max-length
in length in the pprint config, but is there a way of turning that off for a one off command?
Unfortunately not. You can toggle pprint with a keyboard shortcut, but I realize that might not be an option...
that’s ok, I’ve just written to a file for now which is probably more sensible anyway. Thanks for the fast reply!
Is anyone using Calva with live share? We’re doing that quite a bit for the past two weeks, and mostly it works pretty good. Sometimes the repl output buffer is not visible to the person who joins, not sure why or how to fix that. I was wondering if it is possible for the person who joined to evaluate things in a REPL as well, just like the “host”. Is this possible somehow?
I think it's possible. If the host shares the repl port
Thanks @pez, Sounds good! I’ll try later today!
It would be super great with a page on http://calva.io about Live Share. Just sayin’ 😃
I’ll keep that in mind!
what's live share?
An extension bundled with VS Code that enables collaboration. You can share VS Code windows and “follow” the host, as if it was happening in your own instance (which, in a way it does). https://visualstudio.microsoft.com/services/live-share/
It’s one of the reasons why it was important to get rid of the old REPL window, because it would have been a lot of work (maybe not fully possible) to make it work with Live Share. Now, @stefan.van.den.oord tells us that the new repl quirks, but hey …
I guess you can use rich comment blocks instead of a REPL, or is that the issue?
Calva's inline evaluation display does not broadcast over live share. Rich comment blocks in combination with the repl window is probably the way to use it.But we need to find out why it sometimes doesn't show. Sounds like a live share bug to me, but I think it should be investigated before we can say that is so. Eval-to-comment is also an option.
@borkdude When using rich comment blocks on the host, the other party (the “joiner”) can see the output. However, ideally I would want the “joiner” also to be able to evaluate things herself.
so the guest can't edit in files either?
or does eval-ing things not work? did you try eval-ing using selecting the option from the command palette explicitly?
@borkdude I’d be happy to setup a session with you so that you can try it out, just lemme know. (Not today though.)
Guest can edit. And I have evaled as guest in one of my few live share sessions i have joined. It was a long while ago so I don't remember the details, butt I think it involved the host exposing the repl port over live share.
Sometimes I eval something with a ton of data and it completely hangs my repl until I restart the entire process, is there some way to tell calva to stop evaluating?
There's a command for that! 😃
Calva: Interrupt Running Evaluations
But large evaluation results sometimes ”hangs” Calva anyway, so depending on the nature of your hangs, interrupting the evaluation might or might not help.
Thanks! seems to work fine for my use case 🙂 guess I should have checked the commands, for some reason assumed calva was stuck and I needed some vscode level intervention
A friend and I have played with live share and shared a repl via the port. It worked well. He shares his port and then I can just connect calva to his repl. What I evaluate, he can use too. Pretty cool stuff.