-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better REPL feedback while waiting for evaluation #1543
Comments
Thanks for this feedback! The evaluated form is actually decorated with transparent white while evaluating, but obviously not clearly enough. This might also depend a bit on which theme is used. Some things spring to my mind about how to solve this:
The last point there reminds me of that CIDER has a gutter indicator showing that something is evaluated. This is super useful and probably food for a separate issue, but I am now also guessing that CIDER probably uses this indicator to signal that something is being evaluated as well. |
Not all evaluations are triggered from within the actual REPL. I often use a comment block in my code on the left, while having the REPL open on the right: (defn a []
(Thread/sleep 5000)
[1 2 (rand-int 5)])
(comment
(a) ; put cursor here and press Alt+x
) Evaluating the
|
@PEZ what do you mean by "cider gutters"? Googling that gives "unexpected" results ;) |
@Cyrik A gutter is the blank space between the content and the border of the content area. https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_gutter-indicators |
For the record I am only really talking about evaluating things in the regular files. At the REPL prompt we don't decorate anything during or after evaluating. |
An example of gutter indicators in VS Code are the small buttons that let you run tests. Available in Calva since @marcomorain added it a while ago. See https://www.youtube.com/watch?v=bUBrmvczAwg CIDER shows indicators in the gutters to show that something is evaluated. Very, very nifty. I don't understand why I can't find a screenshot (but maybe because I don't dare make the obvious Google search now. 😄 ) |
Gutter indicators seem like a good idea for this. Another option is to change the text of the inline annotation from the previous result (or no existing annotation), to something like |
Please help upvote this issue: microsoft/vscode#143774 |
While pairing with a co-worker via screen sharing, I noticed his CIDER/Emacs had an indicator in the bottom right that was an animation showing the REPL was busy. This made me think maybe we could/should use a status bar animation to show when something is being evaluated. It's not as direct as a gutter icon next to the line being evaluated, but it might be a good addition to that, since the gutter icons require the line of code being evaluated to be in view in the editor for you to see them, but the status bar is always visible. Even if you change files in view or scroll away from the code you started evaluating, you can still see if something is being evaluated. |
I like this. We could also bring the command to interrupt the evaluation to that button. |
I just got an idea 🤔 ... is it possible to use custom icons in the status bar? If we did go with the status bar route for showing a pending evaluation, using some animation, it would be cool to have a version of the Calva logo animated as the glass filling up with calvados. It could just be 3 - 4 frames and repeat from empty to full while the evaluation is pending. |
A status bar animation has the advantage that you can "mislay" the source-code tab or panel and still know whether something is happening and how to stop it. |
I think I've seen an implementation of a custom animated icon. However, I'm not sure we want the calva symbol associated with waiting. Of course, most often it would be a quick eval and the ”right” associations. Just that I've stared at animated Slack icons waiting for something that takes forever quite a few times. It says slowness. 😄 |
@PEZ Fair enough... we don't want a negative association with the Calva icon. 😃 |
Also discussed in https://clojurians.slack.com/archives/CBE668G4R/p1701622706801439. Really resonates with my usage experience. |
I can't figure out how to distinguish when I forgot to evaluate a form and when I'm just waiting for something slow (maybe even hanging). I noticed this mostly when using something like
criterium
to benchmark things (or other things that doesn't yield a result instantly) and I find myself thinking: Did I evaluate the form?The text was updated successfully, but these errors were encountered: