Refresh on .NET Core

464 views
Skip to first unread message

Tom Winans

unread,
May 19, 2020, 10:15:31 AM5/19/20
to clojure-clr
Greetings all--am new to Clojure, am a .NET fan and a Lisp fan. Is ClojureCLR fully available (feature parity) on .NET Core (v3)? The java repository seems active and I am wondering if the ClojureCLR is being actively maintained (vis-a-vis .NET Core changes if needed), and if the rest of the Clojure evolution is at the Lisp level.

Thank you,
Tom

dmiller2718

unread,
May 19, 2020, 10:47:27 AM5/19/20
to clojure-clr




This will be an overall update for those waiting for news about .net core and ClojureCLR.

I've been holding back on the 1.10 version update in order to get up on .Net Core.
It runs on .Net Core 2.x and 3.x and passes all tests.  (You can find the code in the newframework branch.)
However, what is not yet possible is AOT-compilation on .Net Core.

Quick recap of the problem.
AOT-compilation in this context is taking the large set of Clojure source code that sets up the Clojure environment,  such as the definitions of first, rest, defn, etc.
Those can be compiled ahead of time to .Net assemblies for much quicker initialization at startup.
This works fine in .Net Framework 4.x.
However, .net core and .net standard do not support saving dynamically-created assemblies, so we cannot do AOT-compilation.
This means that time-to-prompt on startup is something like 10 seconds instead of sub-seccond.

I found one project that supplies the missing Save functionality for .Net Core. 
It has not been easy sailing.
So far I've filed three bug reports.  I've found workarounds for the ClojureCLR code for those three bugs.
I just found a fourth bug, and I don't know that I can find a workaround in my code or a patch for their code.

So right now, it appears there are three choices available.

(1) Release version 1.10 with support for .Net Core, but with very slow startup times due to no AOT-compilation.
(2) Keep plugging away on making this other project work.
(3) completely rewrite all code generation using (most likely) Mono.Cecil.

Would people settle for (1) to keep things moving until I can solve AOT-compilation via (2) or (3)?

Tom Winans

unread,
May 19, 2020, 10:58:45 AM5/19/20
to dmiller2718, clojure-clr

I would settle for 1 with hope that a faster would come sooner than later (easy for me to say, and I certainly acknowledge your/community lift/contribution) … many thanks for this great response!

 

My challenge is the invest in underpinnings either in Java or C# (preferred) in a Linux/.NET Core context. I have C# investments I’d like to leverage, and I’m less a fan of Java and the need to rebuild.

 

All best, many thanks,

Tom

 

Tom Winans | Concentrum Inc.
(m) +1 719-430-5401 | (e) t...@winans.me

(w) http://tomwinans.info | (li) https://www.linkedin.com/in/tomwinans

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."

I consider this email and any attachments to be confidential or legally privileged. If you received this message in error or are not the intended recipient, please forgive me my error, destroy the email message and any attachments or copies, and kindly inform me of the erroneous delivery by return email. Thank you.

 

--
You received this message because you are subscribed to the Google Groups "clojure-clr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-clr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure-clr/8ee6c416-4ea5-4110-b01e-be0a4f0d98ad%40googlegroups.com.

Scott Archer

unread,
May 19, 2020, 8:41:28 PM5/19/20
to Tom Winans, dmiller2718, clojure-clr
I'm also interested in Clojure in .NET Core.
I'd be OK with any of the above options. Do the performance implications only affect startup time or will it also affect performance in general?

Thanks for your work on this!
Happy with whatever you come up with.

Scott

dmiller2718

unread,
May 20, 2020, 12:30:40 AM5/20/20
to clojure-clr
It only affects startup time.

To unsubscribe from this group and stop receiving emails from it, send an email to clojure-clr+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "clojure-clr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-clr+unsubscribe@googlegroups.com.

Dangercoder

unread,
May 21, 2020, 10:41:37 AM5/21/20
to clojure-clr
- Would people settle for (1) to keep things moving until I can solve AOT-compilation via (2) or (3)?

Hi David, I would settle for option 1. It would be great to start using Clojure together with dotnet core. For me the slow startup time is not a deal breaker.

Tom Winans

unread,
May 21, 2020, 11:36:53 AM5/21/20
to Dangercoder, clojure-clr
I would ...

Tom Winans | Concentrum Inc.
(m) +1 719-430-5401 | (e) t...@winans.me
(w) http://tomwinans.info | (li) https://www.linkedin.com/in/tomwinans

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."

I consider this email and any attachments to be confidential or legally privileged. If you received this message in error or are not the intended recipient, please forgive me my error, destroy the email message and any attachments or copies, and kindly inform me of the erroneous delivery by return email. Thank you.



On 5/21/20, 8:41 AM, "cloju...@googlegroups.com on behalf of Dangercoder" <cloju...@googlegroups.com on behalf of emil.j...@gmail.com> wrote:

- Would people settle for (1) to keep things moving until I can solve AOT-compilation via (2) or (3)?

Hi David, I would settle for option 1. It would be great to start using Clojure together with dotnet core. For me the slow startup time is not a deal breaker.

--
You received this message because you are subscribed to the Google Groups "clojure-clr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-clr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure-clr/b7cb3676-b874-42da-b64e-51d1fe9e7518%40googlegroups.com.

Javier Goday

unread,
May 21, 2020, 12:52:12 PM5/21/20
to clojure-clr
Having core-clr working with dotnet core is a dream for me !
Sorry if I'm saying some non-sense, but, what do you mean with '.net core and .net standard do not support saving dynamically-created assemblies' ?
you can save a dynamically generated dll with roslyn, using CodeCompilation unit emit and so on ...

Anyway, thank you for your coreclr work and initiative very grateful to you !

David Miller

unread,
May 21, 2020, 2:36:51 PM5/21/20
to Javier Goday, clojure-clr
I haven't had a chance to look at what Roslyn supplies.
And there is also Cecil.Mono.
To use Cecil.Mono, I would have to do a complete rewrite of all the IL generation code because it does not follow the Reflection.Emit APIs.
Unless Roslyn can just dump from an AssemblyBuilder, it, too, would require a complete rewrite.
I can't do those rewrites on a short-term basis.  It will be massive.
I was trying to use a project that would allow generation of a DLL from an AssemblyBuilder by changing one line of code.
However, it doesn't seem to be able to handle everything.  If this 'one last bug' is easily solved, then I'm golden.
Otherwise, I think I'll have to put a 1.10 version on .Net Core without AOT-compilation.



--
You received this message because you are subscribed to the Google Groups "clojure-clr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-clr...@googlegroups.com.

Swanand Kriyaban

unread,
May 21, 2020, 5:59:25 PM5/21/20
to clojure-clr
Option 1 would work for me - I have been holding off on adopting Clojure because of this.
Thank you for your awesome work - really appreciate it!

Looking forward
Reply all
Reply to author
Forward
0 new messages