From bf89287dd9569fc7dc15b4d2ddfe8474aa038863 Mon Sep 17 00:00:00 2001 From: Adam Russell Date: Tue, 16 Apr 2019 17:16:27 -0400 Subject: solutions for challenge 004 --- challenge-004/adam-russell/blog.txt | 1 + challenge-004/adam-russell/perl5/ch-1.pl | 34 ++++++++++++++++++++ challenge-004/adam-russell/perl5/ch-2.pl | 55 ++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 challenge-004/adam-russell/blog.txt create mode 100644 challenge-004/adam-russell/perl5/ch-1.pl create mode 100644 challenge-004/adam-russell/perl5/ch-2.pl diff --git a/challenge-004/adam-russell/blog.txt b/challenge-004/adam-russell/blog.txt new file mode 100644 index 0000000000..4c79e37d17 --- /dev/null +++ b/challenge-004/adam-russell/blog.txt @@ -0,0 +1 @@ +https://adamcrussell.livejournal.com/1247.html diff --git a/challenge-004/adam-russell/perl5/ch-1.pl b/challenge-004/adam-russell/perl5/ch-1.pl new file mode 100644 index 0000000000..9150261c6b --- /dev/null +++ b/challenge-004/adam-russell/perl5/ch-1.pl @@ -0,0 +1,34 @@ +use strict; +use warnings; +## +# Write a script to output the same number of PI digits as the size of your script. +# Say, if your script size is 10, it should print 3.141592653. +## +use bignum; + +sub pi{ + my($max) = @_; + my @digits; + my($k, $a, $b, $a1, $b1) = (2, 4, 1, 12, 4); + while(@digits < $max){ + my($p, $q) = ($k ** 2, 2 * $k + 1); + $k = $k + 1; + ($a, $b , $a1, $b1) = ($a1, $b1, $p * $a + $q * $a1, $p * $b + $q * $b1); + my($d, $d1) = (int($a/$b), int($a1/$b1)); + while($d == $d1){ + push @digits, $d; + if(@digits >= $max){ + return \@digits; + } + ($a, $a1) = (10 * ($a % $b), 10 * ($a1 % $b1)); + ($d, $d1) = (int($a / $b), int($a1 / $b1)); + } + } + return \@digits; +} + +## +# Main +## +my $digits=pi((stat($0))[7]); +print $digits->[0] . "." . join("", @{$digits}[1 .. @{$digits} - 1]); diff --git a/challenge-004/adam-russell/perl5/ch-2.pl b/challenge-004/adam-russell/perl5/ch-2.pl new file mode 100644 index 0000000000..75e57258d4 --- /dev/null +++ b/challenge-004/adam-russell/perl5/ch-2.pl @@ -0,0 +1,55 @@ +use strict; +use warnings; +## +# You are given a file containing a list of words (case insensitive 1 word per line) +# and a list of letters. Print each word from the file than can be made using only +# letters from the list. You can use each letter only once (though there can be +# duplicates and you can use each of them once), you don’t have to use all the letters. +## +use boolean; + +my @words=qw| + cat + mouse + rabbit + horse + sheep + cow + aardvark +|; + +my @letters = qw| + a b c e h i o p r s t w b e z +|; + +sub contains_remove{ + my($c) = @_; + return sub{ + my($word) = @_; + $word =~ s/$c//; + return $word; + } +} + +my @checks; +for my $c (@letters){ + push @checks, contains_remove(lc($c)); +} + +sub check_word{ + my($word, $checks) = @_; + if($word && !@{$checks}){ + return false; + } + $word = &{$checks->[0]}($word); + if(!$word){ + return true; + } + check_word($word, [@{$checks}[1 .. @{$checks} - 1]]); +} + +for my $w (@words){ + if(check_word(lc($w), \@checks)){ + print "$w\n"; + } +} -- cgit From e2906991cabbe70178f9991ef50a74ef0babd662 Mon Sep 17 00:00:00 2001 From: Oleksii Tsvietnov Date: Wed, 17 Apr 2019 07:18:26 +0200 Subject: Fix typo in my name --- challenge-001/oleksii-tsvietnov/README | 1 + challenge-001/oleksii-tsvietnov/perl5/ch-1.sh | 2 ++ challenge-001/oleksii-tsvietnov/perl5/ch-2.sh | 2 ++ challenge-001/oleskii-tsvietnov/README | 1 - challenge-001/oleskii-tsvietnov/perl5/ch-1.sh | 2 -- challenge-001/oleskii-tsvietnov/perl5/ch-2.sh | 2 -- challenge-002/oleksii-tsvietnov/README | 1 + challenge-002/oleskii-tsvietnov/README | 1 - challenge-003/oleksii-tsvietnov/README | 1 + challenge-003/oleskii-tsvietnov/README | 1 - challenge-004/oleksii-tsvietnov/README | 1 + challenge-004/oleskii-tsvietnov/README | 1 - members.json | 2 +- stats/pwc-challenge-001.json | 8 ++++---- stats/pwc-master-stats.json | 2 +- stats/pwc-summary-31-60.json | 2 +- stats/pwc-summary.json | 2 +- 17 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 challenge-001/oleksii-tsvietnov/README create mode 100644 challenge-001/oleksii-tsvietnov/perl5/ch-1.sh create mode 100644 challenge-001/oleksii-tsvietnov/perl5/ch-2.sh delete mode 100644 challenge-001/oleskii-tsvietnov/README delete mode 100644 challenge-001/oleskii-tsvietnov/perl5/ch-1.sh delete mode 100644 challenge-001/oleskii-tsvietnov/perl5/ch-2.sh create mode 100644 challenge-002/oleksii-tsvietnov/README delete mode 100644 challenge-002/oleskii-tsvietnov/README create mode 100644 challenge-003/oleksii-tsvietnov/README delete mode 100644 challenge-003/oleskii-tsvietnov/README create mode 100644 challenge-004/oleksii-tsvietnov/README delete mode 100644 challenge-004/oleskii-tsvietnov/README diff --git a/challenge-001/oleksii-tsvietnov/README b/challenge-001/oleksii-tsvietnov/README new file mode 100644 index 0000000000..113183cc6d --- /dev/null +++ b/challenge-001/oleksii-tsvietnov/README @@ -0,0 +1 @@ +Solution by Oleksii Tsvietnov diff --git a/challenge-001/oleksii-tsvietnov/perl5/ch-1.sh b/challenge-001/oleksii-tsvietnov/perl5/ch-1.sh new file mode 100644 index 0000000000..07af007e03 --- /dev/null +++ b/challenge-001/oleksii-tsvietnov/perl5/ch-1.sh @@ -0,0 +1,2 @@ +echo 'Perl Weekly Challenge' | perl -lna -E 'say "Replaced " . s/e/E/g . " times. The result is " . $_' + diff --git a/challenge-001/oleksii-tsvietnov/perl5/ch-2.sh b/challenge-001/oleksii-tsvietnov/perl5/ch-2.sh new file mode 100644 index 0000000000..bad792c9dd --- /dev/null +++ b/challenge-001/oleksii-tsvietnov/perl5/ch-2.sh @@ -0,0 +1,2 @@ +perl -E 'say join("\n", map { $_ % 3 ? ($_ % 5 ? $_ : "$_ buzz") : ($_ % 5 ? "$_ fizz" : "$_ fizz buzz")} 1..20)' + diff --git a/challenge-001/oleskii-tsvietnov/README b/challenge-001/oleskii-tsvietnov/README deleted file mode 100644 index aa464c1841..0000000000 --- a/challenge-001/oleskii-tsvietnov/README +++ /dev/null @@ -1 +0,0 @@ -Solution by Oleskii Tsvietnov diff --git a/challenge-001/oleskii-tsvietnov/perl5/ch-1.sh b/challenge-001/oleskii-tsvietnov/perl5/ch-1.sh deleted file mode 100644 index 07af007e03..0000000000 --- a/challenge-001/oleskii-tsvietnov/perl5/ch-1.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo 'Perl Weekly Challenge' | perl -lna -E 'say "Replaced " . s/e/E/g . " times. The result is " . $_' - diff --git a/challenge-001/oleskii-tsvietnov/perl5/ch-2.sh b/challenge-001/oleskii-tsvietnov/perl5/ch-2.sh deleted file mode 100644 index bad792c9dd..0000000000 --- a/challenge-001/oleskii-tsvietnov/perl5/ch-2.sh +++ /dev/null @@ -1,2 +0,0 @@ -perl -E 'say join("\n", map { $_ % 3 ? ($_ % 5 ? $_ : "$_ buzz") : ($_ % 5 ? "$_ fizz" : "$_ fizz buzz")} 1..20)' - diff --git a/challenge-002/oleksii-tsvietnov/README b/challenge-002/oleksii-tsvietnov/README new file mode 100644 index 0000000000..113183cc6d --- /dev/null +++ b/challenge-002/oleksii-tsvietnov/README @@ -0,0 +1 @@ +Solution by Oleksii Tsvietnov diff --git a/challenge-002/oleskii-tsvietnov/README b/challenge-002/oleskii-tsvietnov/README deleted file mode 100644 index aa464c1841..0000000000 --- a/challenge-002/oleskii-tsvietnov/README +++ /dev/null @@ -1 +0,0 @@ -Solution by Oleskii Tsvietnov diff --git a/challenge-003/oleksii-tsvietnov/README b/challenge-003/oleksii-tsvietnov/README new file mode 100644 index 0000000000..113183cc6d --- /dev/null +++ b/challenge-003/oleksii-tsvietnov/README @@ -0,0 +1 @@ +Solution by Oleksii Tsvietnov diff --git a/challenge-003/oleskii-tsvietnov/README b/challenge-003/oleskii-tsvietnov/README deleted file mode 100644 index aa464c1841..0000000000 --- a/challenge-003/oleskii-tsvietnov/README +++ /dev/null @@ -1 +0,0 @@ -Solution by Oleskii Tsvietnov diff --git a/challenge-004/oleksii-tsvietnov/README b/challenge-004/oleksii-tsvietnov/README new file mode 100644 index 0000000000..113183cc6d --- /dev/null +++ b/challenge-004/oleksii-tsvietnov/README @@ -0,0 +1 @@ +Solution by Oleksii Tsvietnov diff --git a/challenge-004/oleskii-tsvietnov/README b/challenge-004/oleskii-tsvietnov/README deleted file mode 100644 index aa464c1841..0000000000 --- a/challenge-004/oleskii-tsvietnov/README +++ /dev/null @@ -1 +0,0 @@ -Solution by Oleskii Tsvietnov diff --git a/members.json b/members.json index 412140426b..6243667f43 100644 --- a/members.json +++ b/members.json @@ -53,7 +53,7 @@ "neil-bowers" : "Neil Bowers", "nick-logan" : "Nick Logan", "ohmycloud" : "Chenyf", - "oleskii-tsvietnov" : "Oleskii Tsvitenov", + "oleksii-tsvietnov" : "Oleksii Tsvietnov", "ozzy" : "Ozzy", "pavel-jurca" : "Pavel Jurca", "pete-houston" : "Pete Houston", diff --git a/stats/pwc-challenge-001.json b/stats/pwc-challenge-001.json index d1058e24cd..3bc6a147cd 100644 --- a/stats/pwc-challenge-001.json +++ b/stats/pwc-challenge-001.json @@ -428,8 +428,8 @@ ] }, { - "name" : "Oleskii Tsvitenov", - "id" : "Oleskii Tsvitenov", + "name" : "Oleksii Tsvietnov", + "id" : "Oleksii Tsvietnov", "data" : [ [ "Perl 5", @@ -790,8 +790,8 @@ }, { "y" : 2, - "drilldown" : "Oleskii Tsvitenov", - "name" : "Oleskii Tsvitenov" + "drilldown" : "Oleksii Tsvietnov", + "name" : "Oleksii Tsvietnov" }, { "y" : 2, diff --git a/stats/pwc-master-stats.json b/stats/pwc-master-stats.json index 2870449522..1221780f1b 100644 --- a/stats/pwc-master-stats.json +++ b/stats/pwc-master-stats.json @@ -234,7 +234,7 @@ "Neil Bowers", "Nick Logan", "Chenyf", - "Oleskii Tsvitenov", + "Oleksii Tsvietnov", "Ozzy", "Pavel Jurca", "Pete Houston", diff --git a/stats/pwc-summary-31-60.json b/stats/pwc-summary-31-60.json index 9cc30d454d..ce454e96e2 100644 --- a/stats/pwc-summary-31-60.json +++ b/stats/pwc-summary-31-60.json @@ -36,7 +36,7 @@ "Neil Bowers", "Nick Logan", "Chenyf", - "Oleskii Tsvitenov", + "Oleksii Tsvietnov", "Ozzy", "Pavel Jurca", "Pete Houston", diff --git a/stats/pwc-summary.json b/stats/pwc-summary.json index b750ccdad2..278c9da37b 100644 --- a/stats/pwc-summary.json +++ b/stats/pwc-summary.json @@ -54,7 +54,7 @@ "Neil Bowers", "Nick Logan", "Chenyf", - "Oleskii Tsvitenov", + "Oleksii Tsvietnov", "Ozzy", "Pavel Jurca", "Pete Houston", -- cgit From ce9121ac9792b2e378f4f95e880c8cd0f80dadaa Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 17 Apr 2019 12:02:56 +0100 Subject: - Added solutions by Arne Sommer. --- challenge-004/arne-sommer/perl6/ch-1.p6 | 1 + challenge-004/arne-sommer/perl6/ch-2.p6 | 32 ++++++++++++++++++++++ challenge-004/arne-sommer/perl6/lib/.precomp/.lock | 0 challenge-004/arne-sommer/perl6/lib/PiXL.pm6 | 7 +++++ challenge-004/arne-sommer/perl6/say-pi-module | 7 +++++ challenge-004/arne-sommer/perl6/words.txt | 10 +++++++ 6 files changed, 57 insertions(+) create mode 100755 challenge-004/arne-sommer/perl6/ch-1.p6 create mode 100755 challenge-004/arne-sommer/perl6/ch-2.p6 create mode 100644 challenge-004/arne-sommer/perl6/lib/.precomp/.lock create mode 100644 challenge-004/arne-sommer/perl6/lib/PiXL.pm6 create mode 100755 challenge-004/arne-sommer/perl6/say-pi-module create mode 100644 challenge-004/arne-sommer/perl6/words.txt diff --git a/challenge-004/arne-sommer/perl6/ch-1.p6 b/challenge-004/arne-sommer/perl6/ch-1.p6 new file mode 100755 index 0000000000..baff33cc40 --- /dev/null +++ b/challenge-004/arne-sommer/perl6/ch-1.p6 @@ -0,0 +1 @@ +say pi.fmt('%.19f') \ No newline at end of file diff --git a/challenge-004/arne-sommer/perl6/ch-2.p6 b/challenge-004/arne-sommer/perl6/ch-2.p6 new file mode 100755 index 0000000000..3d65286eb7 --- /dev/null +++ b/challenge-004/arne-sommer/perl6/ch-2.p6 @@ -0,0 +1,32 @@ +#! /usr/bin/env perl6 + +my @letters; +my %words is SetHash; + +for lines() -> $word-or-character +{ + if $word-or-character.chars == 1 + { + @letters.push($word-or-character.lc); + } + else + { + %words{$word-or-character.lc} = True; + } +} + +my $max-length = %words.keys>>.chars.max; + +my %seen; + +for @letters.combinations: 2 .. $max-length -> $candidate +{ + my $word = $candidate.join; + next if %seen{$word}; + %seen{$word} = True; + + for $word.comb.permutations.map(*.join).sort.unique -> $possible + { + say $possible if %words{$possible}; + } +} \ No newline at end of file diff --git a/challenge-004/arne-sommer/perl6/lib/.precomp/.lock b/challenge-004/arne-sommer/perl6/lib/.precomp/.lock new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-004/arne-sommer/perl6/lib/PiXL.pm6 b/challenge-004/arne-sommer/perl6/lib/PiXL.pm6 new file mode 100644 index 0000000000..f1faecb735 --- /dev/null +++ b/challenge-004/arne-sommer/perl6/lib/PiXL.pm6 @@ -0,0 +1,7 @@ +use v6.d; + +unit module PiXL; + +our constant $PI is export = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989"; + + diff --git a/challenge-004/arne-sommer/perl6/say-pi-module b/challenge-004/arne-sommer/perl6/say-pi-module new file mode 100755 index 0000000000..4cb72278d1 --- /dev/null +++ b/challenge-004/arne-sommer/perl6/say-pi-module @@ -0,0 +1,7 @@ +#! /usr/bin/env perl6 + +use lib "lib"; + +use PiXL; + +say $PI.substr(0, $?FILE.IO.s -1); diff --git a/challenge-004/arne-sommer/perl6/words.txt b/challenge-004/arne-sommer/perl6/words.txt new file mode 100644 index 0000000000..dc21c5df52 --- /dev/null +++ b/challenge-004/arne-sommer/perl6/words.txt @@ -0,0 +1,10 @@ +abba +axiom +a +b +b +a +cello +bab +x +f -- cgit From a1c80eb6ce84bd979f17cfc758906e5d9becc1b5 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 17 Apr 2019 12:05:17 +0100 Subject: - Added blog entry by Arne Sommer. --- challenge-004/arne-sommer/blog.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 challenge-004/arne-sommer/blog.txt diff --git a/challenge-004/arne-sommer/blog.txt b/challenge-004/arne-sommer/blog.txt new file mode 100644 index 0000000000..07d9033ef7 --- /dev/null +++ b/challenge-004/arne-sommer/blog.txt @@ -0,0 +1 @@ +https://perl6.eu/piermutations.html -- cgit From 897710568e03b17be3b088767783e50bd9991c7f Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 17 Apr 2019 12:06:46 +0100 Subject: - Updated chart stats. --- stats/pwc-current.json | 142 ++++++++++++++++++++------------- stats/pwc-summary-1-30.json | 118 +++++++++++++-------------- stats/pwc-summary-31-60.json | 56 ++++++------- stats/pwc-summary-61-90.json | 55 +++++++------ stats/pwc-summary.json | 185 ++++++++++++++++++++++--------------------- 5 files changed, 296 insertions(+), 260 deletions(-) diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 5c1df0a936..1850fdbd1f 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,32 +1,57 @@ { + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } + }, + "chart" : { + "type" : "column" + }, + "xAxis" : { + "type" : "category" + }, "series" : [ { - "name" : "Champions", "colorByPoint" : 1, + "name" : "Champions", "data" : [ { - "drilldown" : "Abigail", "name" : "Abigail", - "y" : 2 + "y" : 2, + "drilldown" : "Abigail" }, { - "name" : "Athanasius", "y" : 2, - "drilldown" : "Athanasius" + "name" : "Adam Russell", + "drilldown" : "Adam Russell" }, { + "drilldown" : "Arne Sommer", "y" : 2, + "name" : "Arne Sommer" + }, + { + "drilldown" : "Athanasius", + "name" : "Athanasius", + "y" : 2 + }, + { "name" : "Francis Whittle", + "y" : 2, "drilldown" : "Francis Whittle" }, { "drilldown" : "Dr James A. Smith", - "name" : "Dr James A. Smith", - "y" : 4 + "y" : 4, + "name" : "Dr James A. Smith" }, { - "name" : "Jo Christian Oterhals", "y" : 4, + "name" : "Jo Christian Oterhals", "drilldown" : "Jo Christian Oterhals" }, { @@ -40,49 +65,42 @@ "name" : "Kivanc Yazan" }, { - "drilldown" : "Matt Latusek", + "y" : 2, "name" : "Matt Latusek", - "y" : 2 + "drilldown" : "Matt Latusek" }, { "drilldown" : "Maxim Kolodyazhny", - "y" : 1, - "name" : "Maxim Kolodyazhny" + "name" : "Maxim Kolodyazhny", + "y" : 1 } ] } ], - "xAxis" : { - "type" : "category" + "title" : { + "text" : "Perl Weekly Challenge - 004" + }, + "legend" : { + "enabled" : 0 + }, + "subtitle" : { + "text" : "[Champions: 11] Last updated at 2019-04-17 11:05:33 GMT" }, "yAxis" : { "title" : { "text" : "Total Solutions" } }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } - }, - "chart" : { - "type" : "column" - }, - "subtitle" : { - "text" : "[Champions: 9] Last updated at 2019-04-16 16:26:05 GMT" - }, - "legend" : { - "enabled" : 0 + "tooltip" : { + "headerFormat" : "{series.name}
", + "followPointer" : 1, + "pointerFormat" : "{point.name}: {point.y:f}
" }, "drilldown" : { "series" : [ { - "name" : "Abigail", "id" : "Abigail", + "name" : "Abigail", "data" : [ [ "Perl 5", @@ -91,8 +109,8 @@ ] }, { - "name" : "Athanasius", - "id" : "Athanasius", + "id" : "Adam Russell", + "name" : "Adam Russell", "data" : [ [ "Perl 5", @@ -101,17 +119,36 @@ ] }, { - "name" : "Francis Whittle", "data" : [ [ "Perl 6", 2 ] ], - "id" : "Francis Whittle" + "name" : "Arne Sommer", + "id" : "Arne Sommer" + }, + { + "data" : [ + [ + "Perl 5", + 2 + ] + ], + "name" : "Athanasius", + "id" : "Athanasius" + }, + { + "id" : "Francis Whittle", + "data" : [ + [ + "Perl 6", + 2 + ] + ], + "name" : "Francis Whittle" }, { - "name" : "Dr James A. Smith", "id" : "Dr James A. Smith", "data" : [ [ @@ -122,7 +159,8 @@ "Perl 6", 2 ] - ] + ], + "name" : "Dr James A. Smith" }, { "data" : [ @@ -135,57 +173,49 @@ 2 ] ], - "id" : "Jo Christian Oterhals", - "name" : "Jo Christian Oterhals" + "name" : "Jo Christian Oterhals", + "id" : "Jo Christian Oterhals" }, { - "id" : "John Barrett", "data" : [ [ "Perl 5", 2 ] ], - "name" : "John Barrett" + "name" : "John Barrett", + "id" : "John Barrett" }, { + "id" : "Kivanc Yazan", "name" : "Kivanc Yazan", "data" : [ [ "Perl 5", 1 ] - ], - "id" : "Kivanc Yazan" + ] }, { "name" : "Matt Latusek", - "id" : "Matt Latusek", "data" : [ [ "Perl 5", 2 ] - ] + ], + "id" : "Matt Latusek" }, { + "name" : "Maxim Kolodyazhny", "data" : [ [ "Perl 5", 1 ] ], - "id" : "Maxim Kolodyazhny", - "name" : "Maxim Kolodyazhny" + "id" : "Maxim Kolodyazhny" } ] - }, - "tooltip" : { - "followPointer" : 1, - "pointerFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
" - }, - "title" : { - "text" : "Perl Weekly Challenge - 004" } } diff --git a/stats/pwc-summary-1-30.json b/stats/pwc-summary-1-30.json index 07aebcff05..b7f1f6160c 100644 --- a/stats/pwc-summary-1-30.json +++ b/stats/pwc-summary-1-30.json @@ -1,64 +1,17 @@ { - "title" : { - "text" : "Perl Weekly Challenge - 2019" - }, - "chart" : { - "type" : "column" - }, - "yAxis" : { - "title" : { - "text" : "" - }, - "min" : 0 - }, - "tooltip" : { - "shared" : 1, - "pointFormat" : "{series.name}: {point.y}
" - }, - "xAxis" : { - "categories" : [ - "Abigail", - "Adam Russell", - "Ailbhe Tweedie", - "Alex Daniel", - "Alexander Karelas", - "Alexey Melezhik", - "Andrezgz", - "Antonio Gamiz", - "Arne Sommer", - "Arpad Toth", - "Athanasius", - "Aubrey Quarcoo", - "Bill Palmer", - "Bob Kleemann", - "Clive Holloway", - "Daniel Mantovani", - "Dave Cross", - "Dave Jacoby", - "David Kayal", - "Doug Schrag", - "Duncan C. White", - "Eddy HS", - "Finley", - "Francis Whittle", - "Fred Zinn", - "Freddie B", - "Gustavo Chaves", - "Jacques Guinnebault", - "Jaime Corchado", - "Jaldhar H. Vyas" - ] + "subtitle" : { + "text" : "[Champions: 30] Last updated at 2019-04-17 11:05:33 GMT" }, "series" : [ { - "name" : "Perl 5", "data" : [ 2, - 6, + 8, 3, 0, 0, 0, + 0, 6, 0, 0, @@ -81,9 +34,9 @@ 3, 3, 0, - 2, - 6 - ] + 2 + ], + "name" : "Perl 5" }, { "name" : "Perl 6", @@ -95,8 +48,9 @@ 0, 0, 0, + 0, 2, - 4, + 6, 0, 0, 0, @@ -116,8 +70,7 @@ 0, 0, 0, - 0, - 6 + 0 ] } ], @@ -126,7 +79,54 @@ "stacking" : "percent" } }, - "subtitle" : { - "text" : "[Champions: 30] Last updated at 2019-04-16 16:26:06 GMT" + "yAxis" : { + "title" : { + "text" : "" + }, + "min" : 0 + }, + "title" : { + "text" : "Perl Weekly Challenge - 2019" + }, + "tooltip" : { + "shared" : 1, + "pointFormat" : "{series.name}: {point.y}
" + }, + "chart" : { + "type" : "column" + }, + "xAxis" : { + "categories" : [ + "Abigail", + "Adam Russell", + "Ailbhe Tweedie", + "Alex Daniel", + "Alexander Karelas", + "Alexey Melezhik", + "Alicia Bielsa", + "Andrezgz", + "Antonio Gamiz", + "Arne Sommer", + "Arpad Toth", + "Athanasius", + "Aubrey Quarcoo", + "Bill Palmer", + "Bob Kleemann", + "Clive Holloway", + "Daniel Mantovani", + "Dave Cross", + "Dave Jacoby", + "David Kayal", + "Doug Schrag", + "Duncan C. White", + "Eddy HS", + "Finley", + "Francis Whittle", + "Fred Zinn", + "Freddie B", + "Gustavo Chaves", + "Jacques Guinnebault", + "Jaime Corchado" + ] } } diff --git a/stats/pwc-summary-31-60.json b/stats/pwc-summary-31-60.json index ce454e96e2..35456d999c 100644 --- a/stats/pwc-summary-31-60.json +++ b/stats/pwc-summary-31-60.json @@ -1,18 +1,7 @@ { - "subtitle" : { - "text" : "[Champions: 30] Last updated at 2019-04-16 16:26:06 GMT" - }, - "tooltip" : { - "shared" : 1, - "pointFormat" : "{series.name}: {point.y}
" - }, - "plotOptions" : { - "column" : { - "stacking" : "percent" - } - }, "xAxis" : { "categories" : [ + "Jaldhar H. Vyas", "Dr James A. Smith", "Jeff", "Jeremy Carman", @@ -41,13 +30,32 @@ "Pavel Jurca", "Pete Houston", "Philippe Bruhat", - "Prajith P", - "Robert Gratza" + "Prajith P" ] }, + "chart" : { + "type" : "column" + }, + "yAxis" : { + "min" : 0, + "title" : { + "text" : "" + } + }, + "title" : { + "text" : "Perl Weekly Challenge - 2019" + }, + "tooltip" : { + "shared" : 1, + "pointFormat" : "{series.name}: {point.y}
" + }, + "subtitle" : { + "text" : "[Champions: 30] Last updated at 2019-04-17 11:05:33 GMT" + }, "series" : [ { "data" : [ + 6, 8, 2, 2, @@ -76,13 +84,13 @@ 2, 3, 4, - 2, 2 ], "name" : "Perl 5" }, { "data" : [ + 6, 8, 0, 1, @@ -111,22 +119,14 @@ 0, 0, 0, - 0, - 2 + 0 ], "name" : "Perl 6" } ], - "title" : { - "text" : "Perl Weekly Challenge - 2019" - }, - "yAxis" : { - "title" : { - "text" : "" - }, - "min" : 0 - }, - "chart" : { - "type" : "column" + "plotOptions" : { + "column" : { + "stacking" : "percent" + } } } diff --git a/stats/pwc-summary-61-90.json b/stats/pwc-summary-61-90.json index 526c694ead..773b526ae8 100644 --- a/stats/pwc-summary-61-90.json +++ b/stats/pwc-summary-61-90.json @@ -1,22 +1,28 @@ { - "yAxis" : { - "min" : 0, - "title" : { - "text" : "" - } - }, "chart" : { "type" : "column" }, - "title" : { - "text" : "Perl Weekly Challenge - 2019" - }, - "subtitle" : { - "text" : "[Champions: 12] Last updated at 2019-04-16 16:26:06 GMT" + "xAxis" : { + "categories" : [ + "Robert Gratza", + "Ruben Westerberg", + "Sean Meininger", + "Sergio Iglesias", + "Simon Proctor", + "Simon Reinhardt", + "Steve Rogerson", + "Steven Lembark", + "Steven Wilson", + "Tiago Stock", + "Tore Andersson", + "Veesh Goldman", + "William Gilmore" + ] }, "series" : [ { "data" : [ + 2, 4, 0, 4, @@ -35,6 +41,7 @@ { "name" : "Perl 6", "data" : [ + 2, 4, 3, 0, @@ -50,29 +57,25 @@ ] } ], - "xAxis" : { - "categories" : [ - "Ruben Westerberg", - "Sean Meininger", - "Sergio Iglesias", - "Simon Proctor", - "Simon Reinhardt", - "Steve Rogerson", - "Steven Lembark", - "Steven Wilson", - "Tiago Stock", - "Tore Andersson", - "Veesh Goldman", - "William Gilmore" - ] + "subtitle" : { + "text" : "[Champions: 13] Last updated at 2019-04-17 11:05:33 GMT" }, "plotOptions" : { "column" : { "stacking" : "percent" } }, + "title" : { + "text" : "Perl Weekly Challenge - 2019" + }, "tooltip" : { "shared" : 1, "pointFormat" : "{series.name}: {point.y}
" + }, + "yAxis" : { + "title" : { + "text" : "" + }, + "min" : 0 } } diff --git a/stats/pwc-summary.json b/stats/pwc-summary.json index 278c9da37b..bacd39d365 100644 --- a/stats/pwc-summary.json +++ b/stats/pwc-summary.json @@ -1,79 +1,10 @@ { - "xAxis" : { - "categories" : [ - "Abigail", - "Adam Russell", - "Ailbhe Tweedie", - "Alex Daniel", - "Alexander Karelas", - "Alexey Melezhik", - "Andrezgz", - "Antonio Gamiz", - "Arne Sommer", - "Arpad Toth", - "Athanasius", - "Aubrey Quarcoo", - "Bill Palmer", - "Bob Kleemann", - "Clive Holloway", - "Daniel Mantovani", - "Dave Cross", - "Dave Jacoby", - "David Kayal", - "Doug Schrag", - "Duncan C. White", - "Eddy HS", - "Finley", - "Francis Whittle", - "Fred Zinn", - "Freddie B", - "Gustavo Chaves", - "Jacques Guinnebault", - "Jaime Corchado", - "Jaldhar H. Vyas", - "Dr James A. Smith", - "Jeff", - "Jeremy Carman", - "Jim Bacon", - "JJ Merelo", - "Jo Christian Oterhals", - "Joelle Maslak", - "John Barrett", - "Juan Caballero", - "Khalid", - "Kian-Meng Ang", - "Kivanc Yazan", - "Lars Balker", - "Laurent Rosenfeld", - "Magnus Woldrich", - "Mark Senn", - "Martin Mugeni", - "Matt Latusek", - "Maxim Kolodyazhny", - "Michael Schaap", - "Neil Bowers", - "Nick Logan", - "Chenyf", - "Oleksii Tsvietnov", - "Ozzy", - "Pavel Jurca", - "Pete Houston", - "Philippe Bruhat", - "Prajith P", - "Robert Gratza", - "Ruben Westerberg", - "Sean Meininger", - "Sergio Iglesias", - "Simon Proctor", - "Simon Reinhardt", - "Steve Rogerson", - "Steven Lembark", - "Steven Wilson", - "Tiago Stock", - "Tore Andersson", - "Veesh Goldman", - "William Gilmore" - ] + "tooltip" : { + "pointFormat" : "{series.name}: {point.y}
", + "shared" : 1 + }, + "subtitle" : { + "text" : "[Champions: 73] Last updated at 2019-04-17 11:05:33 GMT" }, "yAxis" : { "title" : { @@ -81,20 +12,17 @@ }, "min" : 0 }, - "plotOptions" : { - "column" : { - "stacking" : "percent" - } - }, "series" : [ { + "name" : "Perl 5", "data" : [ 2, - 6, + 8, 3, 0, 0, 0, + 0, 6, 0, 0, @@ -161,11 +89,9 @@ 2, 3, 1 - ], - "name" : "Perl 5" + ] }, { - "name" : "Perl 6", "data" : [ 0, 0, @@ -174,8 +100,9 @@ 0, 0, 0, + 0, 2, - 4, + 6, 0, 0, 0, @@ -239,12 +166,86 @@ 0, 0, 0 - ] + ], + "name" : "Perl 6" } ], - "tooltip" : { - "pointFormat" : "{series.name}: {point.y}
", - "shared" : 1 + "xAxis" : { + "categories" : [ + "Abigail", + "Adam Russell", + "Ailbhe Tweedie", + "Alex Daniel", + "Alexander Karelas", + "Alexey Melezhik", + "Alicia Bielsa", + "Andrezgz", + "Antonio Gamiz", + "Arne Sommer", + "Arpad Toth", + "Athanasius", + "Aubrey Quarcoo", + "Bill Palmer", + "Bob Kleemann", + "Clive Holloway", + "Daniel Mantovani", + "Dave Cross", + "Dave Jacoby", + "David Kayal", + "Doug Schrag", + "Duncan C. White", + "Eddy HS", + "Finley", + "Francis Whittle", + "Fred Zinn", + "Freddie B", + "Gustavo Chaves", + "Jacques Guinnebault", + "Jaime Corchado", + "Jaldhar H. Vyas", + "Dr James A. Smith", + "Jeff", + "Jeremy Carman", + "Jim Bacon", + "JJ Merelo", + "Jo Christian Oterhals", + "Joelle Maslak", + "John Barrett", + "Juan Caballero", + "Khalid", + "Kian-Meng Ang", + "Kivanc Yazan", + "Lars Balker", + "Laurent Rosenfeld", + "Magnus Woldrich", + "Mark Senn", + "Martin Mugeni", + "Matt Latusek", + "Maxim Kolodyazhny", + "Michael Schaap", + "Neil Bowers", + "Nick Logan", + "Chenyf", + "Oleksii Tsvietnov", + "Ozzy", + "Pavel Jurca", + "Pete Houston", + "Philippe Bruhat", + "Prajith P", + "Robert Gratza", + "Ruben Westerberg", + "Sean Meininger", + "Sergio Iglesias", + "Simon Proctor", + "Simon Reinhardt", + "Steve Rogerson", + "Steven Lembark", + "Steven Wilson", + "Tiago Stock", + "Tore Andersson", + "Veesh Goldman", + "William Gilmore" + ] }, "title" : { "text" : "Perl Weekly Challenge - 2019" @@ -252,7 +253,9 @@ "chart" : { "type" : "column" }, - "subtitle" : { - "text" : "[Champions: 72] Last updated at 2019-04-16 16:26:05 GMT" + "plotOptions" : { + "column" : { + "stacking" : "percent" + } } } -- cgit From a47aa568a18d7f8d49f19d0b3d25ad1b02154725 Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Wed, 17 Apr 2019 08:37:41 -0500 Subject: Initial solution to week 4 challenge 1 --- challenge-004/joelle-maslak/perl6/ch-1.pl6 | 1 + challenge-004/joelle-maslak/perl6/ch-1.readme | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 challenge-004/joelle-maslak/perl6/ch-1.pl6 create mode 100644 challenge-004/joelle-maslak/perl6/ch-1.readme diff --git a/challenge-004/joelle-maslak/perl6/ch-1.pl6 b/challenge-004/joelle-maslak/perl6/ch-1.pl6 new file mode 100644 index 0000000000..64f351d24e --- /dev/null +++ b/challenge-004/joelle-maslak/perl6/ch-1.pl6 @@ -0,0 +1 @@ +say 3~'.'~ :32<35IPR975H1E3E2K2GQK0D32I3C1U7N>; diff --git a/challenge-004/joelle-maslak/perl6/ch-1.readme b/challenge-004/joelle-maslak/perl6/ch-1.readme new file mode 100644 index 0000000000..83b38b9a4d --- /dev/null +++ b/challenge-004/joelle-maslak/perl6/ch-1.readme @@ -0,0 +1,3 @@ +The program, including line feeds, is 48 bytes long. +The output on Unix is 48 bytes long, including the line ending. On Windows you +may need to save the file with native line endings for it to match. -- cgit From 719f14b4250df28d79c89317ca24a3c08a119500 Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Wed, 17 Apr 2019 08:43:08 -0500 Subject: Rename to p6 --- challenge-004/joelle-maslak/perl6/ch-1.p6 | 1 + challenge-004/joelle-maslak/perl6/ch-1.pl6 | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 challenge-004/joelle-maslak/perl6/ch-1.p6 delete mode 100644 challenge-004/joelle-maslak/perl6/ch-1.pl6 diff --git a/challenge-004/joelle-maslak/perl6/ch-1.p6 b/challenge-004/joelle-maslak/perl6/ch-1.p6 new file mode 100644 index 0000000000..64f351d24e --- /dev/null +++ b/challenge-004/joelle-maslak/perl6/ch-1.p6 @@ -0,0 +1 @@ +say 3~'.'~ :32<35IPR975H1E3E2K2GQK0D32I3C1U7N>; diff --git a/challenge-004/joelle-maslak/perl6/ch-1.pl6 b/challenge-004/joelle-maslak/perl6/ch-1.pl6 deleted file mode 100644 index 64f351d24e..0000000000 --- a/challenge-004/joelle-maslak/perl6/ch-1.pl6 +++ /dev/null @@ -1 +0,0 @@ -say 3~'.'~ :32<35IPR975H1E3E2K2GQK0D32I3C1U7N>; -- cgit From f20c4295dd66a80e38c2b4e594b630935b896614 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 17 Apr 2019 14:50:51 +0100 Subject: - Updated chart stats. --- challenge-004/joelle-maslak/perl6/ch-1-readme | 3 + challenge-004/joelle-maslak/perl6/ch-1.readme | 3 - stats/pwc-current.json | 235 ++++++++++++++------------ stats/pwc-summary-1-30.json | 110 ++++++------ stats/pwc-summary-31-60.json | 94 +++++------ stats/pwc-summary-61-90.json | 20 +-- stats/pwc-summary.json | 46 ++--- 7 files changed, 263 insertions(+), 248 deletions(-) create mode 100644 challenge-004/joelle-maslak/perl6/ch-1-readme delete mode 100644 challenge-004/joelle-maslak/perl6/ch-1.readme diff --git a/challenge-004/joelle-maslak/perl6/ch-1-readme b/challenge-004/joelle-maslak/perl6/ch-1-readme new file mode 100644 index 0000000000..83b38b9a4d --- /dev/null +++ b/challenge-004/joelle-maslak/perl6/ch-1-readme @@ -0,0 +1,3 @@ +The program, including line feeds, is 48 bytes long. +The output on Unix is 48 bytes long, including the line ending. On Windows you +may need to save the file with native line endings for it to match. diff --git a/challenge-004/joelle-maslak/perl6/ch-1.readme b/challenge-004/joelle-maslak/perl6/ch-1.readme deleted file mode 100644 index 83b38b9a4d..0000000000 --- a/challenge-004/joelle-maslak/perl6/ch-1.readme +++ /dev/null @@ -1,3 +0,0 @@ -The program, including line feeds, is 48 bytes long. -The output on Unix is 48 bytes long, including the line ending. On Windows you -may need to save the file with native line endings for it to match. diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 1850fdbd1f..1b8d648b7b 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,106 +1,12 @@ { - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 - } - }, - "chart" : { - "type" : "column" - }, - "xAxis" : { - "type" : "category" - }, - "series" : [ - { - "colorByPoint" : 1, - "name" : "Champions", - "data" : [ - { - "name" : "Abigail", - "y" : 2, - "drilldown" : "Abigail" - }, - { - "y" : 2, - "name" : "Adam Russell", - "drilldown" : "Adam Russell" - }, - { - "drilldown" : "Arne Sommer", - "y" : 2, - "name" : "Arne Sommer" - }, - { - "drilldown" : "Athanasius", - "name" : "Athanasius", - "y" : 2 - }, - { - "name" : "Francis Whittle", - "y" : 2, - "drilldown" : "Francis Whittle" - }, - { - "drilldown" : "Dr James A. Smith", - "y" : 4, - "name" : "Dr James A. Smith" - }, - { - "y" : 4, - "name" : "Jo Christian Oterhals", - "drilldown" : "Jo Christian Oterhals" - }, - { - "drilldown" : "John Barrett", - "y" : 2, - "name" : "John Barrett" - }, - { - "drilldown" : "Kivanc Yazan", - "y" : 1, - "name" : "Kivanc Yazan" - }, - { - "y" : 2, - "name" : "Matt Latusek", - "drilldown" : "Matt Latusek" - }, - { - "drilldown" : "Maxim Kolodyazhny", - "name" : "Maxim Kolodyazhny", - "y" : 1 - } - ] - } - ], "title" : { "text" : "Perl Weekly Challenge - 004" }, - "legend" : { - "enabled" : 0 - }, - "subtitle" : { - "text" : "[Champions: 11] Last updated at 2019-04-17 11:05:33 GMT" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "tooltip" : { - "headerFormat" : "{series.name}
", - "followPointer" : 1, - "pointerFormat" : "{point.name}: {point.y:f}
" - }, "drilldown" : { "series" : [ { - "id" : "Abigail", "name" : "Abigail", + "id" : "Abigail", "data" : [ [ "Perl 5", @@ -109,8 +15,8 @@ ] }, { - "id" : "Adam Russell", "name" : "Adam Russell", + "id" : "Adam Russell", "data" : [ [ "Perl 5", @@ -125,8 +31,8 @@ 2 ] ], - "name" : "Arne Sommer", - "id" : "Arne Sommer" + "id" : "Arne Sommer", + "name" : "Arne Sommer" }, { "data" : [ @@ -135,21 +41,20 @@ 2 ] ], - "name" : "Athanasius", - "id" : "Athanasius" + "id" : "Athanasius", + "name" : "Athanasius" }, { "id" : "Francis Whittle", + "name" : "Francis Whittle", "data" : [ [ "Perl 6", 2 ] - ], - "name" : "Francis Whittle" + ] }, { - "id" : "Dr James A. Smith", "data" : [ [ "Perl 5", @@ -160,7 +65,8 @@ 2 ] ], - "name" : "Dr James A. Smith" + "name" : "Dr James A. Smith", + "id" : "Dr James A. Smith" }, { "data" : [ @@ -176,6 +82,16 @@ "name" : "Jo Christian Oterhals", "id" : "Jo Christian Oterhals" }, + { + "name" : "Joelle Maslak", + "id" : "Joelle Maslak", + "data" : [ + [ + "Perl 6", + 1 + ] + ] + }, { "data" : [ [ @@ -187,35 +103,134 @@ "id" : "John Barrett" }, { - "id" : "Kivanc Yazan", - "name" : "Kivanc Yazan", "data" : [ [ "Perl 5", 1 ] - ] + ], + "name" : "Kivanc Yazan", + "id" : "Kivanc Yazan" }, { - "name" : "Matt Latusek", "data" : [ [ "Perl 5", 2 ] ], - "id" : "Matt Latusek" + "id" : "Matt Latusek", + "name" : "Matt Latusek" }, { - "name" : "Maxim Kolodyazhny", "data" : [ [ "Perl 5", 1 ] ], + "name" : "Maxim Kolodyazhny", "id" : "Maxim Kolodyazhny" } ] + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "xAxis" : { + "type" : "category" + }, + "subtitle" : { + "text" : "[Champions: 12] Last updated at 2019-04-17 13:50:10 GMT" + }, + "tooltip" : { + "headerFormat" : "{series.name}
", + "pointerFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1 + }, + "series" : [ + { + "data" : [ + { + "y" : 2, + "name" : "Abigail", + "drilldown" : "Abigail" + }, + { + "y" : 2, + "name" : "Adam Russell", + "drilldown" : "Adam Russell" + }, + { + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", + "y" : 2 + }, + { + "drilldown" : "Athanasius", + "name" : "Athanasius", + "y" : 2 + }, + { + "y" : 2, + "name" : "Francis Whittle", + "drilldown" : "Francis Whittle" + }, + { + "name" : "Dr James A. Smith", + "drilldown" : "Dr James A. Smith", + "y" : 4 + }, + { + "name" : "Jo Christian Oterhals", + "drilldown" : "Jo Christian Oterhals", + "y" : 4 + }, + { + "drilldown" : "Joelle Maslak", + "name" : "Joelle Maslak", + "y" : 1 + }, + { + "name" : "John Barrett", + "drilldown" : "John Barrett", + "y" : 2 + }, + { + "name" : "Kivanc Yazan", + "drilldown" : "Kivanc Yazan", + "y" : 1 + }, + { + "name" : "Matt Latusek", + "drilldown" : "Matt Latusek", + "y" : 2 + }, + { + "y" : 1, + "name" : "Maxim Kolodyazhny", + "drilldown" : "Maxim Kolodyazhny" + } + ], + "colorByPoint" : 1, + "name" : "Champions" + } + ], + "legend" : { + "enabled" : 0 + }, + "chart" : { + "type" : "column" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } } } diff --git a/stats/pwc-summary-1-30.json b/stats/pwc-summary-1-30.json index b7f1f6160c..05f8df589a 100644 --- a/stats/pwc-summary-1-30.json +++ b/stats/pwc-summary-1-30.json @@ -1,6 +1,58 @@ { + "tooltip" : { + "shared" : 1, + "pointFormat" : "{series.name}: {point.y}
" + }, "subtitle" : { - "text" : "[Champions: 30] Last updated at 2019-04-17 11:05:33 GMT" + "text" : "[Champions: 30] Last updated at 2019-04-17 13:50:10 GMT" + }, + "plotOptions" : { + "column" : { + "stacking" : "percent" + } + }, + "yAxis" : { + "title" : { + "text" : "" + }, + "min" : 0 + }, + "title" : { + "text" : "Perl Weekly Challenge - 2019" + }, + "xAxis" : { + "categories" : [ + "Abigail", + "Adam Russell", + "Ailbhe Tweedie", + "Alex Daniel", + "Alexander Karelas", + "Alexey Melezhik", + "Alicia Bielsa", + "Andrezgz", + "Antonio Gamiz", + "Arne Sommer", + "Arpad Toth", + "Athanasius", + "Aubrey Quarcoo", + "Bill Palmer", + "Bob Kleemann", + "Clive Holloway", + "Daniel Mantovani", + "Dave Cross", + "Dave Jacoby", + "David Kayal", + "Doug Schrag", + "Duncan C. White", + "Eddy HS", + "Finley", + "Francis Whittle", + "Fred Zinn", + "Freddie B", + "Gustavo Chaves", + "Jacques Guinnebault", + "Jaime Corchado" + ] }, "series" : [ { @@ -39,7 +91,6 @@ "name" : "Perl 5" }, { - "name" : "Perl 6", "data" : [ 0, 0, @@ -71,62 +122,11 @@ 0, 0, 0 - ] + ], + "name" : "Perl 6" } ], - "plotOptions" : { - "column" : { - "stacking" : "percent" - } - }, - "yAxis" : { - "title" : { - "text" : "" - }, - "min" : 0 - }, - "title" : { - "text" : "Perl Weekly Challenge - 2019" - }, - "tooltip" : { - "shared" : 1, - "pointFormat" : "{series.name}: {point.y}
" - }, "chart" : { "type" : "column" - }, - "xAxis" : { - "categories" : [ - "Abigail", - "Adam Russell", - "Ailbhe Tweedie", - "Alex Daniel", - "Alexander Karelas", - "Alexey Melezhik", - "Alicia Bielsa", - "Andrezgz", - "Antonio Gamiz", - "Arne Sommer", - "Arpad Toth", - "Athanasius", - "Aubrey Quarcoo", - "Bill Palmer", - "Bob Kleemann", - "Clive Holloway", - "Daniel Mantovani", - "Dave Cross", - "Dave Jacoby", - "David Kayal", - "Doug Schrag", - "Duncan C. White", - "Eddy HS", - "Finley", - "Francis Whittle", - "Fred Zinn", - "Freddie B", - "Gustavo Chaves", - "Jacques Guinnebault", - "Jaime Corchado" - ] } } diff --git a/stats/pwc-summary-31-60.json b/stats/pwc-summary-31-60.json index 35456d999c..ec4bd42020 100644 --- a/stats/pwc-summary-31-60.json +++ b/stats/pwc-summary-31-60.json @@ -1,40 +1,6 @@ { - "xAxis" : { - "categories" : [ - "Jaldhar H. Vyas", - "Dr James A. Smith", - "Jeff", - "Jeremy Carman", - "Jim Bacon", - "JJ Merelo", - "Jo Christian Oterhals", - "Joelle Maslak", - "John Barrett", - "Juan Caballero", - "Khalid", - "Kian-Meng Ang", - "Kivanc Yazan", - "Lars Balker", - "Laurent Rosenfeld", - "Magnus Woldrich", - "Mark Senn", - "Martin Mugeni", - "Matt Latusek", - "Maxim Kolodyazhny", - "Michael Schaap", - "Neil Bowers", - "Nick Logan", - "Chenyf", - "Oleksii Tsvietnov", - "Ozzy", - "Pavel Jurca", - "Pete Houston", - "Philippe Bruhat", - "Prajith P" - ] - }, - "chart" : { - "type" : "column" + "title" : { + "text" : "Perl Weekly Challenge - 2019" }, "yAxis" : { "min" : 0, @@ -42,15 +8,20 @@ "text" : "" } }, - "title" : { - "text" : "Perl Weekly Challenge - 2019" + "subtitle" : { + "text" : "[Champions: 30] Last updated at 2019-04-17 13:50:10 GMT" + }, + "plotOptions" : { + "column" : { + "stacking" : "percent" + } }, "tooltip" : { - "shared" : 1, - "pointFormat" : "{series.name}: {point.y}
" + "pointFormat" : "{series.name}: {point.y}
", + "shared" : 1 }, - "subtitle" : { - "text" : "[Champions: 30] Last updated at 2019-04-17 11:05:33 GMT" + "chart" : { + "type" : "column" }, "series" : [ { @@ -97,7 +68,7 @@ 0, 1, 6, - 6, + 7, 0, 0, 0, @@ -124,9 +95,38 @@ "name" : "Perl 6" } ], - "plotOptions" : { - "column" : { - "stacking" : "percent" - } + "xAxis" : { + "categories" : [ + "Jaldhar H. Vyas", + "Dr James A. Smith", + "Jeff", + "Jeremy Carman", + "Jim Bacon", + "JJ Merelo", + "Jo Christian Oterhals", + "Joelle Maslak", + "John Barrett", + "Juan Caballero", + "Khalid", + "Kian-Meng Ang", + "Kivanc Yazan", + "Lars Balker", + "Laurent Rosenfeld", + "Magnus Woldrich", + "Mark Senn", + "Martin Mugeni", + "Matt Latusek", + "Maxim Kolodyazhny", + "Michael Schaap", + "Neil Bowers", + "Nick Logan", + "Chenyf", + "Oleksii Tsvietnov", + "Ozzy", + "Pavel Jurca", + "Pete Houston", + "Philippe Bruhat", + "Prajith P" + ] } } diff --git a/stats/pwc-summary-61-90.json b/stats/pwc-summary-61-90.json index 773b526ae8..e75205a96d 100644 --- a/stats/pwc-summary-61-90.json +++ b/stats/pwc-summary-61-90.json @@ -1,7 +1,4 @@ { - "chart" : { - "type" : "column" - }, "xAxis" : { "categories" : [ "Robert Gratza", @@ -19,8 +16,12 @@ "William Gilmore" ] }, + "chart" : { + "type" : "column" + }, "series" : [ { + "name" : "Perl 5", "data" : [ 2, 4, @@ -35,8 +36,7 @@ 2, 3, 1 - ], - "name" : "Perl 5" + ] }, { "name" : "Perl 6", @@ -58,20 +58,20 @@ } ], "subtitle" : { - "text" : "[Champions: 13] Last updated at 2019-04-17 11:05:33 GMT" + "text" : "[Champions: 13] Last updated at 2019-04-17 13:50:10 GMT" }, "plotOptions" : { "column" : { "stacking" : "percent" } }, + "tooltip" : { + "pointFormat" : "{series.name}: {point.y}
", + "shared" : 1 + }, "title" : { "text" : "Perl Weekly Challenge - 2019" }, - "tooltip" : { - "shared" : 1, - "pointFormat" : "{series.name}: {point.y}
" - }, "yAxis" : { "title" : { "text" : "" diff --git a/stats/pwc-summary.json b/stats/pwc-summary.json index bacd39d365..ac1f0f336f 100644 --- a/stats/pwc-summary.json +++ b/stats/pwc-summary.json @@ -1,20 +1,6 @@ { - "tooltip" : { - "pointFormat" : "{series.name}: {point.y}
", - "shared" : 1 - }, - "subtitle" : { - "text" : "[Champions: 73] Last updated at 2019-04-17 11:05:33 GMT" - }, - "yAxis" : { - "title" : { - "text" : "" - }, - "min" : 0 - }, "series" : [ { - "name" : "Perl 5", "data" : [ 2, 8, @@ -89,9 +75,11 @@ 2, 3, 1 - ] + ], + "name" : "Perl 5" }, { + "name" : "Perl 6", "data" : [ 0, 0, @@ -130,7 +118,7 @@ 0, 1, 6, - 6, + 7, 0, 0, 0, @@ -166,10 +154,25 @@ 0, 0, 0 - ], - "name" : "Perl 6" + ] } ], + "tooltip" : { + "shared" : 1, + "pointFormat" : "{series.name}: {point.y}
" + }, + "yAxis" : { + "min" : 0, + "title" : { + "text" : "" + } + }, + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "Perl Weekly Challenge - 2019" + }, "xAxis" : { "categories" : [ "Abigail", @@ -247,11 +250,8 @@ "William Gilmore" ] }, - "title" : { - "text" : "Perl Weekly Challenge - 2019" - }, - "chart" : { - "type" : "column" + "subtitle" : { + "text" : "[Champions: 73] Last updated at 2019-04-17 13:50:10 GMT" }, "plotOptions" : { "column" : { -- cgit From 4eaa114a267f89c8f9ff084444750863f9083ff9 Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Wed, 17 Apr 2019 08:51:49 -0500 Subject: I read the challenge a bit more carefully this time. :) --- challenge-004/joelle-maslak/perl6/ch-1.p6 | 2 +- challenge-004/joelle-maslak/perl6/ch-1.readme | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/challenge-004/joelle-maslak/perl6/ch-1.p6 b/challenge-004/joelle-maslak/perl6/ch-1.p6 index 64f351d24e..572504b65a 100644 --- a/challenge-004/joelle-maslak/perl6/ch-1.p6 +++ b/challenge-004/joelle-maslak/perl6/ch-1.p6 @@ -1 +1 @@ -say 3~'.'~ :32<35IPR975H1E3E2K2GQK0D32I3C1U7N>; +say 3~'.'~:32<35IPR975H1E3E2K2GQK0D32I3C1U7N> diff --git a/challenge-004/joelle-maslak/perl6/ch-1.readme b/challenge-004/joelle-maslak/perl6/ch-1.readme index 83b38b9a4d..d3f6e261ab 100644 --- a/challenge-004/joelle-maslak/perl6/ch-1.readme +++ b/challenge-004/joelle-maslak/perl6/ch-1.readme @@ -1,3 +1,2 @@ -The program, including line feeds, is 48 bytes long. -The output on Unix is 48 bytes long, including the line ending. On Windows you -may need to save the file with native line endings for it to match. +The program, including line feeds, is 46 bytes long. +The output on Unix is 46 pi digits. -- cgit From cad28964d06ce009dec1ca8b2111d80d514a8535 Mon Sep 17 00:00:00 2001 From: Daniel Mantovani Date: Wed, 17 Apr 2019 11:38:15 -0300 Subject: for ch-004 ch-1.pl --- challenge-004/daniel-mantovani/perl5/ch-1.pl | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 challenge-004/daniel-mantovani/perl5/ch-1.pl diff --git a/challenge-004/daniel-mantovani/perl5/ch-1.pl b/challenge-004/daniel-mantovani/perl5/ch-1.pl new file mode 100644 index 0000000000..95f950faf6 --- /dev/null +++ b/challenge-004/daniel-mantovani/perl5/ch-1.pl @@ -0,0 +1,8 @@ +my $n = 1000000; +my ( $x, $y, $area, $n2 ) = ( $n, 0, 0, $n * $n ); +while ( $x > 0 ) { + $y++ while $x * $x + $y * $y < $n2; + $area += $y; + $x--; +} +printf( "Pi whith 8 decimal places: %.8f\n", $area * 4 / $n2 ); \ No newline at end of file -- cgit From b7ade3b4aa6074c4023fb46db047be1f1b8a900a Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 17 Apr 2019 15:50:59 +0100 Subject: - Updated solutions by Arne Sommer. --- challenge-004/arne-sommer/perl6/ch-2-style-2.p6 | 23 +++++ challenge-004/arne-sommer/perl6/ch-2.p6 | 2 +- stats/pwc-current.json | 118 ++++++++++++------------ stats/pwc-summary-1-30.json | 50 +++++----- stats/pwc-summary-31-60.json | 94 +++++++++---------- stats/pwc-summary-61-90.json | 64 ++++++------- stats/pwc-summary.json | 42 ++++----- 7 files changed, 208 insertions(+), 185 deletions(-) create mode 100644 challenge-004/arne-sommer/perl6/ch-2-style-2.p6 mode change 100755 => 100644 challenge-004/arne-sommer/perl6/ch-2.p6 diff --git a/challenge-004/arne-sommer/perl6/ch-2-style-2.p6 b/challenge-004/arne-sommer/perl6/ch-2-style-2.p6 new file mode 100644 index 0000000000..eb1eb3f50e --- /dev/null +++ b/challenge-004/arne-sommer/perl6/ch-2-style-2.p6 @@ -0,0 +1,23 @@ +#! /usr/bin/env perl6 + +unit sub MAIN ($word-file where $word-file.IO.r, *@letters where @letters.elems >= 1); + +my %words is SetHash; + +%words{$_.lc} = True for $word-file.IO.lines(); + +my $max-length = %words.keys>>.chars.max; + +my %seen; + +for @letters.combinations: 1 .. $max-length -> $candidate +{ + my $word = $candidate.sort.join; + next if %seen{$word}; + %seen{$word} = True; + say "seen $word"; + for $word.comb.permutations.map(*.join).sort.unique -> $possible + { + say $possible if %words{$possible}; + } +} diff --git a/challenge-004/arne-sommer/perl6/ch-2.p6 b/challenge-004/arne-sommer/perl6/ch-2.p6 old mode 100755 new mode 100644 index 3d65286eb7..fb1ba417e1 --- a/challenge-004/arne-sommer/perl6/ch-2.p6 +++ b/challenge-004/arne-sommer/perl6/ch-2.p6 @@ -21,7 +21,7 @@ my %seen; for @letters.combinations: 2 .. $max-length -> $candidate { - my $word = $candidate.join; + my $word = $candidate.sort.join; next if %seen{$word}; %seen{$word} = True; diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 1b8d648b7b..d77a8cda71 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,60 +1,64 @@ { - "title" : { - "text" : "Perl Weekly Challenge - 004" + "tooltip" : { + "pointerFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" }, "drilldown" : { "series" : [ { - "name" : "Abigail", "id" : "Abigail", "data" : [ [ "Perl 5", 2 ] - ] + ], + "name" : "Abigail" }, { "name" : "Adam Russell", - "id" : "Adam Russell", "data" : [ [ "Perl 5", 2 ] - ] + ], + "id" : "Adam Russell" }, { + "id" : "Arne Sommer", "data" : [ [ "Perl 6", 2 ] ], - "id" : "Arne Sommer", "name" : "Arne Sommer" }, { + "name" : "Athanasius", "data" : [ [ "Perl 5", 2 ] ], - "id" : "Athanasius", - "name" : "Athanasius" + "id" : "Athanasius" }, { - "id" : "Francis Whittle", "name" : "Francis Whittle", "data" : [ [ "Perl 6", 2 ] - ] + ], + "id" : "Francis Whittle" }, { + "id" : "Dr James A. Smith", +