TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Clojure Implemented in Pure Python

122 点作者 gdw2大约 13 年前

9 条评论

frig8大约 13 年前
This is an exciting idea, but I think the home page focuses far too much on these hypothesized advantages of a dynamic VM. Not only are the advantages unproven, it's hard to see how this project represents anything novel in that aspect given that ClojureScript already exists.<p>The things that come to my mind are things like Numpy, Scipy, PySide, boost.python and all other sorts of Python bindings to C, C++ and Fortran code that aren't readily available on the JVM. Also, the startup time that the JVM can't match, the Python standard library and the other random bits people have developed that make Python such a wonderfully flexible scripting environment.<p>If you have excellent interop, there will be plenty of interest in this project regardless of how fast or slow it is. If it's fast, all the better.
评论 #3650914 未加载
评论 #3651270 未加载
ScottBurson大约 13 年前
Huh. I think Common Lisp would be a much better choice than Python. It's much faster, for starters. And it lets you do some fairly low-level stuff if you want.<p>In general I think Common Lisp's virtues as an implementation substrate for other languages are much greater than most people appreciate. It is flexible, expressive, and fast. Its dynamicity comes in very handy. And some of its vices -- its sheer size, its lack of orthogonality, and its occasionally archaic naming conventions -- are much less problematic for a language implementation task than they are for general programming.<p>There are exceptions, of course. You wouldn't want to implement C++ in Common Lisp. But for dynamically typed languages it ought to be a leading candidate.
评论 #3652849 未加载
评论 #3651398 未加载
ericmoritz大约 13 年前
Here's a quick benchmark on my machine (a EeePC 1001HE). I used reduce1 with clojure-py because there doesn't seem to be a reduce BIF. I don't know if that effected this benchmark any:<p>Python:<p><pre><code> (time (reduce1 + (range 100000))) Elapsed time: 3882.57193565 msecs 4999950000 </code></pre> PyPy:<p><pre><code> user=&#62; (time (reduce1 + (range 100000))) Elapsed time: 259.984970093 msecs 4999950000 </code></pre> Clojure via Java Hotspot:<p><pre><code> user=&#62; (time (reduce + (range 100000))) "Elapsed time: 75.35225 msecs" 4999950000</code></pre>
评论 #3650634 未加载
mark_l_watson大约 13 年前
That looks nice. I have to ask: Clojure on the JVM is fast: can a PyPy runtime really compete after Hotspot has a chance to optimize?
评论 #3650051 未加载
评论 #3650197 未加载
mattdeboard大约 13 年前
Er, what about Java interop? The notions of atoms, agents and refs? How are you going to translate these into "pure Python"?
评论 #3650389 未加载
apatry大约 13 年前
Really nice. I hope it will make clojure scripts faster to start than with the jvm and thus a real alternative as a scripting language.
评论 #3650163 未加载
DanielRibeiro大约 13 年前
Former discussion on HN: <a href="http://news.ycombinator.com/item?id=3589374" rel="nofollow">http://news.ycombinator.com/item?id=3589374</a>
评论 #3650874 未加载
dhconnelly大约 13 年前
This is awesome.
stcredzero大约 13 年前
Please remember kids, language X implemented in language Y, probably means language X &#62; language Y. (And if you question this, first implement a small, elegant language, and a large "pragmatic" one and then talk to me about it.)
评论 #3651404 未加载
评论 #3651304 未加载