This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-26
Channels
- # announcements (1)
- # aws (6)
- # babashka (1)
- # beginners (109)
- # calva (22)
- # clj-kondo (21)
- # cljsrn (1)
- # clojure (68)
- # clojure-europe (41)
- # clojure-nl (2)
- # clojure-uk (5)
- # clojurescript (7)
- # core-logic (1)
- # data-science (4)
- # datomic (1)
- # events (1)
- # fulcro (25)
- # gratitude (1)
- # juxt (4)
- # keyboards (1)
- # malli (5)
- # minecraft (3)
- # missionary (9)
- # music (1)
- # nextjournal (7)
- # off-topic (7)
- # polylith (31)
- # re-frame (3)
- # reveal (7)
- # ring (11)
- # shadow-cljs (1)
- # spacemacs (4)
- # tools-build (5)
- # tools-deps (5)
- # xtdb (25)
Here's an example:
(with-out-str (pprint ['yay
{:lirum :larum}
{:foo {:bum/bar
[{:ding/baz {:buz 42}}
{:ding 'dong}]}}]))
This will insert a line break after yay
and :larum}
, but also a space before the line break, so
[yay \n {:lirum :larum} \n ...
This behaviour is different than that of Clojure's pprint, and eg generating edn with clojurescript might make a linter angry.I created a test-case that fails for cljs.pprint/pprint
, but passes for jvm-clojure's pprint.
I wanted to see if I could fix it, by creating a new ns, cljs.pprint2
, and pasting in the content of https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/pprint.cljs
However, using cljs.pprint2/pprint
, the test now passes. The mysterious thing is that cljs.pprint.cljs
hasn't changed in two years, according to the repo, and I'm using latest 1.10.891
.
Good find!
is it possible to use https://mui.com/components/selects/ in clojurescript ?
yes, this is how I use it : https://github.com/qnkhuat/rtdraw/blob/main/src/rtdraw/cljs/components/mui.cljs