News for hackers. Stuff that matters.
Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by monocasa on Friday May 10, 2019 @08:20PM (#19883534)
Thank god.

Among other things UWP didn't allow PAGE_EXECUTE on the memory mapping calls, meaning that JITs were disallowed. That's pretty core to general purpose computing in a real way, IMO.

Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by bpye on Friday May 10, 2019 @09:17PM (#19883832)
I believe this was true at one point, but isn't any more. Whilst you cannot allocate executable memory, you can use VirtualProtectFromApp to remap memory as executable [1]. UWP does enforce W^X though. You do need the codeGeneration capability.

(Disclaimer, work for Microsoft - made LuaJIT run on UWP in my free time, this definitely works :) )

[1] - https://docs.microsoft.com/en-us/windows/desktop/api/memorya...

Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by MaulingMonkey on Friday May 10, 2019 @10:46PM (#19884201)
VirtualProtectFromApp has the exact same signature as VirtualProtect, just supporting fewer constants and being legal in UWP apps. I don't suppose you have any insight as to why Microsoft forced this kind of API churn? Why I have to lace my code with #ifdef s to support both UWP Apps and earlier OSes? What's the upside? I feel like VirtualProtect could've just supported fewer constants inside the sandbox.

Maybe to limit sandbox attack surface? Or working around KnownDLLs pinning perhaps? But even then, why not provide forwarding stubs instead of forcing all UWP devs to write their own or #ifdef spam? Time constraints before shipping Windows 8?

This style of API churn - not limited to VirtualProtect, and often with only newfangled COM C++/CX bindings for replacement APIs - definitely put me off UWP App dev, and I just don't see what the upside was supposed to be for anyone. Lots of extra work, mostly just to lose functionality.

Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by jdsully on Saturday May 11, 2019 @03:00AM (#19884984)
Because the UWP code under the hood calls the real VirtualProtect. It’s to avoid the name conflict.

Fun fact: your UWP app also links in gdi.dll and user32 as well.

Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by seanmcdirmid on Friday May 10, 2019 @08:56PM (#19883720)
The DLR was nerfed because of this: no JIT, just interpreted. Really slowed down my live programming implementations.

Also, I remember deploying some code to a surface Hub, my C# build for that took 40 minutes to an hour. Not fun.

On the other hand, it did make me learn some web development to do UIs.

Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by Wowfunhappy on Friday May 10, 2019 @10:16PM (#19884096)
iOS also disallows JIT’s. I’m not saying this is okay, but it is quite clearly possible to have a successful software platform without them.

(Excluding the platform-holder’s own JIT’s, of course.)

Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by umanwizard on Friday May 10, 2019 @10:39PM (#19884179)
iOS is not really “general-purpose computing”.
Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by Wowfunhappy on Saturday May 11, 2019 @01:10AM (#19884670)
How do you define "general-purpose computing", then?

DVD players, microwaves, and even game consoles are single-purpose computing devices, designed to do one thing. I'm having a lot of trouble putting iPhones and iPads in that category. As terribly locked down as they are, they're still very much "general purpose".

And BTW, I think Microsoft's goal was quite clearly for UWP to be as locked down as iOS.

Re:Microsoft Throws in the Towel on UWP, Elevates Win32 by umanwizard on Saturday May 11, 2019 @08:47PM (#19889384)
Well, it’s a spectrum. Microwaves < Game consoles < iPhones < laptops/desktops.

I’d only call the last element of that chain “general-purpose” — to me, one requirement for earning that label is the ability to write and compile programs. If I can’t write iOS apps from inside iOS, it isn’t general-purpose.