106 karma · joined December 5, 2017
My development environment is VS Code running in a Dev container in docker desktop. So after my work laptop was so fast, I made some changes to my Mac docker desktop and suddenly the mac could build the project from scratch in about 2 minutes. Incremental compile was several minutes before, instant now.
This is not really what most people mean when they say “optimal strategy”. It’s true that exploitative play will make more money if you know exactly what your opponent is doing and if they keep doing it despite it not working. Neither of these will generally hold in an actual game.
The reason it’s called “optimal strategy” is because it works no matter what your opponent is doing. It will not make as much as a strategy tailored perfectly to your opponent but it will never lose to anyone under any circumstances, assuming infinite games (assuming infinite games just so we can ignore variance). The worse case the strategy has is break even to anyone else using it.
The thing people don’t get is: when you answer on SO you’re not answering that poster. You’re answering anyone who will ever have this question. It’s quite arrogant to assume it will be an XY for every single person forever more.
The proper way to answer is to answer the question exactly as ask and then insert your “but you probably should be doing Y instead” at the end.
The issue is that for most things you'd want (+) to be defined like: (+) :: a -> a -> a
But actually, to be more flexible it could be defined as: (+) :: a -> b -> a
So then all the normal stuff would supported, as now, but you could also support things like:
instance BetterNum DateTime where
(+) :: DateTime -> Duration -> DateTime
And so on.[1] https://github.com/jason-johnson/frobo/blob/master/src/Text/...
The “match” function. And yes, this is ugly and needs to be cleaned up.