Thomas Heller
unread,Feb 4, 2012, 2:14:09 PM2/4/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Clojure
Hey,
I'm playing with ClojureScript and one thing that would help me out in
a big way would be to print out data at certain points.
I can call (.log js/console "test" 1 2 3 4) and it prints the expected
results, but whenever I want to log a Clojure Object I just get its
classname and can inspect how its represented in JS, interesting but
not what I need.
Is there any function I can call which outputs the data as it would
look in the code?
(.log js/console [1 2 3 4]) should log [1 2 3 4] but currently logs
cljs.core.Vector (Chrome btw.)
(.log js/console {:hello "world"}) logs cljs.core.ObjMap, etc
Basically whatever the REPL would print, I'd like to see.
(print [:a 1 "2"]) just complains with "No *print-fn* fn set for
evaluation environment".
Any hints?
Thanks,
/thomas