4 ms·
I would love to support a JS project that is something like a port of OM to JS.
by ThomasDeutsch 12y ago
I would love to support a JS project that is something like a port of OM to JS.
- malvosenior 12y agoI understand that there are sometimes practical reasons for not being able to use ClojureScript, but have you given it a go? It's really very, very nice (much nicer than JS in pretty much every way). * Immutable data (you can get some of this in JS with Nolen's Mori http://swannodette.github.io/mori/ http://swannodette.github.io/mori/) * Better functional programming than Underscore (map :mykey some-objects) * Great syntax: homoiconicity, thrush operator, first class set, regex, map, vector syntax * Macros! * Use of cool frameworks: Om, core.async * Same language as back-end if using Clojure It was quite frankly intimidating to get started with it all as an ex-Java/Obj-c/Python/JS dev but I could never go back.
- ThomasDeutsch 12y agoOM and ClojureScript are great - but it is all about choice. Sometimes i prefer/need JS as a language. It would be great to get the AMAZING clojure-community ideas into the JS world.
- malvosenior 12y agoYep, camus2 points out environments like jsbin. Bookmarklets are another place you wouldn't use something like ClojureScript. I'd argue once you go beyond "small" things though switching to ClojureScript is preferable to duplicating large parts of its functionality in separate JS libs.
- camus2 12y agoit's really unfortunate clojurescript is not written in javascript (or clojurescript, like coffeescript compiler is written in coffeescript ). I wanted to integrate a lisp to a toy jsbin app (https://mparaiso.github.io/playground/ https://mparaiso.github.io/playground/), but no way, right now i'm using outlet. See the use case? clojurescript is never going to be big in javascript land if one cant compile it in the browser.
- malvosenior 12y agoI agree that a self-hosting ClojureScript compiler is desperately needed and highly desirable.
- sgrove 12y agoWe'll get there (we're not so far as it is), but it's just not high enough on anyone's priority list yet.
- lsdafjklsd 12y agoLooking forward to that. I'm a JS dev who learned Clojure through Clojurescript (and D.Nolen's blog). In trying to entice my colleagues to try it, the JVM bit seems to be a bit of a barrier... but the LightTable development loop blows them away.
- cnp 12y agoI've been trying to move towards ClojureScript for a while, but there are so few introductory resources out there that allow you to navigate between the Clojure world and the JavaScript world in a way that makes sense to people who come from JS backgrounds exclusively. I wish OReileys would issue an expanded version of their Intro ClojureScript book!
- malvosenior 12y agoIt's definitely a lot to take on. I'd probably start with just plain Clojure to learn the syntax and how to do functional programming, then look into ClojureScript. Get comfortable using Lein and editing your project.clj, then check out this plugin: https://github.com/emezeske/lein-cljsbuild https://github.com/emezeske/lein-cljsbuild It's a big investment but learning Lisp will repay you. There's tons of classic CS literature that you'll now be able to unlock and immutability really is the future, so it's good to start getting acquainted with it.
- cnp 12y agoTotally. Since I started following React and digging into various links and resources the FP paradigm is really starting to make sense in terms of long-term benefit. Time for the next step, however.
- undershirt 12y agoI've been learning CLJS for a couple months. Here's a syntax guide and a list of resources I've used: https://github.com/shaunlebron/ClojureScript-Syntax-in-15-minutes https://github.com/shaunlebron/ClojureScript-Syntax-in-15-mi...
- Raynos 12y agoI've been building a FP style framework very similar to OM & Elm in plain javascript ( https://github.com/Raynos/mercury https://github.com/Raynos/mercury ). It has some of the core features - immutable data - immutable vdom - global state atom, no hidden local state. - no manual DOM manipulation code (read or write). - a single top down flow of data from input to output - Events and Signals from FRP that can be manipulated using pure higher order functions. etc. As a bonus it's very modular, so if it doesn't fit your needs at least some subset of it will.