Adding network input and output to the REPL?


#1

Clojure has a network REPL, which enables some very useful features.

The two features which I’d like to use are:

  1. Send code to the REPL through network
    We don’t need to type to the terminal, instead we can send code from an editor/IDE.
  2. Get back results from the REPL
    We are not bound to display results in the terminal and it’s possible to use any UI. Displaying bigger data structures can be made more convenient (Think of something like watch variables in debuggers, where you can collapse and open parts of the data structures)

Maybe there are other cool applications as well which I missed, but these two features would already make the REPL more convenient and useful.

If I’m not mistaken there is nothing like this in the Scala ecosystem.
What do you think could this be added to the Scala REPL?


#2

There’s https://github.com/jupyter-scala/jupyter-scala which provides jupyter notebooks that can be run on a remote machine. I agree that having some sort of REPL protocol (kind of like the Language Server Protocol) would be really interesting.


#3

Ammonite lets you run a REPL remotely over SSH http://ammonite.io/#RemoteREPL


#4

Thanks @lihaoyi! I didn’t notice this feature in Ammonite. I’ll see if I can make something useful with this and IntelliJ.