> In #401 @cnblogs-dudu referenced a post explaining that the GC was machine-generated from LISP. Since gc.cpp is not a real source code (just intermediate code), but the lisp code is, should it be more useful to publish the lisp source and the transpiler (Source-to-source compiler) for LISP -> CPP?
It's my understanding that the LISP -> CPP was only done in the beginning and is no longer carried out. I.e. all recent development is done directly in the .cpp source.
I thought I knew a thing or two about .NET, having used it since beta days, I had no idea LISP was used to bootstrap the original GC code. Fascinating stuff.
Regions aren't a .Net Framework feature, they're a language feature.
There's absolutely no reason they should be in C# and encourage bad coding practices (like overly long .cs files). Even if you need all your code in a single class, you can shard that class across several .cs files to make organisation and maintainability easier.
Regions are just a crutch people use to allow them to create 10K+ line .cs files that will eventually become a maintainability nightmare (as well as making merges/check-ins/finding things more annoying in general).
Only region I'll use is the built DEBUG one and I only use that to create:
Well, just because YOU cannot write good code with regions doesn't mean it's a bad feature. It's actually very very useful thing, but as with everything, you have to know when and how to use it.
I find these runtime VMs fascinating to ogle at after looking at how Erlang's GC worked. I think you have provided me reading material for this weekend.
The second biggest fear which made Sun sue Microsoft was that when MS licensed Java, their VM was faster than Sun's. Microsoft is (was?) the king of JIT. Technically biggest since if theirs was faster, they wouldn't have cared for Microsoft's anyway. Even now CLR is generally considered much faster than JRE.
I don't know how Chakra compares against v8 but then it also depends on what makes money for MS.
Hmmm really? I'm not sure I can think of many technological breakthroughs in the area of JITs that Microsoft have been responsible for? Google and Mozilla have made lots of advances, as have Sun and Oracle, and lots of academics like the PyPy people, HP with Dynamo.
What have Microsoft done in the area of JITs that so notable as to earn them the title 'king' of JITs? Can you say anything specific?
Mostly I never understood the point of JIT in the .net framework. You pay a price in term of startup time, but the reality is that you can only run .net on x86 and x64. So we might as well have saved the trouble. And the first time .net was given an opportunity to run on ARM (WinRT), they disallowed regular .net applications in order to introduce a toll through the windows store.
We would have been better off without JIT. Even now with ARM. You compile to 3 architectures,... so what?
> Even now CLR is generally considered much faster than JRE.
That’s... not really true. JRE’s HotSpot is much faster than CLR, even today.
I’d be interested to see benchmarks proving your argument, because basically every benchmark out there proves you wrong.
Sun’s HotSpot does recompilation and profiling, to reoptimize depending on use case, while CLR only JIT’s once, so the base performance is very low. This is also why HotSpot can reach better-than-C performance in some cases (because it can optimize at runtime for actually taken code paths, and jump to interpreted code for rarely taken paths), while .NET (and native code) can not. (This is what gives HotSpot the name – it recognizes hot spots, and swaps them out for more and more optimized versions at runtime)
I tried to find any studies because the claim surprised me, but I didn't find any, so I wasn't going to try to refute that without any data.
But I can say that the number of research papers around the JIT in the JVM is probably and order of magnitude more than around the CLR. Someone else linked to 'Research papers in the .NET source', and guess what? Several of them are really JVM papers, talking about how they've used the same technique.
Yes, that's an odd claim. You can construct a synthetic benchmark where C#'s support for value types lets .Net beat a pointer-chasing JVM, and I'm sure there are other corners where .Net wins; but that's not the general rule.
The only thing the CoreCLR might be quicker at is starting up, and maybe a little better memory usage though I don't have any numbers and this is just a feeling from using both. Anyone know for sure on this?
>> Just over 2 years ago Microsoft open-sourced the entire .NET framework,
Except they open-sourced a new .NET stack, not really the entire .NET Framework, .NET Core and .NET Framework are similar but not fully backwards compatible. I've been porting .NET Framework code to .NET Core and depending on how specialized your project is you may not always find the same libraries supporting your project. A project that perfectly compiles with .NET 2.0 will not just compile for .NET Core, at least not as easily as using a .NET Framework 2.0 project in .NET Framework 4.6. I love Microsoft and .NET but I think Core is executed poorly. You also have EntityFramework vs. EntityFramework Core which lacks features from EF which were deemed "unused" which bites some people in the face.
Well, it depends how you look at it, but you have a point.
I guess I could've written 'Microsoft open-sourced the entire .NET stack'. I wanted to make it clear that they open-sourced everything, i.e. runtime, JIT, GC, base-class libraries, etc
I understood what you meant, but I figure some might not understand what you meant, overall I appreciate the write up, I will take the time to read through it when I'm not working. It also inspired me to want to read through the source code behind .NET's CoreCLR.
being 100% backwards compatible may be nice, but it would also be severely restrictive. this is a good a moment as any to clean up (where possible) bad choices made in .net's younger days.
I feel like .NET Framework is going to be replaced by .NET Core eventually as its use rises more. I wish I didn't need to port to .NET Core, but I don't pay my own salary.
Only for things that are possible within .NET Core. Which currently seem to be web services and console applications. At the current point I doubt that .NET Core will get an official desktop UI framework for now, simply because of the problems of getting those cross-platform.
I can agree with that. Though I mean in the sense of cloud focused technology. Though if Java can do it, and Python can do it, it would not surprise me, I guess it's just a matter of when. Microsoft is more focused on providing tooling and services now than ever, I've said it a couple of times, their competitors are those who offer cloud hosting and services as well as JetBrains and similar companies who offer tooling.
.NET Standard/Core 2.0 will add back many APIs. It'll be the real release of the newer framework, similar to how the original .NET Framework took until v2 to get things into shape.
.NET Standard is all about compatibility - so you can use that to determine which framework you can/need to use. However .NET Core is a distinctly designed for cross-platform reach so it will be a break from .NET Framework in some ways - this is just a given, otherwise they would've just released another .NET Framework version instead of doing all this.
Yeah I know this, and hopefully they get it right, unfortunately I'm not there yet. To be fair .NET Core has been great otherwise, I have been able to develop from Ubuntu (used Sublime Text, which I didn't use the plugins since they seem abandoned or something) gave Rider a try but it was buggy at times. I wish Microsoft releases either a plugin for MonoDevelop, or "Visual Studio for Linux" at some point.
Have you tried VS Code yet? It's not a full "Visual Studio for Linux", but in terms of intellisense and debugging it has a lot more than you might expect.
About the same time the .NET Framework "Reference Source" for the old .NET Framework moved to a much more permissive open source license, but not open source/community-driven development (partly because development has been focused on .NET Core). It includes a lot more than people think it might (including most/all of SWF and WPF).
You still might quibble over "entire" .NET Framework, but a lot of the .NET Framework is open source in addition to .NET Core.
> You also have EntityFramework vs. EntityFramework Core which lacks features from EF which were deemed "unused" which bites some people in the face.
Where did you get this "unused" claim? I've been following EF Core and EF6 for quite a while and I've never heard them say this about most of the major features missing from EF Core.
EF Core is a complete re-write from the ground up of Entity Framework. They're attempting to fix some design issues that cropped up in the original Entity Framework, improve performance, and improve the underlying architecture (the APIs are similar, but the "under the hood" layout/design has shifted).
They've been extremely clear that the current release isn't on feature parity to Entity Framework 6, and they've told people to avoid it until it is. If you look at their EF Core TODO list it will come back into EF 6 feature parity eventually and with some new functionality provided by the underlying changes they're making in EF Core.
Honestly your whole post is full is misleading claims, this is just one example. You've started using brand new technology (which is a rewrite) and are complaining because you ignored their very specific warnings about the state of it. Then you justify your own lack of research by making wild outlandish claims about how it is everyone else's fault.
To quote EF Core Team's Roadmap[0]:
> Because EF Core is a new code base, the presence of a feature in Entity Framework 6.x does not mean that the feature is implemented in EF Core.
> We have provided a list of features that we think are important but are not yet implemented. This is by no means an exhaustive list, but calls out some of the important features that are not yet implemented in EF Core.
> The things we think we need before we say EF Core is the recommended version of EF. Until we implement these features EF Core will be a valid option for many applications, especially on platforms such as UWP and .NET Core where EF6.x does not work, but for many applications the lack of these features will make EF6.x a better option. [Big List of missing features]
> There are many features on our backlog and this is by no means an exhaustive list. These features are high priority but we think EF Core would be a compelling release for the vast majority of applications without them [Big List of missing features]
> Our team is currently working on the EF Core 2.0 release. It's early days, so our plans will likely change as the release progresses, but here are the major features we are planning to address in this release. [Big List of missing features]
The truth is that YOU started using a piece of technology they expressly told you not to use and told you why you shouldn't. Then created fictional justifications for why it is their fault you screwed up.
But I welcome you to cite your "[won't implement features] which were deemed 'unused'" claim. Somehow I don't think you will...
1) I didn't pick .NET Core because I'm not in a leadership position, I'm probably the developer in my job who gets paid the least, and has the lowest of job titles, unless we at some point have an intern.
2) My Team Lead picked .NET Core, we are porting from Silverlight, not from ASP .NET which I have a feeling eventually will stop being included as a project template for Visual Studio as more people swap to ASP .NET Core so if that becomes the case I could see why I wouldn't be asked to develop a project in ASP .NET just to recode it later on down the road.
3) I might of mistaken EF Core not implementing features with ASP .NET Core, they seem to be shifting a lot of things for ASP .NET Core, especially with Identity being a new way of doing things. ASP .NET has always "lost" features along the way, need we remember when it was not even called .NET and was just "ASP"? Not sure why I need citations for that, you could form your own conclusions. I'm just a "Junior" anyway what do I know?
I didn't notice that before, I wonder what file extension it's incorrectly assuming are smalltalk? There is a whole lot of '.S' files in there, I wonder if it's those?
I was always having these gut feelings about my partner cheating on me with her boss at work but i couldn't confront her about it because i didn't want to cause any problems where there's none. Then Contact World Best Hackers: They are Set of professionals that provide Quality Hacking Services. They have series of testimonies from Their clients Worldwide,they are Proficient in Hacking every areas of ICT which include:
* Hack and access DATA FROM ANY COMPANY Web Sites, he hack hack into a company email account call log,Hack Visichat Room ? Hack Flash Chat Room ? Hack Ftp User & Pass ? Hack Database ? Hack Yahoo Mail ? Hack Gmail Id ? Hack Websites ? Hack FaceBook Account ? hack Vb Forum ? Hack WordPress Blog ? hack C C any country ? hack moneybroker ACCOUNT ? hack liberty Reverse Account ? hack paypal Account ? increase your credit score today? bypass Google phone verification, ? Hash Crack ? Hack Bank Account ? increase your credit score today,online game access?hack twitter?and listened to all his calls and upgrading result making changes in database,such as your college/university grades,Retrival of lost files,preventing you from been hacked or tracked,You can reach out to him for any hack related exploit {{alandavid76@tutanota dot com} for an effective service and consider your big problems solved..
51 comments
[ 2.6 ms ] story [ 128 ms ] threadI think the reason for it being soo large is that the GC is shared across all the .NET versions, so having it in one file has some advantages.
See https://github.com/dotnet/coreclr/issues/408 for a discussion on reorganizing it.
> In #401 @cnblogs-dudu referenced a post explaining that the GC was machine-generated from LISP. Since gc.cpp is not a real source code (just intermediate code), but the lisp code is, should it be more useful to publish the lisp source and the transpiler (Source-to-source compiler) for LISP -> CPP?
There's a reply from a Microsoft employee that seems to confirm this, see https://github.com/dotnet/coreclr/issues/408#issuecomment-78...
https://blogs.msdn.microsoft.com/patrick_dussud/2006/11/21/h...
I thought I knew a thing or two about .NET, having used it since beta days, I had no idea LISP was used to bootstrap the original GC code. Fascinating stuff.
I've archived it here just in case:
http://archive.is/1qk25
Patrick is also interviewed on Channel9 and he talks about the GC. Not watched it yet:
https://channel9.msdn.com/Shows/Going+Deep/Patrick-Dussud-Ga...
There's absolutely no reason they should be in C# and encourage bad coding practices (like overly long .cs files). Even if you need all your code in a single class, you can shard that class across several .cs files to make organisation and maintainability easier.
Regions are just a crutch people use to allow them to create 10K+ line .cs files that will eventually become a maintainability nightmare (as well as making merges/check-ins/finding things more annoying in general).
Only region I'll use is the built DEBUG one and I only use that to create:
Stackoverflow answer for why regions are bad: http://softwareengineering.stackexchange.com/questions/53086...BTW if it's reading material you want, you should also check out me other post 'Research papers in the .NET source' http://mattwarren.org/2016/12/12/Research-papers-in-the-.NET...
The second biggest fear which made Sun sue Microsoft was that when MS licensed Java, their VM was faster than Sun's. Microsoft is (was?) the king of JIT. Technically biggest since if theirs was faster, they wouldn't have cared for Microsoft's anyway. Even now CLR is generally considered much faster than JRE.
I don't know how Chakra compares against v8 but then it also depends on what makes money for MS.
Hmmm really? I'm not sure I can think of many technological breakthroughs in the area of JITs that Microsoft have been responsible for? Google and Mozilla have made lots of advances, as have Sun and Oracle, and lots of academics like the PyPy people, HP with Dynamo.
What have Microsoft done in the area of JITs that so notable as to earn them the title 'king' of JITs? Can you say anything specific?
We would have been better off without JIT. Even now with ARM. You compile to 3 architectures,... so what?
That’s... not really true. JRE’s HotSpot is much faster than CLR, even today.
I’d be interested to see benchmarks proving your argument, because basically every benchmark out there proves you wrong.
Sun’s HotSpot does recompilation and profiling, to reoptimize depending on use case, while CLR only JIT’s once, so the base performance is very low. This is also why HotSpot can reach better-than-C performance in some cases (because it can optimize at runtime for actually taken code paths, and jump to interpreted code for rarely taken paths), while .NET (and native code) can not. (This is what gives HotSpot the name – it recognizes hot spots, and swaps them out for more and more optimized versions at runtime)
But I can say that the number of research papers around the JIT in the JVM is probably and order of magnitude more than around the CLR. Someone else linked to 'Research papers in the .NET source', and guess what? Several of them are really JVM papers, talking about how they've used the same technique.
Additionally there is PGO support between runs and explicit SIMD support.
IBM J9 also does support caching JIT code thought.
really? since when? can't say i've ever heard this claim before.
The only thing the CoreCLR might be quicker at is starting up, and maybe a little better memory usage though I don't have any numbers and this is just a feeling from using both. Anyone know for sure on this?
Except they open-sourced a new .NET stack, not really the entire .NET Framework, .NET Core and .NET Framework are similar but not fully backwards compatible. I've been porting .NET Framework code to .NET Core and depending on how specialized your project is you may not always find the same libraries supporting your project. A project that perfectly compiles with .NET 2.0 will not just compile for .NET Core, at least not as easily as using a .NET Framework 2.0 project in .NET Framework 4.6. I love Microsoft and .NET but I think Core is executed poorly. You also have EntityFramework vs. EntityFramework Core which lacks features from EF which were deemed "unused" which bites some people in the face.
I guess I could've written 'Microsoft open-sourced the entire .NET stack'. I wanted to make it clear that they open-sourced everything, i.e. runtime, JIT, GC, base-class libraries, etc
Excellent, that's the effect I hope my posts have!
It'd be a shame if the progress they are making were stymied in order to be compatible with the .Net of a decade ago.
> I've been porting .NET Framework code to .NET Core
Yeah, but you probably don't need to do that. .Net Framework is still supported, and will be for a long time.
.NET Standard is all about compatibility - so you can use that to determine which framework you can/need to use. However .NET Core is a distinctly designed for cross-platform reach so it will be a break from .NET Framework in some ways - this is just a given, otherwise they would've just released another .NET Framework version instead of doing all this.
You still might quibble over "entire" .NET Framework, but a lot of the .NET Framework is open source in addition to .NET Core.
Where did you get this "unused" claim? I've been following EF Core and EF6 for quite a while and I've never heard them say this about most of the major features missing from EF Core.
EF Core is a complete re-write from the ground up of Entity Framework. They're attempting to fix some design issues that cropped up in the original Entity Framework, improve performance, and improve the underlying architecture (the APIs are similar, but the "under the hood" layout/design has shifted).
They've been extremely clear that the current release isn't on feature parity to Entity Framework 6, and they've told people to avoid it until it is. If you look at their EF Core TODO list it will come back into EF 6 feature parity eventually and with some new functionality provided by the underlying changes they're making in EF Core.
Honestly your whole post is full is misleading claims, this is just one example. You've started using brand new technology (which is a rewrite) and are complaining because you ignored their very specific warnings about the state of it. Then you justify your own lack of research by making wild outlandish claims about how it is everyone else's fault.
To quote EF Core Team's Roadmap[0]:
> Because EF Core is a new code base, the presence of a feature in Entity Framework 6.x does not mean that the feature is implemented in EF Core.
> We have provided a list of features that we think are important but are not yet implemented. This is by no means an exhaustive list, but calls out some of the important features that are not yet implemented in EF Core.
> The things we think we need before we say EF Core is the recommended version of EF. Until we implement these features EF Core will be a valid option for many applications, especially on platforms such as UWP and .NET Core where EF6.x does not work, but for many applications the lack of these features will make EF6.x a better option. [Big List of missing features]
> There are many features on our backlog and this is by no means an exhaustive list. These features are high priority but we think EF Core would be a compelling release for the vast majority of applications without them [Big List of missing features]
> Our team is currently working on the EF Core 2.0 release. It's early days, so our plans will likely change as the release progresses, but here are the major features we are planning to address in this release. [Big List of missing features]
The truth is that YOU started using a piece of technology they expressly told you not to use and told you why you shouldn't. Then created fictional justifications for why it is their fault you screwed up.
But I welcome you to cite your "[won't implement features] which were deemed 'unused'" claim. Somehow I don't think you will...
[0] https://github.com/aspnet/EntityFramework/wiki/Roadmap
2) My Team Lead picked .NET Core, we are porting from Silverlight, not from ASP .NET which I have a feeling eventually will stop being included as a project template for Visual Studio as more people swap to ASP .NET Core so if that becomes the case I could see why I wouldn't be asked to develop a project in ASP .NET just to recode it later on down the road.
3) I might of mistaken EF Core not implementing features with ASP .NET Core, they seem to be shifting a lot of things for ASP .NET Core, especially with Identity being a new way of doing things. ASP .NET has always "lost" features along the way, need we remember when it was not even called .NET and was just "ASP"? Not sure why I need citations for that, you could form your own conclusions. I'm just a "Junior" anyway what do I know?
BTW if you want a bit more info on it, I wrote a whole blog post, see http://mattwarren.org/2016/02/04/learning-how-garbage-collec...
https://github.com/dotnet/coreclr/search?l=smalltalk