Why does pprint to a writer truncate the output?
clojure
Solution
Sound like a buffer flush issue, try this:
(binding [*out* (writer "foo.txt")]
(pprint models)
(flush))
`flush` will flush the output stream buffers.
Problem
The following snippter: ``` (binding [*out* (writer "foo.txt")] (pprint models)) ``` Will truncate the output at exactly 208Kb. However the following: ``` (spit "foo.txt" (with-out-str (pprint models))) ``` Works fine and doesn't truncate the output. Why is this?