Re: Clair Grant on VMS code base

Liste des GroupesRevenir à co vms 
Sujet : Re: Clair Grant on VMS code base
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vms
Date : 17. Apr 2025, 13:37:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtqslm$j0ll$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
On 4/16/2025 9:29 PM, Dan Cross wrote:
In article <67fee5b8$0$708$14726298@news.sunsite.dk>,
Arne Vajhøj  <arne@vajhoej.dk> wrote:
There is no question that it is most accurate to only
count the continued line as one in your example.
>
But I suspect that a lot of LOC counters just count
non-blank and non-comment.
>
Anything else requires language knowledge.
>
And while it for Fortran, Basic, Macro-32 may be relative
simple, then for other languages it can become more tricky.
>
Let us take 4 times Pascal:
>
if a = 1 then b := 2 else b := 3;
>
if a = 1 then
    b := 2
else
    b := 3;
>
if a = 1 then begin
    b := 2;
end else begin
    b := 3;
end;
>
if a = 1 then
begin
    b := 2;
end
else
begin
    b := 3;
end;
>
How many lines? I would say that the most correct is 3 in
all 4 cases. But coding the line counter to return that
would require it to have Pascal knowledge.
>
And what about the fluent style that are so modern?
>
o = f.create();
o.add(1);
o.add(2);
o.add(3);
>
o = f.create()
      .add(1)
      .add(2)
      .add(3);
>
o = f.create().add(1).add(2).add(3);
>
1 1 1 or 4 1 1 or 4 4 1 or 4 4 4??
>
So I think counters go for the simple approach and assume
that for large code bases with many developers then total
converge towards an "average" style.
 Most modern code-counting tools _are_ language aware.  Whether
they do a better or worse job for each given language may be a
matter of debate, but most at least recognize different
languages and have some knowledge of their semantics.
 Cf, https://github.com/XAMPPRocky/tokei?tab=readme-ov-file
https://github.com/AlDanial/cloc?tab=readme-ov-file#recognized-languages-
https://github.com/boyter/scc/blob/master/LANGUAGES.md
 etc.
Their language awareness consist of recognizing comments.
They are examples of some of those tools that simply count
non-blank non-comment lines.
(SCC also know some keywords but that is used for complexity
calculation not for line counting)
C:\Work>type demo.c
// C demo
#include <stdio.h>
int main()
{
     int a[] = {
         1,
         2,
         3
     };
     printf("%d %d %d\n",
         a[0],
         a[1],
         a[2]);
     return 0;
}
C:\Work>cloc-1.96 demo.c
        1 text file.
        1 unique file.
        0 files ignored.
