(defn read-line
"Reads a line from the reader or from *in* if no reader is specified"
([] (read-line *in*))
([rdr]
(if (or (instance? LineNumberingPushbackReader rdr)
(instance? BufferedReader rdr))
(binding [*in* rdr]
(clojure.core/read-line))
(loop [c (read-char rdr) s (StringBuilder.)]
(if (newline? c)
(str s)
(recur (read-char rdr) (.append s c)))))))