lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
johanatan 2018-05-19T23:24:09.000032Z

thx

johanatan 2018-05-19T23:24:47.000006Z

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

johanatan 2018-05-19T23:25:00.000090Z

this claims to do it: https://github.com/clojure/tools.reader

johanatan 2018-05-19T23:26:33.000061Z

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

anmonteiro 2018-05-19T23:28:01.000052Z

something like this?

anmonteiro 2018-05-19T23:28:11.000013Z

(`tools.reader` is bundled with Lumo)

johanatan 2018-05-19T23:28:35.000058Z

ooh, nice!

johanatan 2018-05-19T23:28:38.000082Z

yep, that should do it

johanatan 2018-05-19T23:35:28.000004Z

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

johanatan 2018-05-19T23:51:40.000030Z

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

johanatan 2018-05-19T23:53:12.000052Z

ah

johanatan 2018-05-19T23:53:15.000023Z

prn is the answer