News for hackers. Stuff that matters.
Re:Writing Snake in 12 Lines of PyTorch by qsort on Thursday August 11, 2022 @02:42PM (#32430019)
It has some merit when you are comparing different solutions. For example (and I know people loathe python on here, I'm just using it for the sake of example, please bear with me), writing a simple web service in python takes fewer lines of code than doing the same in say, Rust.

This doesn't imply that a language is better than another, it's just an objective fact one might find useful to keep in mind.

The article's usage is admittedly clickbait, another recent article that popped up on the home page was titled something to the effect of "Speech Recognition in 100 lines of C++". Predictably, it turned out that they depend on a multi-million-line library.

Re:Writing Snake in 12 Lines of PyTorch by alberth on Thursday August 11, 2022 @02:51PM (#32430114)
But if you're importing in a library that might have 100,000 LoC just so that you can say you "wrote X in 12 LoC" ... is that really a far representation?
Re:Writing Snake in 12 Lines of PyTorch by qsort on Thursday August 11, 2022 @02:56PM (#32430170)
Yes, that's my point. What these articles do is effectively to "hijack" that metric.
Re:Writing Snake in 12 Lines of PyTorch by selcuka on Thursday August 11, 2022 @07:34PM (#32433138)
This article is more honest, though. It only imports PyTorch and that is already mentioned in the title.