With fast compiling languages a unit test is not for off from being a REPL. In Java I use JUnit as a REPL. Actually I prefer unit tests over a REPL the same reason I prefer bash scripts over one liners or SQL scripts instead of typing into the interpreter... I don't like the ephemeral nature of REPLs. Also with true REPLs unlike the debug unit test approach I mention with Java you really need the language to be dynam…
What makes a good REPL?
61–70 of 177 posts
Re: What makes a good REPL?
#62(READ, EVAL, and PRINT are all old Lisp primitives, and the REPL was literally implemented with them. There's also a complex macro called LOOP but it was added much later, and is not integral to the language)
Re: What makes a good REPL?
#63Earlier quoted context omitted.
Lisp + Emacs + SLIME: miss no longer. Picking them all up is a tall order though.
Emacs suffers from not being like Lisp machines REPL, meaning lacking graphical display on buffers. If I remember correctly, XEmacs used to support it (which was my favorite fork), but it seems to have faded away. For example, try to achieve this demo on Emacs. https://www.youtube.com/watch?v=o4-YnLpLgtk
[1] -- (https://github.com/millejoh/emacs-ipython-notebook/blob/mast...) [2] -- (https://python-pillow.org/)
Re: What makes a good REPL?
#64Code with a lot of mockable dependencies is usually considered testable but sometimes it's a pain to setup.
Accessible code seems to fix this. Instead of taking dependencies, return some data so it's easy to check what your component does in isolation.
Re: What makes a good REPL?
#65Pretty-printing of data structures in a human-readable format.
Re: What makes a good REPL?
#66With fast compiling languages a unit test is not for off from being a REPL. In Java I use JUnit as a REPL. Actually I prefer unit tests over a REPL the same reason I prefer bash scripts over one liners or SQL scripts instead of typing into the interpreter... I don't like the ephemeral nature of REPLs. Also with true REPLs unlike the debug unit test approach I mention with Java you really need the language to be dynam…
Re: What makes a good REPL?
#67Pretty-printing of data structures in a human-readable format.
I think Jupyter has the right idea here with various kinds of repr -alternatives that can render html or images directly into the notebook. http://ipython.readthedocs.io/en/stable/config/integrating.h...
Re: What makes a good REPL?
#68There's a lot of excitement about compiled languages lately, and many seem to wonder if interpreted languages are dying. Unfortunately I don't see the value of a good REPL brought up in those conversations very often.
Re: What makes a good REPL?
#69I am not convinced that immutability matters; this seems like a bias. After all the original REPL, and the name itself, was in Lisp (note that the first Lisp implementations were not interactive, but it was the first interactive language) and Lisp doesn't have immutable data structures. (READ, EVAL, and PRINT are all old Lisp primitives, and the REPL was literally implemented with them. There's also a complex macro c…
Re: What makes a good REPL?
#70With fast compiling languages a unit test is not for off from being a REPL. In Java I use JUnit as a REPL. Actually I prefer unit tests over a REPL the same reason I prefer bash scripts over one liners or SQL scripts instead of typing into the interpreter... I don't like the ephemeral nature of REPLs. Also with true REPLs unlike the debug unit test approach I mention with Java you really need the language to be dynam…