nREPL is supported in several languages, not just Clojure! https://metaredux.com/posts/2019/01/12/nrepl-beyond-clojure.html
Interacting with a live instance isn't handled by LSP, so it's interesting to see language-agnostic protocols in this space.
miniblog.
Related Posts
Rich Hickey compares REPL design with RPC style nREPL: https://groups.google.com/g/clojure-dev/c/Dl3Stw5iRVA/m/IHoVWiJz5UIJ
Rich considers the nesting ability to be important. If the user is interacting with stdout/stdin, they can enter arbitrary other text UIs.
Today I learnt about crossterm, a Rust crate for interacting with terminals in a cross-platform way: https://docs.rs/crossterm/latest/crossterm/
It handles things like is_tty() and terminal::size(), which are hard to support correctly in both Linux and Windows. I might port difftastic.