Thanks guys!

For me the ideal flow would be something that would allow me to save an 
incoming http req (I do mostly web dev) onto some variable/def, and replay 
it against some code I'm writing in the repl.
Also I like to use step debuggers when I'm new to the language or lib, it 
allows me to go down the rabbit hole and see how things work. Sometimes you 
find some surprises!

I think documentation on this is something that's missing on the clj 
community, because everyone does things a little different, but it makes it 
hard for beginners to get the gist of it.
I know some people that don't even have auto-reload on lein/ring and end up 
stopping/starting the jvm which is crazy because it takes a while.

I may write something up, I would appreciate if you guys had any more 
suggestions, including suggestions about where to put this info.

This is what I think it's standard practice:

- ideally you don't restart jvm
- on ring, use hot-reload/auto-reload
- app can be started from repl
- ide can eval clj expressions (send it to repl)
- people code small bits on ide, eval it, loop on this until its working - 
can do this for tests also
- basically the whole idea is to have components built upon functional 
style that can be started and invoked from the repl at any layer depth

- As for debuggers, I know some people other than Sean that dont use step 
debuggers at all (specially oldschool ppl), but I think its helpful for 
newbies


I will keep you guys updated if I ever write something. First have to learn 
it ;)

On Monday, October 5, 2015 at 8:07:32 PM UTC+1, Sean Corfield wrote:
>
> 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 clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to