Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing Clojure on top of V8 engine

I am just wondering if it would make sense to implement Clojure on top of Googles V8 Javascript engine. I never use Java interoperability. I also am learning ClojureScript. So I could see an advantage of having clojure running on the V8 engine.

Any thoughts on this? Is anyone doing this? How hard would it be?

like image 763
Jonovono Avatar asked May 07 '13 21:05

Jonovono


2 Answers

ClojureScript can already run on top of V8 outside of the browser and has been able to since the very beginning. In particular, the test suite and the benchmark suite get executed in V8 if the path to V8's directory is provided to the runner scripts (via an environment variable); besides V8, SpiderMonkey and JavaScriptCore are being used in this way.

Node.js adds a full standard library to V8 and has been a valid compilation target for ClojureScript since the initial release. As for the state of the art, JohnJ's reference to Bodil's presentation is a good one (see also Bodil's projects like cljs-noderepl and Dog Fort).

Now, ClojureScript lacks certain features of Clojure, notably runtime access to the compiler, but there is a fork with the compiler ported to ClojureScript. A self-hosted ClojureScript release is probably a matter of time.

like image 129
Michał Marczyk Avatar answered Oct 21 '22 05:10

Michał Marczyk


Check out Bodil Stokke's video, "ClojureScript All The Way Down," where she builds a full-stack Web application on top of Node.js.

like image 1
JohnJ Avatar answered Oct 21 '22 05:10

JohnJ