Live data from Hacker News

Windows Code Samples

microsoft.github.io

81–90 of 107 posts

Re: Windows Code Samples

#81
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?

It is significantly better than cygwin, but of course it doesn't beat real Linux.

Re: Windows Code Samples

#82

Earlier quoted context omitted.

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.

Was that hard? I hate bouncing between bash and PowerShell.

Re: Windows Code Samples

#83

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.

I suspect that large part of Windows, perhaps not the kernel, but many of the required subsystems, are written by 3rd. parties and licensing will prohibit an open source release of Windows.

The kernel is full of third party libs too.

Re: Windows Code Samples

#84

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…

There is a new XAML feature called x:Bind where the XAML compiler code-gens the data binding code instead of the framework doing it all at runtime. You can set breakpoints in the generated code.

https://msdn.microsoft.com/en-us/windows/uwp/xaml-platform/x...

Instead of C++/Cx, you can use the new C++/WinRT, which uses standard C++ syntax and adds "await" to make async programming much easier.

https://github.com/Microsoft/cppwinrt

Re: Windows Code Samples

#85
post #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)

C# maybe. But C# is not suitable for what I do (fast deep learning on video, images, and audio). Any kind of managed language is hostile to those kinds of things and just plain not designed for them. I want to drop down to SIMD intrinsics and assembly when I need perf, and C# won't let me do so.

But I think even folks with much more modest needs suffer with UWP. For instance, try to load an image from your hard drive (using UWP C++), resize it with Lanczos and get access to its pixels. The API is a fucking nightmare, there's no way to resize an image that I could find (unless you want to show it in the UI, in which case all is taken care of for you, but you can't get pixels from there). On macOS/iOS, it's just a few lines of rather plain looking code.

Re: Windows Code Samples

#86
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?

Yes, If you're comfy in Ubuntu land then the everything just works..

Re: Windows Code Samples

#87

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.

NO no no... Alibaba has a clone that they claim their OS, YunOS, is not Android and even it is not written in java, but can run most of Android apps.The OS is written in some java like programming language and close sourced.

Re: Windows Code Samples

#88
post #47

Earlier quoted context omitted.

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…

> they're just begging you to put it in the Windows Store. And now their store is full of crap and no one uses it.

The first part of that applies to Apple and Google app stores, too.

Re: Windows Code Samples

#89
post #80

Earlier quoted context omitted.

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)

C# maybe. But C# is not suitable for what I do (fast deep learning on video, images, and audio). Any kind of managed language is hostile to those kinds of things and just plain not designed for them. I want to drop down to SIMD intrinsics and assembly when I need perf, and C# won't let me do so. But I think even folks with much more modest needs suffer with UWP. For instance, try to load an image from your hard drive…

.Net offers reasonable SIMD access through the System.Numerics package. Roslyn offers writing plain IL Assembly, which is heavily used throughout SharpDX, and ultimately, P/Invoke is fast and allows you to call any C++ library you might want if you really want to get down to the metal. Seems a better alternative to me that having to deal with the hilariously bad C++ UWP API

Re: Windows Code Samples

#90
post #89

Earlier quoted context omitted.

C# maybe. But C# is not suitable for what I do (fast deep learning on video, images, and audio). Any kind of managed language is hostile to those kinds of things and just plain not designed for them. I want to drop down to SIMD intrinsics and assembly when I need perf, and C# won't let me do so. But I think even folks with much more modest needs suffer with UWP. For instance, try to load an image from your hard drive…

.Net offers reasonable SIMD access through the System.Numerics package. Roslyn offers writing plain IL Assembly, which is heavily used throughout SharpDX, and ultimately, P/Invoke is fast and allows you to call any C++ library you might want if you really want to get down to the metal. Seems a better alternative to me that having to deal with the hilariously bad C++ UWP API

Really, you call this "reasonable SIMD" access: https://msdn.microsoft.com/en-us/library/system.numerics(v=v...? For comparison get a load of Apple Accelerate: https://developer.apple.com/reference/accelerate. Now that's "reasonable" SIMD access, and extremely heavily optimized on both macOS and iOS for both speed and power efficiency. Similar capabilities are just one command line incantation away in Linux. And if that's not enough, you get real, actual assembly, not some "IL assembly" where you have no control over what it will emit when converted to machine code.

Here's another constraint you may have failed to consider: my code doesn't just run on Windows. I compile the same C++ code across all supported platforms with fairly minimal #ifdefs to adjust to platforms and SIMD ISA. Windows is the only platform that fights me every step of the way. Linux is great. macOS is great. iOS and Android are great. Goddamned bare metal is great (cross-compiling on Linux). UWP is awful and hostile.

Post reply on HN