github.com/AlDanial/cloc v 1.96  T=0.01 s (67.5 files/s, 1147.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment    code
-------------------------------------------------------------------------------
C                                1              2              1      14
-------------------------------------------------------------------------------
C:\Work>scc demo.c
───────────────────────────────────────────────────────────────────────────────
Language                 Files     Lines   Blanks  Comments     Code Complexity
───────────────────────────────────────────────────────────────────────────────
C                            1        17        2         1       14       0
───────────────────────────────────────────────────────────────────────────────
Total                        1        17        2         1       14       0
───────────────────────────────────────────────────────────────────────────────
Estimated Cost to Develop (organic) $305
Estimated Schedule Effort (organic) 0.63 months
Estimated People Required (organic) 0.04
───────────────────────────────────────────────────────────────────────────────
Processed 200 bytes, 0.000 megabytes (SI)
───────────────────────────────────────────────────────────────────────────────
C:\Work>tokei-x86_64-pc-windows-msvc demo.c
===============================================================================
  Language            Files        Lines         Code     Comments Blanks
===============================================================================
  C                       1           17           14            1       2
===============================================================================
  Total                   1           17           14            1       2
===============================================================================
Arne

Date Sujet#  Auteur
1 Apr 25 * Clair Grant on VMS code base55Arne Vajhøj
1 Apr 25 +* Re: Clair Grant on VMS code base5Dan Cross
1 Apr 25 i`* Re: Clair Grant on VMS code base4Arne Vajhøj
1 Apr 25 i +- Re: Clair Grant on VMS code base1Dan Cross
1 Apr 25 i `* Re: Clair Grant on VMS code base2Lawrence D'Oliveiro
2 Apr 25 i  `- Re: Clair Grant on VMS code base1Arne Vajhøj
3 Apr 25 `* Re: Clair Grant on VMS code base49Simon Clubley
3 Apr 25  +* Re: Clair Grant on VMS code base45Arne Vajhøj
4 Apr 25  i`* Re: Clair Grant on VMS code base44Simon Clubley
4 Apr 25  i +- Re: Clair Grant on VMS code base1Rich Alderson
7 Apr 25  i `* Re: Clair Grant on VMS code base42Arne Vajhøj
7 Apr 25  i  +- Re: Clair Grant on VMS code base1Arne Vajhøj
7 Apr 25  i  +* Re: Clair Grant on VMS code base3Lawrence D'Oliveiro
7 Apr 25  i  i`* Re: Clair Grant on VMS code base2Lawrence D'Oliveiro
7 Apr 25  i  i `- Re: Clair Grant on VMS code base1Arne Vajhøj
8 Apr 25  i  `* Re: Clair Grant on VMS code base37Simon Clubley
8 Apr 25  i   `* Re: Clair Grant on VMS code base36Arne Vajhøj
8 Apr 25  i    +- Re: Clair Grant on VMS code base1abrsvc
8 Apr 25  i    `* Re: Clair Grant on VMS code base34Simon Clubley
11 Apr 25  i     `* Re: Clair Grant on VMS code base33Arne Vajhøj
11 Apr 25  i      +- Re: Clair Grant on VMS code base1Arne Vajhøj
14 Apr 25  i      `* Re: Clair Grant on VMS code base31Simon Clubley
14 Apr 25  i       `* Re: Clair Grant on VMS code base30Dave Froble
14 Apr 25  i        +* Re: Clair Grant on VMS code base3Simon Clubley
16 Apr 25  i        i`* Re: Clair Grant on VMS code base2Dave Froble
17 Apr 25  i        i `- Re: Clair Grant on VMS code base1Dan Cross
16 Apr 25  i        `* Re: Clair Grant on VMS code base26Arne Vajhøj
17 Apr 25  i         `* Re: Clair Grant on VMS code base25Dan Cross
17 Apr 25  i          +* Re: Clair Grant on VMS code base18bill
17 Apr 25  i          i+* Re: Clair Grant on VMS code base6Arne Vajhøj
17 Apr 25  i          ii`* Re: Clair Grant on VMS code base5bill
17 Apr 25  i          ii +- Re: Clair Grant on VMS code base1Arne Vajhøj
17 Apr 25  i          ii `* Re: Clair Grant on VMS code base3Simon Clubley
17 Apr 25  i          ii  `* Re: Clair Grant on VMS code base2bill
17 Apr 25  i          ii   `- Re: Clair Grant on VMS code base1Simon Clubley
17 Apr 25  i          i`* Re: Clair Grant on VMS code base11Simon Clubley
17 Apr 25  i          i `* Re: Clair Grant on VMS code base10Arne Vajhøj
17 Apr 25  i          i  +* Re: Clair Grant on VMS code base4bill
17 Apr 25  i          i  i`* Re: Clair Grant on VMS code base3Arne Vajhøj
17 Apr 25  i          i  i `* Re: Clair Grant on VMS code base2bill
17 Apr 25  i          i  i  `- Re: Clair Grant on VMS code base1Arne Vajhøj
18 Apr 25  i          i  `* Re: Clair Grant on VMS code base5Lawrence D'Oliveiro
18 Apr 25  i          i   +* Re: Clair Grant on VMS code base3Arne Vajhøj
18 Apr 25  i          i   i+- Re: Clair Grant on VMS code base1Lawrence D'Oliveiro
19 Apr 25  i          i   i`- Re: Clair Grant on VMS code base1Waldek Hebisch
19 Apr 25  i          i   `- Re: Clair Grant on VMS code base1Waldek Hebisch
17 Apr 25  i          +* Re: Clair Grant on VMS code base4Arne Vajhøj
17 Apr 25  i          i`* Re: Clair Grant on VMS code base3Dan Cross
18 Apr 25  i          i `* Re: Clair Grant on VMS code base2Dave Froble
18 Apr 25  i          i  `- Re: Clair Grant on VMS code base1Dan Cross
17 Apr 25  i          `* Re: Clair Grant on VMS code base2Arne Vajhøj
17 Apr 25  i           `- Re: Clair Grant on VMS code base1Dan Cross
9 Apr 25  `* Re: Clair Grant on VMS code base3John Reagan
9 Apr 25   `* Re: Clair Grant on VMS code base2Lawrence D'Oliveiro
11 Apr 25    `- Re: Clair Grant on VMS code base1Arne Vajhøj

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal