I'd like to know if there is a REPL which is not language-specific. I spend a lot of time dipping in and out of REPLs (mainly for Clojure, Scala and Haskell), and the bundled ones all frustrate me to a greater or lesser extent. It seems like the job of a REPL is quite generic in that they:
I don't see why there shouldn't be some language-agnostic REPL, but I have been unable to find such a thing. Some things I would like in my ideal REPL:
And more optimistically
Does this exist?
WHAT IS REPL.IT? Repl.it is a free IDE (integrated development environment) that allows users to write their own programs and code in dozens of different languages.
A Read-Eval-Print Loop, or REPL, is a computer environment where user inputs are read and evaluated, and then the results are returned to the user. REPLs provide an interactive environment to explore tools available in specific environments or programming languages.
Forking a repl "Forking" means to copy an existing software project so that you can create your own spin on it, which is something that is very commonly done in open source projects.)
If you knew your friend's Replit username or the email associated with the Replit account, you could instead use the Invite box at the top. Share the link with your friend and wait for them to join. As soon as they do, you will see that a chat box pops up in the bottom right corner.
Bash doesn't know anything about C-r
: it uses readline, which does that, as well as up-arrow history, for it. It sounds like the REPL you're looking for is readline? Just prefix the command you want REPL-like behavior from with rlwrap (install it if you don't have it - it's great), and you should be good to go.
$ rlwrap java -jar clojure.jar
Scala 2.9 REPL will have CTRL-R reverse search support. The nightly builds have that already. There has been context aware tab completion for a while (though it could be improved).
When using scala with rlwrap
, use the -Xnojline flag:
rlwrap scala -Xnojline
That prevents jline from interfering with rlwrap. Then rlwrap is free to use readline to implement cursor motions and history but that is before the interpreters sees the line and you won't have language-aware completion.
I hope that the Scala REPL will be improved.
So I can dream that one day I will have IDE level feature in the Scala REPL. Realistically, it would require substantial effort and adding these features is surely lower priority than improving eclipse support for instance... Besides it may make more sense to add REPL support in eclipse.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With