Status of Clojure on .NET?

135 views
Skip to first unread message

John "Z-Bo" Zabroski

unread,
Jun 9, 2009, 9:31:38 PM6/9/09
to Clojure
I am basically in love with Clojure. It fixes everything I ever found
annoying about Lisp dialects, except for type safety (which I can live
without for many scenarios).

But I feel like my love is unrequited: Clojure is a JVM language, and
all my core libraries at .NET.

The rest of this post discusses what options exist today for running
Clojure on the CLR.

Options:
- IKVM.NET is a JVM implementation on top of .NET; it can therefore
load clojure and its libraries
- David Miller's ClojureCLR; Last Updated May 31st, 2009;
http://github.com/dmiller/ClojureCLR/tree/master
- Stefan Rusek's Xronos; Last Updated ~4 months ago;
http://bitbucket.org/stefanrusek/xronos/wiki/Home

David Miller's ClojureCLR is, as the name suggests, CLR-based.
Stefan Rusek's Xronos is DLR-based.

David last posted about the project on the Clojure Google Group on
April 27th, 2009: http://groups.google.com/groups/profile?enc_user=uoL2hhUAAABdPRgdaaO0krQLTeyusdD29h3i3SmjGmAJbX05nZ-8fQ

Not positive, but I believe Stefan hasn't updated his wiki since
December 07, 2008.

What I know I don't know:
To what extent has the notion of benchmarking and comparing the
performance of Clojure implementations been discussed on this list?

If this post happens to reach those outside this Google Group, I will
also provide "where to start?" pointers for .NET developers.

Getting Started Links:
- A link to the best independent review of Clojure I've read:
http://technomancy.us/121
- Programming Clojure by Stuart Halloway is a great overview
http://www.amazon.com/Programming-Clojure-Stuart-Halloway/dp/1934356336/

Cheers,
Z-Bo

Cosmin Stejerean

unread,
Jun 10, 2009, 3:08:34 PM6/10/09
to clo...@googlegroups.com


On Tue, Jun 9, 2009 at 8:31 PM, John "Z-Bo" Zabroski <johnza...@gmail.com> wrote:

I am basically in love with Clojure.  It fixes everything I ever found
annoying about Lisp dialects, except for type safety (which I can live
without for many scenarios).

But I feel like my love is unrequited: Clojure is a JVM language, and
all my core libraries at .NET.

The rest of this post discusses what options exist today for running
Clojure on the CLR.

Options:
 - IKVM.NET is a JVM implementation on top of .NET; it can therefore
load clojure and its libraries
 - David Miller's ClojureCLR; Last Updated May 31st, 2009;
http://github.com/dmiller/ClojureCLR/tree/master
 - Stefan Rusek's Xronos; Last Updated ~4 months ago;
http://bitbucket.org/stefanrusek/xronos/wiki/Home

David Miller's ClojureCLR is, as the name suggests, CLR-based.
Stefan Rusek's Xronos is DLR-based.

David last posted about the project on the Clojure Google Group on
April 27th, 2009: http://groups.google.com/groups/profile?enc_user=uoL2hhUAAABdPRgdaaO0krQLTeyusdD29h3i3SmjGmAJbX05nZ-8fQ

There was an updated post to the list from David on May 31st, although it seems to be pretty hard to find using search on the google group. I finally tracked a link to it down by going backwards through the archive and looking at all the threads from May 31st.


--
Cosmin Stejerean
http://offbytwo.com

David Miller

unread,
Jun 11, 2009, 12:11:40 AM6/11/09
to Clojure
Actually, ClojureCLR is also DLR-based, relying on Expression Trees
V2, but not the hosting goodies. Thus, it might be runnable directly
in .NET 4.0 without the DLR.

For ClojureCLR: Performance of the core libraries is quite good.
Startup time is quite good. Of compiled Clojure code, not so good.
The compiler is quite new and needs optimizing.

Regarding benchmarking Clojure being discussed on the list: mostly
I've seen comparisons of Clojure to other languages. There was a
discussion of IKVM/Clojure performance some 11 months ago here:
http://groups.google.com/group/clojure/browse_thread/thread/e48b64f3dc1f09fb

I'd love to have good Clojure examples for benchmarking.

For me, there are two aspects of benchmarking ClojureCLR against the
JVM implementation. (1) How do the two compare in straight-up elapsed
time comparisons? (2) How much of the difference is attributable to
the implementations and how much to the platforms (JVM vs CLR)? The
former is something I can work on, the latter is out of my control,
other than finding compilation workarounds. Regarding platform
benchmarks, I've not found much recent work. I've tracked down some
older JVM/CLR benchmarks that are relevant and will be playing with
them soon.

Improving the performance of ClojureCLR is in the top two development
goals. (Porting to Mono is the other.)

-- David Miller


On Jun 9, 8:31 pm, "John \"Z-Bo\" Zabroski" <johnzabro...@gmail.com>
wrote:
> I am basically in love with Clojure.  It fixes everything I ever found
> annoying about Lisp dialects, except for type safety (which I can live
> without for many scenarios).
>
> But I feel like my love is unrequited: Clojure is a JVM language, and
> all my core libraries at .NET.
>
> The rest of this post discusses what options exist today for running
> Clojure on the CLR.
>
> Options:
>  - IKVM.NET is a JVM implementation on top of .NET; it can therefore
> load clojure and its libraries
>  - David Miller's ClojureCLR; Last Updated May 31st, 2009;http://github.com/dmiller/ClojureCLR/tree/master
>  - Stefan Rusek's Xronos; Last Updated ~4 months ago;http://bitbucket.org/stefanrusek/xronos/wiki/Home
>
> David Miller's ClojureCLR is, as the name suggests, CLR-based.
> Stefan Rusek's Xronos is DLR-based.
>
> David last posted about the project on the Clojure Google Group on
> April 27th, 2009:http://groups.google.com/groups/profile?enc_user=uoL2hhUAAABdPRgdaaO0...

John "Z-Bo" Zabroski

unread,
Jun 11, 2009, 3:27:01 PM6/11/09
to Clojure


On Jun 11, 12:11 am, David Miller <dmiller2...@gmail.com> wrote:

> Improving the performance of ClojureCLR is in the top two development
> goals.  (Porting to Mono is the other.)

Are you familiar with Mono and the recent attempts from the Mono
developers to make the VM more functional programming language
friendly, e.g. coroutines? Miguel discusses it on his blog.

I'd love to help you, but have my own projects on table right now. At
best I might submit a patch as I comb over the source code.

Also, I'll do my best to raise awareness of your project, hopefully
nudging developers to the cause, and help out in that way for now.

David Miller

unread,
Jun 12, 2009, 8:52:47 AM6/12/09
to Clojure
I am familiar with Mono, but not with the Mono developer attempts to
make it a happy place for FP. Thanks for the tip.

The more the merrier.

On Jun 11, 2:27 pm, "John \"Z-Bo\" Zabroski" <johnzabro...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages