Live data from Hacker News

Windows Code Samples

microsoft.github.io

71–80 of 107 posts

Re: Windows Code Samples

#71

Earlier quoted context omitted.

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 us…

If you think of kernel32 & friends, that's not actually considered kernel code. That is the "kernel" of Win32, which is mostly a userspace thing. The word kernel is just used in an overloaded way.

Re: Windows Code Samples

#72

Earlier quoted context omitted.

In all honesty, I wouldn't be that surprised if that happened at this stage - I don't know that they would have much to lose, but they'd potentially have an awful lot to gain.

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

They can give access to the source code without necessarily using an Open Source licence for that.

Re: Windows Code Samples

#73
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…

On what points you think the NT kernel is architecturally superior to Linux today?

Re: Windows Code Samples

#74
post #7

Earlier quoted context omitted.

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

Depends on your use case/tools/habits. WSL gives you the advantage of being able to access the same files with native Windows tools and from the GNU[1] command line. If you plan on using the X GUI tools, it will be much less useful to you. [1] I can't bring myself to use the term 'Linux' here, because, ironically, Linux is the primary missing part in this Ubuntu distribution. It should really be called WSG or WSU.

> access the same files with native Windows tools

Er, about that: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-n...

DO NOT, under ANY circumstances, create and/or modify Linux files using Windows apps, tools, scripts, consoles, etc.

Edit: downvoting accurate information that was previously posted on HN? Really?

Re: Windows Code Samples

#75
post #74

Earlier quoted context omitted.

Depends on your use case/tools/habits. WSL gives you the advantage of being able to access the same files with native Windows tools and from the GNU[1] command line. If you plan on using the X GUI tools, it will be much less useful to you. [1] I can't bring myself to use the term 'Linux' here, because, ironically, Linux is the primary missing part in this Ubuntu distribution. It should really be called WSG or WSU.

> access the same files with native Windows tools Er, about that: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-n... DO NOT, under ANY circumstances, create and/or modify Linux files using Windows apps, tools, scripts, consoles, etc. Edit: downvoting accurate information that was previously posted on HN? Really?

You can access your entire Windows filesystem freely from Linux, so that's not really an issue. Just keep your data in /mnt, or link it from there to other places.

Re: Windows Code Samples

#76
Having actually used UWP SDK for C++ fairly recently, I was left with the impression that it's a complete non-starter for most folks. It assumes too much skill on the part of the developer (i.e. "everything is asynchronous"), it uses a significantly extended superset of C++, and it inexplicably comes with _no_ libraries for such basic things as image processing, signal processing, linear algebra, etc -- stuff that Apple knocks out of the park. It's just basically WPF and very little else. Enough perhaps to write business apps, but way inadequate for anything outside this narrow niche. And because everything is async, and UI uses opaque data binding, the debugging experience tends to be a bit of a nightmare. I'm not sure what Microsoft was thinking, but Apple's approach to async (concurrent and serial queues in GCD) is an order of magnitude easier to understand, use, and debug, and OS X and iOS SDKs come with a ton more high quality features.

Re: Windows Code Samples

#77

Earlier quoted context omitted.

> Electron apps all have orders of magnitude higher memory usage than comparable native apps I use across the board (10s of MB vs 100s of MB). This can be an issue, but it depends on the type of app you are making. If you are making a calculator app, you don't want it to consume 100 MB of memory and take 15 seconds to start. But if you are making a Business Intelligence app then if it takes 100 MB and 15 seconds to s…

>This can be an issue, but it depends on the type of app you are making. It does, but the problem is Electron is the new hotness, so every chat client that could have been a 10MB native app is now coming out as a 100MB Electron app. Instead of looking at the problem being solved and choosing Electron, people work backwards and choose Electron because that's what looks good on a resume/is easy to hire for/is popular/e…

On the bright side, these Electron apps work on Linux, whereas I'd be stuck running the ill-maintained web version (if one even existed) otherwise.

Re: Windows Code Samples

#78

Earlier quoted context omitted.

UWP is a sandbox. I wouldn't call that native. You can't even do any sort of local IPC with it if your other process is Win32. Furthermore: - You can't run a UWP as Administrator. - A UWP app has less access to the system and user data. - You can't develop a UWP app that has in-process plugins. - You can't hook into a UWP app like you can with actual native Win32 apps, to send keys, hook keys or do screen overlays. I…

Just because you don’t have permissions to do something, doesn’t mean something is wrong with the API. Technically, you can restrict permissions in a similar way on any NT-based OS. Doesn’t mean the Win32 API is not native. Doesn’t mean those ACL permission checks everywhere are “artificial limitations”. Most of those UWP’s limitations are here to protect users. Microsoft learned their lesson about the security. I do…

There is going to be a Win32 subsystem on phones. That's the next thing Microsoft is trying. They already showed Windows 10 running on arm with Win32 apps running on it.

The things I mentioned or not permissions. They are limitations. No UWP app is permitted to do them so they might as will not exist. However those things do exist and there must be a reason why. Maybe people have needed to use them before? I think so.

Re: Windows Code Samples

#79
post #7

Earlier quoted context omitted.

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

For me not, because of the lack of Docker.

I've configured the Docker client in WSL to talk to the Docker for Windows daemon. It's good enough for 90% of use cases.

Re: Windows Code Samples

#80

Having actually used UWP SDK for C++ fairly recently, I was left with the impression that it's a complete non-starter for most folks. It assumes too much skill on the part of the developer (i.e. "everything is asynchronous"), it uses a significantly extended superset of C++, and it inexplicably comes with _no_ libraries for such basic things as image processing, signal processing, linear algebra, etc -- stuff that Ap…

I have no idea what your problems are, but I code UWP in C# which is the preferred language and its all fine and dandy here.

(c++ .net is not real c++ anyway)

Post reply on HN