Live data from Hacker News

ClojureScript

github.com

61–70 of 95 posts

Re: ClojureScript

#61
post #55

Earlier quoted context omitted.

What would you expect to be different? Your post says the important point: it's Clojure. For some an additonal point is that it's not JavaScript. There is nothing deeper than that.

If that's the most important point I fail to understand why it's #1 Hacker News, sorry. This makes HN no better than a "hype engine" as some say. If someone would at least mention that Google Closure makes it pretty neat, then I would have let it go , so to say. Even worse, two other relevant Clojure libs are mentioned and the important point is still "it's Clojure"?

The other libraries are clojure libs that implement javascript analogies[1] as clojure macros and functions and generate javascript.

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

Re: ClojureScript

#62
> ClojureScript seeks to address the weak link in the client/embedded application development story by replacing JavaScript with Clojure, a robust, concise and powerful programming language. In its implementation, ClojureScript adopts the strategy of the Google Closure library and compiler, and is able to effectively leverage both tools, gaining a large, production-quality library and whole-program optimization. ClojureScript brings the rich data structure set, functional programming, macros, reader, destructuring, polymorphism constructs, state discipline and many other features of Clojure to every place JavaScript reaches.

Re: ClojureScript

#63
post #62

> ClojureScript seeks to address the weak link in the client/embedded application development story by replacing JavaScript with Clojure, a robust, concise and powerful programming language. In its implementation, ClojureScript adopts the strategy of the Google Closure library and compiler, and is able to effectively leverage both tools, gaining a large, production-quality library and whole-program optimization. Cloj…

http:www.nurhadi.info

Re: ClojureScript

#64

Given a radical departure from the JavaScript core (comparing to Coffeescript), I wonder how easy the debugging would be.

Presumably, you wouldn't have to look at the Javascript source because the Clojurescript should directly tell what's wrong when it's compiling to Javascript. This is different from Coffee because Coffee is only a compiler front-end (a lexer/parser) and thus, doesn't really provide any execution semantics.

Re: ClojureScript

#65
post #53

Earlier quoted context omitted.

I could be wrong, but I think this is different. Are there any other languages that are both hosted on the JVM and also in Javascript VMs? Beyond that, there almost certainly isn't a lisp that is.

Java via GWT runs on the JVM and in JavaScript.

[deleted]

Re: ClojureScript

#66
post #53

Earlier quoted context omitted.

I could be wrong, but I think this is different. Are there any other languages that are both hosted on the JVM and also in Javascript VMs? Beyond that, there almost certainly isn't a lisp that is.

Java via GWT runs on the JVM and in JavaScript.

Ah, how could I forget! I guess the "non suck" criteria made me forget about GWT :)

Re: ClojureScript

#67
I'm both curious and surprised by the lack of comments/questions about the quality of the generated JS. Can anyone who has played with it speak to the quality? How does the generated code stack up against say Coffeescript's?

Re: ClojureScript

#69
post #19

Earlier quoted context omitted.

Atoms are available now. Agents might come soon. Refs and Vars are questionable.

> 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?

I think stuff like defn is just a normal js function and does not have the semantics of a clojure var.

Re: ClojureScript

#70

Node.js + clojurescript just came up in the Demo. Part of me says awesome, another part says "How many hipster programmer brains blew up" 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.

I'm glad for the Clojure community if this didn't exist before, but I'm pretty sure Lispers (ie Common Lispers) have written "entire" web apps in Lisp for quite a while[1]. 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, t…

ParenScript (or CoffeeScript) is not the same as ClojureScript. ParenScript "transforms" a subset of CL to JS, while ClojureScript is a full-fledged target runtime for Clojure. For example, something like

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

Post reply on HN