Dart as a platform provided the unique ability to target both JIT at development-time to enable sub-second hot reload and AOT for release apps, providing native performance when it comes to scrolling, animation, etc.
Dart as a platform provided the unique ability to target both JIT at development-time to enable sub-second hot reload and AOT for release apps, providing native performance when it comes to scrolling, animation, etc.
We find that most developers want their apps to look and feel the same on multiple platforms, with some relatively minor tweaks. Flutter itself handles many platform specifics automatically, e.g. scrolling physics, adding scrollbars, button press effects, etc.
Flutter provides its own widget implementations and does not rely on those provided by the underlying OS. This gives us the ability to give you complete control over scrolling, animation, theming, etc. while still running at native speeds across multiple platforms.
It depends on your definition of optimal. If you optimize for time, then pressing each button one at a time until a Coke comes out. Plus it doesn't take any brain cells so I can get back to coding quicker. : )
If you take as given, "none of them are correct," I think both of those optimisations still start with pressing Pepsi. It is either Coke or random, so you have about a 75% chance of getting what you want on the first press.
If you want Coke and you start with Pepsi, you'll get back Coke (1/2 + 1/2x1/2) or Pepsi (1/2x1/2). However, you could pick it and get back Pepsi 10 times in a row.
If you start by picking Random, you get back Coke (1/2) or Pepsi (1/2). If you get back Pepsi, you know
1. Random = Pepsi
2. Coke = Random (since it can no longer be Pepsi, since Random is)
3. Pepsi = Coke
So, you get back Coke on your first attempt (1/2),
or you get back Coke on your second attempt (1/1).
So picking random first, then the correct one, optimizes for lowest upper bound on the number of choices to get what you want. Which is _actually_ what I meant by "The least amount of money spent to guarantee getting your choice", but didn't actually express correctly.
> If you want Coke and you start with Pepsi, you'll get back Coke (1/2 + 1/2x1/2) or Pepsi (1/2x1/2). However, you could pick it and get back Pepsi 10 times in a row.
Why would you push it ten times in a row? If you get a Pepsi from it on your first press, you now know:
- The button labeled Pepsi is actually Random (it can't be the actual Pepsi button, since none of the labels are correct, and it's also not the Coke button)
- Therefore, the button labeled Coke is actually Pepsi (it can't be Coke by rule, and it's also not Random since we know where Random is now)
- Therefore, the button labeled Pepsi is actually Coke (elimination)
So the max is still 2 steps, but you have 75% chance of getting a Coke on the first try instead of just 50% chance. Same lower bounds, but better expected value.
If you hit the Pepsi button and get Pepsi, you know it's random, so the random button has to be Coke (and Coke gives Pepsi). So picking the Pepsi button first still works in two tries - you either get a Coke all the time, get it randomly on the first try, or figure out which button gets you Coke.
Regardless of the probability distribution of the random button, it does not change the optimal strategy. By pressing the Pepsi button, you are either going to get Coke (you "win") or Pepsi (so you know the button is random and you "win" by pressing random on the next go which you now know is Coke).
Hey, all. I'm a PM on the Flutter team and happy to be able to fill out the set desktop OSes that Flutter supports with Windows (in addition to macOS and Linux). Got Qs? AMA.
Dart does have it's own compiler that targets the native instruction set for supported platforms, e.g. 32-bit and 64-bit ARM for Android and iOS, x86 for Windows and macOS, etc. We're experimenting with bitcode in case Apple decides in the future that they're rather have iOS and/or macOS apps be submitted that way instead of ARM or x86, as they already have for tvOS and watchOS.