34 ms·
Completely disagree - limiting lines of code as an ethos makes as much sense as using lines of code written as a business metric. What if they want to add a ne
by babelfish 5y ago
Completely disagree - limiting lines of code as an ethos makes as much sense as using lines of code written as a business metric.
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)
- dleslie 5y ago> What if they want to add a new feature that takes another ~1000 LoC? They don't. The LoC limit exists as much to avoid scope creep and maintain focus as it is about anything else.
- blueblob 5y agoIt trades off utility for managing scope creep. Keeping this code base tiny necessarily means that anything that uses it would need to write more code. If the point is a demonstration instead of a usable library, then that is good because it is much easier to follow without excess complexity.
- dleslie 5y agoNecessarily is a strong word; there are assuredly many users of this tool who find it sufficient in its scope as it is, based on the project activity. If a user needs significant feature additions they can write them as a separate tool that interacts with this one.
- mhh__ 5y agoThis one arguably does have a bit of scope creep it's just in a separate directory.
- alwaysjoe 5y agoMaybe don’t add that feature then? Not every library is meant to solve all problems
- recuter 5y agoYou say 1000 lines is an arbitrary number. Do you actually have a feature in mind that takes it above this artificial limit? Did you even read the code? They like this round number. Fork. Why argue.
- striking 5y agoIt's how you get commits like these, though https://github.com/geohot/tinygrad/commit/050636bcb1068beff62ed23392de02e2f5d80f22 https://github.com/geohot/tinygrad/commit/050636bcb1068beff6... 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.
- recuter 5y agoThis is why the good lord gave us: https://github.com/psf/black https://github.com/psf/black Import line is actually improved with this commit. LGTM, ship it. We now return to your regularly scheduled bikeshedding.
- striking 5y agoYou're saving yourself from one kind of golfing, but not all of them. Additionally, I feel like installing an additional tool is kind of against the spirit of 1kLOC simplicity.
- dundarious 5y agoDev dependencies and release dependencies are distinct. There would be no sense in complaining about hypocrisy if a zero-dependency C project uses clang-format or valgrind, and similarly for a python project using black or mypy.
- a-dub 5y agosimplicity is a virtue. the project goal apparently isn't to have a lot of features, it's to do the core thing in the simplest way possible.
- lazide 5y agoAnd if someone does some code golf to stay under the 1000 line limit rather than go to 1050 lines that’s an improvement?
- a-dub 5y agono that's another bloated ml library with code compression. i suspect a part of the motivation for this library is learning and teaching. and maybe a little flexing on overcomplicated autograd libraries.
- recursive 5y agoThen the human responsible for approving the PR will decide whether it's worth it. Personally, I love it.
- deleted 5y ago[deleted]
- elcomet 5y agoThis is a semi-educational project, so it makes sense to keep the number of lines small.
- canjobear 5y agoIt serves an important gatekeeping function by discouraging low-effort contributions.
- robbedpeter 5y agoNot all software is intended to grow indefinitely. Keeping things small and grokkable is very valuable for learning.