This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-24
Channels
- # beginners (100)
- # calva (11)
- # cider (17)
- # clj-kondo (2)
- # cljdoc (66)
- # cljs-dev (54)
- # clojure (77)
- # clojure-czech (1)
- # clojure-dev (42)
- # clojure-europe (3)
- # clojure-italy (8)
- # clojure-nl (17)
- # clojure-spec (12)
- # clojure-uk (41)
- # clojurescript (68)
- # cursive (8)
- # datomic (15)
- # emacs (9)
- # expound (3)
- # fulcro (14)
- # garden (3)
- # graphql (2)
- # hoplon (2)
- # lein-figwheel (4)
- # leiningen (4)
- # off-topic (22)
- # onyx (8)
- # parinfer (2)
- # planck (1)
- # re-frame (5)
- # reagent (55)
- # reitit (3)
- # remote-jobs (8)
- # shadow-cljs (35)
- # spacemacs (23)
- # sql (3)
- # tools-deps (32)
- # unrepl (8)
- # vim (25)
- # yada (5)
Hello again, à propos datafiables. There’s a behaviour in printing 'unrepl/browsable
literals in combination with nav
that I cannot understand. Take a dumb example
(defrecord DN [a b]
clojure.core.protocols/Datafiable
(datafy [this] (into {} this))
clojure.core.protocols/Navigable
(nav [this k v] (clojure.datafy/datafy v)))
then feeding unrepl a (DN. 1 2)
and following the first elision for the browsable result in this malformed EDN which makes trouble with the reader:
[:eval (({:a # [nil #unrepl/... {:get (unrepl.repl$4NSDREePlCk74VjoImLYAZy60JQ/fetch :G__785)}], :b # [nil #unrepl/... {:get (unrepl.repl$4NSDREePlCk74VjoImLYAZy60JQ/fetch :G__786)}]})) 6]
Am I using nav
the wrong way?the example above doesn’t comply with rebinding of the variable x
at
https://github.com/Unrepl/unrepl/blob/111b729e2cb49c81149f5eb9fb4a27f70b875a3d/src/unrepl/printer.clj#L363-L367
in the machine printable protocol for browsable tagged literals