News for hackers. Stuff that matters.
Re:ClojureScript by andrewvc on Wednesday July 20, 2011 @08:25PM (#2788028)
I'm wondering if this has the refs, agents, and atoms that make concurrent clojure so awesome. If not, it would feel.... strange.
Re:ClojureScript by lukev on Wednesday July 20, 2011 @08:34PM (#2788053)
Atoms are there. The others are not, but they would be pretty much meaningless in a Javascript engine anyway, since Javascript is specified to be single threaded.
Re:ClojureScript by azakai on Wednesday July 20, 2011 @08:52PM (#2788099)
JavaScript does have Web Workers, though, which are threads/processes.

They have no shared state though, not sure if that is a problem in this case or not.

Re:ClojureScript by runevault on Wednesday July 20, 2011 @08:27PM (#2788031)
The impression I got is the core syntax is all there, you just don't get access to the jvm libraries anymore.
Re:ClojureScript by fogus on Wednesday July 20, 2011 @08:34PM (#2788055)
All of the core syntax is not currently there, but you're right that ClojureScript only interops with js and not Java. For a more detailed differences list see https://github.com/clojure/clojurescript/wiki/Differences-fr...
Re:ClojureScript by fogus on Wednesday July 20, 2011 @08:42PM (#2788073)
Bear in mind that the wording is very careful. We took great pains to say things like "not currently implemented." ;-)
Re:ClojureScript by SomeIdiot on Thursday July 21, 2011 @10:39AM (#2789659)
"ClojureScript does not currently support regular expression literals using #"" "

This one seems like a big deal, given how often I find myself using regexes in clojure. Is it on its way and is there a workaround currently?

Re:ClojureScript by ericmoritz on Thursday July 21, 2011 @11:22PM (#2792287)
I'm sure you can use the native RegExp class:

    (def pat (RegExp. "Some(.+)"))
Re:ClojureScript by abp on Friday July 22, 2011 @08:32PM (#2795719)
Re:ClojureScript by runevault on Wednesday July 20, 2011 @08:39PM (#2788068)
No STM, that'll be interesting.

Ack no transients either! I know it's early but not gonna lie that one makes me sad. I love being able to write stupid fast list/map builder functions that bash inline but then return something nice and immutable.

Re:ClojureScript by fogus on Wednesday July 20, 2011 @08:33PM (#2788050)
Atoms are available now. Agents might come soon. Refs and Vars are questionable.
Re:ClojureScript by technomancy on Wednesday July 20, 2011 @11:21PM (#2788404)
> Vars are questionable.

Really? Without vars you don't even have defn. Or do you just mean that vars in clojurescript don't implement IRef?

Re:ClojureScript by nickik on Thursday July 21, 2011 @04:19AM (#2788845)
I think stuff like defn is just a normal js function and does not have the semantics of a clojure var.
Re:ClojureScript by SergeyHack on Wednesday July 20, 2011 @08:29PM (#2788039)
IIRC just atoms are available right now.
Re:ClojureScript by mattdeboard on Thursday July 21, 2011 @06:21AM (#2789016)
No agents yet