
ClojureScript One - fogus
http://clojurescriptone.com/
======
swannodette
ClojureScript is the only compile to JS language that I'm aware that lets you
fully leverage the power of modifying JavaScript prototypes w/o fear of gross
incompatibilities:

<http://clojurescriptone.com/documentation.html#one.color>

Note that they've extended (safely because of namespaces) browser natives
including Element, Array, String, as well as the custom ClojureScript data
types to respond to the color function.

~~~
mark_l_watson
Thanks for putting that together, especially the documentation! I think that I
would save a lot of time, _eventually_ , using a uniform Clojure development
environment for server side and client side, but I am hesitant to spend the
learning curve time right now. (Clojure, Noir, and Javascript are working out
really well for me.)

Your good job on documentation will get me to spend the learning curve time
sooner than later.

I also do work using GWT and SmartGWT and the uniform development environment
(even if it is Java :-) really helps work flow.

~~~
swannodette
Don't thank me, thank fogus & Clojure/core! :)

~~~
fogus
Actually you should thank Brenton Ashworth, Craig Andera, Jen Myers, and Kevin
Altman. It is and looks as beautiful as it does because of them.

------
pavpanchekha
I assume this is just-launched, but being able to do examples online would be
amazing. I believe ClojureScript does not include (eval) so you'd have to
route to the server and back; perhaps this is feasible?

~~~
icefox
There is a clojure jail so yah it is feasible.

------
MatthewPhillips
Looks great. What I would love to see is a ClojureScript tutorial that doesn't
assume you already know Clojure.

~~~
edoloughlin
ClojureScript is a subset of Clojure, so you do need to more or less know
Clojure. The main benefit to ClojureScript is that you can use essentially the
same language on the front- and back-ends.

~~~
amouat
Yes, but it doesn't really mention that in the documentation. It would be good
to something along the lines of "You will need to know Clojure to use
ClojureScript One, go here to learn it".

This looks excellent though - I'll give it a go once I think of a toy project
to try it with.

------
werg
It would be supercool to see something like this using websockets.

~~~
macmac
Here is a good example of ClojureScript <-> Clojure communication
<https://github.com/neotyk/ws-cljs> It uses the Aleph Clojure library on the
server side.

------
aveeno
How good is the interop with existing js libraries? Would i be able to use
webgl or three.js?

~~~
asmala
The short answer is yes, ClojureScript has similar interop features for
vanilla JS as Clojure for the JVM has for Java.

However, given that ClojureScript uses the Google Closure compiler to optimize
production code, there are a few gotchas to be aware of. This article does a
great job at explaining the details:

• [http://lukevanderhart.com/2011/09/30/using-javascript-and-
cl...](http://lukevanderhart.com/2011/09/30/using-javascript-and-
clojurescript.html)

------
jcdreads
Thank you very, very much for this.

Note: Installing failed for me until I replaced git:// with <https://> in two
places in script/deps. Then it worked.

~~~
jsofra
Strange for me it was he other way around. I had to replace <https://> with
git:// , perhaps it depends on the git version? mine was probably pretty old.

------
c_t_montgomery
View -> Source on this page. Just do it.

~~~
paulkoer
Yes, do it! The people downvoting you obviously didn't!

~~~
johanmagnusson
Or they did it but only on the first page. What you should look at is the
source for the documentation page
(<http://clojurescriptone.com/documentation.html>).

------
rman666
From a design perspective, that is one sweet looking site! Who created it?
With what?

~~~
rman666
Okay, that was kind of a dumb question. I assume it's created using
ClojureScript One. What I meant was how was the visual design created?

~~~
raju
This podcast from Relevance -
[http://thinkrelevance.com/blog/2012/01/12/podcast-
episode-00...](http://thinkrelevance.com/blog/2012/01/12/podcast-
episode-003.html) talks about the development of ClojureScript One, and names
a few people responsible for the visual design.

I believe Jen Myers (@antiheroine) is one of them.

------
jsavimbi
How do I [intelligently] choose ClosureScript over say, Node.js?

~~~
rgbrgb
This is definitely a question worth asking. I think the audience ClojureScript
is most appealing to is those who are already writing server-side stuff in
Clojure and want to have a consistent front end or "old-school Lisp hackers"
who are now writing web applications.

Personally, I'm attracted to Lisp/Clojure because of its AI history but
haven't put the time in to build anything real with it yet. Are there people
who have switched away from (Node || Python || Ruby) && JS who could discuss
their experience?

~~~
jshen
I've done Ruby for years and I've written one large commercial project in
clojure. Clojure was great, and I would love to use it more, but I haven't
been able to convince people to use a lisp.

It's very strange actually, I tried really hard to do a small project in
clojure at my current job and got resistance from everyone. These same people
were happy to try coffee script, scala, golang, etc, etc. There seems to be a
true bias against lisps.

~~~
devin
Personally, all I can say is: Other people can choose to accept or reject
parentheses. As people who know and understand the power and inherent elegance
of the language we need to skip the step where we yearn for recognition and go
straight to the "doing really fantastic stuff and making you jealous" portion
of the narrative.

We dote too much on the history of Lisp w/r/t Clojure IMO. Clojure is not CL.
Clojure is not Scheme. Clojure is not Haskell. Clojure is Clojure. It has its
own state, identity, and time. Make great stuff with it and other people will
follow. My feeling is that was need to quit waiting for approval and simply
draw the line in the sand. I would be happy to forfeit future programming job
opportunities if it meant committing to a language that solves the problems I
care about. Will everyone do that? Unlikely. Will the people who know better
than to settle for second best do it? I have a feeling the answer there is
closer to yes.

~~~
moomin
The joke is, David Wheeler demonstrated years ago that you don't need most of
the parens:

<http://www.dwheeler.com/readable/sweet-expressions.html>

It wouldn't be too hard to develop an indentation-based dialect of Clojure.

~~~
nickik
This is well known and has allready been done for clojure (cant remember where
I saw it).

There are problems with this syntax when you combine it with macros. There is
some work done to solve this but not much. For a (theoretical) lisp that works
this way, see here: <http://users.rcn.com/david-moon/PLOT/>

