News for hackers. Stuff that matters.
Re:Writing a Managed JIT in C# with CoreCLR by GenericsMotors on Thursday April 12, 2018 @11:49AM (#16822142)
Thanks, enjoyed the article! Though on this point:

> As you may know, in .NET CoreCLR (and Mono), the JIT has been entirely written in C/C++. That’s sometimes even a joke used by C++ developers to remind the enthusiastic C# developer crowd that their ecosystem is being actually ran by C++.

The CLR has never been only about C#. While C# may be the most popular language to target the VM, it will run anything that has been compiled to valid MSIL (or even emitted at runtime).

Re:Writing a Managed JIT in C# with CoreCLR by kyberias on Thursday April 12, 2018 @01:05PM (#16822877)
No-one claimed it's only about C#.
Re:Writing a Managed JIT in C# with CoreCLR by GenericsMotors on Thursday April 12, 2018 @02:13PM (#16823460)
Correct, but the rest of the paragraph sort of gives that impression (at least to me) by mentioning how language compilers are usually written in a more primitive language, like the Go compiler being written in C then later rewritten in Go.

IMHO that sort of blurred the line between the platform and language in the article...rewriting the Go compiler in Go sort of makes sense, but I don't see why this was a good comparison to the .NET ecosystem. Rewriting the CLR JIT in C# isn't making it "self-hosting" as its not language specific.

Does that make sense?

Re:Writing a Managed JIT in C# with CoreCLR by xoofx on Friday April 13, 2018 @09:05AM (#16829576)
That's true that I put an explicit emphasis on C#

But let's face it, the whole CoreFX library is in C#, Roslyn Compiler is in C#... the line is already blurred

So while the CLR is not language specific (like the JVM is not Java specific), rewriting the runtime with the most prominent language used for the underlying platform sounds an acceptable implicit emphasis ;)

Re:Writing a Managed JIT in C# with CoreCLR by GenericsMotors on Friday April 13, 2018 @08:02PM (#16834965)
Fair enough :)
Re:Writing a Managed JIT in C# with CoreCLR by Scarbutt on Thursday April 12, 2018 @01:24PM (#16823040)
I hear is pretty bad performance wise compared to the JVM for dynamic languages.
Re:Writing a Managed JIT in C# with CoreCLR by pjmlp on Thursday April 12, 2018 @02:07PM (#16823397)
Neither the JVM nor the CLR were originally designed with dynamic languages in mind.

Thanks to the efforts of IronPython's creator, which eventually joined Microsoft for a while, the Dynamic Language Runtime (DLR) was created.

Eventually the JVM followed suit by investing into the infrastructure that eventually became known as invokedynamic.

Where most JVMs JIT compilers still beat .NET JIT compilers is that they explore more re-optimizations, while .NET JITs tend to only optimize once, but there are plans to at least improve this on RyuJIT.

Re:Writing a Managed JIT in C# with CoreCLR by pavelbr on Thursday April 12, 2018 @01:55PM (#16823276)
What dynamic languages run on the jvm? To my knowledge it doesn't support dynamic types at all.
Re:Writing a Managed JIT in C# with CoreCLR by mythz on Thursday April 12, 2018 @02:04PM (#16823376)
Clojure, Groovy, JRuby, Jython are popular dynamic languages on the JVM, there are others:

https://en.wikipedia.org/wiki/List_of_JVM_languages

> To my knowledge it doesn't support dynamic types at all.

Not sure where you've got that from or what that's supposed to mean.

Re:Writing a Managed JIT in C# with CoreCLR by pjmlp on Thursday April 12, 2018 @02:08PM (#16823414)
You missed the most relevant one that even comes bundled with the JDK, JavaScript.
Re:Writing a Managed JIT in C# with CoreCLR by vorg on Thursday April 12, 2018 @04:02PM (#16824423)
> Clojure, Groovy, JRuby, Jython are popular dynamic languages on the JVM, there are others

Perhaps he meant no dynamic languages have become popular enough on the JVM that it becomes common knowledge that the JVM can support popular types. None of those 4 languages you mentioned (Clojure, Apache Groovy, JRuby, Jython) are popular, whereas alternative JVM languages built from the ground up as static languages (i.e. Kotlin and Scala) are the ones people are adopting.

Re:Writing a Managed JIT in C# with CoreCLR by omaranto on Thursday April 12, 2018 @05:46PM (#16825192)
My impression was that Clojure's popularity was comparable to Kotlin and Scala's. Is that not the case?
Re:Writing a Managed JIT in C# with CoreCLR by vorg on Thursday April 12, 2018 @05:59PM (#16825273)
I like programming in Clojure -- it's the language that introduced me to lisp syntax and immutable values. But Scala has been adopted and Kotlin is being adopted to a far greater degree than Clojure seems to have been.
Re:Writing a Managed JIT in C# with CoreCLR by PeCaN on Thursday April 12, 2018 @02:33PM (#16823639)
Rhino (JavaScript on the JVM, originally written by Mozilla) dates back to 1997 and JRuby to 2001. Suffice it to say, dynamic languages have ran on the JVM for 20 years.

Reflection used to be used to implement dynamic types, but since Java 7 (2011) there's been a JVM instruction, invokedynamic, to explicit support dynamic types.