From 41fe0673c76c3d392adb694cac0832e42ea7f36a Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 5 Jun 2014 16:01:52 -0700 Subject: [PATCH] contributors: simplify using histogram. --- extra/contributors/contributors.factor | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/extra/contributors/contributors.factor b/extra/contributors/contributors.factor index 1ca62beef3..7e4287b4d0 100644 --- a/extra/contributors/contributors.factor +++ b/extra/contributors/contributors.factor @@ -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 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 simple-table. ;