by babelfish · 4y ago · 0 comments
What if they want to add a new feature that takes another ~1000 LoC? Can they just write it as a separate library and include it as a dependency? IMO trying to minimize LoC creates a perverse incentive to split up your package when it might not need it (in the same way maximizing LoC creates a perverse incentive to write the most verbose code possible, not necessarily the most readable/maintainable)
They don't.
The LoC limit exists as much to avoid scope creep and maintain focus as it is about anything else.
i suspect a part of the motivation for this library is learning and teaching.
and maybe a little flexing on overcomplicated autograd libraries.
They like this round number. Fork. Why argue.
Subject: here's two extra lines of precious code (#307)
diff --git a/tinygrad/__init__.py b/tinygrad/__init__.py
index 0deab3e9..31ac75d5 100644
--- a/tinygrad/__init__.py
+++ b/tinygrad/__init__.py
@@ -1,3 +1 @@
-import tinygrad.optim
-import tinygrad.tensor
-import tinygrad.nn
+from tinygrad import optim, tensor, nn
There's a difference between "I will refuse features like X/Y/Z" and "I want the length of the code file to be N lines at most". The former tells you both explicitly and implicitly which features not to bother contributing. The latter is just nonsense.Import line is actually improved with this commit. LGTM, ship it.
We now return to your regularly scheduled bikeshedding.
Additionally, I feel like installing an additional tool is kind of against the spirit of 1kLOC simplicity.