On Wed, Jul 11, 2012 at 3:05 PM, Timothy Baldridge <tbaldri...@gmail.com> wrote:
>>> I've been debating on working on a native Clojure
>
> I've also been debating this for over two years now,y but I keep
> coming back to the same problems over and over again:
>
> 1) A from-scratch native Clojure either needs to be just a compiler
> (as this project is), or you're going to need a decent GC, JIT and
> object system

You need a decent GC and object system in either case.

> 2) The Boehm GC is easy to use, but it's not fast or accurate. The
> JVMs can implement generational concurrent compacting GCs (and do
> depending on your implementation). These are all very useful features,
> and things that Boehm doesn't support. In addition, Boehm isn't
> accurate, so memory leaks can still occur.

Boehm is just a starting point to get things off the ground.  We'll
eventually have a precise, generational GC as well.  In particular,
there is one I have a bit of experience with:

  http://schani.wordpress.com/tag/sgen/

> 3) Unless you plan on staying strictly AOT, and igoring the REPL, then
> we're going to need a JIT, that's not exactly something you can hack
> together in an afternoon

I don't follow.

> 4) Arithmetic must auto-unbox or it will be quite slow. This also
> requires a JIT.

No.  JITs can help there in some ways, with run-time feedback
optimizations, but type declarations and some analysis also go a long
way.

> 5) Clojure is made up of hundreds of single line functions, a JIT
> should be able to inline this, one more reason why its needed

Static compilers can also inline.  Again, JITs can do more, but this
is not a show-stopper by a long shot.

> All these reasons have brought me to the conclusion that the simplest
> way to get all this, is to base a native version of Clojure on PyPy.
> No, I didn't say write it in Python and have it run on the Python VM.
> PyPy is technically speaking a "language agnostic JIT generator
> written in Python".

We already have two first class JITting Clojure implementations.  This
is a different project.

Mark

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