4 ms·
Why a REPL? I don't get it. I don't get it in Clojure. I don't get it in Python. I just make a JUnit with a little test method. Then I have the full power of th
by virmundi 10y ago
Why a REPL? I don't get it. I don't get it in Clojure. I don't get it in Python. I just make a JUnit with a little test method. Then I have the full power of the IDE: debugger, code follower, block editing. Most of that is missing in every REPL.
- revscat 10y agoOther developers have different styles of developing. I have a REPL open in a tmux tab all day every day, and pipe snippets to it from vim to test how stuff works. When I was working with Java there were times I wanted that: just a quick way to verify behavior. I'm currently working with Ruby, and for me the REPL help me work faster because I can play with the code in parrallel to writing the tests or implementation code.
- cle 10y agoInteractively executing code on real data, with real dependencies, is vastly different from a junit test, for obvious reasons. It's not hard to get the features you listed, e.g. Clojure REPLs have all of those features (CIDER/Cursive). Why do you think statisticians and data scientists don't write Java programs that they must recompile and rerun every time they tweak it? The statisticians I work with are obsessed with Jupyter notebook, because the iterative, fast-feedback development lets them almost touch and feel the numbers they're working with.
- virmundi 10y agoJupyter notebooks make sense since you can modify the whole block. When I used Python or Clojure, the REPL is singles line. So small changes necessitated modifying out of repl and pasting.
- pjmlp 10y agoHave a try at using Emacs/Cider or Cursive with Clojure.
- lemming 10y agoHave a look at https://cursive-ide.com/userguide/repl.html https://cursive-ide.com/userguide/repl.html under "Using the REPL" - there's a little demo there of what this looks like in Cursive. The editor is fully multi line and can be stretched out as large as you would like. It's also easy in pretty much any Clojure environment to be able to send forms easily from your editor to the REPL, and many people prefer to work this way.
- pjmlp 10y agoOnly because you think in UNIX terms. A REPL is an extension of the IDE, that is how it was born. http://franz.com/products/allegro-common-lisp/acl_ide.lhtml http://franz.com/products/allegro-common-lisp/acl_ide.lhtml https://github.com/squeak-smalltalk/squeak.org/blob/master/img/screenshots/executing.png https://github.com/squeak-smalltalk/squeak.org/blob/master/i... https://cursive-ide.com/ https://cursive-ide.com/ Of course I do understand it is hard to grasp the power of a REPL when it is a plain old readline CLI app.