> I find this response the most interesting with respect to the OP's question.
> Can you elaborate how you re-define what clojure is? Then assuming we make
> no claim on ease of updating or strict adherence to what Clojure is defined
> to do, in other words we are making an evolution of ClojureScript, what
> would the PyPy implementation look like? How would things be simpler, and
> more complicated? What's the minimal set of functionality that needs to be
> implemented in RPython so that we can begin to define clojure.core.
>

Rpython is very restrictive. Basically it's garbage collected C++ with
a different syntax. So this means we can't import modules at runtime.
So any additional libraries must be added via C FFI. So as an example,
let's take a look at core/slurp. To properly implement this function,
we need HTTP support...but where do we get this from? On the JVM and
CLR this is simple. But in PyPy we need to go and find a HTTP library,
find a way to link it in, figure out how to call it's methods via FFI,
and then figure out how to dispose of any memory it creates. So what
used to be a simple 5 lines of code calling HttpWebRequest (on the
CLR), has now ballooned into a lib requirement, FFI, and a bunch of
support routines. Or we can simply say "slurp can only read from
files", which means now you just create a doc of "ways clojure-pypy
differs from clojure-jvm.

In some ways, this is why I'm in favor of going with a clojure->python
translator. There would be a small impact in speed, but this means you
could leverage the existing Python ecosystem. And to be honest,
debugging Python is way better than RPython, for example:

def foo (x, y):
    return x + y;

x = 0
print foo(x, 1.0)
print foo(x, 1)

Will the above compile? In Python, yes, in RPython, no....and here is
the error you will receive:

"Resolution of foo has revolved to SomeObject. Previous definitions
are foo(int, float), at foo(int int)"

Now if you work with RPython long enough...that may make sense...but
most likely you won't quite understand that this is complaining
because you've already created a function as having a float argument,
and later you use it with a int argument.

So to sum this up. With RPython you loose 100% of the ecosystem, and
concurrency. With Python you still loose concurrency, but you have the
ecosystem, but you do loose some performance.

-----

Now let me say this: I'm in favor of Clojure on PyPy, it'd take a lot
more work that it looks originally, but it's not impossible. I'm for
this project, and I'd love to help. Sadly, I've got too many other
things on my plate right now to head this up. But if someone else
creates the project, and gets it going, I'll make regular commits and
help where/whenever I can.

Also, I'm only half joking about implementing a JVM on pypy...someone
recently implemented the JVM on Javascript, so it's not that hard.

Timothy

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to