Live data from Hacker News

Clojure Implemented in Pure Python

github.com

31–40 of 56 posts

Re: Clojure Implemented in Pure Python

#31
post #27

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

The interesting thing about python is that while it's fast to start, it can be slow to stop. I've certainly seen that in CPython, I don't know if it's something that affects PyPy as well.

Re: Clojure Implemented in Pure Python

#33

Please remember kids, language X implemented in language Y, probably means language X > 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.)

What do you mean by "language X > language Y"?

Re: Clojure Implemented in Pure Python

#35

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. 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 lac…

I dougth CL-Clojure is faster then pypy-Clojure.

Re: Clojure Implemented in Pure Python

#36
post #26

Former discussion on HN: http://news.ycombinator.com/item?id=3589374

PyClojure (in the link) didn't actually take it to the extent we are. clojure-py goes so far as to implement all the standard collections in pure python. So [1 2 3] in clojure-py is a PersistentVector not a python list.

Why? If your going to rewritte the collections, why not in Clojure? Speed?

Re: Clojure Implemented in Pure Python

#37

Please remember kids, language X implemented in language Y, probably means language X > 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.)

Or language X > language Y in some domains, but language X is not practical in some other domains - see Lua/C[++]

Re: Clojure Implemented in Pure Python

#38
post #29
post #27

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

I agree. Native access to legacy linear algebra functionality exposed by Numpy is the #1 reason this project seems exciting to me. I don't really care if the bulk of the code is O(10) slower so long as the numerical bits are O(1000) faster, which is a typical comparison of LAPACK for the JVM equivalents.

(Pedant warning)

I think you may be abusing Big-O notation a little here since, technically O(10) is equivalent to O(1000)—and both are O(1).

Re: Clojure Implemented in Pure Python

#39
post #35

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. 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 lac…

I dougth CL-Clojure is faster then pypy-Clojure.

Why? CL compilers (SBCL at least) generate really fast code.

Re: Clojure Implemented in Pure Python

#40

Earlier quoted context omitted.

Ok, what's the use case? What is the benefit to this versus regular ol' Python? In what situations might I write clj-py assumine identical performance to Cpython or pypy, instead of just Python? I agree that this is a really cool project and I plan on reading through the source when I have time strictly as a learning exercise, but I cannot think of a use case.

Consider the case of a person that prefers programming in Clojure to programming in Python... :)

I am such a person. That's why I program in Clojure -- yes, including a couple of Clojure repos at work (after gettin sign off from my boss). I also love Python. Best tool for the job and all that. Rewriting Clojure in Python is as absurd to me as rewriting JavaScript or Ruby in "pure Python". You get nothing meaningful except different syntax.
Post reply on HN