anyone here using tech.ml.dataset/tablecloth and cider? I've found that cider-pprint-eval-last-sexp doesn't print tables the way I want (tho cider-eval-last-sexp does, just not to a cider-result buffer). Instead I'm seeing the table in the underlying map like format (so a key, with all the values of that column underneath it rather than a nicely printed table)
this is on
;; CIDER 2.0.0-snapshot (package: 20260705.1346), nREPL 1.7.0
;; Clojure 1.12.4, Java 25.0.3and using
techascent/tech.ml.dataset {:mvn/version "8.024"}
scicloj/tablecloth {:mvn/version "8.021"}and clojure 1.12.4
I'm guessing I'm missing setting up some default from the recent cider improvements
what I want:
census-dates [2 2]:
| :census-year | :census-date |
|-------------:|--------------|
| 2025 | 2025-01-16 |
| 2026 | 2026-01-15 |
what I get
{:census-year (2025 2026),
:census-date
(#object[java.time.LocalDate 0x68d2d38a "2025-01-16"] #object[java.time.LocalDate 0x197078a6 "2026-01-15"])}
(in cider-result)I'm dodging it atm by using the clerk tap inspector:
(defun clerk-tap ()
(interactive)
(let ((sym (symbol-at-point)))
(when sym
(cider-interactive-eval
(format "(tap> %s)" sym)))))
(defun clerk-table-tap ()
(interactive)
(let ((sym (symbol-at-point)))
(when sym
(cider-interactive-eval
(format "(tap> (clerk/table %s))" sym)))))Yeah, the simplest way to use a different cider-print-fn. orchard.pp is just a convenient default (it's much faster than the old default, but I guess we didn't consider all the implications). I'll take a closer look at this later in the afternoon.
I think for you this will be enough:
(setq cider-print-fn "cider.nrepl.pprint/clojure-pprint")that worked for me
Can you a file a ticket about this so that I won’t forget to look into this?
Sure! I asked here first as I was certain the problem was me
This happened because cider-nrepl has recently switched to orchard.pp as the default pretty-printer (from clojure.pprint).
According to my research, the Dataset type implements a multimethod called clojure.pprint/simple-dispatch to provide this custom output when pretty-printing is used.
In order to fix this, orchard.pp would somehow need to figure out which types have a "custom" pretty-printer implemented. Which is maybe feasible but a bit complicated.
is there a way I could roll back to the old pprint format?
Yeah, that's just a configuration option in CIDER.
@otfrom According the way it is implemented now, you can't easily roll back to
Disregard what I said above, the link Bozhidar posted literally contains an example how to get back to clojure.pprint. However, it requires having a custom function defined somewhere which might not be terribly convenient.clojure.pprint printer. But you can set pr as your printer if you want the datasets pretty but don't care about pretty-printing everything else.
https://clojurians.slack.com/archives/C0617A8PQ/p1783610267296869?thread_ts=1783347170.914109&cid=C0617A8PQ If the pprint is handled by orchard.pp and that is my problem then I have to go to a custom cider-print-fn?