]> gitweb.factorcode.org Git - factor.git/commitdiff
contributors: simplify using histogram.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 5 Jun 2014 23:01:52 +0000 (16:01 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 6 Jun 2014 04:01:57 +0000 (21:01 -0700)
extra/contributors/contributors.factor

index 1ca62beef396e8050d9e9e3232ef021e4b7336a0..7e4287b4d07cd709cd69a1f1674ef3b7ab07894b 100644 (file)
@@ -1,22 +1,18 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.files io.launcher io.directories io.pathnames
-io.encodings.ascii io prettyprint hashtables kernel sequences
-assocs system sorting math.parser sets ;
+USING: io io.directories io.encodings.ascii io.launcher
+io.pathnames math.statistics prettyprint sequences sorting
+system ;
 IN: contributors
 
 : changelog ( -- authors )
     image parent-directory [
-        "git log --no-merges --pretty=format:%an" ascii <process-reader> stream-lines
+        "git log --no-merges --pretty=format:%an"
+        ascii [ lines ] with-process-reader
     ] with-directory ;
 
-: patch-counts ( authors -- assoc )
-    dup members
-    [ dup rot [ = ] with count ] with
-    { } map>assoc ;
-
 : contributors ( -- )
-    changelog patch-counts
+    changelog histogram
     sort-values <reversed>
     simple-table. ;