unrepl

discussing specification of an edn-based repl and its implementations.
2019-05-24T07:34:30.000100Z

2019-05-24T08:35:49.000200Z

Andrea 2019-05-24T09:09:19.004600Z

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?

Andrea 2019-05-24T09:11:34.005700Z

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

2019-05-24T09:21:15.005900Z

2019-05-24T09:21:17.006Z

2019-05-24T09:21:44.006100Z

Andrea 2019-05-24T09:26:17.006600Z

It seems that (:tag x) and (:form x) are nil in the above example