Skip to content

Instantly share code, notes, and snippets.

@Xliff
Last active February 7, 2022 21:44
Show Gist options
  • Save Xliff/9a93ab12c32aceb67c195eab49c47f2d to your computer and use it in GitHub Desktop.
Save Xliff/9a93ab12c32aceb67c195eab49c47f2d to your computer and use it in GitHub Desktop.
On project sizes and ecosystems...

I did a bit of downloading over the weekend, and after downloading the ecosystem repository, fixing update.p6 with the following patch:

diff --git a/update.p6 b/update.p6
index 8d42270..e8f5088 100644
--- a/update.p6
+++ b/update.p6
@@ -2,7 +2,7 @@ use v6;
 use JSON::Tiny;
 
 sub run-or-die($x) {
-    run $x and die "Failed running '$x'"
+    shell $x or die "Failed running '$x'"
 }
 
 my @modules;
@@ -10,10 +10,11 @@ my @modules;
 my $fh = open('META.list');
 for $fh.lines -> $url {
     run-or-die "wget $url";
-    my $info = from-json(slurp('META.info'));
+    my $meta-file = $url.split('/').tail;
+    my $info = from-json(slurp($meta-file));
     @modules.push($info);
     say $info.perl;
-    unlink 'META.info';
+    unlink $meta-file;
 }
 
 given open('projects.json', :w) {

Dornloading the entire list of ecosystem projects using the following oneliner:

use JSON::Fast; for from-json("projects.json".IO.slurp)[] { try shell "git clone { .<source-url> }" }

Then running the following script on the result:

use File::Find; 
for dir() { 
  next unless .d; 
  chdir(.absolute); 
  print "{ .basename }: "; 
  find( dir => ".", name => { .ends-with(".pm6" | ".raku" | ".rakumod" | ".pl6" | ".pm" | ".pl" ) } ).map( 
    *.lines 
  ).sum.say
}

I discovered that the largest raku program in the ecosystem is Intl-CLDR at 11439 lines.

It shocked me to discover I've got 16 unreleased projects of that size and larger:

ICal	20783
GLib	36507
ATK	6344
GIO	57014
SOUP	13418
GUPnP	12474
GDK	15698
GtkPlus	89689
SourceViewGTK	11666
WebkitGTK	15282
Clutter	28588
GStreamer	66237
ICal-GLib	18788
GDA	13760
EDS	44901
X11	19623

...with another 2 that are very close behind:

GooCanvas	11420	
COGL	11312

Why haven't they been released yet?

Well... short story: they aren't ready yet. Could use some help getting them there, but that isn't the point of this post.

Actually, I'm not really sure what the point of this "post" really is.

GNOME developers might find some of these names familiar, though.

And maybe that's the point after all.

EDIT: I actually mistakenly treated the url nodes as if they were path nodes. URLs are separated by "/" and only "/", so the reference to $*SPEC was a mistake. It has been replaced with the proper code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment