On FireFox with uBlock on and logged into my corporate gmail I get 0.9, switching to a private tab I get 0.7. This is with every privacy setting turned on in the FF options.
YouTube deciding your video is ineligible for earning ad revenue. So the creator gets nothing (or close to nothing, not sure). I'm not sure if it actually stops running ads on the videos since I've been using an ad blocker for ages.
Interesting. I thought the lack of proper tail recursion is a JVM limitation. Hence why Clojure uses loop/recur to handle it by translating it to a loop rather then as an actual tail call. Which means things like mutually recursive functions are not possible in Clojure without blowing the stack.
How does Kotlin handle that? Is it internally rewriting to a loop or trampoline, or did they find some way to actually make proper tail calls?
Those are all just particular cases of the same concept. A "map", well, maps values in a domain to values in a codomain. A mathematical function is a map. A key/value data structure can be viewed as a partial function on a non contiguous, discrete domain. A hashmap is just an implementation detail of a key/value structure. A map over an array is again just a function mapping an array in one domain to another array in a codomain.
I don't think they originate from different definitions. Concepts in category theory are very abstract on purpose, because it focuses on the main essence of the idea, divorced from any particular application of it. Which will greatly vary, but have a common set of properties.
In Haskell functors are endofunctors in the category Hask. Endofunctors are a special case of functors where the source and result category are the same, and Hask is a category of Haskell types. So essentially Haskell functors are all Hask -> Hask transformations. For example applying "fmap show" to a Maybe Int produces a Maybe String, which are both in Hask.
In OCaml you can treat modules of the same signature as categories. If you look at [1] and look at the example for intervals, you have one category of Comparable modules and another category of Interval modules. The Make_interval functor maps objects from Comparable to Interval.
So it really is the same concept, just different applications, but they follow the same theoretical framework and properties.
For someone only passingly familiar with Spec, what's the benefit of Spec over just using a property based testing framework like Haskell's QuickCheck (and I think Clojure's test.check)?
I can encode all those invariants as QuickCheck properties and have them automatically tested against random inputs on every test run. It's still all runtime verification, but with random inputs I actually have more confidence of hitting a corner case than with just asserting during regular program runs or hand written example tests.
Also, with enough heavy lifting you can actually encode all of that in the types in a dependantly typed language like Idris [1]. And while a machine checked proof of your sorting algorithm is nice, it might be hitting the diminishing returns point the article mentions over just using property tests.
I worked on a small Python project some years ago and we had a type error in production despite having tests.
We traced it back to a call to a third party library. It was supposed to return a list of results, and all of the test cases around it worked and always got a list back. In production however we encountered an error because if there was only one value to return, the library would not return a list of one element, as we expected, but a scalar value. So the rest of the code was expecting a list and when it encountered a scalar it blew up.
You can blame it on us for having insufficient test cases, or not coding defensively enough, or not reading the source code of the library we used, or the author of the library for bad design, but ultimately, this bug would not have been possible in a statically typed language.
So just saying "have test cases" is not good enough. Your test cases can be not exhaustive, but a good static type system and type checker is.
On FireFox with uBlock on and logged into my corporate gmail I get 0.9, switching to a private tab I get 0.7. This is with every privacy setting turned on in the FF options.