aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-044/colin-crain/perl/ch-1.pl63
-rw-r--r--challenge-044/colin-crain/perl/ch-2.pl85
-rw-r--r--challenge-044/colin-crain/raku/ch-1.p6121
-rw-r--r--challenge-044/colin-crain/raku/ch-2.p660
-rw-r--r--stats/pwc-current.json255
-rw-r--r--stats/pwc-language-breakdown-summary.json50
-rw-r--r--stats/pwc-language-breakdown.json360
-rw-r--r--stats/pwc-leaders.json388
-rw-r--r--stats/pwc-summary-1-30.json52
-rw-r--r--stats/pwc-summary-121-150.json46
-rw-r--r--stats/pwc-summary-31-60.json44
-rw-r--r--stats/pwc-summary-61-90.json40
-rw-r--r--stats/pwc-summary-91-120.json122
-rw-r--r--stats/pwc-summary.json32
14 files changed, 1033 insertions, 685 deletions
diff --git a/challenge-044/colin-crain/perl/ch-1.pl b/challenge-044/colin-crain/perl/ch-1.pl
new file mode 100644
index 0000000000..ca21559051
--- /dev/null
+++ b/challenge-044/colin-crain/perl/ch-1.pl
@@ -0,0 +1,63 @@
+#! /opt/local/bin/perl
+#
+# one_hundred.pl
+#
+# PWC 44 - TASK #1
+# Only 100, please.
+# You are given a string “123456789”. Write a script that would insert
+# ”+” or ”-” in between digits so that when you evaluate, the result
+# should be 100.
+#
+# method: For the list (1, 2, 3, 4, 5 , 6, 7, 8, 9) there are 9
+# elements, or 8 interelemental spacings for operators.
+#
+# Each operator can be one of '+' '-' or '~', signifying merging the
+# two numbers into one number 10a+b
+#
+# 3 choices 8 times yields 3^8 permutations with repetition, or 6561
+# equations to be considered.
+
+# The 'merge' operator a~b is associative to itself,
+# (1~2)~3 = 1~(2~3) = 123
+# however
+# (1+2)~3 != 1+(2~3)
+# thus it has higher precedence than the others and must be evaluated
+# first. By concatenating a~b into the equation string during
+# construction as 'ab' this is practically accomplished positionally
+# rather than overtly mathematically, yet with the same result as applying
+# f(a,b) = 10a+b
+#
+# the resultant string, containing only left-associative operators can
+# now be eval'd left to right and compared to 100
+
+#
+#
+# 2020 colin crain
+## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
+
+
+
+use warnings;
+use strict;
+use feature ":5.26";
+
+## ## ## ## ## MAIN
+
+my @list = ( 1..9 );
+my @equations = shift @list;
+my $idx = 0;
+
+for my $new ( @list ){
+ while (my $target = splice @equations, $idx, 1){
+ for (' + ', ' - ', ''){
+ splice @equations, $idx, 0, $target . $_ . $new;
+ $idx++;
+ }
+ }
+ $idx = 0;
+}
+
+## output#
+for (@equations){
+ printf "%-30s = 100\n", $_ if eval $_ == 100;
+}
diff --git a/challenge-044/colin-crain/perl/ch-2.pl b/challenge-044/colin-crain/perl/ch-2.pl
new file mode 100644
index 0000000000..272b2b7e96
--- /dev/null
+++ b/challenge-044/colin-crain/perl/ch-2.pl
@@ -0,0 +1,85 @@
+#! /opt/local/bin/perl
+#
+# two_hundred.pl
+#
+# PWC 44 - TASK #2
+# Make it $200
+# You have only $1 left at the start of the week. You have been given an
+# opportunity to make it $200. The rule is simple with every move you can either
+# double what you have or add another $1. Write a script to help you get $200 with
+# the smallest number of moves.
+
+
+#
+# 2020 colin crain
+## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
+
+
+
+use warnings;
+use strict;
+use feature ":5.26";
+
+## ## ## ## ## MAIN
+
+
+# method: Of the two given options available to proceed towards our goal,
+#
+# f(x) = 2x
+# g(x) = x + 1
+#
+# given that
+#
+# 2x >= x+1 ∀ x > 0
+# --> goal - (2 * value) <= goal - (value + 1) ∀ x > 0 ,
+#
+# doubling will invariably be a more efficiant progress towards the
+# goal, so f(x) should always be the preferred move. What is not obvious
+# is when to increment by 1. This becomes clear when we work backwards.
+# The way to find the optimum path is to invert the problem, working
+# backwards from the goal, either halving if even or subtracting one
+# until 1 is reached. The two available functions then become:
+#
+# f'(x) = x / 2
+# g'(x) = x - 1
+#
+# When we look at the inverted functions, we notice that any odd number
+# minus 1 becomes even, and hence able to be halved, which should always
+# be the preferred move. So any application of g'(x) is followed by
+# f'(x) for all x > 0. It is now clear the only application of g'(x)
+# will be to make x even again, allowing further application of f'(x).
+#
+# Thus progressing from the end of the sequence, then reversing the
+# order of steps taken, both maximizes the use of the doubling function
+# and minimizes the addition, so any other variation will be
+# sub-optimal.
+#
+# The resultant algorithm is:
+#
+# reverse steps:
+# x :- endpoint
+# loop: until x = 1 {
+# if x even -> halve x
+# else x := x - 1
+# }
+#
+
+
+
+
+
+my $value = shift @ARGV // 200;
+my @steps = $value;
+
+while ( $value != 1) {
+ if ($value % 2 == 0){
+ $value /= 2;
+ }
+ else {
+ $value -= 1;
+ }
+ unshift @steps, $value; ## we build the array of steps from back to front
+ ## so there is no need to reverse it later
+}
+
+print join ', ', @steps;
diff --git a/challenge-044/colin-crain/raku/ch-1.p6 b/challenge-044/colin-crain/raku/ch-1.p6
new file mode 100644
index 0000000000..9bfb9137fd
--- /dev/null
+++ b/challenge-044/colin-crain/raku/ch-1.p6
@@ -0,0 +1,121 @@
+use v6.d;
+
+#
+#
+# one_hundred.p6
+#
+# PWC 44 - TASK #1
+# "Only 100, please."
+# You are given a string “123456789”. Write a script that would
+# insert ”+” or ”-” in between digits so that when you evaluate, the
+# result should be 100.
+#
+#
+#
+# method:
+
+# EVAL vs. eval ""
+
+# 1. The logic for the perl 5 version of this solution is
+# strightforward, and we'll repeat it here. We build a list of
+# strings containing combinations of '+', '-' or nothing between
+# the digits in the source string, then treat that string as code
+# and see whether it adds to 100. It's a fair number of
+# iterations to got through, but nothing crazy. Profiling the
+# code states it runs for me in 230ms to produce the 11
+# solutions:
+
+# For the list (1, 2, 3, 4, 5 , 6, 7, 8, 9) there are 9 elements, or
+# 8 interelemental spacings for operators.
+#
+# Each operator can be one of '+' '-' or '~', signifying merging the
+# two numbers into one number 10a+b (being the same as not splitting
+# the original string at all at that point, or doing nothing)
+#
+# 3 choices 8 times yields 3^8 permutations with repetition, or 6561
+# equations to be considered.
+#
+# The 'merge' operator a~b is associative to itself,
+# (1~2)~3 = 1~(2~3) = 123
+# however
+# (1+2)~3 != 1+(2~3)
+# thus it has higher precedence than the others and must be
+# evaluated first. By concatenating a~b into the equation string
+# during construction as 'ab' this is accomplished positionally
+# rather than mathematically and precedence order is maintained.
+#
+# the resultant string, containing only left-associative operators
+# can now be eval'd left to right and compared to 100
+#
+# 2. Directly translating the logic to raku, including the lines:
+
+# use MONKEY-SEE-NO-EVAL;
+# printf "%-30s = 100\n", $_ if EVAL($_) == 100;
+#
+# is painfully, ridiculously slow. The same 6561 evaluations took a
+# full 55 seconds, and it is not clear what is happening here, but
+# it's using an inordinant amount of memory doing so. Adding the
+# profiler eats everything available until segfault so we can't use
+# that. But assuming it's the EVAL (spoiler: it's the EVAL), we
+# rewrite that as a specific calculator subroutine that dices the
+# string and computed the total, bringing the elapsed time down to
+# about 3000ms. Inlining that subroutine got us to 2171, and
+# replacing shift with an explicit index, keeping the array of
+# equations intact as shown below brings us to 1623ms, which is
+# still about 7x slower than Perl5 for the same logic. I think this
+# qualifies as a solution, if not a great one. Further efforts
+# didn't prove fruitful, and getting this time down further will
+# presumably require a complete reworking of the methodology.
+#
+
+# 2020 colin crain
+## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
+
+
+sub MAIN () {
+# my $start = BEGIN { DateTime.now }; ## our timer init
+
+ my $string = "123456789";
+ my @list = $string.comb;
+ my @equations = @list.shift;
+ my $idx = 0;
+
+ ## for each element of the existing list, remove and replace it in place
+ ## with 3 new elements suffixed with the next operator and operand
+ ## -- 9840 iterations to produce 6561 elements
+ for @list -> $new {
+ while my $target = @equations.splice($idx, 1) {
+ for (' + ', ' - ', '') {
+ @equations.splice( $idx, 0, "$target$_$new" );
+ $idx++;
+ }
+ }
+ ## restart from beginning of list as each number is added to the strings
+ $idx = 0;
+ }
+
+# say DateTime.now - $start ; ## isolate the top from the bottom
+
+ ## inline the filter sub
+ my @valid;
+ for @equations {
+ my @eq = $_.split( /<[-+]>/, :v);
+ my $total;
+
+ my $idx = 0;
+ while ($idx < @eq.elems) {
+ given @eq[$idx] {
+ when "+" { $idx++; $total += @eq[$idx] }
+ when "-" { $idx++; $total -= @eq[$idx] }
+ default { $total = $_ }
+ }
+ $idx++;
+ }
+ @valid.push: $_ if $total == 100;
+ }
+
+ ## output
+ printf "%-30s = 100\n", $_ for @valid; ## roll your own
+
+# END { say DateTime.now - $start }; ## report
+}
diff --git a/challenge-044/colin-crain/raku/ch-2.p6 b/challenge-044/colin-crain/raku/ch-2.p6
new file mode 100644
index 0000000000..05cc6a14e8
--- /dev/null
+++ b/challenge-044/colin-crain/raku/ch-2.p6
@@ -0,0 +1,60 @@
+use v6;
+
+#
+# two_hundred.p6
+#
+# method: Of the two given options available to proceed towards our goal,
+#
+# f(x) = 2x
+# g(x) = x + 1
+#
+# given that
+#
+# 2x >= x+1 ∀ x > 0
+# --> goal - (2 * value) <= goal - (value + 1) ∀ x > 0 ,
+#
+# doubling will invariably be a more efficiant progress towards the
+# goal, so f(x) should always be the preferred move. What is not obvious
+# is when to increment by 1. This becomes clear when we work backwards.
+# The way to find the optimum path is to invert the problem, working
+# backwards from the goal, either halving if even or subtracting one
+# until 1 is reached. The two available functions then become:
+#
+# f'(x) = x / 2
+# g'(x) = x - 1
+#
+# When we look at the inverted functions, we notice that any odd number
+# minus 1 becomes even, and hence able to be halved, which should always
+# be the preferred move. So any application of g'(x) is followed by
+# f'(x) for all x > 0. It is now clear the only application of g'(x)
+# will be to make x even again, allowing further application of f'(x).
+#
+# Thus progressing from the end of the sequence, then reversing the
+# order of steps taken, both maximizes the use of the doubling function
+# and minimizes the addition, so any other variation will be
+# sub-optimal.
+#
+# The resultant algorithm is:
+#
+# reverse steps:
+# x :- endpoint
+# loop: until x = 1 {
+# if x even -> halve x
+# else x := x - 1
+# }
+#
+#
+# 2020 colin crain
+## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
+
+sub MAIN (Int:D $target where { $target > 1 } = 200) {
+ my $value = $target;
+ my @steps = $value;
+
+ while $value > 1 {
+ $value -= $value %% 2 ?? $value / 2 !! 1;
+ unshift @steps, $value;
+ }
+
+ say @steps.join: ", ";
+}
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index 5923af7724..149018b06b 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,11 +1,18 @@
{
- "title" : {
- "text" : "Perl Weekly Challenge - 044"
+ "tooltip" : {
+ "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>",
+ "followPointer" : 1,
+ "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>"
+ },
+ "chart" : {
+ "type" : "column"
+ },
+ "subtitle" : {
+ "text" : "[Champions: 27] Last updated at 2020-01-29 05:34:42 GMT"
},
"drilldown" : {
"series" : [
{
- "name" : "Adam Russell",
"data" : [
[
"Perl",
@@ -16,29 +23,31 @@
2
]
],
+ "name" : "Adam Russell",
"id" : "Adam Russell"
},
{
"name" : "Alicia Bielsa",
- "id" : "Alicia Bielsa",
"data" : [
[
"Perl",
2
]
- ]
+ ],
+ "id" : "Alicia Bielsa"
},
{
- "id" : "Andrezgz",
+ "name" : "Andrezgz",
"data" : [
[
"Perl",
2
]
],
- "name" : "Andrezgz"
+ "id" : "Andrezgz"
},
{
+ "id" : "Arne Sommer",
"name" : "Arne Sommer",
"data" : [
[
@@ -49,18 +58,31 @@
"Blog",
1
]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
],
- "id" : "Arne Sommer"
+ "name" : "Cheok-Yin Fung",
+ "id" : "Cheok-Yin Fung"
},
{
"data" : [
[
"Perl",
2
+ ],
+ [
+ "Raku",
+ 2
]
],
- "id" : "Cheok-Yin Fung",
- "name" : "Cheok-Yin Fung"
+ "name" : "Colin Crain",
+ "id" : "Colin Crain"
},
{
"name" : "Cristina Heredia",
@@ -73,44 +95,44 @@
"id" : "Cristina Heredia"
},
{
- "id" : "Daniel Mantovani",
"data" : [
[
"Perl",
2
]
],
- "name" : "Daniel Mantovani"
+ "name" : "Daniel Mantovani",
+ "id" : "Daniel Mantovani"
},
{
- "name" : "Darren Bottin",
"data" : [
[
"Perl",
1
]
],
+ "name" : "Darren Bottin",
"id" : "Darren Bottin"
},
{
+ "name" : "Dave Jacoby",
"data" : [
[
"Perl",
2
]
],
- "id" : "Dave Jacoby",
- "name" : "Dave Jacoby"
+ "id" : "Dave Jacoby"
},
{
- "id" : "Duane Powell",
+ "name" : "Duane Powell",
"data" : [
[
"Perl",
2
]
],
- "name" : "Duane Powell"
+ "id" : "Duane Powell"
},
{
"data" : [
@@ -119,10 +141,11 @@
2
]
],
- "id" : "Duncan C. White",
- "name" : "Duncan C. White"
+ "name" : "Duncan C. White",
+ "id" : "Duncan C. White"
},
{
+ "id" : "E. Choroba",
"name" : "E. Choroba",
"data" : [
[
@@ -133,31 +156,31 @@
"Blog",
1
]
- ],
- "id" : "E. Choroba"
+ ]
},
{
"name" : "Fabrizio Poggi",
- "id" : "Fabrizio Poggi",
"data" : [
[
"Perl",
2
]
- ]
+ ],
+ "id" : "Fabrizio Poggi"
},
{
+ "name" : "Jan Ole Kraft",
"data" : [
[
"Raku",
2
]
],
- "id" : "Jan Ole Kraft",
- "name" : "Jan Ole Kraft"
+ "id" : "Jan Ole Kraft"
},
{
"id" : "Laurent Rosenfeld",
+ "name" : "Laurent Rosenfeld",
"data" : [
[
"Perl",
@@ -171,28 +194,27 @@
"Blog",
1
]
- ],
- "name" : "Laurent Rosenfeld"
+ ]
},
{
- "name" : "Luca Ferrari",
- "id" : "Luca Ferrari",
"data" : [
[
"Raku",
2
]
- ]
+ ],
+ "name" : "Luca Ferrari",
+ "id" : "Luca Ferrari"
},
{
- "id" : "Markus Holzer",
+ "name" : "Markus Holzer",
"data" : [
[
"Raku",
2
]
],
- "name" : "Markus Holzer"
+ "id" : "Markus Holzer"
},
{
"data" : [
@@ -201,20 +223,21 @@
2
]
],
- "id" : "Noud Aldenhoven",
- "name" : "Noud Aldenhoven"
+ "name" : "Noud Aldenhoven",
+ "id" : "Noud Aldenhoven"
},
{
- "name" : "Peter Scott",
- "id" : "Peter Scott",
"data" : [
[
"Perl",
1
]
- ]
+ ],
+ "name" : "Peter Scott",
+ "id" : "Peter Scott"
},
{
+ "id" : "Roger Bell West",
"data" : [
[
"Perl",
@@ -225,12 +248,9 @@
2
]
],
- "id" : "Roger Bell West",
"name" : "Roger Bell West"
},
{
- "name" : "Ruben Westerberg",
- "id" : "Ruben Westerberg",
"data" : [
[
"Perl",
@@ -240,10 +260,12 @@
"Raku",
2
]
- ]
+ ],
+ "name" : "Ruben Westerberg",
+ "id" : "Ruben Westerberg"
},
{
- "id" : "Ryan Thompson",
+ "name" : "Ryan Thompson",
"data" : [
[
"Perl",
@@ -258,69 +280,89 @@
2
]
],
- "name" : "Ryan Thompson"
+ "id" : "Ryan Thompson"
},
{
- "name" : "Saif Ahmed",
"data" : [
[
"Perl",
2
]
],
+ "name" : "Saif Ahmed",
"id" : "Saif Ahmed"
},
{
+ "id" : "Simon Proctor",
+ "name" : "Simon Proctor",
"data" : [
[
"Raku",
2
]
- ],
- "id" : "Simon Proctor",
- "name" : "Simon Proctor"
+ ]
},
{
- "name" : "Ulrich Rieke",
- "id" : "Ulrich Rieke",
"data" : [
[
"Raku",
2
]
- ]
+ ],
+ "name" : "Ulrich Rieke",
+ "id" : "Ulrich Rieke"
},
{
- "id" : "Wanderdoc",
+ "name" : "Wanderdoc",
"data" : [
[
"Perl",
2
]
],
- "name" : "Wanderdoc"
+ "id" : "Wanderdoc"
}
]
},
+ "legend" : {
+ "enabled" : 0
+ },
+ "plotOptions" : {
+ "series" : {
+ "dataLabels" : {
+ "enabled" : 1,
+ "format" : "{point.y}"
+ },
+ "borderWidth" : 0
+ }
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
+ "title" : {
+ "text" : "Perl Weekly Challenge - 044"
+ },
"series" : [
{
- "name" : "Perl Weekly Challenge - 044",
"colorByPoint" : 1,
+ "name" : "Perl Weekly Challenge - 044",
"data" : [
{
- "y" : 4,
+ "name" : "Adam Russell",
"drilldown" : "Adam Russell",
- "name" : "Adam Russell"
+ "y" : 4
},
{
+ "drilldown" : "Alicia Bielsa",
"name" : "Alicia Bielsa",
- "y" : 2,
- "drilldown" : "Alicia Bielsa"
+ "y" : 2
},
{
- "drilldown" : "Andrezgz",
"y" : 2,
- "name" : "Andrezgz"
+ "name" : "Andrezgz",
+ "drilldown" : "Andrezgz"
},
{
"name" : "Arne Sommer",
@@ -329,78 +371,83 @@
},
{
"drilldown" : "Cheok-Yin Fung",
- "y" : 2,
- "name" : "Cheok-Yin Fung"
+ "name" : "Cheok-Yin Fung",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Colin Crain",
+ "name" : "Colin Crain",
+ "y" : 4
},
{
- "name" : "Cristina Heredia",
"y" : 1,
+ "name" : "Cristina Heredia",
"drilldown" : "Cristina Heredia"
},
{
"y" : 2,
- "drilldown" : "Daniel Mantovani",
- "name" : "Daniel Mantovani"
+ "name" : "Daniel Mantovani",
+ "drilldown" : "Daniel Mantovani"
},
{
"name" : "Darren Bottin",
- "y" : 1,
- "drilldown" : "Darren Bottin"
+ "drilldown" : "Darren Bottin",
+ "y" : 1
},
{
+ "drilldown" : "Dave Jacoby",
"name" : "Dave Jacoby",
- "y" : 2,
- "drilldown" : "Dave Jacoby"
+ "y" : 2
},
{
- "name" : "Duane Powell",
"y" : 2,
+ "name" : "Duane Powell",
"drilldown" : "Duane Powell"
},
{
- "drilldown" : "Duncan C. White",
"y" : 2,
+ "drilldown" : "Duncan C. White",
"name" : "Duncan C. White"
},
{
- "drilldown" : "E. Choroba",
"y" : 3,
- "name" : "E. Choroba"
+ "name" : "E. Choroba",
+ "drilldown" : "E. Choroba"
},
{
"name" : "Fabrizio Poggi",
- "y" : 2,
- "drilldown" : "Fabrizio Poggi"
+ "drilldown" : "Fabrizio Poggi",
+ "y" : 2
},
{
- "name" : "Jan Ole Kraft",
+ "y" : 2,
"drilldown" : "Jan Ole Kraft",
- "y" : 2
+ "name" : "Jan Ole Kraft"
},
{
- "drilldown" : "Laurent Rosenfeld",
"y" : 5,
+ "drilldown" : "Laurent Rosenfeld",
"name" : "Laurent Rosenfeld"
},
{
- "drilldown" : "Luca Ferrari",
"y" : 2,
+ "drilldown" : "Luca Ferrari",
"name" : "Luca Ferrari"
},
{
- "drilldown" : "Markus Holzer",
"y" : 2,
+ "drilldown" : "Markus Holzer",
"name" : "Markus Holzer"
},
{
- "name" : "Noud Aldenhoven",
"drilldown" : "Noud Aldenhoven",
+ "name" : "Noud Aldenhoven",
"y" : 2
},
{
"name" : "Peter Scott",
- "y" : 1,
- "drilldown" : "Peter Scott"
+ "drilldown" : "Peter Scott",
+ "y" : 1
},
{
"y" : 4,
@@ -408,24 +455,24 @@
"name" : "Roger Bell West"
},
{
+ "y" : 4,
"name" : "Ruben Westerberg",
- "drilldown" : "Ruben Westerberg",
- "y" : 4
+ "drilldown" : "Ruben Westerberg"
},
{
- "drilldown" : "Ryan Thompson",
"y" : 6,
- "name" : "Ryan Thompson"
+ "name" : "Ryan Thompson",
+ "drilldown" : "Ryan Thompson"
},
{
- "y" : 2,
+ "name" : "Saif Ahmed",
"drilldown" : "Saif Ahmed",
- "name" : "Saif Ahmed"
+ "y" : 2
},
{
+ "drilldown" : "Simon Proctor",
"name" : "Simon Proctor",
- "y" : 2,
- "drilldown" : "Simon Proctor"
+ "y" : 2
},
{
"y" : 2,
@@ -440,35 +487,7 @@
]
}
],
- "chart" : {
- "type" : "column"
- },
- "yAxis" : {
- "title" : {
- "text" : "Total Solutions"
- }
- },
- "plotOptions" : {
- "series" : {
- "borderWidth" : 0,
- "dataLabels" : {
- "enabled" : 1,
- "format" : "{point.y}"
- }
- }
- },
"xAxis" : {
"type" : "category"
- },
- "subtitle" : {
- "text" : "[Champions: 26] Last updated at 2020-01-29 05:22:01 GMT"
- },
- "legend" : {
- "enabled" : 0
- },
- "tooltip" : {
- "followPointer" : 1,
- "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>",
- "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>"
}
}
diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index 98ebbb7756..5228669340 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -1,21 +1,15 @@
{
+ "subtitle" : {
+ "text" : "Last updated at 2020-01-29 05:34:42 GMT"
+ },
"chart" : {
"type" : "column"
},
+ "tooltip" : {
+ "pointFormat" : "<b>{point.y:.0f}</b>"
+ },
"series" : [
{
- "dataLabels" : {
- "color" : "#FFFFFF",
- "style" : {
- "fontSize" : "13px",
- "fontFamily" : "Verdana, sans-serif"
- },
- "align" : "right",
- "enabled" : "true",
- "y" : 10,
- "rotation" : -90,
- "format" : "{point.y:.0f}"
- },
"data" : [
[
"Blog",
@@ -23,19 +17,28 @@
],
[
"Perl",
- 1803
+ 1805
],
[
"Raku",
- 1092
+ 1094
]
],
- "name" : "Contributions"
+ "name" : "Contributions",
+ "dataLabels" : {
+ "style" : {
+ "fontSize" : "13px",
+ "fontFamily" : "Verdana, sans-serif"
+ },
+ "align" : "right",
+ "y" : 10,
+ "rotation" : -90,
+ "format" : "{point.y:.0f}",
+ "enabled" : "true",
+ "color" : "#FFFFFF"
+ }
}
],
- "subtitle" : {
- "text" : "Last updated at 2020-01-29 05:22:01 GMT"
- },
"xAxis" : {
"type" : "category",
"labels" : {
@@ -46,18 +49,15 @@
}
},
"yAxis" : {
+ "min" : 0,
"title" : {
"text" : null
- },
- "min" : 0
+ }
},
- "tooltip" : {
- "pointFormat" : "<b>{point.y:.0f}</b>"
+ "title" : {
+ "text" : "Perl Weekly Challenge Contributions [2019 - 2020]"
},
"legend" : {
"enabled" : "false"
- },
- "title" : {
- "text" : "Perl Weekly Challenge Contributions [2019 - 2020]"
}
}
diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json
index 9742177ca9..d26c13361e 100644
--- a/stats/pwc-language-breakdown.json
+++ b/stats/pwc-language-breakdown.json
@@ -1,68 +1,89 @@
{
+ "legend" : {
+ "enabled" : "false"
+ },
+ "plotOptions" : {
+ "series" : {
+ "borderWidth" : 0,
+ "dataLabels" : {
+ "enabled" : 1,
+ "format" : "{point.y}"
+ }
+ }
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
+ "title" : {
+ "text" : "Perl Weekly Challenge Language"
+ },
+ "xAxis" : {
+ "type" : "category"
+ },
"series" : [
{
- "name" : "Perl Weekly Challenge Languages",
- "colorByPoint" : "true",
"data" : [
{
"name" : "#001",
- "y" : 140,
-