On Monday, November 21, 2011 10:28:18 AM UTC-5, tbc++ wrote:
>
> 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.
>
I specified that we could be looser on what we define Clojure to meet. So I 
was hinting at implementing in a manner similar to ClojureScript, where we 
simply define the lisp primitives and deftype/defprotocol. We wouldn't have 
to implement slurp in rpython, we could instead implement it in clojure+.
 

> 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.
>
In my opinion, I think this is the most sane approach. This goes better 
with eval everything mentality of PyPy. You get another JVM implementation 
with fancy cool new optimizations. So not only do you get Clojure, you get 
Scala, Groovy, Java, etc. Now while this is probably a more daunting 
project, people have implemented JVM's in other languages, and this pulls 
from a larger pool of motivation, so more people would be likely to work on 
it.

>

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