cursive

Rachel Westmacott 2025-12-08T10:32:29.231629Z

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"

cfleming 2025-12-08T18:07:04.966939Z

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.

Rachel Westmacott 2025-12-09T08:42:53.572189Z

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.

Rachel Westmacott 2025-12-09T08:43:40.546479Z

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.

shaunlebron 2025-12-08T22:39:41.879369Z

Cursive’s "inline repl result" inspector is so useful, I’d love to have the option to see it on every tap>:

shaunlebron 2025-12-08T22:42:43.973349Z

Would be extra nice if it also worked on taps in other namespaces if the tab is open

cfleming 2025-12-08T23:11:10.947099Z

The question is always where to show it, would you always want it alongside the tap expression?

cfleming 2025-12-08T23:14:03.576849Z

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.

shaunlebron 2025-12-08T23:18:45.597759Z

yeah, always next to the tap expression, as if I evaluated the form myself

cfleming 2025-12-08T23:23:59.110559Z

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.

😮 1
shaunlebron 2025-12-08T23:27:22.771809Z

oh I see, yeah, tap> probably can’t tell you that

cfleming 2025-12-08T23:28:53.659099Z

I can always create an exception and parse the trace, but only as long as there isn't an async queue in there.

shaunlebron 2025-12-08T23:30:05.039129Z

any precedent for exposing a cursive api?

cfleming 2025-12-08T23:30:37.849179Z

There's a screenshot at the bottom here: https://cursive-ide.com/blog/customising-inline-nodes.html

cfleming 2025-12-08T23:33:43.401499Z

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

cfleming 2025-12-08T23:34:49.461879Z

That relies on returning a value from an evaluation though, it's not receiving values asynchronously.

cfleming 2025-12-08T23:36:35.909869Z

Yeah, tap> has an intermediate queue, which prevents figuring out where a value came from.

cfleming 2025-12-08T23:37:08.298709Z

It's odd to me that it doesn't return the value you tap, to allow inserting it in chains, too.

shaunlebron 2025-12-08T23:37:38.318849Z

I see, so a custom cursive/tap-> might work then

cfleming 2025-12-08T23:37:43.695019Z

I guess I could add a cursive/tap> function which works similarly... exactly.

shaunlebron 2025-12-08T23:37:51.813079Z

yeah, I brought this up recently in #clojure, and found this old issue: https://clojure.atlassian.net/browse/CLJ-2538

shaunlebron 2025-12-08T23:38:53.056659Z

sounded to me like alex will have rich take a look at it again

shaunlebron 2025-12-08T23:41:44.743909Z

hmm, yeah, that would be really nice if values going through the tap were tagged somehow with their source location

shaunlebron 2025-12-08T23:43:33.411469Z

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

cfleming 2025-12-08T23:43:33.882739Z

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.

➕ 1
cfleming 2025-12-08T23:44:41.968479Z

I had planned something more like https://github.com/weavejester/hashp

shaunlebron 2025-12-08T23:50:38.978029Z

oh that’s nice

shaunlebron 2025-12-08T23:51:55.367139Z

several options here I guess

shaunlebron 2025-12-08T23:53:16.506809Z

anyway this is what got me thinking about it, Kevin had a cool idea about "passive" inspection: https://clojurians.slack.com/archives/C03KZ3XT0CF/p1763738146470429