protorepl

William Skinner 2020-10-20T14:03:31.001100Z

Is there a way to configure proto-repl to give me more info about syntax errors when reloading?

seancorfield 2020-10-20T15:07:29.002800Z

As a general point, I'd recommend not using any of the auto-refresh/auto-reload stuff. It can get your REPL into a weird state and it's hard to recover. Much better to develop a workflow where you eval every top-level form as you make changes, so that it becomes second nature.

seancorfield 2020-10-20T15:08:45.004200Z

As for getting more info about the error from ProtoREPL, probably not? ProtoREPL has pretty much been abandoned (unless there's been new activity recently). All the Atom users have switched to #chlorine now, which is very well maintained @skinner89

William Skinner 2020-10-20T15:29:45.004300Z

I was starting to worry that protorepl was abandoned. I'm still very new to using RDD. Do you switch to the namespace of a function you're working on for that namespace? It seems like the general guidance is to do RDD in a namespace that isn't part of application code. I see people create a file and define a user namespace a lot. I'm still unclear as to how to develop/modify functions via RDD that exist in a defined namespace.

seancorfield 2020-10-20T15:42:11.004500Z

I use "Rich Comment Forms" -- code inside

(comment
  <scratch code goes here>
  ,)
then it's in the context of your actual code (can call your functions) and it can stay in the file as a record of how you developed your solution.

seancorfield 2020-10-20T15:43:03.004700Z

Rich Hickey uses that approach -- you'll see RCFs at the end of several Clojure files in the core libraries -- and Stu Halloway and others also advocate using comment forms to hold scratch code as you're exploring the solution.

seancorfield 2020-10-20T15:43:35.004900Z

Never type into the REPL directly: always write code and eval it -- that's it in a nutshell.

seancorfield 2020-10-20T15:48:13.005100Z

Since you're working in a source file, nearly all Clojure integrations for editors take care of evaluating the code in the correct namespace automatically, so you never need to worry about that.

seancorfield 2020-10-20T15:49:42.005300Z

BTW, the Chlorine package for Atom doesn't even have a REPL "input" area: so it forces you to always write code and eval it. But you'll normally start a REPL yourself from a terminal, with a Socket REPL running, and you can still type into that if you really feel the urge to just try out an expression without putting it in source code.

seancorfield 2020-10-20T15:51:09.005500Z

I have a couple of videos on YouTube showing my Chlorine/Atom workflow https://www.youtube.com/channel/UC8GD-smsEvNyRd3EZ8oeSrA -- in those videos I'm also using Cognitect's REBL data browser but I've switched to Reveal now so I really need to do some updated videos.

William Skinner 2020-10-20T15:54:44.005800Z

Thank you! This is most helpful. Going to try chlorine and the rich comment workflow right now. I had already gotten used to writing forms and sending them to the repl with protorepl which was quite a revelation.

William Skinner 2020-10-20T15:55:33.006Z

I need to brush up on the history of all these different repls at some point.

seancorfield 2020-10-20T15:56:54.006200Z

The #chlorine channel nearly always has some folks who can help you, if you get stuck.