Page 2 of 3

Re: ReactOS built in C# (crazy idea)

Posted: Sun Jun 05, 2011 2:54 am
by Z98
You know Aeneas, your attempt at an analogy here hurts your argument more than it helps. Were I a construction engineer or architect, my first reaction to this bubblegum nonsense would be to ask if you are actually interested in a working end product or not. We have a goal we are trying to achieve. When there is a goal and there is a plan, changes to a plan must be justified with "why make the change," not "why not." You ask "why not" if you are more interested in playing around with the project and completion of the goal is a secondary or even tertiary consideration. If completion of the goal is the primary consideration, any proposed change has to be judged by its merits and whether it can help advance completion of the goal. If you cannot come up with benefits that do not outweight the costs of the change, or if your only response is "why not," then you seem to either not understand the priorities of this project or are ignoring them.

Re: ReactOS built in C# (crazy idea)

Posted: Sun Jun 05, 2011 10:43 am
by Pesho
Yes, it is a crazy idea, this type of thread pops up every once in a while. Rewrites are not a joke! ;)

Re: ReactOS built in C# (crazy idea)

Posted: Sun Jun 05, 2011 12:20 pm
by EmuandCo
Everyone, fell free to fork ros and try it out, bets are open how long it will take till this fork is dead...

Re: ReactOS built in C# (crazy idea)

Posted: Sun Jun 05, 2011 8:00 pm
by Artlav
Reminds me of SharpOS.
That was an opinion-shattering little bastard.

But for ReactOS that does not feel like anything remotely beneficial in any way - slowdown, incompatibility, toolset chaos, etc.

Re: ReactOS built in C# (crazy idea)

Posted: Sun Jun 05, 2011 9:02 pm
by rosfanatic
wow didn't check back for a couple days and looks like I missed out on some convo.

Yes, just a crazy idea tossed out there for conversation purposes, I'm sure it's fully impossible. Just an interesting thought that, if it could be figured out, using the benefits of a higher level language (memory management, type safety, testability etc) to define large portions of an operating system, but still maintain the performance of the lower level ones (by converting into assembly, ie compiling without the JIT/language runtime etc), is at least an interesting concept.

Re: ReactOS built in C# (crazy idea)

Posted: Sun Jun 05, 2011 9:10 pm
by Z98
I suggest you reread what I said about high level abstractions being absent at the OS level.

Re: ReactOS built in C# (crazy idea)

Posted: Tue Jun 07, 2011 11:33 pm
by Trivalik
Z98 wrote: 1) Cosmos is cheating. Last I heard, they were converting their C# code into C which then gets compiled into machine code. They weren't using a genuine AOT compiler for C#, and the only open source one I'm aware of is being worked on by the MOSA project, which is not completed.

2) One of C#'s key advantages is it's basically a gateway to access the .NET framework. When writing an OS, you can't use those features since they don't exist at such a low level. And much of C#'s syntax that helps with eliminating boilerplate code also depend on existing high level abstractions already being implemented. Again, those don't exist at the OS level.
Correct some facts:

1.) No, the project does currently map CIL to x86 Assembler, with dynamic parts. For your information that ever used a C compilier is totally wrong.

2.) Currently, only such parts are in the image involved that are really used. So is it possible to use existing .NET Functions with pure CIL in it. If there are a native one, this could be plugged (use an other function than orignal).

For those that are interrest to test we have also an Debugger for Visual Studio 2010 that could debug the running COSMOS in Vmware Workstations.

Re: ReactOS built in C# (crazy idea)

Posted: Wed Jun 08, 2011 4:45 am
by Z98
1) Okay, so this statement is changed to, Cosmos is cheating as they are bootstrapping by converting from msil to assembly. I stand by the rest of my statement as a matter of opinion, which people are free to disagree with.

2) Not sure what your statement corrects, as things like templates and other more complex data structures are still not suited to low level systems programming.

Re: ReactOS built in C# (crazy idea)

Posted: Wed Jun 08, 2011 9:26 am
by Lone_Rifle
Z98, to your first point, don't most other JIT compilers do that? Could you clarify your statement? Not disagreeing here, just trying to assess the significance of your opinion.

Trivalik, if you're the Trivalik from the Cosmos project, welcome to the ReactOS forums.

Re: ReactOS built in C# (crazy idea)

Posted: Wed Jun 08, 2011 9:07 pm
by Z98
There's a distinction between x86 assembly and x86 machine code. It's one that often gets muddled because people mistakenly use the terms interchangeably. What Cosmos did when I first heard of it, was they converted MSIL instructions to x86 assembly, which was then run through an assembler to generate the actual executable binary. This is akin to the original C compiler converting C into assembly and then having an assembler generate the binary. It is however different from what an AOT compiler for MSIL like what MS has would actually do. If they had actually completed an AOT compiler, I would be very surprised at not having heard about it.

Note that my opinion is based on my personal preferences with respect to architecture. Cosmos chose one way to do it, SharpOS/MOSA chose another. I happen to prefer MOSA's approach to creating a MSIL to machine code compiler. I only brought up the point because Cosmos was presented in the opening post. It has a considerably different objective that makes it inappropriate for what the opening posts proposes anyway.

Posted: Wed Jun 08, 2011 11:14 pm
by hto
There's a distinction between x86 assembly and x86 machine code. It's one that often gets muddled because people mistakenly use the terms interchangeably.
The distinction is largely artifical, as one can convert them back and forth with minimal effort.

Re: ReactOS built in C# (crazy idea)

Posted: Wed Jun 08, 2011 11:16 pm
by Z98
I'd like to see you execute a text file of assembly code.

Re: ReactOS built in C# (crazy idea)

Posted: Wed Sep 04, 2019 8:55 am
by Breinstorm
Is the opinion changed allready?
Why not support c#.
There are more programmers who use that language.

Re: ReactOS built in C# (crazy idea)

Posted: Wed Sep 04, 2019 2:33 pm
by EmuandCo
The opinion mentioned above is still valid and will not change C# is a toy for user mode and not for a OS kernel/core

Re: ReactOS built in C# (crazy idea)

Posted: Thu Sep 05, 2019 7:52 am
by ROCKNROLLKID
EmuandCo wrote:
Wed Sep 04, 2019 2:33 pm
The opinion mentioned above is still valid and will not change C# is a toy for user mode and not for a OS kernel/core
SharpOS and Cosmos would disagree with that.

However, I agree ReactOS should stay with C/Assembly. If anything, I would rather see it rewritten in Rust or Go. C/C++ is the most popular as it is usually the first recommended to anyone wanting to start programming in colleges/universities.