Fork me on GitHub
#cider
<
2021-12-30
>
AC02:12:20

Anyone have some workflow suggestions using tap> (or something else) with cider to log verbose debugging output? When doing Advent of Code, for example, I often run into situations where I want to just spew tons of “printf” debug statements without worrying about bogging down emacs. (as opposed to a “real” project where I’d have something more formal to handle logging)

anonimitoraf03:12:58

Check out https://github.com/athos/Postmortem if you haven't yet, specifically the dump function. You can use this lib in conjunction with tap> or just a vanilla REPL I guess

practicalli-johnny10:12:36

Have you considered using the cider-inspect tool to see larger results and navigate through them https://practical.li/spacemacs/evaluating-clojure/inspect.html#inspecting-simple-values Or the cider-debug tool to step through code, seeing the values at each stage. Otherwise, I would set up a tap> source, such as Portal in a dev/user.clj file and then use tap> (instead of println expressions) Printing lots of lines or very long lines to a REPL buffer is a guaranteed way to slow Emacs down. If this must be done, limit the size of the repl buffer (setq cider-repl-buffer-size-limit 100) ;; limits the number of lines shown in REPL buffer consider using fundamental mode (to remove syntax highlighting any any other process consuming tasks)