<div dir="ltr">I tried to run `cloc` in the `compiler` folder and got this. Not sure how to further break down the Compiler into smaller modules.<div><br></div><div>```</div><div>➜ ghc git:(master) ✗ cloc compiler<br> 723 text files.<br> 655 unique files.<br> 68 files ignored.<br><br><a href="http://github.com/AlDanial/cloc">github.com/AlDanial/cloc</a> v 1.92 T=0.64 s (1025.4 files/s, 716024.5 lines/s)<br>-------------------------------------------------------------------------------<br>Language files blank comment code<br>-------------------------------------------------------------------------------<br>Haskell 635 68541 147036 224747<br>yacc 2 971 10 5024<br>Logos 3 530 0 3642<br>Pascal 1 661 936 2312<br>C/C++ Header 7 187 304 1512<br>Puppet 1 106 0 445<br>make 2 47 84 187<br>C 3 11 16 37<br>YAML 1 6 10 18<br>-------------------------------------------------------------------------------<br>SUM: 655 71060 148396 237924<br>-------------------------------------------------------------------------------<br></div><div>```</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">-Haisheng</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 14, 2022 at 9:14 AM Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com">simon.peytonjones@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Indeed cool. <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><ul><li>Can it do numeric breakdowns too? Like I needed for my talk?</li><li>Can it distinguish code from comments?</li></ul><div>Simon<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 14 Jun 2022 at 16:04, Bryan Richter <bryan@haskell.foundation> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div>
<p>A quick googling discovered
<a href="https://githubnext.com/projects/repo-visualization" target="_blank">https://githubnext.com/projects/repo-visualization</a>, which has some
of the desired features. :)</p>
<p>(CC'ing the author and team mentioned in the article, too.)<br>
</p>
<p>Has:</p>
<p>* very visual<br>
* subdirectory breakdown<br>
* filetype breakdown</p>
<p>Doesn't have:</p>
<p>* Separating code from comments<br>
* History is listed under "future work"<br>
* Drop-in support for gitlab (it's presented as a GitHub Action)<br>
</p>
<p>The article has an interactive widget you can point at a repo. I
pointed it at ghc/ghc, and although my browser is still churning
ten minutes later, here's a preview. It's pretty cool!<br>
</p>
<p><img src="cid:18162fe8289266268641" alt=""></p>
<p><br>
</p>
<div>On 14/06/2022 16:20, Hécate wrote:<br>
</div>
<blockquote type="cite">
<p>I'm taking the liberty of forwarding this to Bryan, as he's in
a unique position to help on this front. :) <br>
</p>
<div>Le 14/06/2022 à 16:18, Simon Peyton
Jones a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks Hecate. I used
your figures in my talk. Really helpful.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"> A note to all
ghc-devs: it's be lovely to have a regularly-updated summary
visualisation of GHC's source code:</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">
<ul>
<li>Separating code from comments</li>
<li>Broken up by sub-directory</li>
<li>As visual as possible</li>
<li>Ideally with some kind of historical time-line ability</li>
</ul>
<div>This can't be new. Zillions of GitHub repositories
could be visualised like this. There must be prior art;
probably a lot of it. Can we just press a button and get
it?<br>
</div>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">Simon<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, 10 Jun 2022 at
17:45, Hécate <<a href="mailto:hecate@glitchbra.in" target="_blank">hecate@glitchbra.in</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div>
<p>If you don't have a nix shell handy, here is what I'm
getting:<br>
<font face="monospace"><br>
❯ cloc compiler rts driver <br>
1148 text files.<br>
1137 unique
files. <br>
108 files ignored.<br>
<br>
<a href="http://github.com/AlDanial/cloc" target="_blank">github.com/AlDanial/cloc</a>
v 1.88 T=1.31 s (794.3 files/s, 431269.4 lines/s)<br>
---------------------------------------------------------------------------------------<br>
Language files
blank comment code<br>
---------------------------------------------------------------------------------------<br>
Haskell 635
68541 140216 231567<br>
C 158
10529 16953 51162<br>
C/C++ Header 209
4329 8984 14536<br>
yacc 2
971 10 5024<br>
Logos 3
530 0 3642<br>
Pascal 1
661 936 2312<br>
make 14
252 409 850<br>
Windows Module Definition 7
27 0 489<br>
Assembly 5
76 269 478<br>
Puppet 1
106 0 445<br>
Python 1
32 19 162<br>
D 1
16 42 60<br>
YAML
1 6 10 18<br>
Lisp
1 2 4 7<br>
Windows Resource File
1 0 0 1<br>
---------------------------------------------------------------------------------------<br>
SUM: 1040
86078 167852 310753<br>
---------------------------------------------------------------------------------------</font><br>
</p>
<div>Le 10/06/2022 à 18:29, chessai a écrit :<br>
</div>
<blockquote type="cite">
<div dir="auto">You might be able to do something with
cloc and a shell script for a rough estimate.
<div dir="auto"><br>
</div>
<div dir="auto">```</div>
<div dir="auto">$ cd ghc</div>
<div dir="auto">$ nix-shell -p clock --run "cloc ."</div>
<div dir="auto">```</div>
<div dir="auto"><br>
</div>
<div dir="auto">will output a detailed report of the
loc and language breakdown of the top level ghc
directory (it is comment-aware and aware of many
languages). there might be a way to get cloc or a
similar tool to output something more inspect able
(eg json), and then use a shell script to gather
everything from the appropriate directories/files. </div>
<div dir="auto"><br>
</div>
<div dir="auto">I suspect something could be hacked up
in less than a day, but it would require a bit of
research. Hopefully this is helpful and gets you
going - I'd be happy to hear of better solutions.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thanks</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Jun 10,
2022, 11:20 Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com" target="_blank">simon.peytonjones@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div class="gmail_default" style="font-family:tahoma,sans-serif">Dear GHC
devs<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">Is it
possible to get a "lines-of-code" summary of GHC
these days? Like the one below, from 2011. <br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">It needs
more than `wc` because it's helpful to split
lines of code from lines of comments and notes.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">We used to
have `count_lines` but I'm not sure whether it
is still extant. <br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">I'm giving
a talk at Zurihac on Sunday morning, about the
internals of GHC. Any data before then,
preferably in a form comparable to that below,
would be terrific.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">But you
have a lot else to do. This isn't do-or-die,
just nice to have.<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">Simon<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><img src="cid:18162fe828acb971f162" alt="image.png" width="525" height="542"><br>
<br>
</div>
</div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" rel="noreferrer" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
ghc-devs mailing list
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a>
</pre>
</blockquote>
<pre cols="72">--
Hécate ✨
🐦: @TechnoEmpress
IRC: Hecate
WWW: <a href="https://glitchbra.in" target="_blank">https://glitchbra.in</a>
RUN: BSD</pre>
</div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote>
</div>
</blockquote>
<pre cols="72">--
Hécate ✨
🐦: @TechnoEmpress
IRC: Hecate
WWW: <a href="https://glitchbra.in" target="_blank">https://glitchbra.in</a>
RUN: BSD</pre>
</blockquote>
</div>
</blockquote></div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>