News for hackers. Stuff that matters.
Re:Bringing functional to the frontend – Clojure and Clojure... by aria on Thursday January 17, 2013 @12:24PM (#5073764)
Author here. Happy to answer any questions or comments.
Re:Bringing functional to the frontend – Clojure and Clojure... by zcam on Thursday January 17, 2013 @02:35PM (#5074681)
What ClojureScript libraries are you using?

What other "regular" JS framework/libs do you use with ClojureScript (thinking about jQuery, Backbone, angular and the likes)?

About dommy, what made you choose DOM vs String generation (knowing the later could be faster in some situations/setups)?

And the last one, did you consider EDN? I'd guess you choose json for obvious performance reasons.

Re:Bringing functional to the frontend – Clojure and Clojure... by aria on Thursday January 17, 2013 @02:53PM (#5074800)
Frankly at the moment, we're not using any external clojurescript libraries; we've tried many, but none quite meet our needs or the style we really like. We're internally phasing out jQuery selectors in favor of some code that we'll be releasing once we know it's battle-hardened and ready.

We don't use an MVC or components type framework, but ideas about how to setup those abstractions are percolating.

Re:Bringing functional to the frontend – Clojure and Clojure... by zcam on Thursday January 17, 2013 @03:08PM (#5074888)
I added two more questions while you where writing this reply probably.
Re:Bringing functional to the frontend – Clojure and Clojure... by aria on Thursday January 17, 2013 @07:05PM (#5076182)
Ah sorry, I didn't see. So the decision about DOM elem vs String is one I'm not 100% sure about, but I think the performance difference is at most like a 10-15% difference which wasn't that compelling to us. So I didn't see a strong reason to go one way or the other and the code I believe is cleaner producing nodes rather than Strings, but I easily could be wrong on both counts.

I didn't actually consider EDN. I haven't see enough of a win over JSON to consider it, but that could just be misinformed.

Re:Bringing functional to the frontend – Clojure and Clojure... by mingpan on Thursday January 17, 2013 @03:38PM (#5075055)
I've been using Clojure for a while now. Do you have any particular recommendations for resources for getting started with ClojureScript? I tried a while back and got really confused.
Re:Bringing functional to the frontend – Clojure and Clojure... by pchristensen on Thursday January 17, 2013 @03:44PM (#5075088)
I haven't used it but here's a 10-part mega tutorial on modern Clojurescript: https://github.com/magomimmo/modern-cljs/
Re:Bringing functional to the frontend – Clojure and Clojure... by lukev on Thursday January 17, 2013 @03:58PM (#5075159)
Shameless plug, but I'll do it anyway since it's a direct answer to the question: I'm the (co)author of ClojureScript: Up and Running from O'Reilly.

If anyone wants, email me at the address in my profile and I'll get you a discount code.

Re:Bringing functional to the frontend – Clojure and Clojure... by zcam on Thursday January 17, 2013 @03:53PM (#5075136)
http://himera.herokuapp.com/synonym.html from Fogus is also a good starting point to have an overview of how to do things and what is possible. Next stop: modern-cljs as mentioned by pchristensen.
Re:Bringing functional to the frontend – Clojure and Clojure... by No1 on Friday January 18, 2013 @12:46AM (#5077349)
"about a year and a half ago ... a relative absence of development tools for building and debugging apps."

I looked at ClojureScript when it was first released, and came to the exact same conclusion. I'm very interested to know how debugging ClojureScript works out for you. From what I remember, the ClojureScript -> JavaScript step generated some code that could be fairly difficult to follow. Also, in your experience, how well does it integrate with other JavaScript libraries?

Re:Bringing functional to the frontend – Clojure and Clojure... by willismichael on Thursday January 17, 2013 @12:41PM (#5073862)
I really want to like ClojureScript, particularly since the idea of using the same language all around the app appeals to me, but it's not quite the same language. Have you found this to be a pain in practice? I'm specifically wondering about require-macros and lack of support for ~ and ~@, although I'm also curious if you were bit by any of the other differences between Clojure and ClojureScript.
Re:Bringing functional to the frontend – Clojure and Clojure... by aria on Thursday January 17, 2013 @12:47PM (#5073905)
Indeed it's not the same language. I wasn't bit by the macro differences (which are probably the largest non-interop difference) since I tend not to use macros in my Clojure or ClojureScript code. Macros are going to be different since the macro compile host (JVM) is different than the run host (Javascript VM).

Other than macros and the VM interop (ugh I think (.-length str) is an eye-sore for property acesss), the core of the language is close enough that I Don't think of it 90% of the time.

Re:Bringing functional to the frontend – Clojure and Clojure... by vemv on Thursday January 17, 2013 @12:54PM (#5073947)
I'd say that not having "the whole language, all the time" is only (potentially) a pain regarding the development process/experience itself, not the quality of the resulting programs - which is what matters at the end.
Re:Bringing functional to the frontend – Clojure and Clojure... by weareconvo on Thursday January 17, 2013 @01:03PM (#5074002)
In general, I believe people underestimate the importance of development time, as well as ease of training/hiring new programmers - one language is nearly always better as far as both of these things are concerned (unless that language is something like Malbolge).
Re:Bringing functional to the frontend – Clojure and Clojure... by piranha on Friday January 18, 2013 @02:05AM (#5077518)
Why jQuery, when ClojureScript already comes with a framework? It's easy to wrap it by a thin layer if you don't like the API, but then you get working advanced mode and one external dependency less.