Announcement

Collapse
No announcement yet.

Ubuntu Developers Discuss Using Mono AOT

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

  • #11
    yes about dalvik. remember that google developed dalvik to address the specific need they had. openjdk(sun's opensource release of their java ecosystem, you must remember there are different javas out there just like mono is a type of .net) is developed with the understanding that its probobly gunna be run on a desktop or a laptop or a blue ray player or soemthing that will have 128 meg or ram or more and a floting point proccessing unit. the company google bout that was making android started back in somehting like 2003 and started to have soemthing to show in around 2005-2006. think about what a phone had at that time. you had less than 128 meg of ram. an arm5 or less proccessor that had no bells and wistles to make floating point or anyhting like that easier, and you had like 128 meg of storage at best. that is the envronment that dalvik was designed to support. it wasnt designed to be fast but to be really efficient. java EM (sun had a special, much more proprietary ecosystem of java for the embedded phone market, an this is the basis of much of oracles case against google) was what dalvik was ment to compeate with. so compairing mono, a fully fleged speed optimized platform to the dalvik interpreter isn't a fair comparison. mono wont run on the things dalvik will.

    one could argue that with the new cortex based asic's with floating point proccessors and 512-1 gig memory and 4-8 gigs of storage, we are geting into the realm of full fleged run time environments where openjdk's hotspot intermriter would thrive. however, oracle is really trowing a stick in that wheel. actualy there was a bit of news (more like non news if you really think about it) that came out just a couple days ago. kinda suprised micheal hasnt mentioned anything about that. whatever though, there wasnt any crappy beer involved so i guess it didnt catch his attention.

    Comment


    • #12
      Originally posted by 89c51 View Post
      obligatory because there are certain words that create a mess everytime someone mentions them. some are Mono, Pulseaudio, Systemd, Lennart Poettering, Microsoft, network transparency etc

      Mono <--- legal shit storm just waiting to happen. Play with MS and you're sure to get burned.

      DO NOT MESS with my network transparency! 98% of my work is done over the network.

      Comment


      • #13
        Originally posted by curaga View Post
        horrible, verbose syntax
        Sure, it can get verbose, but it's far better than java and I'd say about on par with C++.

        being a bytecode language without any of the benefits (no way to addess objects by their name, ie a string. No the reflection/introspection/etc extensions don't work for this.)
        Can you go into details of this? Why doesn't reflection work for you? You can certainly iterate through the properties of an object and return just those that are strings if you want. Or did you mean looking up a field by it's variable name? Of course you can do that - the API is pretty ugly, but it's obviously possible.

        slow startup (same as Java)
        That's the point of the AOT compiler, to get rid of the startup overhead.

        completely illogical parts like "using"
        I'm not sure why you find it illogical, but even if you do it's completely optional. "using" is just a syntax shortcut you can replace as follows:

        using (IDisposable d = new X()) {
        //statements with d in scope here
        }

        IDisposable d = new X();
        try {
        //statements with d in scope here
        }
        finally {
        d.Dispose();
        d = null;
        }

        no macro processor at all
        Why in the world would you want one? Getting rid of macros is a positive feature of the language, not a negative one.
        Last edited by smitty3268; 12 May 2012, 03:42 PM.

        Comment


        • #14
          Nice how you skipped the memory part No I don't want my app leaking a meg per second until the GC sees fit to come clean things with a gig or two spent. Causing a huge pause, of course.

          Originally posted by smitty3268 View Post
          Sure, it can get verbose, but it's far better than java and I'd say about on par with C++.
          Equally bad to Java and worse than C++, IMHO.

          Can you go into details of this? Why doesn't reflection work for you? You can certainly iterate through the properties of an object and return just those that are strings if you want. Or did you mean looking up a field by it's variable name? Of course you can do that - the API is pretty ugly, but it's obviously possible.
          I had this one case where I needed to dynamically handle some 500 checkboxes. So of course I wanted to address them by their name, dynamically generated string, at runtime, "checkbox001" and so on. Given that the language is not compiled to machine code, I expect it to take advantage of that and so support features like that, by default.

          In that case I couldn't find a way to make the reflection etc work well enough, and had to insert a huge kludge (Dictionary binding the strings to object names, IIRC).

          I'm not sure why you find it illogical, but even if you do it's completely optional. "using" is just a syntax shortcut you can replace as follows:

          using (IDisposable d = new X()) {
          //statements with d in scope here
          }

          IDisposable d = new X();
          try {
          //statements with d in scope here
          }
          finally {
          d.Dispose();
          d = null;
          }
          First of all, that's illogical by itself in a language that shouts loudly "no you don't need to mind memory with me". But what I meant more was the "include" replacement.

          I can type
          using System.blah;

          And then use those things by typing "System.blah.foo.bar.xyzz.something". Overly verbose.

          Now, why can't I type "using System.blah.foo.bar.xyzz;" and use the objects directly as "something"? Illogical. That works for some parts and not others.

          Why in the world would you want one? Getting rid of macros is a positive feature of the language, not a negative one.
          Because of the mentioned above over-verboseness and "using", among other ugly parts of the language.

          Comment


          • #15
            Originally posted by curaga View Post
            Nice how you skipped the memory part No I don't want my app leaking a meg per second until the GC sees fit to come clean things with a gig or two spent. Causing a huge pause, of course.
            Memory leaks are not untrackable, but they can get complicated and I think that is a legitimate complaint to have. C# should be able to make that simpler.

            Equally bad to Java and worse than C++, IMHO.
            Completely disagree. There's no comparison at all to Java, just look at event handling code as a prime example. C# brings in a lot of functional programming options as well, with the newer versions. Like an .OrderBy(x => x.Id) method you can use easily on any collection, etc.

            I had this one case where I needed to dynamically handle some 500 checkboxes. So of course I wanted to address them by their name, dynamically generated string, at runtime, "checkbox001" and so on. Given that the language is not compiled to machine code, I expect it to take advantage of that and so support features like that, by default.

            In that case I couldn't find a way to make the reflection etc work well enough, and had to insert a huge kludge (Dictionary binding the strings to object names, IIRC).
            I'm not sure why you had trouble with this.

            Controls.FindControls("name", true);

            That's with the MS APIs, maybe you were using GTK bindings or something?

            But what I meant more was the "include" replacement.

            I can type
            using System.blah;

            And then use those things by typing "System.blah.foo.bar.xyzz.something". Overly verbose.

            Now, why can't I type "using System.blah.foo.bar.xyzz;" and use the objects directly as "something"? Illogical. That works for some parts and not others.
            Umm, that's exactly what you do.

            using System.blah.foo.bar.xyzz;

            new something(); //where something is defined in namespace System.blah.foo.bar.xyzz

            is correct. If there is a conflict, such as 2 classes in different namespaces that have the same name, then you can even redefine one of them.

            using something2 = System.blah.foo.bar.xyzz.something;

            new something2();


            Because of the mentioned above over-verboseness and "using", among other ugly parts of the language.
            I'm starting to think you just don't know how to program in C#, and are assuming a lot of things to be true that aren't.

            Comment


            • #16
              Umm, that's exactly what you do.

              using System.blah.foo.bar.xyzz;

              new something(); //where something is defined in namespace System.blah.foo.bar.xyzz

              is correct. If there is a conflict, such as 2 classes in different namespaces that have the same name, then you can even redefine one of them.

              using something2 = System.blah.foo.bar.xyzz.something;

              new something2();
              No, that's where it doesn't compile, because "using System.blah.foo.bar.xyzz;" is somehow not valid even when having one or two levels less is. I don't mean classes, but static methods and the like; they can never be used just by their name, it's always at least one level of unnecessary fuzz.

              For example (may be wrong, just for illustration), Math.PI always has to be typed like that, you can't "using Math" and then type "PI".

              I'm starting to think you just don't know how to program in C#, and are assuming a lot of things to be true that aren't.
              Yes, I have significantly more experience in C and C++ than C#. Because of that I expect C# not to have some of the blunders it has, given they were better in languages invented decades earlier.

              Comment


              • #17
                BTW, Control.FindControl seems to be a web function, would it have worked in WPF?

                Searches the current naming container for the specified server control.

                Comment


                • #18
                  Originally posted by curaga View Post
                  No, that's where it doesn't compile, because "using System.blah.foo.bar.xyzz;" is somehow not valid even when having one or two levels less is. I don't mean classes, but static methods and the like; they can never be used just by their name, it's always at least one level of unnecessary fuzz.

                  For example (may be wrong, just for illustration), Math.PI always has to be typed like that, you can't "using Math" and then type "PI".
                  Oh, I see. Yes, the using statement only goes to the class level. If you want to access static or constant variable/functions inside a class, then you must preface it with the class name.

                  Still, that's only 1 level - i have a hard time seeing how Math.PI is that much worse than PI. You shouldn't ever need to do some entire System.blah.foo.bar.Math.PI.

                  Edit:
                  Oh, maybe you are talking about things like Application.Current.MainWindow.

                  That's simply chaining calls together.

                  Application app = Application.Current; //calls a static method in the Application class
                  app.MainWindow; //gets the object from the Application class

                  It's a pretty common convention in C# i suppose. But it really has nothing to do with the using statement.
                  Last edited by smitty3268; 12 May 2012, 05:19 PM.

                  Comment


                  • #19
                    Originally posted by curaga View Post
                    BTW, Control.FindControl seems to be a web function, would it have worked in WPF?

                    http://msdn.microsoft.com/en-us/library/486wc64h.aspx
                    Also in WinForms, but I confess to not being as familiar with WPF. It seems not - i did find this http://stackoverflow.com/questions/6...-find-controls which gives a little method to look controls up by their name.

                    To be honest, I'm not in love with the direction WPF went, that does seem overly complicated, even if it is possible.

                    Comment


                    • #20
                      Originally posted by smitty3268 View Post
                      Still, that's only 1 level - i have a hard time seeing how Math.PI is that much worse than PI. You shouldn't ever need to do some entire System.blah.foo.bar.Math.PI.
                      Instead of "Math", picture "OverlyLongClassNameJustBecauseWeLikeThem". You see why it's bad?

                      Comment

                      Working...
                      X