Are there any Clojure web frameworks that really embrace ClojureScript and blur the line between the server and the client like Meteor recently demonstrated? Sorry to be off-topic.
This is awesome. I especially love the contrast between first-class namespaces, immutable collections, and destructuring.
Also, towards the bottom: "Ocaml, Haskell style pattern matching is a library. Prolog style relational programming is a library." core.match/core.logic is like Michael Fassbender. It's everywhere! :D
I don't think ClojureScript supports "first-class namespaces" quite yet, does it? Maybe more "first-class" than JS, but at least not the way Clojure does, with functions like ns-publics etc?
Thanks for the feedback. :street is getting fixed, and I fixed the missing "extend". But if you see others please do send pull requests here: https://github.com/fogus/himera
I wish this existed few weeks ago. It would be awesome if there's something similar to this but with JavaScript/jQuery translations to ClojureScript/Google Closure. In my opinion, that's the hardest part after getting the basics.
Have you checked out jayq or domina? They give you nice wrappers around JQuery and the Google Closure libs and are relatively self explanatory to use if you've messed with any DOM libs before...
Yes, I did. In the end I stick with Domina for DOM manipulation and Google Closure library for the rest. I decided to skip jQuery (jayq) to experiment on doing things "the ClojureScript way," it's only a personal project after all.
Note that ClojureScript is only related to the Google Closure project via the compiler. So a demonstration of jQuery to Closure Library API calls would serve an unrelated purpose.
I don't know if the initial announcement still applies today; but I think ClojureScript encourages using Google Closure library for DOM manipulation and event handling[1]:
> The ClojureScript compiler emits JavaScript which follows Google Closure's code conventions, and then invokes the Google Closure compiler to generate compact, optimized JavaScript for delivery to clients. ClojureScript also makes use of the Google Closure library for capabilities such as event handling, DOM manipulation, and user interface widgets.
> It is possible to use ClojureScript with JavaScript libraries other than Google Closure, but those libraries typically do not follow the conventions of the Google Closure compiler and therefore will not be able to take full advantage of its optimizations.
They even have few wrappers to Google Closure Library under the `clojure.browser` namespace[1] (although from my testing, some of them, such as `clojure.browser.event`, is not compatible with ADVANCED_OPTIMIZATIONS.)