So I had an eyeball at the various graphs of activity on ohloh
(eg https://www.ohloh.net/p/parrot/commits/summary )
and thought that probably last month by the crude measure of "number of
commits", Perl 6 probably now had more activity than the Perl 5 core.
(ie just activity on git://perl5.git.perl.org/perl.git )

So I've written a number cruncher to check this, and it's surprising.
If you take MoarVM + NQP + Rakudo + Roast, and compare that with Perl 5,
there has been


    more Perl 6 activity every month this year.


Not just September.


I've added a couple more columns for Parrot, and for the combined repository
for IronRuby & IronPython (git://github.com/IronLanguages/main)

These are figures for blead/nom/master:

          MoarVM     nqp  rakudo   roast   (sum)  perl 5  parrot   Iron*
Sep 2013     276     116     168     139     699     528       7      48
Aug 2013     373     124     224     120     841     601       8       3
Jul 2013     166     137     254      95     652     592       5       0
Jun 2013     119     165     226      99     609     465      23       0
May 2013      98     147     220     100     565     528      19       1
Apr 2013     198     156     152      47     553      74      58       3
Mar 2013     111      74     185      64     434     228      45       5
Feb 2013     105     197      71      34     407     206      17       9
Jan 2013     135     101     145      89     470     282     123       0
Dec 2012      36      35     115      56     242     440     220       4
Nov 2012      25      22     115      71     233     612      25       0
Oct 2012      31     112     132      46     321     310      65       0
Sep 2012      11      91     105      28     235     400     184       2
Aug 2012     129     223     188      47     587     479      96       8
Jul 2012     257     190     293     124     864     288      44      11
Jun 2012     383      99     209      78     769     813     210      62
May 2012      99     161     256     148     664     426     366      27
Apr 2012      52     103     171      91     417     201     144      35
Mar 2012       0      23     175     100     298     242     243      36
Feb 2012       0     202     190     150     542     401      45      49
Jan 2012       0     138     202     369     709     520     117      30


These are figures for commits reachable from all currently mirrored branches:

          MoarVM     nqp  rakudo   roast   (sum)  perl 5  parrot   Iron*
Sep 2013     329     143     173     139     784     629       7      51
Aug 2013     383     131     230     121     865     658       8      13
Jul 2013     166     139     262     102     669     640      14      10
Jun 2013     119     165     226      99     609     643      43       8
May 2013      98     147     222     100     567     747      19       5
Apr 2013     198     171     152      47     568      81      60      14
Mar 2013     111     124     219      64     518     287      52       5
Feb 2013     105     214      74      34     427     248      97      19
Jan 2013     135     102     148      90     475     359     227       4
Dec 2012      36      41     115      56     248     455     245       9
Nov 2012      25      22     115      71     233     690      52       2
Oct 2012      31     112     132      46     321     436     284       8
Sep 2012      11      92     108      28     239     434     219       3
Aug 2012     129     224     190      47     590     536     102       8
Jul 2012     257     192     297     124     870     321      54      14
Jun 2012     383     101     218      78     780     857     256      83
May 2012      99     165     260     148     672     605     531      38
Apr 2012      52     103     171      91     417     285     331      58
Mar 2012       0      46     179     100     325     278     337      63
Feb 2012       0     202     190     150     542     413      50      62
Jan 2012       0     138     213     369     720     542     181      30


Number cruncher attached.

I think that my figures differ from Ohloh's because I'm doing the calculation
"now", not each month, and git is attributing to months based on commit date.
So any work that was rebased and then merged will be attributed to the date
of rebasing. I think that this is partly why April is relatively barren in
Perl 5 land - because branch activity in April was rebased onto v5.19.0 in
May before merging.


Nicholas Clark
#!/usr/bin/perl -w

my $all = shift;

use POSIX qw(ctime mktime strftime);

sub count_revisions {
    my ($repo, $after, $before, $all) = @_;
    my @heads;
    if ($all) {
        @heads = `git --git-dir $repo show-ref --heads --hash`;
        chomp @heads;
    } else {
        @heads = 'HEAD';
    }
    # Yes, I know I can do this with git rev-list but this one is easier to
    # debug:
    my @command = ('git', '--git-dir', $repo , 'log', '--format=oneline',
                   '--after', $after, '--before', $before, @heads);
    # print "\n@command\n";
    open my $fh, '-|', @command
        or die "Can't start @command";
    my $count = 0;
    ++$count while <$fh>;
    close $fh
        or die "Can't stop @command";
    $count;
}

# This is a hack :-)
my $sum;
my @repos = (qw(MoarVM nqp rakudo roast), sub { $sum }, qw(perl parrot main));
my %map = (perl => 'perl 5', main => 'Iron*');
print "        ";
foreach my $name (@repos) {
    $name = '(sum)'
        if ref $name;
    printf "%8s", $map{$name} ? $map{$name} : $name;
}
print "\n";

my $now = time;

foreach my $year (2013, 2012) {
    foreach my $mon (reverse 1..12) {
        my $before_t = mktime(0, 0, 0, 1, $mon, $year - 1900);
        # Is the end of the time range in the future?
        next
            if $before_t > $now;
        my $before = ctime($before_t);
        my $after = ctime(mktime(0, 0, 0, 1, $mon -1, $year - 1900));

        $sum = 0;
        print strftime("%b %Y", 0, 0, 0, 1, $mon - 1, $year - 1900);
        foreach my $repo (qw(MoarVM nqp rakudo roast), sub { $sum },
                          qw(perl parrot main)) {
            my $count;
            if (ref $repo) {
                $count = $repo->();
            } else {
                $count = count_revisions("$repo.git", $after, $before, $all);
                $sum += $count;
            }
            printf "%8d", $count;
        }
        print "\n";
    }
}

Reply via email to