Fork me on GitHub
#protorepl
<
2020-10-20
William Skinner14:10:31

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

seancorfield15:10:29

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.

William Skinner15:10:45

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.

seancorfield15:10:11

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.

seancorfield15:10:03

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.

seancorfield15:10:35

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

seancorfield15:10:13

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.

seancorfield15:10:42

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.

seancorfield15:10:09

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 Skinner15:10:44

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 Skinner15:10:33

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

seancorfield15:10:54

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

seancorfield15:10:45

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