@daslu If there's was a clear problem we are aiming to solve I guess we can do something about it.
> Some tools like to use nREPL middleware to listen to the user's code evaluations. Can you expand on what do you mean by this?
@bozhidar thanks, I guess what wrote was indeed a bit vague. 🙏
Here is what I have been practicing recently (in both CIDER and Calva): listening to user code evaluations through nREPL middleware, and sending the relevant values to Portal.
Demo: https://www.youtube.com/watch?v=e3M4u1XIVTo&t=940s
The related example project: https://github.com/scicloj/visual-tools-experiments/tree/main/portal-clerk-kindly-nrepl-1
Currently, some setup is needed (e.g., in the deps.edn file and the Emacs config).
I am wondering about recommended practices for making it transparent to users. 🙏
Curious why not tap>?
@flowthing
We are hoping it would be possible to pick an existing piece of documentation -- e.g. this color tutorial:
https://clojure2d.github.io/clojure2d/docs/notebooks/index.html#/notebooks/color.clj
-- and then evaluate forms in the REPL and see the results in Portal, without any code change.
I think (and maybe I'm wrong) that needing to wrap with tap> could be a bit of a nuisance for a user wishing to explore existing code examples.
That is one of our short-term hopes at the #visual-tools group.
(On the longer term, we are hoping we could listen to all user interactions in the editor & REPL and automatically maintain a live-reloading document that makes sense out of them. Notespace v4 is one attempt of this kind (see the demo https://www.youtube.com/watch?v=uICA2SDa-ws), but it is not complete yet, and not our current focus.)
Might be best file a ticket or some discussion on the subject and we can discuss this topic more there.
That is great, thanks @bozhidar -- an Issue at the nREPL repo, right? https://github.com/nrepl/nrepl
> and then evaluate forms in the REPL and see the results in Portal, without any code change.
I see, that makes sense.
> I think (and maybe I'm wrong) that needing to wrap with tap> could be a bit of a nuisance for a user wishing to explore existing code examples.
I have a key binding that lets me evaluate (tap> $0), where $0 gets replaced with the form that's currently under my caret. I know it's not exactly the same thing, but just a thought.
Nice!! Thanks, yes, eventually we might need some specific integration into specific environments (e.g., CIDER, Calva). I am just still hoping we would not need that, and find something that just works for any user. 😊
Certainly, that makes sense. An nREPL-based solution won't work for every user, although it certainly will for the vast majority.
Created an issue here: https://github.com/nrepl/nrepl/issues/269 Thanks, @bozhidar & @flowthing.