This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-30
Channels
- # adventofcode (27)
- # ai (1)
- # announcements (2)
- # aws (66)
- # babashka (2)
- # beginners (34)
- # calva (28)
- # cider (5)
- # clj-kondo (18)
- # clojure (16)
- # clojure-europe (4)
- # clojure-norway (2)
- # clojure-uk (3)
- # clojurescript (11)
- # code-reviews (23)
- # conjure (23)
- # core-logic (1)
- # cursive (12)
- # datalevin (1)
- # datomic (9)
- # introduce-yourself (3)
- # kaocha (3)
- # klipse (4)
- # malli (42)
- # midje (1)
- # minecraft (1)
- # missionary (4)
- # music (1)
- # nextjournal (10)
- # polylith (5)
- # re-frame (2)
- # reitit (1)
- # releases (1)
- # sci (126)
- # shadow-cljs (4)
- # sql (2)
- # tools-deps (11)
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)
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
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)