dcsimg
Results 1 to 27 of 27

Thread: Microsoft .NET Native

  1. #1

    Thread Starter
    Fanatic Member esposito's Avatar
    Join Date
    Sep 2003
    Location
    Perugia, Italy
    Posts
    961

    Microsoft .NET Native

    Hi,

    I would like to ask you what you think about Microsoft .NET Native.

    For the moment, VB is not supported, but MS said they will very likely include it in the future.

    Do you know if there will be a free Express edition of Microsoft .NET Native?

    By the way, this is the relevant page:

    http://msdn.microsoft.com/en-us/vstudio/dn629511

    P.S. I have a feeling that, if MS decides to support VB and target the Win32/Win64 desktop, .NET Native will become the real successor to VB6. (And this could be an opportunity for me to return to the fold.)
    Last edited by esposito; Apr 3rd, 2014 at 04:29 AM.
    Since I discovered Delphi and Lazarus, VB has become history to me.

  2. #2
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,639

    Re: Microsoft .NET Native

    This is not that big a deal in my opinion. Native code compilation only offers better security against decompilation as far as I care. Besides, according to what I've read in your link, its only available for Windows Stores Apps.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  3. #3

    Thread Starter
    Fanatic Member esposito's Avatar
    Join Date
    Sep 2003
    Location
    Perugia, Italy
    Posts
    961

    Re: Microsoft .NET Native

    Quote Originally Posted by Niya View Post
    This is not that big a deal in my opinion. Native code compilation only offers better security against decompilation as far as I care. Besides, according to what I've read in your link, its only available for Windows Stores Apps.
    Yes, for the moment it is only available for Windows Store Apps, but MS also stated that "Desktop apps are a very important part of our strategy. Initially, we are focusing on Windows Store apps with .NET Native. In the longer term we will continue to improve native compilation for all .NET applications.", and "nothing prevents us from supporting any .NET language when we broaden our focus".
    Last edited by esposito; Apr 3rd, 2014 at 05:50 AM.
    Since I discovered Delphi and Lazarus, VB has become history to me.

  4. #4
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,639

    Re: Microsoft .NET Native

    I'm currently watching the C9 video where two of the engineers working on this are talking about it and I don't think I want any part of it. They mentioned that it uses static compilation and this is probably going have tremendous implications for reflection. Since moving to VB.Net, I've since become quite reliant on reflection to make my life easier for certain tasks. If this think breaks reflection I don't want any part of it. Of course I don't know this for a fact. Perhaps they already considered this and found a way to make reflection work as it always has in which case, I would have no problems. Guess we'll have to wait and see.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  5. #5
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,639

    Re: Microsoft .NET Native

    Ok, I've reached 33 minutes into the video and they started talking about reflection and they said that they had their compiler check for reflection and their "treeshaker" keeps the things you're reflecting so it would work with properly. So I guess I don't have a problem then.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  6. #6
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,639

    Re: Microsoft .NET Native

    OK, I've finished watching the video. They talked some more about reflection and they mentioned that developers may have to start using hints to help it along in certain scenarios. I'm kind of hesitant about that change but hopefully it won't become too much of a headache for developers like me that rely on reflection a great deal. Keeping my fingers crossed.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  7. #7

    Thread Starter
    Fanatic Member esposito's Avatar
    Join Date
    Sep 2003
    Location
    Perugia, Italy
    Posts
    961

    Re: Microsoft .NET Native

    Quote Originally Posted by Niya View Post
    Keeping my fingers crossed.
    So am I. I started hating Microsoft when they discontinued VB6. If they finalize this project and reintroduce native compilation making it compatible with VB syntax, I'm ready to forgive them.
    Since I discovered Delphi and Lazarus, VB has become history to me.

  8. #8
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,639

    Re: Microsoft .NET Native

    Quote Originally Posted by esposito View Post
    ...making it compatible with VB syntax...
    What do you mean by this ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  9. #9

    Thread Starter
    Fanatic Member esposito's Avatar
    Join Date
    Sep 2003
    Location
    Perugia, Italy
    Posts
    961

    Re: Microsoft .NET Native

    For the moment you can only use C# syntax in .NET Native, as far as I know. (Please correct me if I'm mistaken.)

    This is taken from .NET Native's FAQ page:

    This preview release supports only C# code because it’s the .NET language used by most Store apps.
    Last edited by esposito; Apr 3rd, 2014 at 07:10 AM.
    Since I discovered Delphi and Lazarus, VB has become history to me.

  10. #10
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,639

    Re: Microsoft .NET Native

    Actually yes. They haven't yet implemented native compilation for the VB.Net compiler. Only C# for the time being. However, this isn't that big a deal since there are converters can can convert VB.Net code to C# code with very high fidelity. Its an inconvenience for sure but not a huge setback for VB.Net developers.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  11. #11
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,321

    Re: Microsoft .NET Native

    To some extent, things like this have been available for a some time...though at a cost. I would say that this is an interesting move, and a reasonable one on the part of MS. It'll be interesting to watch where this goes. Personally, I have no need for native code compilation, but I realize that some people do, and we all have need of performance gains.
    My usual boring signature: Nothing

  12. #12
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,372

    Re: Microsoft .NET Native

    Just to be clear, when they say theyll make it compatible with VB they mean .Net, not classic. If you're looking for this to resurrect your old VB6 programs then I'd suggest you don't get your hopes up. If, on the other hand, your after a basic language that doesn't decompile readily and is cross platform (presumably, I didn't see tha stated explictely but you'd assume it can support any platform for which there's a compiler) then you're probably in luck.

    It's interesting because it does answer a couple of the main complaints the VB6 fans are making but doesn't address what is probably the biggest. I'm curious to see how it goes down.
    You can depend upon the Americans to do the right thing. But only after they have exhausted every other possibility - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  13. #13

    Thread Starter
    Fanatic Member esposito's Avatar
    Join Date
    Sep 2003
    Location
    Perugia, Italy
    Posts
    961

    Re: Microsoft .NET Native

    Quote Originally Posted by FunkyDexter View Post
    Just to be clear, when they say theyll make it compatible with VB they mean .Net, not classic. If you're looking for this to resurrect your old VB6 programs then I'd suggest you don't get your hopes up. If, on the other hand, your after a basic language that doesn't decompile readily and is cross platform (presumably, I didn't see tha stated explictely but you'd assume it can support any platform for which there's a compiler) then you're probably in luck.
    I'm ready to learn VB.NET syntax if it allows me to compile natively. I don't want to resurrect anything, because I have already converted 90% of my old VB6 apps (VB5, actually!) to Delphi. This means I would be using both languages for some time and, eventually, convert all of my Delphi code to .NET Native if the latter fulfils my expectations. Microsoft usually releases an Express Edition of most of their development tools that is free and can also be used for commercial purposes. I really hope this will also be the case with .NET Native.
    Since I discovered Delphi and Lazarus, VB has become history to me.

  14. #14
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,720

    Re: Microsoft .NET Native

    Don't be fooled that it is a simple matter of language syntax. There are reasons far beyond syntax that make attempted conversion so difficult.

    But this might answer a concern about the relatively trivial reverse-engineering of current .Net IL and even NGenned code (which requires the original assembly to work).

    As far as this ever supporting conventional desktop and server applications... I have my doubts. But it might. If so it will probably take a few more years since that is all considered legacy at Microsoft these days. The focus is "all WinRT, all the time" and this is ramping up with the newer push toward "universal apps."

    Whether VB.Net will ever see any of this... only time will tell.

    And of course none of this does anything about the stops and stutters and high memory consumption caused by the use of garbage collection.

    Here's a little more on the topic: Announcing .NET Native Preview

  15. #15
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,720

    Re: Microsoft .NET Native

    Hmm...

    From Microsoft .NET Native FAQ:

    Compilation with .NET Native is slower than with MSIL. Why?

    Normal app development uses the standard MSIL/JIT development experience in Visual Studio. The .NET Native compiler isn’t invoked until the application is deployed to the device, after most of the development process is finished and the focus shifts to optimizing the app. At this point, the compilation times are similar to optimized C++ with Link-Time Code Generation.
    I underlined the important point.

    It looks as if these WinRT applets still ship as IL. I was pretty sure this was an analog of Android's AOT compile process.

    However:

    What scenarios were considered while designing this?

    The scenarios we had in mind was Store apps for devices – allow developers to keep the .NET and MSIL productivity advantages and upload MSIL packages to the Store, and provide end-users native code (C++) like performance (with the compilation happening in the cloud similar to Windows Phone 8).
    So perhaps most users would never have access to that IL code in the first place, with the native compile happening off-device.

  16. #16

    Thread Starter
    Fanatic Member esposito's Avatar
    Join Date
    Sep 2003
    Location
    Perugia, Italy
    Posts
    961

    Re: Microsoft .NET Native

    Quote Originally Posted by dilettante View Post
    As far as this ever supporting conventional desktop and server applications... I have my doubts. But it might. If so it will probably take a few more years since that is all considered legacy at Microsoft these days. The focus is "all WinRT, all the time" and this is ramping up with the newer push toward "universal apps."
    If this is the case, then I'm not in the least interested.
    Since I discovered Delphi and Lazarus, VB has become history to me.

  17. #17
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,321

    Re: Microsoft .NET Native

    Dilettante is considerably more negative in his outlook for Microsoft (perhaps even his outlook for Outlook) than most people. He believes the worst will happen, the rest of us just appreciate his robes, sandals, and the fact that he bathes occasionally.
    My usual boring signature: Nothing

  18. #18
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    5,639

    Re: Microsoft .NET Native

    I'm with Shaggy on this too. While their primary focus seems to be WinRT and the Windows Store, I for one do not believe that they will leave desktop developers in the cold. I just can't see that happening.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  19. #19
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,720

    Re: Microsoft .NET Native

    You might be interested in Windows 8 side loading improvements

  20. #20
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,321

    Re: Microsoft .NET Native

    The app store has several compelling features. It also has some serious issues as a distribution model. I'm not convinced that the app store approach can work for Line of Business apps, despite MS floundering around trying to find a solution that will work for LOB. That link does show some promise. Several of the things I work on might well benefit from such an approach, though only using one of the open source app store variants. However, I can also see a real problem in my particular case because some of the app user domains cross agency boundaries, which is already causing political issues.

    On the other hand, that does look like it might be a vialble LOB solution. At that point, though, I'm just not quite sure what practical difference exists between something like ClickOnce deployment and a custom app store.
    My usual boring signature: Nothing

  21. #21

    Thread Starter
    Fanatic Member esposito's Avatar
    Join Date
    Sep 2003
    Location
    Perugia, Italy
    Posts
    961

    Re: Microsoft .NET Native

    After two months, still no statement about native compilation for desktop applications. MS's only interest seems to be in WinRT and the Windows Store. Nothing else. So, their promise was a joke. Dilettante's doubts about supporting conventional desktop and server applications were absolutely right. To hell RT!
    Last edited by esposito; May 22nd, 2014 at 05:57 AM.
    Since I discovered Delphi and Lazarus, VB has become history to me.

  22. #22
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,720

    Re: Microsoft .NET Native

    I actually hope it is just too early to know yet. But my doubts come from the way recompiling .Net IL into clean native code occurs: entirely on Microsoft servers as part of the process of deploying to "The Store."

    Contrast this with the Android approach Microsoft is trying to emulate: final compile from Dalvik bytecode to native code occurs there on the device at time of installation, allowing it to be used with any store, or none at all.

  23. #23
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,321

    Re: Microsoft .NET Native

    It should be simple enough, as far as I can tell. After all, the IL IS compiled on the native machine. That's what the JIT compiler does. So, all we are really talking about is moving that step much earlier. My understanding is that there have been third party tools that did just that, and have been available for some time....for some serious bucks, too, from what I have heard. I could understand that there may be some linking issues, but they are all issues that are overcome, and therefore could be overcome.
    My usual boring signature: Nothing

  24. #24
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,720

    Re: Microsoft .NET Native

    From descriptions Microsoft leaks here and there it sounds like the process involves quite a bit more than the JITter does.

    Whether they actually decompile the IL partially or not isn't clear. Some comments suggest they do, while others explicitly say they don't.

    But they do say this post-compiler/recompiler is doing things like path analysis to try to figure out how to make better use of machine registers, avoid recalculating invariant subexpressions, and so on. The JIT compiler attempts some of this as well but uses a much smaller peephole window on the code when doing so and only JITs code that gets hit heavily.

    Ngen may be even "dumber" than the JIT compiler, doing little more than one-for-one translation of IL operators and stripping out type-safety verification steps. However it does get around loading separate copies of the code for every process using it and eliminates the substantial memory footprint of the JITter itself. It just doesn't approach the fast-start of truly native code or do any significant code optimization, the resulting code requires "full trust," Ngenned code can be slower than JITted code, etc. It is pretty inadequate all around and only aids a few narrow scenarios - and thus this new post-compiler was created.

  25. #25
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,372

    Re: Microsoft .NET Native

    After two months, still no statement about native compilation for desktop applications. MS's only interest seems to be in WinRT and the Windows Store. Nothing else. So, their promise was a joke. Dilettante's doubts about supporting conventional desktop and server applications were absolutely right. To hell RT!
    From MS's point of view they are suporting desktop, just not native compilation... and why would they?

    For us as devs there are two primary advantages to native compilation:-
    1. A small footprint
    2. Cross platform compatability.

    From MS's point of view there's only 1, the small footprint. This allows they're apps to be deployed in low resource tablets, phones etc. It's not really a consideration in the desktop world though (excepting a very few edge cases). Cross Platform Compatability was never a driver behind the decision to release .Net native, it was merely a happy side effect. In fact it's a negative from MS's point of view because it enables users to move to other OSs and OSs are still MS's primary offering.
    You can depend upon the Americans to do the right thing. But only after they have exhausted every other possibility - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  26. #26
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    103,483

    Re: Microsoft .NET Native

    Quote Originally Posted by esposito View Post
    After two months, still no statement about native compilation for desktop applications. MS's only interest seems to be in WinRT and the Windows Store. Nothing else. So, their promise was a joke. Dilettante's doubts about supporting conventional desktop and server applications were absolutely right. To hell RT!
    Obviously Store apps are their primary focus or they wouldn't have started there. Don't you think that it's possible, though, that they are trying to get it working properly and completely with Store apps before they then try to get it working with desktop apps too? There's not even a product yet - it's still a developer preview - so it's too early to say what they will or won't support. It sounds like Native compilation will take place when a user installs an app from the Store, optimising it for the particular device at the time. If so then the process would be quite different for desktop applications that are not installed from the Store so it makes perfect sense that they'd tackle that as a separate problem.

  27. #27
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,720

    Re: Microsoft .NET Native

    Quote Originally Posted by FunkyDexter View Post
    For us as devs there are two primary advantages to native compilation:-
    1. A small footprint
    2. Cross platform compatability.
    No, the compiled version is actually larger in most cases. The gain is in getting around the "slow start" nature of .Net, though you are still left with erratic GC freezes.

    No, the compiled code is native, and thus single-platform by nature. To get around that they compile mulitple copies, one for each target architecture (ARM, x86, x86).

    This compiling is done on Microsoft servers when you submit to the Store, not at installation time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width