I'm looking for something like JSBin.com for ClojureScript. Most JavaScript code is UI code so when experimenting with ClojureScript I want to manipulate the DOM, test interopability with other js libraries, and try to do things I would normally do with JavaScirpt.
Unfortunately most ClojureScript getting started tutorials throw you into a headless runtime. Running ClojureScript code in a headless JavaScript environment is great at demonstrating that Clojure can be ported to other runtimes, but for doing actual web development it doesn't seem that useful. If I wanted a headless environment I would just use Clojure. I get that ClojureScript needs to be compiled in Clojure on the JVM before it is sent to the client for execution, but setting up a ClojureScript project with a browser repl seems unnecessarily complex barrier to getting started. I was thinking that the ideal environment to experiment would be something like JSBin.com. I don't know if I can build it myself... but I thought I might give it a try. I did find some good starting points: The closest thing I found is Himera by fogus: http://himera.herokuapp.com/index.html - https://github.com/fogus/himera This provides a cljs repl in a browser. What it lacks however is an output pane/iframe sandbox where you can generate your own views and the ability to include additional ClojureScript dependencies such as jayq. Adding an output frame with additional javascript libraries would be not be hard, but I'm less certain how to go about introducing additional dependencies. It appears to compile each command as individual expressions and does not keep any state between service calls. It does not even appear to allow multiple namespaces. Another approach might be to create a browser based nrepl console window with cemerick/piggieback in one frame and use a traditional browser repl or cemerick/austin a sandboxed iframe. I found a couple browser based clojure repls, tryclojure and catnip, neither of these are nrepl based. They appear to just eval on the server, tryclojure having a bit more care around untrusted code but I'm not sure that eval approach would work here? I like the idea of a ClojureScript compiler service as done in Himera, but it seems that a ClojureScript repl has a fair amount of state, namespace, libraries etc that don't seem easy to work with as a service. Anyone have any thoughts on this? -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
