Miguel Ping wrote on Monday, October 5, 2015 at 3:00 AM:
- do you code functions in the repl and copy them to respective files?
I use Emacs/CIDER and code functions in a file, then use C-M-x to evaluate each
one into the running REPL. I usually keep the REPL in the user namespace and
require in the namespace I’m working on (C-c C-z to jump to the REPL as needed)
and then type in expressions to test functions as I go. Later I’ll take a
transcript of parts of the REPL and add them to my unit test namespace —
usually just copy’n’paste, followed by some minor edits to turn them into
Expectations format: (expect {expected} {actual}) which means using C-M-t to
swap REPL output which has:
user> (some test expression)
{the actual output}
=>
(expect {the actual output}
(some test expression))
Put the cursor after the prompt: user>| then M-delete, type (expect) and slurp
twice M-) then forward one s-exp C-M-f and swap C-M-t
- do you edit files directly and hook them into the repl?
Yes, but I don’t save them every time since I can use C-M-x to evaluate the
current form as I type.
- how do you set breakpoints?
I don’t bother. I’ve never liked step debuggers in any language in my 30+ years
of development :(
- can you do hot-replacement easily? I always see a bunch of stack traces while
using lein and ring with reload flags
If I want to hot-swap into a running process, I just start a REPL server inside
the process and connect CIDER to that, instead of starting a standalone REPL in
Emacs. I tend to use standalone REPLs only for running Expectations anyway
(where I use a slightly different workflow and keep the REPL in the same
namespace as the Expectations file (C-c M-n to swap REPL namespaces).
- is there an article or screencast explaining the "feel" of this?
I don’t know, sorry.
Sean
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.