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.
我只是想知道在Googles V8 Javascript引擎上实现Clojure是否有意义。我从不使用Java互操作性。我也在学习ClojureScript。所以我可以看到在V8引擎上运行clojure的优势。
Any thoughts on this? Is anyone doing this? How hard would it be?
有什么想法吗?有人这样做吗?这有多难?
2 个解决方案
#1
18
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.
ClojureScript已经可以在浏览器之外的V8上运行,并且从一开始就能够运行。特别是,如果将V8目录的路径提供给运行者脚本(通过环境变量),则在V8中执行测试套件和基准套件;除了V8之外,还以这种方式使用SpiderMonkey和JavaScriptCore。
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).
Node.js为V8添加了一个完整的标准库,并且自初始版本以来一直是ClojureScript的有效编译目标。至于最先进的技术,JohnJ对Bodil演示的参考是一个很好的参考(参见Bodil的项目,如cljs-noderepl和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.
现在,ClojureScript缺少Clojure的某些功能,特别是对编译器的运行时访问,但是有一个分支,编译器移植到ClojureScript。自托管的ClojureScript版本可能只是时间问题。
#2
1
Check out Bodil Stokke's video, "ClojureScript All The Way Down," where she builds a full-stack Web application on top of Node.js.
查看Bodil Stokke的视频“ClojureScript All The Way Down”,在Node.js上构建一个全栈Web应用程序。
#1
18
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.
ClojureScript已经可以在浏览器之外的V8上运行,并且从一开始就能够运行。特别是,如果将V8目录的路径提供给运行者脚本(通过环境变量),则在V8中执行测试套件和基准套件;除了V8之外,还以这种方式使用SpiderMonkey和JavaScriptCore。
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).
Node.js为V8添加了一个完整的标准库,并且自初始版本以来一直是ClojureScript的有效编译目标。至于最先进的技术,JohnJ对Bodil演示的参考是一个很好的参考(参见Bodil的项目,如cljs-noderepl和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.
现在,ClojureScript缺少Clojure的某些功能,特别是对编译器的运行时访问,但是有一个分支,编译器移植到ClojureScript。自托管的ClojureScript版本可能只是时间问题。
#2
1
Check out Bodil Stokke's video, "ClojureScript All The Way Down," where she builds a full-stack Web application on top of Node.js.
查看Bodil Stokke的视频“ClojureScript All The Way Down”,在Node.js上构建一个全栈Web应用程序。