News for hackers. Stuff that matters.
Re:Removing User Interface Complexity, or Why React is Awesome by malvosenior on Tuesday May 13, 2014 @11:44AM (#7738711)
I 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/)

* 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.

Re:Removing User Interface Complexity, or Why React is Awesome by cnp on Tuesday May 13, 2014 @02:03PM (#7739610)
I'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!

Re:Removing User Interface Complexity, or Why React is Awesome by malvosenior on Tuesday May 13, 2014 @02:42PM (#7739853)
It'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

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.

Re:Removing User Interface Complexity, or Why React is Awesome by cnp on Tuesday May 13, 2014 @04:35PM (#7740536)
Totally. 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.
Re:Removing User Interface Complexity, or Why React is Awesome by undershirt on Tuesday May 13, 2014 @07:26PM (#7741241)
I'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-mi...
Re:Removing User Interface Complexity, or Why React is Awesome by cnp on Tuesday May 13, 2014 @10:29PM (#7741889)
After browsing around, you're GitHub repo is a learning treasure. Thanks for posting all of that stuff in such a clear way.
Re:Removing User Interface Complexity, or Why React is Awesome by cnp on Tuesday May 13, 2014 @10:11PM (#7741843)
Thanks so much for posting this! I haven't found anything this concise before, with such a specific target.
Re:Removing User Interface Complexity, or Why React is Awesome by camus2 on Tuesday May 13, 2014 @12:22PM (#7738935)
it'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/), 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.
Re:Removing User Interface Complexity, or Why React is Awesome by malvosenior on Tuesday May 13, 2014 @12:40PM (#7739062)
I agree that a self-hosting ClojureScript compiler is desperately needed and highly desirable.
Re:Removing User Interface Complexity, or Why React is Awesome by sgrove on Tuesday May 13, 2014 @01:17PM (#7739323)
We'll get there (we're not so far as it is), but it's just not high enough on anyone's priority list yet.
Re:Removing User Interface Complexity, or Why React is Awesome by lsdafjklsd on Tuesday May 13, 2014 @03:46PM (#7740237)
Looking 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.
Re:Removing User Interface Complexity, or Why React is Awesome by ThomasDeutsch on Tuesday May 13, 2014 @12:20PM (#7738922)
OM 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.

Re:Removing User Interface Complexity, or Why React is Awesome by malvosenior on Tuesday May 13, 2014 @12:42PM (#7739068)
Yep, 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.