Follow

We're about to throw out 120k lines of C++ and replace it with a shell script that does basically the same thing.

@shpuld it's mostly glue code anyway. The performance will basically be the same, maybe within a few percent difference.

@newt yeah I wouldn't expect that amount of complexity to ever have good perf no matter which lang

@Archivist no, it's just a product made for the sake of being made. It can be replaced with a script and a few standard tools.

@newt What I mean is that I don't get how they could make a 120KLoC tool that does the same job as a shell script.

Generally when I do that i get something about twice as long as a shell script at most

@Archivist it reimplements many tool found in any Linux distro, and does it poorly. That's the thing.

The guy who developed this thing has a strong hate-boner against using third-party libraries and tools, even if those are open source. Honestly, I wouldn't be surprised if Greenspun's tenth rule applies here.

@newt But I mean... the C++ standard library covers the same pane as most Unix tools ( except maybe Awk) so he also was a very bad C++ dev xD

@newt I mean, it takes about 500 lines of code to implement a complete lisp interpreter, 250 to implement a complete CSV parser and maybe 1500 more to make functions to make both interact in meaningful ways, surely you can make a nice C++ tool in 120KLoCs xD

@Archivist not if you have an implementation of json using only printf and scanf. This isn't a joke.

@Archivist did I mention a hate-boner against third-party libraries? There also is an http-client. Yup, printf and scanf too.

@newt B-but C++ have stuff for that ;-; you have the heavenly stringstreams and string_view, I mean.... Just why? I also try to avoid using too much external libraries and tend to reinvent the wheel a bit but... you have tools for that...

Glad Joe Armstrong never got to read that before dying because that would have killed him

@newt Well, I have an acquaintance that is indiscriminately rewriting all of his software in a language he made that have no standard library and is only focused in making small executable and brags his "hello world" program is only 40bytes twice a day sooooo (cc @selea knows who I mean)

@Archivist @selea if it's his software, then whatever. If he's paid for writing that, he's an asshole.

@newt @selea Hopefully, the famous Maxi will never find an actual job given his coding habits, he would temper his C++ code with more assembly than is reasonable

@newt you didn't say that the shell script has 10 times the vulnerabilities and is 180kloc!

@musicmatze it doesn't. It's like a hundred lines, give or take.

Sign in to participate in the conversation
niu.moe

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !