Clojurians
#lumo
<
2018-05-19
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

johanatan23:05:47

anyone know how to use a reader to read full clojurescript source?

johanatan23:05:33

but i'm not sure a) if that is a "compatible library" and b) how to include dependencies like that in lumo

anmonteiro23:05:01

something like this?

anmonteiro23:05:11

(`tools.reader` is bundled with Lumo)

johanatan23:05:38

yep, that should do it

johanatan23:05:28

any idea how the following would lose the quotes around strings?:

(doseq [l (r/read-string (format "( %s )" (clojure.string/join " " file)))] (println l))
where file is a sequence of the lines of a file

johanatan23:05:40

this seems to be the crux of the problem:

cljs.user=> (r/read-string "(func \"blah\")")
(func "blah")
cljs.user=> (println *1)
(func blah)
nil

johanatan23:05:15

prn is the answer