TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Clojure Implemented in Pure Python

122 pointsby gdw2about 13 years ago

9 comments

frig8about 13 years ago
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 未加载
ScottBursonabout 13 years ago
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 未加载
ericmoritzabout 13 years ago
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_watsonabout 13 years ago
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 未加载
mattdeboardabout 13 years ago
Er, what about Java interop? The notions of atoms, agents and refs? How are you going to translate these into "pure Python"?
评论 #3650389 未加载
apatryabout 13 years ago
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 未加载
DanielRibeiroabout 13 years ago
Former discussion on HN: <a href="http://news.ycombinator.com/item?id=3589374" rel="nofollow">http://news.ycombinator.com/item?id=3589374</a>
评论 #3650874 未加载
dhconnellyabout 13 years ago
This is awesome.
stcredzeroabout 13 years ago
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 未加载