Fork me on GitHub
#nrepl
<
2022-03-14
>
bozhidar11:03:10

@daslu If there's was a clear problem we are aiming to solve I guess we can do something about it.

bozhidar11:03:25

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

Daniel Slutsky11:03:03

@U051BLM8F 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&amp;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. 🙏

flowthing12:03:43

Curious why not tap>?

Daniel Slutsky13:03:55

@U4ZDX466T 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.)

bozhidar13:03:23

Might be best file a ticket or some discussion on the subject and we can discuss this topic more there.

Daniel Slutsky14:03:30

That is great, thanks @U051BLM8F -- an Issue at the nREPL repo, right? https://github.com/nrepl/nrepl

flowthing14:03:47

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

🙏 1
Daniel Slutsky14:03:10

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

flowthing14:03:50

Certainly, that makes sense. An nREPL-based solution won't work for every user, although it certainly will for the vast majority.

👍 1