Clojure CLR Experiences

479 views
Skip to first unread message

Adrian Mowat

unread,
Nov 11, 2014, 10:38:58 AM11/11/14
to clo...@googlegroups.com
Hi All,

We are using Clojure on the JVM but one of our .Net developers has asked me whether I have considered using it on the CLR.  I haven't tried doing it so I wondered if anyone can share any experiences using Clojure on the CLR?  A quick google search suggests the project is still active but not especially vibrant (current version 1.4, last commit 24 days ago) but maybe that's unfair.

I'm broadly interested in the following...

* Is Clojure CLR production ready?
* Do its version numbers correspond to the core Clojure version numbers?  (would it be fair to say the Java version is the core version)
* Is it sensible to think in terms of writing platform independent code in the same way as we do with cljx files in ClojureScript?
* How good is the Visual Studio support for Clojure?
* Does Leiningen work?
* Are there any significant pitfalls to be aware of?

Any other comments would be greatly appreciated.

Many Thanks

Adrian





Shantanu Kumar

unread,
Nov 11, 2014, 12:00:11 PM11/11/14
to clo...@googlegroups.com
Not sure why you say that 1.4 is the current version. ClojureCLR releases are here: https://www.nuget.org/packages/Clojure - as of today 1.6.0.1 is the current stable version.


Shantanu

Adrian Mowat

unread,
Nov 11, 2014, 2:10:46 PM11/11/14
to clo...@googlegroups.com
Hi,

Thanks for the info and the link to the lein plugin.

I checked git hub and the latest branch was 1.4.1. That coupled with this blog http://clojureclr.blogspot.co.uk suggested the latest version was 1.4. Looks like I missed the crucial link :-)

Cheers

Adrian


Sent from Mailbox


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/Vz6C9rMeu8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aaron

unread,
Nov 11, 2014, 3:17:29 PM11/11/14
to clo...@googlegroups.com
Hi Adrian,

I'll share some of my experiences.

* Is Clojure CLR production ready?
Yes, I have been using it in production for about 2 years now.

* Do its version numbers correspond to the core Clojure version numbers?  (would it be fair to say the Java version is the core version)
It's fair to say that the Java is the core version, but Dave Miller (the ClojureCLR maintainer) does a pretty good job of keeping it up to date with the Java version.

* Is it sensible to think in terms of writing platform independent code in the same way as we do with cljx files in ClojureScript?
It is feasible if you put the effort into testing and writing the code correctly, but currently I don't think cljx supports ClojureCLR - you'd probably need to add that functionality yourself.

* How good is the Visual Studio support for Clojure?
I use emacs and *inferior-lisp* and am pretty happy with them so I can't comment on the Visual Studio workflow.

* Does Leiningen work?
There is Shantanu's lein plugin and I've tried to do a proof of concept "nlein", but there really isn't the equivalent thing in ClojureCLR. I mostly deploy my .clj files as embedded resources in C# DLL's and have C# call into Clojure to bootstrap things. I'm sure other people use other strategies.

* Are there any significant pitfalls to be aware of?
Not as many libraries are available and you'll have to do a fair amount of groundwork yourself. Startup time is similar to the JVM verison.

Overall, once I got past the initial hurdles, I found the environment to be quite stable and a huge productivity boost. I would definitely recommend ClojureCLR for projects with a big existing .NET code base. For new projects, I do usually go with JVM Clojure mainly for access to more libraries and IDE's. At the time when I started using ClojureCLR our team was heavily invested in .NET so it made a lot of sense and was definitely well worth it...

Be sure to check out the ClojureCLR google group: https://groups.google.com/forum/#!forum/clojure-clr

Alex Miller

unread,
Nov 11, 2014, 9:31:38 PM11/11/14
to clo...@googlegroups.com


On Tuesday, November 11, 2014 9:38:58 AM UTC-6, Adrian Mowat wrote:

* Is it sensible to think in terms of writing platform independent code in the same way as we do with cljx files in ClojureScript?

With the feature expressions work we hope to include in 1.7, this will become possible. Our primary goal is Clojure/ClojureScript portability as that is significantly more common, but I think with the corresponding changes in ClojureCLR, this should become possible. One issue in particular that I know is the pipe-delimited symbol extension in ClojureCLR which would not be parseable in Clojure or ClojureScript even with feature expressions so that would be a limit. There may be other issues as well. We would like this to work though eventually.

Alex

dmiller

unread,
Nov 11, 2014, 9:32:23 PM11/11/14
to clo...@googlegroups.com
Re versions: look at the tags, not the branches.  The 1.4.1 branch was anomalous, due to needing to get out a bug fix.

Adrian Mowat

unread,
Nov 12, 2014, 3:45:57 AM11/12/14
to clo...@googlegroups.com
Ah, OK.  Sorry about that!

Adrian Mowat

unread,
Nov 12, 2014, 3:48:11 AM11/12/14
to clo...@googlegroups.com
Hi Aaron,

That really helpful.  Just what I was looking for.

Adrian
Reply all
Reply to author
Forward
0 new messages