I'm sorry to have offended you, but I don't feel personal insults over the README of an open source project are particularly reasonable.
This affects the actual code, too! See, for example, https://github.com/geohot/tinygrad/commit/cfb7a4c41a2b6bcc09..., which includes this gem:
diff --git a/tinygrad/ops/ops_cpu.py b/tinygrad/ops/ops_cpu.py
index a454f56f..0686f810 100644
--- a/tinygrad/ops/ops_cpu.py
+++ b/tinygrad/ops/ops_cpu.py
@@ -2,22 +2,15 @@
from ..tensor import Function
class CPUBuffer(np.ndarray):
- def log(x):
- return np.log(x)
- def exp(x):
- return np.exp(x)
- def relu(x):
- return np.maximum(x, 0)
- def expand(x, shp):
- return np.broadcast_to(x, shp)
+ log = lambda x: np.log(x)
+ exp = lambda x: np.exp(x)
+ relu = lambda x: np.maximum(x, 0)
+ expand = lambda x,shp: np.broadcast_to(x, shp)
+ permute = lambda x,order: x.transpose(order)
+ type = lambda x,tt: x.astype(tt)
+ custompad = lambda x,padding: np.pad(x, padding)
def amax(x, *args, **kwargs):
return np.amax(x, *args, **kwargs)
- def permute(x, order):
- return x.transpose(order)
- def type(x, tt):
- return x.astype(tt)
- def custompad(x, padding):
- return np.pad(x, padding)
def toCPU(x):
return x
@staticmethod
The "
actual code" is being golfed for no other reason than to keep the line count down, for the sake of a promise that never needed to be made. This commit recovered a total of seven lines wherein new code can be added, in exchange for readability. It is not just a quirk, not just some sort of interesting aside like one could argue for suckless' `dwm`: this promise actively makes the code worse over time, for no reason.