ReactOS built in C# (crazy idea)

If it doesn't fit anywhere else, drop it in here. (not to be used as a chat/nonsense section)

Moderator: Moderator Team

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: ReactOS built in C# (crazy idea)

Post 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.

User avatar
Pesho
Posts: 209
Joined: Mon Dec 10, 2007 1:16 pm

Re: ReactOS built in C# (crazy idea)

Post by Pesho »

Yes, it is a crazy idea, this type of thread pops up every once in a while. Rewrites are not a joke! ;)

User avatar
EmuandCo
Developer
Posts: 4425
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: ReactOS built in C# (crazy idea)

Post 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...
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

Artlav
Posts: 32
Joined: Wed Dec 29, 2004 4:53 pm
Location: Moscow

Re: ReactOS built in C# (crazy idea)

Post 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.

rosfanatic
Posts: 38
Joined: Thu May 26, 2011 12:57 am
Contact:

Re: ReactOS built in C# (crazy idea)

Post 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.
.NET MVC web project- subdomain custom mapping, ie: bank of america and chase bank locations and now an ASP.Net Core based pokemon app at pokefind

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: ReactOS built in C# (crazy idea)

Post by Z98 »

I suggest you reread what I said about high level abstractions being absent at the OS level.

Trivalik
Posts: 13
Joined: Tue Nov 21, 2006 9:53 am
Contact:

Re: ReactOS built in C# (crazy idea)

Post 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.

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: ReactOS built in C# (crazy idea)

Post 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.

Lone_Rifle
Test Team
Posts: 802
Joined: Thu Apr 03, 2008 2:17 pm
Contact:

Re: ReactOS built in C# (crazy idea)

Post 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.

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: ReactOS built in C# (crazy idea)

Post 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.

hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Post 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.

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: ReactOS built in C# (crazy idea)

Post by Z98 »

I'd like to see you execute a text file of assembly code.

Breinstorm
Posts: 1
Joined: Wed Sep 04, 2019 8:53 am

Re: ReactOS built in C# (crazy idea)

Post by Breinstorm »

Is the opinion changed allready?
Why not support c#.
There are more programmers who use that language.

User avatar
EmuandCo
Developer
Posts: 4425
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: ReactOS built in C# (crazy idea)

Post 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
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

ROCKNROLLKID
Posts: 307
Joined: Mon Oct 17, 2016 3:19 am
Contact:

Re: ReactOS built in C# (crazy idea)

Post 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.

Locked

Who is online

Users browsing this forum: No registered users and 2 guests