5 ms·
ClojureScript Synonyms
- dinedal 15y agoAwesome, when I started ClojureScript, getting even the basics down was a little tricky, but this certainly helps! Thanks.
- swannodette 15y agoI took http://synonym.dartlang.org/ http://synonym.dartlang.org/ as an inspiration ;) This is a work in progress. Suggested additions, modifications, corrections welcome!
- darklajid 15y agoCallable Collections -> (map address [:zip street]) Should that be :street instead? Love the sheet. Got 4 days of vacation on front of me and I'm planning to play with Clojure and ClojureScript during that time. Perfect timing. Edit: Another one: Iterators Uniform Iteration For All Types "JavaScript natives are safely ?______? to the same iteration protocol" - missing word, I guess. Would create a pull request (is that even polite/acceptable for ridiculously small things and typos?), but maybe the author is following this thread?
- swannodette 15y agoThanks 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 https://github.com/fogus/himera
- thoradam 15y agoAre 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.
- dinedal 15y agoYes, checkout http://clojurescriptone.com/ http://clojurescriptone.com/
- wilkes 15y agoChris Granger, of Light Table fame, has a few handy libraries. None of these are quite on par Meteor, but they are the basis for Light Table. https://github.com/ibdknox/fetch https://github.com/ibdknox/fetch - remoting https://github.com/ibdknox/crate https://github.com/ibdknox/crate - html generation https://github.com/ibdknox/jayq https://github.com/ibdknox/jayq - jQuery wrapper https://github.com/ibdknox/waltz https://github.com/ibdknox/waltz - state machine Checkout https://github.com/ibdknox/live-cljs https://github.com/ibdknox/live-cljs for a cool example of using these libraries together.
- zerokarmaleft 15y agoThis 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
- spacemanaki 15y agoI 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?
- sirn 15y agoI 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.
- swannodette 15y agoWe'll try to add some practical DOM & Ajax examples. Thanks for the feedback.
- spacemanaki 15y agoHave 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... https://github.com/ibdknox/jayq https://github.com/ibdknox/jayq https://github.com/levand/domina https://github.com/levand/domina
- sirn 15y agoYes, 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.
- oinksoft 15y agoNote 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.
- sirn 15y agoI 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.) [1]: http://clojure.com/blog/2011/07/22/introducing-clojurescript.html http://clojure.com/blog/2011/07/22/introducing-clojurescript... [2]: https://github.com/clojure/clojurescript/tree/master/src/cljs/clojure/browser https://github.com/clojure/clojurescript/tree/master/src/clj...
- xer0x 15y agoReally helpful, thanks.