Live data from Hacker News

Windows Code Samples

microsoft.github.io

41–50 of 107 posts

Re: Windows Code Samples

#41

Earlier quoted context omitted.

They still make money on every single pc/laptop that ships with windows which is still their biggest money maker with office. If they truely open source windows (BSD or else) it will be free to ship for OEM and Microsoft will lose one of their biggest source of income. tl;dr: not gonna happen

Android is open source, and still (nearly) everybody is locked into Google's version with licensing costs. Google open-sourced nearly everything, while managing to make their "apps" so entrenched that every customer expects them and even a lot of apps don't work without them.

> Google open-sourced nearly everything

Nearly everything about Android the operating system. Android the app platform is deeply tied to Google Play Services, which is not open source and is once more deeply tied to Google's online services.

And they've re-routed apps' access to basic phone data like GPS, camera and microphone through Google Play Services, so that if you want to use any app that uses those services you also have to let Google log those data.

It's almost as bad as tivoization from the FOSS perspective, while also invading your privacy. Yay.

Re: Windows Code Samples

#42

Here's the problem: As a developer Electron (see http://electron.atom.io/ ) is more attractive to me than Windows APIs. Take a look at the RSS Reader ( https://github.com/Microsoft/Windows-appsample-rssreader ). I can make a desktop app that is practically indistinguishable from this app using Electron, so why would I use Windows APIs? If I use Electron then my app will run on Mac and Linux, not just Windows, and my…

Indistinguishable, until you look at the resources usage :/

Re: Windows Code Samples

#43

Here's the problem: As a developer Electron (see http://electron.atom.io/ ) is more attractive to me than Windows APIs. Take a look at the RSS Reader ( https://github.com/Microsoft/Windows-appsample-rssreader ). I can make a desktop app that is practically indistinguishable from this app using Electron, so why would I use Windows APIs? If I use Electron then my app will run on Mac and Linux, not just Windows, and my…

- Electron is big dependency, adding hundreds of MB to our app - Electron Apps haven't and won't ever 100% fit into the OS environment/theme, neither Windows, macOS, or any Linux desktop - Electron takes a long time to start up - Electron eats a big amount of memory - Electron uses a lot more battrey - Many APIs of the underlying OS are not avaiable to Electron, especially those not found on competing platforms So, a…

It makes me think Electron is the new Java. Trying to make things cross-platform inevitably introduces inefficiencies and lowest-common-denominator functionality. The UI may look native but the contrast in everything else is instantly noticeable.

That said, these samples seem to be mostly UWP/C# stuff which I wouldn't consider "real native" i.e. Win32 --- I've been programming in Win32 for a long time and even the differences in resource usage between Win32 and .NET apps are noticeable.

Re: Windows Code Samples

#44
post #7
post #3

Too bad the WSL (Windows Subsystem for Linux) is not open source. It is already an impressive piece of software, but many features are still lacking (e.g., neither Valgrind nor gperftools work right now), and it could benefit greatly from community involvement. Fittingly, issue #1 in the WSL bug tracker is requesting it to be open-sourced: https://github.com/Microsoft/BashOnWindows/issues/1

For development, is WSL good enough to replace dual-boot?

For me not, because of the lack of Docker.

Re: Windows Code Samples

#45
post #30

Earlier quoted context omitted.

Some institutes at some universities have access to the NT source code for academic purposes. (Google "Windows Research Kernel" -- supposedly some academic entities have more access).

This is true. The program allowing this was active a few years ago, so the Windows research kernel is stuck at NT 5.2 (just before Vista). That makes it a decade old, but it is still a great tool for understanding the unique things about the NT architecture. The downside is that Windows has improved dramatically in ten years, so the old source can be misleading if not taken with proper perspective. People like to shi…

I wouldn't say Windows has "improved dramatically in ten years" --- perhaps "changed" would be the right word for me; given how popular XP was, I'd say WRK is still quite relevant.

Re: Windows Code Samples

#46

Earlier quoted context omitted.

If the license isn't extremely restrictive about what you can do with the source and your knowledge of it, it would be a huge boost for Wine and ReactOS. Since those two are the biggest threat to Windows on the Desktop, I don't think Microsoft would risk that.

If it's just the kernel and not the userland above it, I doubt it. Apple's open sourcing of XNU and Darwin was never an existential threat to Apple. The question is how much third-party code there is in the NT kernel. There may even be remainders of the cooperation with IBM tainting the source code (Windows NT did have an OS/2 personality at some point).

Based on what researchers who had access to the Windows kernel are saying, Windows has a decent amount of edge cases and special conditions to maintain backwards compatability with old software. For example if some popular software from 2000 abused some implementation detail that has since changed, Windows will detect that specific program and simulate old behaviour for it.

I expect most of that stuff lives in the userland interfaces to the kernel, but at least Microsoft seems to consider those to still be kernel code.

Re: Windows Code Samples

#47

Here's the problem: As a developer Electron (see http://electron.atom.io/ ) is more attractive to me than Windows APIs. Take a look at the RSS Reader ( https://github.com/Microsoft/Windows-appsample-rssreader ). I can make a desktop app that is practically indistinguishable from this app using Electron, so why would I use Windows APIs? If I use Electron then my app will run on Mac and Linux, not just Windows, and my…

I don't think MS wants to discourage developing apps using web technologies. They support a number of ways [1,2,3] to turn HTML/JS apps into windows {,store} apps. They've been supportive of using web technologies to make apps before electron existed. The original "modern" app platform for Windows 8 had APIs for C#, C++/CX, and JS. I don't think the first JS push was an effort to improve portability, but portability is definitely a part of "new MS" strategy. Look at things like Xamarin and the Objective-C compiler for visual studio (whatever they're calling it). They don't care if your app isn't Windows exclusive, they're just begging you to put it in the Windows Store.

[1]: https://developer.microsoft.com/en-us/windows/develop/winjs [2]: https://www.microsoft.com/developerblog/real-life-code/2016/... [3]: https://developer.microsoft.com/en-us/windows/bridges/hosted...

Re: Windows Code Samples

#48
post #7
post #3

Too bad the WSL (Windows Subsystem for Linux) is not open source. It is already an impressive piece of software, but many features are still lacking (e.g., neither Valgrind nor gperftools work right now), and it could benefit greatly from community involvement. Fittingly, issue #1 in the WSL bug tracker is requesting it to be open-sourced: https://github.com/Microsoft/BashOnWindows/issues/1

For development, is WSL good enough to replace dual-boot?

why wouldn't you just use a vm rather than dual boot, these days?

Re: Windows Code Samples

#50

Here's the problem: As a developer Electron (see http://electron.atom.io/ ) is more attractive to me than Windows APIs. Take a look at the RSS Reader ( https://github.com/Microsoft/Windows-appsample-rssreader ). I can make a desktop app that is practically indistinguishable from this app using Electron, so why would I use Windows APIs? If I use Electron then my app will run on Mac and Linux, not just Windows, and my…

Electron is a fine choice if you hold your users in utter disdain.
Post reply on HN