Announcement

Collapse
No announcement yet.

Why Mono Is Desirable For Linux

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by hoohoo View Post
    What language was the .NET runtime, and the C-octothorpe compiler written in? I'll bet a beer the language is C++ or C. When they are written in C-octothorpe or Visual Basic then you could make such a claim without being laughed at.
    https://github.com/mono/mono/tree/master/mcs/mcs

    https://github.com/mono/mono-basic/t...nc/vbnc/source

    C# compiler written in C#, VB.NET compiler written in VB.NET

    Mono's C# compiler being written in C# (as opposed to Microsoft's being in C) is one reason why it's capable of much more, e.g. use in a REPL

    Comment


    • Originally posted by directhex View Post
      https://github.com/mono/mono/tree/master/mcs/mcs

      https://github.com/mono/mono-basic/t...nc/vbnc/source

      C# compiler written in C#, VB.NET compiler written in VB.NET

      Mono's C# compiler being written in C# (as opposed to Microsoft's being in C) is one reason why it's capable of much more, e.g. use in a REPL
      You've made it abundantly clear that you don't know what you're talking about, that post should be the final nail in the coffin of your alleged expertise.

      1. Compilers: They parse code into binaries containing CPU instructions and data. I could write a compiler for any language in C, then re-write it in C#, and then re-write it again in Python, and it wouldn't have anything to do with the capabilities of the compiler. The only thing that would be affected by the choice of language is ease of writing the compiler, and execution speed when compiling.

      2. C# is intended to coax better code out of unskilled developers(aka: code for dummies), but C# is not capable of anything that C and C++ can do. You could program literally anything in C, there is no C# program in existence that couldn't have also been done in C. C#, however, is more limited than C because some of the low-level access to the CPU and memory is abstracted away. It is, beyond the shadow of a doubt, possible to create types and functions in C that can do literally anything that C# and the Mono library functions can do.

      Comment


      • Originally posted by directhex View Post
        https://github.com/mono/mono/tree/master/mcs/mcs

        https://github.com/mono/mono-basic/t...nc/vbnc/source

        C# compiler written in C#, VB.NET compiler written in VB.NET

        Mono's C# compiler being written in C# (as opposed to Microsoft's being in C) is one reason why it's capable of much more, e.g. use in a REPL
        OK. How about the runtime?

        Comment


        • Originally posted by hoohoo View Post
          OK. How about the runtime?
          The main CLR is C. The VB.NET specific additions are VB.NET. The Dynamic Language Runtime is C#. The class library is C#

          Comment


          • I think it is the best for games. Just look at games like World of Goo

            Comment


            • I agree, but disagree about .net being for amature coders.

              Originally posted by o247492 View Post
              You've made it abundantly clear that you don't know what you're talking about, that post should be the final nail in the coffin of your alleged expertise.

              1. Compilers: They parse code into binaries containing CPU instructions and data. I could write a compiler for any language in C, then re-write it in C#, and then re-write it again in Python, and it wouldn't have anything to do with the capabilities of the compiler. The only thing that would be affected by the choice of language is ease of writing the compiler, and execution speed when compiling.

              2. C# is intended to coax better code out of unskilled developers(aka: code for dummies), but C# is not capable of anything that C and C++ can do. You could program literally anything in C, there is no C# program in existence that couldn't have also been done in C. C#, however, is more limited than C because some of the low-level access to the CPU and memory is abstracted away. It is, beyond the shadow of a doubt, possible to create types and functions in C that can do literally anything that C# and the Mono library functions can do.
              First off about me: I started off as a C then C++ coder I've got a three year diploma in C++/MFC I know Assembler and was a Linux sysadmin for an ISP for years. It's not about what you can or cannot do. Years ago when Java started out, there was a dream, a write once execute anywhere dream that we hoped Java would fulfill. Then it turned out that java, because of it's insistence to build EVERYTHING from the ground up and not using the native windowing systems etc was just too slow. C# is that language. It's fast, and epitomizes one thing INTELLIGENT DESIGN, to say it's a language for unskilled developers is ridiculous, C is a low level language, C# enables easy use of design patterns and other computer science concepts, We're moving towards things like WCF (windows communication foundation) that replaces COM, Web Services and a host of other clunky intermediate technology. A universal Data Abstraction Layer for all data sources (LinQ) and Generics (so much more than C++ Templates) SOAP and XML are the basis for WCF and the design patterns to learn to create endpoints and service contracts, abstract classes and interfaces to implement SOA architecture are built into C#. C++ has it's place, and that is the same place it's been in since 1985. Creating low level time critical apps where performance out-ways RAD development needs. Thats why C++ is still included in Visual Studio and regular updates are made to the MFC. We need it. But I could argue(and will argue) that doing pointer arithmetic, and dynamic memory management is chips compared to learning a new way of doing things like C#. Watch a video on LinQ, search for "Microsoft LinQ to Sql tutorial" do the same for WCF or Reflection (finding out type information at run time, or creating new Types at run time) It's about working smarter not harder, but it's not easy, I'll wager that learning the new paradigm will be the hardest thing you ever learned. yes it makes it easy for stupid people to get simple things done without having to much starting off, but the more you learn the more you find there is to know. As far as C having all these features that C# does not, please, enlighten me, then I'll give you a few pages of stuff C# can do that C cannot do natively, without building class libraries that would take years. As I said if you want to go Low level with C# you can pointers, direct calls to win32 functions, low level DirectX/GDI+ access, you name it. Access native dll's no problem, access reverse stack parameters from other languages in DLL's no problem. All I'm saying is that you might find that the DESIGN learning curve and usefulness of C# and .net out ways the "Complexity" of c/c++ who anybody who understands win32 and *x6 instruction set can pick up quite easily. C/C++ coders always have such big egos, this is not Visual Basic Boys, Implement a real life factory design pattern using a LinQ data source (dbml) and service objects through a WCF service contract with multiple endpoints and implemented in SOAP and XML. Don't use wizards, do it by hand, then I'll come and do some pointer arithmetic and assembler access to create a small device driver, lets see which is REALLY more complex to learn. As I said this is not Visual Basic. It's an extremely powerful and versatile framework that people in the know use every day and thank god for it's sheer genius. Yes you could "do it in C", you know how many times I hear that? But it would not be as 1) concise 2) secure 3) readable 4) scalable I'll leave you with this, a recursive directory search the C# way and the c way. First the c way:

              Code:
              bool find_file( const path & dir_path,         // in this directory,
                              const std::string & file_name, // search for this name,
                              path & path_found )            // placing path here if found
              {
                if ( !exists( dir_path ) ) return false;
                directory_iterator end_itr; // default construction yields past-the-end
                for ( directory_iterator itr( dir_path );
                      itr != end_itr;
                      ++itr )
                {
                  if ( is_directory(itr->status()) )
                  {
                    if ( find_file( itr->path(), file_name, path_found ) ) return true;
                  }
                  else if ( itr->leaf() == file_name ) // see below
                  {
                    path_found = itr->path();
                    return true;
                  }
                }
                return false;
              }
              Now the C# way:

              Code:
              void findFile(string filename, string directory)
              {
              	// Get list of files in the specific directory.
              	string[] files = Directory.GetFiles(directory,"*.*",SearchOption.AllDirectories);
              	If(files.Contains(filename))
              	{
              	    Console.WriteLine(files[files.Indexof(filename]);
              	}
              }
              And my mine prints is as well, if I just wanted to know if it was there it would have been a one liner.
              Last edited by maxpfc; 09-22-2012, 01:10 PM.

              Comment


              • Originally posted by maxpfc View Post
                Yes you could "do it in C", you know how many times I hear that? But it would not be as 1) concise 2) secure 3) readable 4) scalable I'll leave you with this, a recursive directory search the C# way and the c way.
                I think you're wasting your time. You cannot convince someone to use C# with .Net with words, especially not if they don't want to hear arguments. Someone has to _really_ use it to fall in love with it. Everyone I know that used it loved it. It really makes you able to solve the problems on a higher level and makes the code much more readable.

                I don't like Microsoft and can't stand most of the things they do. But .Net is awesome (note: I don't talk about Mono, because I never used it and can't say if it's as good as .Net).

                Comment


                • Originally posted by Dami55an View Post
                  I think it is the best for games. Just look at games like World of Goo
                  World of Goo Linux doesn't need mono to run.

                  Comment


                  • Originally posted by droste View Post
                    I think you're wasting your time. You cannot convince someone to use C# with .Net with words, especially not if they don't want to hear arguments. Someone has to _really_ use it to fall in love with it. Everyone I know that used it loved it. It really makes you able to solve the problems on a higher level and makes the code much more readable.

                    I don't like Microsoft and can't stand most of the things they do. But .Net is awesome (note: I don't talk about Mono, because I never used it and can't say if it's as good as .Net).
                    I agree totally, you have to use it to fall in love with it. I also love C++, but for different reasons. I also don't particularly like Microsoft's licensing strategies or their closed way of doing things, but things are changing. Take their DocX format for word documents, now OO.org can make XML markup word documents when before it was a propriety binary format that had to be reverse engineered. The fact is Mono is just not there yet, the classes might be there being worked on but the drag and drop toolbox leaves something to be desired. People in the Linux community are only going to become excited about .net after seeing what it can do on MS Windows, then bringing Mono up to the same standard. (Drag and drop Membership API, Reporting etc etc) Can't they see that the one thing that could make Linux great is standardization of installation and usage with something like Mono/.net. We thought we had it with Java, but nothing java made is fast enough. It just does not work. .Net is fast, interacts with the native OS unlike Java and to my mind is the solution. That excites me. So lets not bash .net. See it's possibilities, coding used to be about going to new frontiers, I challenge you check out .net (LinQ, Generics, Delegates, assemblies, Asp.net) and explore, then once you have it down pat and love it, I guarantee you will, bring that to the Linux world. You're the guy's used to using device contexts and HWND classes, you can see what a jump this is best. Like the good man above said I cannot convince you, check it out yourself, it's the next big thing whether you like it or not. .net in the form of Mono is soon gonna be the official language of Android and IPhone. It's the way things are going give it a try, and for gods sake if you like it, help get it onto a stable Mono version that is equivalent with .net. peace, never be stuck in a rut explore.....

                    Comment


                    • Originally posted by narciso View Post
                      World of Goo Linux doesn't need mono to run.
                      Not a real human. The images in their post are supposed to infect Windows PCs with a virus.

                      Comment

                      Working...
                      X