practicalli

https://practicalli.github.io/ http://yt.vu/+practicalli (youtube)
practicalli-john 2020-10-13T00:47:47.064Z

I've created a new graphic that hopefully shows the central nature of the REPL process to Clojure development, showing the main ways to interact with the REPL. Feedback welcome on if this graphic makes sense, thank you https://github.com/practicalli/graphic-design/blob/master/clojure/clojure-repl-driven-development-lifecycle-concept.png

Jose Varela 2020-10-13T16:10:28.064200Z

from what I understand, the REPL does some sort of request/response wrt to the code we write: • The editor sends your code as you type, the REPL evaluates and then the editor embeds/renders the result in place • The cmd line makes it more explicit: you hit enter to trigger the ‘request’ to the evaluation and the response is rendered below the line you wrote • Data inspectors are like the editor in that it’s more interactive, but same deal just that the rendering does fancier stuff by allowing the views themselves to be interactive in different ways Breaking this down so you can debug what I interpreted. In my case the graph confused me a little because I think of the REPL as allowing for ‘two way’ interactions but in the picture it seems the cmd line has a different exchange than the editor, and the data viz also seems to have a different kind of exchange

practicalli-john 2020-10-13T17:25:44.064400Z

Interesting feedback and very useful, thank you. In the LightTable editor that was exactly what happens, although most Clojure editors have an explicit eval command, but was not sure how (or if) to show that. I am trying to think how to show that a form / expression is the unit of evaluation. I considering data inspectors as a way to navigate the result rather than change and eval code, hence the uni-directional communication to the inspector. I may be missing something about the nature of inspectors, but havent seem the same interaction as the editor/cli. The command line and editor should feel similar, only differing in the use of the interface (harder to capture in a static image I think). I wanted to make the editor to be the main interface into the repl process, hence the command line section being smaller. Ultimately I want to portray the REPL as being the central process for Clojure development with many interfacese to interact (but constraining that to the limited exposure of information that someone new/fairly new to Clojure can absorb. Thanks again.

Jose Varela 2020-10-13T17:33:44.064600Z

Makes sense. I think in this case, since you know so much about how this works, as you mention it’s tough to convey in those terms to a newcommer. Hoping this sheds some like on how a beginner may understand it, they way I saw it as a beginner to Clojureland that made the REPL ‘click’ for me was thinking about it as a view/client of my code. A new view/client that enhances other options which are ‘normal’ in other stacks: 1. My test suite is a client of my code, evaluates it and compares the result 2. My application (say HTML) interacts with my code, I click through it and several codepaths are evaluated while I do that The REPL is a new tool I know use thanks to Clojure as it allows me to interact more fluidly with my code as I copy-paste, highlight-to-eval, etc.

Jose Varela 2020-10-13T17:34:27.064800Z

I saw some gists of the benefits in Ruby, as I could evaluate/redefine without restarting the console

Jose Varela 2020-10-13T17:35:11.065Z

Something that’s foreign to most that is a symptom of the REPL are the comments! Devs leaving comments to highlight and run seem weird to someone who doesn’t have the REPL dynamic in mind.