Minor quibble: I'm seeing:
"No implementation of method: of protocol: ..."
in a popup inline evaluation thingy in the editor. However I expand it, it won't tell me what the class it was using was and insists on truncating the message. I've just noticed though that if I copy/paste the line (to add to this slack message!) it does actually know.
"No implementation of method: of protocol: found for class: nil" Interesting, can you send a screenshot of that? This is when you're getting that error when evaluating your own code rather than Cursive itself getting that error, correct? i.e. it's a problem with error display.
I think - trying to reproduce it now - that it actually might be fine. The expanded result with strings in green are all maddeningly truncated so you can't see that the object was nil, but there's some red text that - if I scroll far enough to the right does complete the message.
So, unless there's some scenario where the popup expandy-box thingy shows up, but the red text doesn't, then all the information is there, I just failed to spot it yesterday.
Cursive’s "inline repl result" inspector is so useful, I’d love to have the option to see it on every tap>:
Would be extra nice if it also worked on taps in other namespaces if the tab is open
The question is always where to show it, would you always want it alongside the tap expression?
This would also rely on some kind of asynchronous message from the REPL process back to the IDE. This is something I've considered from time to time but have never come up with a design I like. However, having watches like this would be super useful, so I'll have another go at it.
yeah, always next to the tap expression, as if I evaluated the form myself
I had planned to do something more like Tonsky's watches: https://github.com/tonsky/Clojure-Sublimed?tab=readme-ov-file#watches, but using tap is probably a nice alternative. The problem is always determining which tap> a value came from to locate it in the source code. I'll check the implementation to see whether that's possible.
oh I see, yeah, tap> probably can’t tell you that
I can always create an exception and parse the trace, but only as long as there isn't an async queue in there.
BTW have you seen this? https://github.com/cursive-ide/inline-tutorials/blob/master/src/cursive/tutorials/inline/c_scope_capture.clj as part of https://github.com/cursive-ide/inline-tutorials.
any precedent for exposing a cursive api?
There's a screenshot at the bottom here: https://cursive-ide.com/blog/customising-inline-nodes.html
> any precedent for exposing a cursive api? Somewhat, there are things like https://cursive-ide.com/userguide/repl.html#showing-data-structure-diffs-from-the-repl, which could be extended to show values inline.
That relies on returning a value from an evaluation though, it's not receiving values asynchronously.
Yeah, tap> has an intermediate queue, which prevents figuring out where a value came from.
It's odd to me that it doesn't return the value you tap, to allow inserting it in chains, too.
I see, so a custom cursive/tap-> might work then
I guess I could add a cursive/tap> function which works similarly... exactly.
yeah, I brought this up recently in #clojure, and found this old issue: https://clojure.atlassian.net/browse/CLJ-2538
sounded to me like alex will have rich take a look at it again
https://clojurians.slack.com/archives/C03S1KBA2/p1758908888705419
hmm, yeah, that would be really nice if values going through the tap were tagged somehow with their source location
I guess that would be okay if I evaluated a function with a cursive/tap->, I’d just have to remember to remove it since I guess the cursive namespace would only be available in the cursive repl
It's tricky for arbitrary values. A hypothetical cursive/tap> could add it to metadata if the value is a type supporting it, but that wouldn't work for e.g. numbers or strings.
I had planned something more like https://github.com/weavejester/hashp
oh that’s nice
several options here I guess
anyway this is what got me thinking about it, Kevin had a cool idea about "passive" inspection: https://clojurians.slack.com/archives/C03KZ3XT0CF/p1763738146470429