Goodhart's Law vs the Turing Test! Can our humans accurately evaluate intelligence, or will they be fooled by fakes? Live this Sunday!
class Thing:
def __init__(self, a, b):
self.a = a; self.b = b
def __eq__(me, them):
return me.a == them.a and me.b == them.b
>>>[1, 2, Thing(6, "Hi")] == [1, 2, Thing(6, "Hi")]
True
>>>[1, 2, Thing(6, "Hi")] == [1, 2, Thing(6, "Hello")]
False
In this case, the builtins are syntax, namely the `==` operator. There's a uniform syntax for comparing two objects for equality. import Control.Lens
baseLens --> nextIndex = baseLens . ix nextIndex
assocIn structure keyLens newValue = set keyLens newValue structure
It works like so: setTo256 structure = assocIn structure (ix 0 --> 0 --> 0) 256
-- setTo256 [[[1]], [[2]]] returns [[[256]], [[2]]]