1. 35
  1.  

  2. 9

    ClojureScript can compile itself now!

    1. 9

      Author of the post. I’m happy to answer any questions! :)

      1. 1

        In watching one of David Nolen’s talks I seem to recall some discussion of a Nodejs compiler for CLJS, so that you could use CLJS purely with JS apps. Is this what he was talking about, or are these somewhat orthogonal things?

        Either way - very cool! I’ve been using CLJS for “real work” now for a month or so, and I have nothing but good things to say about it. Glad to see the language, community and ecosystem blossoming like this!

        1. 3

          The idea is to enable such efforts but we’re not going to maintain anything specific for Node.js in much the same way we’re not actually maintaining anything specific for browsers wrt. to self-hosting. I suspect over the coming months the community will fill in the blanks now that the foundation is in place.

          Glad to hear you’re enjoying ClojureScript!

          1. 2

            Thanks for the reply - just realized that you are David Nolen! Thanks for all the good work :) your talks are great. We’re using om/cljs converting out of an old rails app, for context, and so far so fun.

      2. 3

        This is wonderful! I’ve always been a fan of Clojure, but never a fan of the JVM. With this milestone, I can use Clojure without even having a JVM on my machine! So much progress has been made since the night I sighed in disappointment when seeing Rich talk about ClojureScript for the first time.

        EDIT: But, I’ve already moved on and just use Racket now.

        1. 4

          I can use Clojure without even having a JVM on my machine!

          Except the only other option is V8.

          1. 4

            This is not true, any JS engine that can provide I/O works. The post was pretty clear about that. Node.js, SpiderMonkey, and even JavaScriptCore (http://planck.fikesfarm.com/) work just fine.

            1. 1

              There are (in theory) standalone versions of spider monkey and jsc.

              1. 1

                SpiderMonkey already provides the necessary I/O bits https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell.

                Making JavaScriptCore requires a simple custom build but that’s already been done with Planck.

            2. 1

              Yeah, but you don’t have Racket compiling to JS yet, as far as I know. Do you? If not, Om would still make this worthwhile.

                1. 1

                  Thanks for the pointer! Are you using this for anything meaningful? How’s JS interop been in practice?

                  1. 1

                    It’s been, maybe, 2 years since I’ve done anything that targets a web browser, and needs the help of JavaScript. As a result, I’ve yet to try it out.

                    To be quite honest, whalesong doesn’t look nearly as good as what ClojureScript provides, but at least there’s something.