3 ms·
Where did the author get the idea that fish is 200k SLOC? They're wildly mis-counting. Yes, `cloc` on a fresh checkout of fish-shell says there's 200k lines, b
by eridius 10y ago
Where did the author get the idea that fish is 200k SLOC? They're wildly mis-counting.
Yes, `cloc` on a fresh checkout of fish-shell says there's 200k lines, but most of that isn't fish-shell source. Fully half of that is from PCRE. And if I run `cloc` on just the `src` directory I get 39k lines.
- adamrt 10y agoQ: Where did the author get the idea that fish is 200k SLOC? A: 'cloc' on a fresh checkout of fish-shell says there's 200k lines. ;)
- majewsky 10y agoNo matter how many of these lines you label as "fish" and "not-fish", they somehow all end up in "/usr/bin/fish".
- eridius 10y agoThat's not particularly meaningful. The author was making a statement about shell complexity by using lines of code, not making a statement about binary size. The fact that there's 113k CLOC of PCRE in there is pretty irrelevant to talking about the complexity of Fish itself.
- i80and 10y agoWell, not necessarily. The linker will strip out any symbols that aren't actually used, which may indeed be a non-inconsequential chunk of fish's bundled dependencies.
- the_qbit 10y agoAuthor here :) - I did all of the counts using the source tree (from tarball or cvs) of the respective shells. Using just the `src` tree doesn't cut it imo, especially for fish, it installs lots of python scripts (fish_configure which sets up a python webserver, fish_update_completions which calls create_manpage_completions.py.. etc). Those count, and they are not included inthe src tree.
- eridius 10y ago`cloc` on the `share` folder (which contains all of the python webserver scripts) only adds another 10k. Also I'm not sure those should count when talking about shell complexity, because nearly all of that is strictly a helper tool that most people don't actually even run (fish_config), so isn't particularly meaningful for your day-to-day running of the shell. Or to put it another way, running `cloc` on the full checkout is extremely misleading. You're counting PCRE and other stuff that aren't particularly relevant to talking about shell complexity. Find the specific folders you do care about (which I still maintain is just the src/ folder) and run `cloc` on those specific folders, not on the full checkout.