I mean just print-dup and print-meta should be enough !
Le vendredi 30 mars 2018 14:31:04 UTC+2, LaurentJ a écrit :
>
> Yes we will set print-dup, print-meta, print-level and print-length to
> have a properly formatted edn file.
>
> Le vendredi 30 mars 2018 05:55:50 UTC+2, Didier a écrit :
>>
>>
Yes we will set print-dup, print-meta, print-level and print-length to have
a properly formatted edn file.
Le vendredi 30 mars 2018 05:55:50 UTC+2, Didier a écrit :
>
> Ya, I'd write a wrapping fn, like ->edn which internally binds everything
> to what it should be, maybe even declares some extr
I guess we will do that and provide an helper function in an util namespace
to write an EDN file safely :/
By the way does binding *print-dup* to true isn't enough to prevent any
interaction of other options like : *print-length* *print-level* ?
Le jeudi 29 mars 2018 21:16:54 UTC+2, Rick Moyn
I'd suggest wrapping the code that writes via prn to the file with a
dynamic binding:
e.g. at a REPL:
user=> (set! *print-length* 5)
5
user=> (prn (range 10))
(0 1 2 3 4 ...)
nil
user=> (binding [*print-length* nil] (prn (range 11)))
(0 1 2 3 4 5 6 7 8 9 10)
nil
user=> (prn (range 10))
(0 1 2 3 4