Overall I'm excited about this and anxious to see how far it can be taken, because if you can write an ENTIRE webapp in clojure is thought provoking.
Overall I'm excited about this and anxious to see how far it can be taken, because if you can write an ENTIRE webapp in clojure is thought provoking.
For example, Kenny Tilton wrote a Lisp wrapper to qooxdoo on top of his data-flow library (Cells). The only time we need to write JS code now is for additional glue for widgets or functionality we haven't wrapped yet. And since it wraps qooxdoo, this means not writing (or needing to know) a lick of HTML/CSS. We just write Lisp. And we persist data to a triple store that "shapes" the Lisp/qooxdoo code at runtime.
</smug>
[1] I want to say "years" but I'm not sure how many people have used CL to write "entire" web apps.
What this means now is, for the first time, you can write Clojure code on the server, interop with legacy Java code or well-tested libraries, and then write Clojure code on the client, full stack. This, as far as I know, is a pretty big game changer since it allows you to write a full-stack web application that is part of the Java ecosystem in a single language that happens to not suck either.
Edit: To clarify, I'm sure there are other JVM lisps, and other Javascript lisps. But this is the first one that is both, I'd wager. This is important.
Edit: I guess this somebody also happens to be Rich Hickey. Indeed it would be a big deal if John McCarthy had written Parenscript. :D
No, I think the thing to note here is that Clojure--for reasons I can only guess at--has a lot more sex appeal than CL.
Just because people are excited about developments in the Clojure ecosystem doesn't mean they aren't excited you can do this elsewhere. It's interesting right now because it's new, and it opens up some new ways of development for people who enjoy writing software in Clojure.
Good point. My comment was more of a response to the "thought provoking" part rather than being excited about ClojureScript itself.
I don't think anyone has managed to get a JVM to run on his Linux port yet though.
More practically, Javascript itself runs fine on the JVM (via Rhino).
There are Ruby-on-JS[1] and Python-on-JS[2] efforts as well (both Ruby & Python run on the JVM)
[1] http://ejohn.org/blog/ruby-vm-in-javascript/
[2] http://pyjs.org/
Doing compilation GWT/Clojurescript style is going to reduce integration overhead. So far I haven't seen anything that integrates as well as Parenscript.
I forgot about the LLVM compiler - that's a very promising project.
Parenscript doesn't have a runtime beyond what the JS implementation provides, so it's not really a Common Lisp running on JS, more like a way to compile Common Lisp-based DSLs to JavaScript. Red Daly's PSOS (https://github.com/gonzojive/paren-psos) library provides most of the runtime stuff, and I guess counts as a sort of implementation of CL. I've been toying with the idea of extending PSOS to a full CL in JavaScript.
possible with the above alternatives and
Armed Bear Common Lisp?
Yes it is. I wish being possible was all that it took for it to be done. In the absence of ClojureScript I would love to write my web client code in Common Lisp. I love Common Lisp.Edit: Trimmed unnecessary banter as it's a genuine question.
Even worse, two other relevant Clojure libs are mentioned and the important point is still "it's Clojure"?
ClojureScript is a Clojure The Language compiler that implements Clojure (its datastructures, standard lib, protocols, deftypes etc etc) and is hosted[2] on javascript rather than the JVM.
In ClojureScript you are not writing reskinned javascript, you are writing Clojure.
[1] simplified for the argument
[2] By outputting javascript
(parenscript:ps (defun square (x) (* x n))) ;; [sic]
will compile fine to "incorrect" JS code. Try doing the same in ClojureScript, you'll get an error/warning from the compiler. This applies to CoffeeScript, etc. as well.Update - To summarise, ClojureScript is to Clojure what ABCL is to Common Lisp.
Edit: Actually that's not strictly true. "What ClojureScript is Not" https://github.com/clojure/clojurescript/wiki/Core-blog-post...
Why is this example incorrect? n might be a dynamic or global variable; there's no way to know during compilation.