From 6e732b22091c8f4e029af1ada0290808e164036f Mon Sep 17 00:00:00 2001 From: Randy Lauen Date: Sun, 18 Aug 2019 23:07:54 -0500 Subject: perl6 solution for task 1 --- challenge-022/randy-lauen/perl6/ch-1.p6 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 challenge-022/randy-lauen/perl6/ch-1.p6 diff --git a/challenge-022/randy-lauen/perl6/ch-1.p6 b/challenge-022/randy-lauen/perl6/ch-1.p6 new file mode 100644 index 0000000000..a16df8844c --- /dev/null +++ b/challenge-022/randy-lauen/perl6/ch-1.p6 @@ -0,0 +1,5 @@ +#!/usr/bin/env perl6 + +# Task: Write a script to print first 10 Sexy Prime Pairs. Sexy primes are prime numbers that differ from each other by 6. + +say (1 .. Inf).map( { $_, $_+6 } ).flat.grep( { $^a.is-prime && $^b.is-prime } ).head(10).join("\n"); -- cgit From 6d6e3664d0a2d3d3f382ace5bb94a16ac4276c89 Mon Sep 17 00:00:00 2001 From: Randy Lauen Date: Mon, 19 Aug 2019 11:49:07 -0500 Subject: perl5 solution for task 1 --- challenge-022/randy-lauen/perl5/ch-1.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 challenge-022/randy-lauen/perl5/ch-1.pl diff --git a/challenge-022/randy-lauen/perl5/ch-1.pl b/challenge-022/randy-lauen/perl5/ch-1.pl new file mode 100644 index 0000000000..9bfc8234a6 --- /dev/null +++ b/challenge-022/randy-lauen/perl5/ch-1.pl @@ -0,0 +1,18 @@ +#!/usr/bin/env perl + +use v5.26; +use strict; +use warnings; + +use Math::Prime::Util qw( prime_iterator is_prime ); + +my @matches; +my $it = prime_iterator(); + +while ( @matches < 10 ) { + my $prime = $it->(); + my $plus_six = $prime + 6; + push @matches, "$prime, $plus_six" if is_prime( $plus_six ); +} + +say join( "\n", @matches ); -- cgit From 5b0cf6989aece0ec2da49d6d2e4c2d4d04ba9850 Mon Sep 17 00:00:00 2001 From: Adam Russell Date: Wed, 21 Aug 2019 14:02:41 -0400 Subject: initial commit --- challenge-022/adam-russell/blog.txt | 0 challenge-022/adam-russell/perl5/ch-1.pl | 0 challenge-022/adam-russell/perl5/ch-2.pl | 0 challenge-022/adam-russell/perl6/ch-1.p6 | 0 challenge-022/adam-russell/perl6/ch-2.p6 | 0 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 challenge-022/adam-russell/blog.txt create mode 100644 challenge-022/adam-russell/perl5/ch-1.pl create mode 100644 challenge-022/adam-russell/perl5/ch-2.pl create mode 100644 challenge-022/adam-russell/perl6/ch-1.p6 create mode 100644 challenge-022/adam-russell/perl6/ch-2.p6 diff --git a/challenge-022/adam-russell/blog.txt b/challenge-022/adam-russell/blog.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-022/adam-russell/perl5/ch-1.pl b/challenge-022/adam-russell/perl5/ch-1.pl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-022/adam-russell/perl5/ch-2.pl b/challenge-022/adam-russell/perl5/ch-2.pl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-022/adam-russell/perl6/ch-1.p6 b/challenge-022/adam-russell/perl6/ch-1.p6 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/challenge-022/adam-russell/perl6/ch-2.p6 b/challenge-022/adam-russell/perl6/ch-2.p6 new file mode 100644 index 0000000000..e69de29bb2 -- cgit From 8f8cf3b2b09cf46a64060579d8b3b15295381eb4 Mon Sep 17 00:00:00 2001 From: Steven Wilson Date: Wed, 21 Aug 2019 22:13:12 +0100 Subject: add task 1 solution --- challenge-022/steven-wilson/perl5/ch-1.pl | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 challenge-022/steven-wilson/perl5/ch-1.pl diff --git a/challenge-022/steven-wilson/perl5/ch-1.pl b/challenge-022/steven-wilson/perl5/ch-1.pl new file mode 100644 index 0000000000..de783f219a --- /dev/null +++ b/challenge-022/steven-wilson/perl5/ch-1.pl @@ -0,0 +1,35 @@ +#!/usr/bin/env perl +# Author: Steven Wilson +# Date: 2019-08-21 +# Week: 022 +# +# Task #1 +# Write a script to print first 10 Sexy Prime Pairs. Sexy primes are +# prime numbers that differ from each other by 6. For example, the +# numbers 5 and 11 are both sexy primes, because 11 - 5 = 6. The term +# “sexy prime” is a pun stemming from the Latin word for six: sex. For +# more information, please checkout wiki page. +# https://en.wikipedia.org/wiki/Sexy_prime + +use strict; +use warnings; +use feature qw/ say /; + +use Math::Primality qw/ next_prime /; + +my @primes; +my @sexy_prime_pairs; +my $next_prime = 2; + +while ( scalar @sexy_prime_pairs < 10 ) { + if ( grep { $_ == ( $next_prime - 6 ) } @primes ) { + push @sexy_prime_pairs, [ ( $next_prime - 6 ), $next_prime ]; + } + $next_prime = next_prime($next_prime); + push @primes, $next_prime; +} + +say "First 10 Sexy Prime Pairs are:"; +for (@sexy_prime_pairs) { + say @{$_}[0], " ", @{$_}[1]; +} -- cgit From 2a43422f090e458b8c36478cea30fbd75bc5f2fa Mon Sep 17 00:00:00 2001 From: Steven Wilson Date: Wed, 21 Aug 2019 22:49:59 +0100 Subject: push primes earlier --- challenge-022/steven-wilson/perl5/ch-1.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-022/steven-wilson/perl5/ch-1.pl b/challenge-022/steven-wilson/perl5/ch-1.pl index de783f219a..44478e6705 100644 --- a/challenge-022/steven-wilson/perl5/ch-1.pl +++ b/challenge-022/steven-wilson/perl5/ch-1.pl @@ -22,11 +22,11 @@ my @sexy_prime_pairs; my $next_prime = 2; while ( scalar @sexy_prime_pairs < 10 ) { + push @primes, $next_prime; if ( grep { $_ == ( $next_prime - 6 ) } @primes ) { push @sexy_prime_pairs, [ ( $next_prime - 6 ), $next_prime ]; } $next_prime = next_prime($next_prime); - push @primes, $next_prime; } say "First 10 Sexy Prime Pairs are:"; -- cgit From 7aa9479fd3773951c93c70004d7e8336402954a6 Mon Sep 17 00:00:00 2001 From: Randy Lauen Date: Wed, 21 Aug 2019 17:11:19 -0500 Subject: encode function --- challenge-022/randy-lauen/perl5/ch-2.pl | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 challenge-022/randy-lauen/perl5/ch-2.pl diff --git a/challenge-022/randy-lauen/perl5/ch-2.pl b/challenge-022/randy-lauen/perl5/ch-2.pl new file mode 100644 index 0000000000..0fa86bbd95 --- /dev/null +++ b/challenge-022/randy-lauen/perl5/ch-2.pl @@ -0,0 +1,46 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use feature 'say'; + +# Task: +# Write a script to implement Lempel–Ziv–Welch (LZW) compression algorithm. +# The script should have method to encode/decode algorithm. + +# This is a port of LZW-B found at https://marknelson.us/posts/2011/11/08/lzw-revisited.html + +encode( $ARGV[0] ); + +sub encode { + my $file = shift; + + open my $in, '<', $file or die $!; + open my $out, '>', "$file.lzw" or die $!; + + my %codes = map { chr($_) => $_ } 0 .. 255; + my $next_code = 256; + my $current_string = ''; + + while ( my $line = <$in> ) { + foreach my $char ( split //, $line ) { + $current_string .= $char; + if ( !exists $codes{ $current_string } ) { + $codes{ $current_string } = $next_code++; + $current_string = substr( $current_string, 0, -1 ); + print $out pack( 'S', $codes{ $current_string} ); + $current_string = $char; + } + } + + if ( length $current_string ) { + print $out pack( 'S', $codes{ $current_string} ); + } + } + + close $in; + close $out; + + return; +} + -- cgit From 14f3ef7240468c62a55f7a1e6b7a11b506cab369 Mon Sep 17 00:00:00 2001 From: Randy Lauen Date: Wed, 21 Aug 2019 17:17:01 -0500 Subject: bug fix --- challenge-022/randy-lauen/perl5/ch-2.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/challenge-022/randy-lauen/perl5/ch-2.pl b/challenge-022/randy-lauen/perl5/ch-2.pl index 0fa86bbd95..468680a919 100644 --- a/challenge-022/randy-lauen/perl5/ch-2.pl +++ b/challenge-022/randy-lauen/perl5/ch-2.pl @@ -1,15 +1,15 @@ #!/usr/bin/env perl -use strict; -use warnings; -use feature 'say'; - # Task: # Write a script to implement Lempel–Ziv–Welch (LZW) compression algorithm. # The script should have method to encode/decode algorithm. # This is a port of LZW-B found at https://marknelson.us/posts/2011/11/08/lzw-revisited.html +use strict; +use warnings; +use feature 'say'; + encode( $ARGV[0] ); sub encode { @@ -32,10 +32,10 @@ sub encode { $current_string = $char; } } + } - if ( length $current_string ) { - print $out pack( 'S', $codes{ $current_string} ); - } + if ( length $current_string ) { + print $out pack( 'S', $codes{ $current_string} ); } close $in; -- cgit From 9cf74babee1f364bbb5204340e73405c7a5c0ff6 Mon Sep 17 00:00:00 2001 From: Doomtrain14 Date: Thu, 22 Aug 2019 11:36:42 +0800 Subject: Add perl6 solution for ch022-1 --- challenge-022/yet-ebreo/perl6/ch-1.p6 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 challenge-022/yet-ebreo/perl6/ch-1.p6 diff --git a/challenge-022/yet-ebreo/perl6/ch-1.p6 b/challenge-022/yet-ebreo/perl6/ch-1.p6 new file mode 100644 index 0000000000..1877829eb4 --- /dev/null +++ b/challenge-022/yet-ebreo/perl6/ch-1.p6 @@ -0,0 +1,25 @@ +# Write a script to print first 10 Sexy Prime Pairs. +# Sexy primes are prime numbers that differ from each other by 6. +# For example, the numbers 5 and 11 are both sexy primes, because 11 - 5 = 6. +# The term “sexy prime” is a pun stemming from the Latin word for six: sex. + +#This is my first ever attempt to write a perl6 program. Please go easy on me. +#I will try to do it in a perl6-ish way +#But first; +#print "Hello World!"; +#Works! + +#Perl6 One-Liner +say grep { $_[1]-$_[0] == 6 }, (grep { $_.is-prime }, 0..55).combinations: 2; + +#Perl6 using sieve of eratosthenes +my Int @r = 0..55; +grep { + if ($_>1) { + for $_..((@r.end+1)/$_).Int -> $x { + @r[ $_*$x ] = 0; + } + } +}, @r; + +grep { $_>1 && (($_+6) ~~ any @r) && say ($_,$_+6) }, @r -- cgit From e53696169ae773df677c2a170bb217c0793aa02c Mon Sep 17 00:00:00 2001 From: Randy Lauen Date: Wed, 21 Aug 2019 22:50:44 -0500 Subject: read in one byte at a time --- challenge-022/randy-lauen/perl5/ch-2.pl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/challenge-022/randy-lauen/perl5/ch-2.pl b/challenge-022/randy-lauen/perl5/ch-2.pl index 468680a919..6a21c43c19 100644 --- a/challenge-022/randy-lauen/perl5/ch-2.pl +++ b/challenge-022/randy-lauen/perl5/ch-2.pl @@ -15,22 +15,21 @@ encode( $ARGV[0] ); sub encode { my $file = shift; - open my $in, '<', $file or die $!; + open my $in, '<:raw', $file or die $!; open my $out, '>', "$file.lzw" or die $!; my %codes = map { chr($_) => $_ } 0 .. 255; my $next_code = 256; my $current_string = ''; - while ( my $line = <$in> ) { - foreach my $char ( split //, $line ) { - $current_string .= $char; - if ( !exists $codes{ $current_string } ) { - $codes{ $current_string } = $next_code++; - $current_string = substr( $current_string, 0, -1 ); - print $out pack( 'S', $codes{ $current_string} ); - $current_string = $char; - } + my $char; + while ( read($in, $char, 1) ) { + $current_string .= $char; + if ( !exists $codes{ $current_string } ) { + $codes{ $current_string } = $next_code++; + $current_string = substr( $current_string, 0, -1 ); + print $out pack( 'S', $codes{ $current_string} ); + $current_string = $char; } } -- cgit From 20ce1852e3d7f49f251575f732d6906922889971 Mon Sep 17 00:00:00 2001 From: "Jaldhar H. Vyas" Date: Thu, 22 Aug 2019 02:30:26 -0400 Subject: Challenge 21 by Jaldhar H. Vyas: Perl6 version of problem 2 plus blog post. --- challenge-021/jaldhar-h-vyas/blog.txt | 1 + challenge-021/jaldhar-h-vyas/perl6/ch-2.p6 | 121 +++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 challenge-021/jaldhar-h-vyas/blog.txt create mode 100755 challenge-021/jaldhar-h-vyas/perl6/ch-2.p6 diff --git a/challenge-021/jaldhar-h-vyas/blog.txt b/challenge-021/jaldhar-h-vyas/blog.txt new file mode 100644 index 0000000000..1d51db8b73 --- /dev/null +++ b/challenge-021/jaldhar-h-vyas/blog.txt @@ -0,0 +1 @@ +https://www.braincells.com/perl/2019/08/perl_weekly_challenge_week_21.html diff --git a/challenge-021/jaldhar-h-vyas/perl6/ch-2.p6 b/challenge-021/jaldhar-h-vyas/perl6/ch-2.p6 new file mode 100755 index 0000000000..92b661eb44 --- /dev/null +++ b/challenge-021/jaldhar-h-vyas/perl6/ch-2.p6 @@ -0,0 +1,121 @@ +#!/usr/bin/perl6 + +grammar URL { + rule TOP { + + ':' + [ + ? + [ '@' ]? + + [ ':' ]? + ]? + ? + [ '?' ]? + [ '#' ]? + } + + token Scheme { + } + token Slashes { \/\/ } + token Userinfo { + } + token Host { | + } + token Port { \d+ } + token Path { + } + token Query { + } + token Fragment { + } + + token SchemeChar { <[ A..Z a..z 0..9 + \- . ]> } + token DecOctet { \d | <[1..9]>\d | 1\d\d | 2<[0..4]>\d | 25<[0..5]> } + token HexOctet { <[ 0..9 A..F a..f ]> ** 2 } + token IPv4 { \. \. \. } + token PChar { | '@' } + token PathChar { | '/' } + token PctEncoded { \% } + token QueryOrFragment { | \/ | \? } + token SubDelim { <[ \! $ & \' \( \) * \+ \, \; \= ]> } + token Unreserved { <[ A..Z a..z 0..9 \- . _ \~ ]> } + token UserinfoChar { | | | ':' } +} + +class URLAction { + method TOP($/) { + my $result = $.made ~ ':'; + if $/ { + $result ~= $; + } + + if $/ { + $result ~= $.made ~ '@'; + } + + if $/ { + $result ~= $.made; + } + + if $/ { + $result ~= ':' ~ $.made; + } + + $result ~= $.made; + + if $/ { + $result ~= '?' ~ $.made; + } + + if $ { + $result ~= '#' ~ $.made; + } + + make($result); + + } + + method Scheme($/) { + make($/.Str.lc); + } + + method Host($/) { + make($/.Str.lc); + } + + method Userinfo($/) { + make(self.processPctEncoded($/.Str)); + } + + method Port($/) { + if ($/.Str ~~ '80') { + make(Nil); + } + } + + method Path($/) { + make(self.processPctEncoded($/.Str)); + } + + method Query($/) { + make(self.processPctEncoded($/.Str)); + } + + method Fragment($/) { + make(self.processPctEncoded($/.Str)); + } + + method processPctEncoded($part) { + my $processed = $part; + for $part ~~ m:g/ \% $ = ( <[ 0..9 A..F a..f ]> ** 2 ) / + -> $pct { + my $hex = $pct.Str.uc; + if :16($hex) ~~ / <[ A..Z a..z 0..9 \- . _ \~ ]> / { # Unreserved + $processed = $processed.subst($pct.Str, :16($hex).chr); + } else { + $processed = $processed.subst($pct.Str, "%$hex"); + } + } + return $processed; + } +} + + +multi sub MAIN($url) { + URL.parse($url, actions => URLAction.new).made.say; +} \ No newline at end of file -- cgit From 234e571dafb8da93f158a4c7ec8934d89f4674da Mon Sep 17 00:00:00 2001 From: Doomtrain14 Date: Thu, 22 Aug 2019 16:18:44 +0800 Subject: Add perl6 solution for ch022-2 --- challenge-022/yet-ebreo/perl6/ch-2.p6 | 98 +++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 challenge-022/yet-ebreo/perl6/ch-2.p6 diff --git a/challenge-022/yet-ebreo/perl6/ch-2.p6 b/challenge-022/yet-ebreo/perl6/ch-2.p6 new file mode 100644 index 0000000000..e4721eb34e --- /dev/null +++ b/challenge-022/yet-ebreo/perl6/ch-2.p6 @@ -0,0 +1,98 @@ +# Write a script to implement Lempel–Ziv–Welch (LZW) compression algorithm. +# The script should have method to encode/decode algorithm. +# The wiki page explains the compression algorithm very nicely. + +constant INIT_DICT_SIZE = 255; + +sub encode (Str $string){ + my Int $len = $string.chars; + #Initialize the dictionary to hash + my $dict_size = INIT_DICT_SIZE; + my %dictionary = map { $_.chr => $_ }, 0..$dict_size; + + my Str $prev = $string.substr: 0,1; + my Str $curr = ""; + + my Int $code = INIT_DICT_SIZE+1; + my @buff_out = (); + + # say "String\tOutput Code\tAddition"; + for 0..$len-1 -> $i { + if ($i != $len-1) { + $curr ~= $string.substr: $i + 1,1; + } + if (%dictionary{$prev~$curr}:exists) { + + $prev ~= $curr; + } else { + + # say ($prev~"\t"~(%dictionary{$prev})~"\t\t"~$prev~$curr~"\t"~$code); + push @buff_out, %dictionary{$prev}; + %dictionary{$prev~$curr} = $code; + $code++; + $prev = $curr; + } + $curr = ""; + } + # say "$prev\t%dictionary{$prev}"; + push @buff_out, %dictionary{$prev}; + return @buff_out; +} + +sub decode (Int @buff_in){ + + #Initialize dictionary using numbers as keys + #Using array would work too + my %dictionary = map { $_ => $_.chr }, 0..INIT_DICT_SIZE; + + #Initialize the first value from @buff_in to $o + my $o = @buff_in[0]; + my $n = ""; + my $s = %dictionary{$o}; + my $c = $s.substr: 0, 1; + my $ret = $s; + + my $count = INIT_DICT_SIZE; + + #Go through the codes in @buff_in + for 0..@buff_in.end-1 -> $i { + + #Store the $n-ext value + $n = @buff_in[$i+1]; + + #Check if $n-ext value is in the dictionary + if ( %dictionary{$n}:exists ) { + $s = %dictionary{$n}; + } else { + $s = %dictionary{$o}; + $s~= $c; + } + + #Update return value + $ret ~= $s; + $c = $s.substr: 0, 1; + + #Update dictionary + %dictionary{++$count} = %dictionary{$o}~$c; + + #Update store $n to $o as + #new value becomes old and be replaced on next iteration + $o = $n; + } + return $ret; +} +my $original = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; +say "Original String has length "~$original.chars; +say $original; + +my Int @compressed = encode($original); +say "\nCompressed String has length "~(map {$_.chr},@compressed).join.chars; +say (map {$_.chr},@compressed).join; + +my $uncompressed = decode(@compressed); +say "\nUncompressed String has length "~($uncompressed.chars); +say "$uncompressed"; + +if ($uncompressed eq $original) { + say "\nUncompressed string matches original"; +} -- cgit From 292114f9047e6a79a8a34298b75cb8e240ad70ef Mon Sep 17 00:00:00 2001 From: Doomtrain14 Date: Thu, 22 Aug 2019 16:20:30 +0800 Subject: Code cleanup --- challenge-022/yet-ebreo/perl6/ch-2.p6 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/challenge-022/yet-ebreo/perl6/ch-2.p6 b/challenge-022/yet-ebreo/perl6/ch-2.p6 index e4721eb34e..815a1f78bd 100644 --- a/challenge-022/yet-ebreo/perl6/ch-2.p6 +++ b/challenge-022/yet-ebreo/perl6/ch-2.p6 @@ -16,17 +16,14 @@ sub encode (Str $string){ my Int $code = INIT_DICT_SIZE+1; my @buff_out = (); - # say "String\tOutput Code\tAddition"; for 0..$len-1 -> $i { if ($i != $len-1) { $curr ~= $string.substr: $i + 1,1; } if (%dictionary{$prev~$curr}:exists) { - $prev ~= $curr; } else { - # say ($prev~"\t"~(%dictionary{$prev})~"\t\t"~$prev~$curr~"\t"~$code); push @buff_out, %dictionary{$prev}; %dictionary{$prev~$curr} = $code; $code++; @@ -34,7 +31,6 @@ sub encode (Str $string){ } $curr = ""; } - # say "$prev\t%dictionary{$prev}"; push @buff_out, %dictionary{$prev}; return @buff_out; } -- cgit From 4c69bd8ec37c3c55c7abb5cbfca011a0779f88a2 Mon Sep 17 00:00:00 2001 From: Simon Proctor Date: Thu, 22 Aug 2019 09:22:31 +0100 Subject: LZW encoding. Kinda --- challenge-022/simon-proctor/perl6/ch-2.p6 | 108 ++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 challenge-022/simon-proctor/perl6/ch-2.p6 diff --git a/challenge-022/simon-proctor/perl6/ch-2.p6 b/challenge-022/simon-proctor/perl6/ch-2.p6 new file mode 100644 index 0000000000..bedda7c19d --- /dev/null +++ b/challenge-022/simon-proctor/perl6/ch-2.p6 @@ -0,0 +1,108 @@ +#!/usr/bin/env perl6 + +use v6; + +=begin pod + +Encodes and Decodes using the LZW algorithm. + +Encoded data is expected as a series of space seperated numbers because I don't want to mess about bit twiddling. + +=end pod + +subset FilePath of Str where *.IO.f; +subset ValidToEncode of Str where m/^<[a..z A..Z 0..9 \ _ \n \. , ]>* \n?$/; +subset ValidToDecode of Str where m/^ [\d+]+ % " " $/; + +multi sub MAIN( Bool :h(:$help) where ?* ) { say $*USAGE } + +#| Read from STDIN and encode the result +multi sub MAIN( 'encode' ) { + say encode-data( $*IN.slurp.chomp ); +} + +#| Read the text from the given file and output the encoded result +multi sub MAIN( 'encode', FilePath $path ) { + say encode-data( $path.IO.slurp.chomp ); +} + +#| Encode the given string +multi sub MAIN( 'encode', Str $data ) { + say encode-data( $data ); +} + +#| Read from STDIN and decode the result +multi sub MAIN( 'decode' ) { + say decode-data( $*IN.slurp.chomp ); +} + +#| Read the text from the given file and output the decoded result +multi sub MAIN( 'decode', FilePath $path ) { + say decode-data( $path.IO.slurp.chomp ); +} + +#| Decode the given string +multi sub MAIN( 'decode', Str $data ) { + say decode-data( $data ); +} + +#| Decode a list of ints +multi sub MAIN( 'decode', *@data where { @data.all ~~ Int } ) { + say decode-data( @data.join(" ") ); +} + + + +multi sub encode-data( ValidToEncode $str ) { + my @working = $str.comb; + my %dict = (available-characters() Z=> (0,1,2...*)).hash; + my $output = []; + + LOOP: while @working.elems > 0 { + # Find the maximum key length + my $max = %dict.keys.map( *.codes ).sort( { $^b <=> $^a } ).first(); + $max = @working.elems if $max > @working.elems; + + for (1..$max).reverse -> $length { + my $substr = @working[0..^$length].join(""); + if ( %dict{$substr}:exists ) { + $output.push( %dict{$substr} ); + if ( @working.elems > $length ) { + my $next = @working[0..$length].join(""); + %dict{$next} = %dict.values.max+1; + } + @working.splice(0,$length); + next LOOP; + } + } + } + + $output.join(" "); +} + +multi sub encode-data( Str $ ) { + die "Data to encode can include only a-z, A-Z, 0-9, ' ', ',', '.', and '_' newlines"; +} + +multi sub decode-data( ValidToDecode $str ) { + my @input = $str.split(" "); + my %dict = ((0,1,2...*) Z=> available-characters()).hash; + my $next-key = %dict.keys.elems; + my @output = []; + my $last; + + for @input -> $key { + @output.push( %dict{$key} ); + with $last { + %dict{$next-key} = $last ~ %dict{$key}; + $next-key++; + } + $last = %dict{$key} + } + + @output.join(""); +} + +sub available-characters() { + ( |("a".."z"), |("A".."Z"), " ", "_", ",", ".", "\n", |("0".."9") ); +} -- cgit From 61f69e6549114c1fe7fce40c6ad54ca2ec0b971d Mon Sep 17 00:00:00 2001 From: Simon Proctor Date: Thu, 22 Aug 2019 09:27:55 +0100 Subject: Tidy up --- challenge-022/simon-proctor/perl6/ch-2.p6 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/challenge-022/simon-proctor/perl6/ch-2.p6 b/challenge-022/simon-proctor/perl6/ch-2.p6 index bedda7c19d..e0e2ecd0ff 100644 --- a/challenge-022/simon-proctor/perl6/ch-2.p6 +++ b/challenge-022/simon-proctor/perl6/ch-2.p6 @@ -10,11 +10,15 @@ Encoded data is expected as a series of space seperated numbers because I don't =end pod +sub USAGE() { + say "Encodes and Decodes using the LZW algorithm.\n\nEncoded data is expected as a series of space seperated numbers because I don't want to mess about bit twiddling.\n$*USAGE"; +} + subset FilePath of Str where *.IO.f; subset ValidToEncode of Str where m/^<[a..z A..Z 0..9 \ _ \n \. , ]>* \n?$/; subset ValidToDecode of Str where m/^ [\d+]+ % " " $/; -multi sub MAIN( Bool :h(:$help) where ?* ) { say $*USAGE } +multi sub MAIN( Bool :h(:$help) where ?* ) { USAGE() } #| Read from STDIN and encode the result multi sub MAIN( 'encode' ) { @@ -103,6 +107,10 @@ multi sub decode-data( ValidToDecode $str ) { @output.join(""); } +multi sub decode-data( Str $ ) { + die "Data to decode should be a space seperated string of Ints"; +} + sub available-characters() { ( |("a".."z"), |("A".."Z"), " ", "_", ",", ".", "\n", |("0".."9") ); } -- cgit From 0b7d8d4071c8176c237353c11565eada6780ce6d Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Thu, 22 Aug 2019 12:31:05 +0100 Subject: - Added solution by Steven Wilson. --- stats/pwc-current.json | 105 ++-- stats/pwc-language-breakdown-summary.json | 58 +- stats/pwc-language-breakdown.json | 348 ++++++------ stats/pwc-leaders.json | 870 +++++++++++++++--------------- stats/pwc-summary-1-30.json | 40 +- stats/pwc-summary-31-60.json | 122 ++--- stats/pwc-summary-61-90.json | 18 +- stats/pwc-summary-91-120.json | 34 +- stats/pwc-summary.json | 268 ++++----- 9 files changed, 939 insertions(+), 924 deletions(-) diff --git a/stats/pwc-current.json b/stats/pwc-current.json index d78f4ac93f..fa6d04702a 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,42 +1,4 @@ { - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } - }, - "subtitle" : { - "text" : "[Champions: 3] Last updated at 2019-08-21 14:16:34 GMT" - }, - "chart" : { - "type" : "column" - }, - "series" : [ - { - "colorByPoint" : 1, - "name" : "Perl Weekly Challenge - 022", - "data" : [ - { - "drilldown" : "Duane Powell", - "y" : 1, - "name" : "Duane Powell" - }, - { - "name" : "Simon Proctor", - "drilldown" : "Simon Proctor", - "y" : 1 - }, - { - "y" : 2, - "drilldown" : "Yet Ebreo", - "name" : "Yet Ebreo" - } - ] - } - ], "drilldown" : { "series" : [ { @@ -59,31 +21,84 @@ "id" : "Simon Proctor", "name" : "Simon Proctor" }, + { + "data" : [ + [ + "Perl 5", + 1 + ] + ], + "id" : "Steven Wilson", + "name" : "Steven Wilson" + }, { "name" : "Yet Ebreo", - "id" : "Yet Ebreo", "data" : [ [ "Perl 5", 2 ] - ] + ], + "id" : "Yet Ebreo" } ] }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, "tooltip" : { "pointFormat" : "{point.name}: {point.y:f}
", "headerFormat" : "{series.name}
", "followPointer" : 1 }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, + "series" : [ + { + "name" : "Perl Weekly Challenge - 022", + "colorByPoint" : 1, + "data" : [ + { + "y" : 1, + "drilldown" : "Duane Powell", + "name" : "Duane Powell" + }, + { + "drilldown" : "Simon Proctor", + "name" : "Simon Proctor", + "y" : 1 + }, + { + "y" : 1, + "name" : "Steven Wilson", + "drilldown" : "Steven Wilson" + }, + { + "drilldown" : "Yet Ebreo", + "name" : "Yet Ebreo", + "y" : 2 + } + ] + } + ], + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, "title" : { "text" : "Perl Weekly Challenge - 022" }, + "chart" : { + "type" : "column" + }, + "subtitle" : { + "text" : "[Champions: 4] Last updated at 2019-08-22 11:30:32 GMT" + }, "xAxis" : { "type" : "category" }, diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 71e96c29c9..ba7964c2fd 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -2,15 +2,6 @@ "legend" : { "enabled" : "false" }, - "subtitle" : { - "text" : "Last updated at 2019-08-21 14:16:42 GMT" - }, - "title" : { - "text" : "Perl Weekly Challenge Contributions - 2019" - }, - "chart" : { - "type" : "column" - }, "xAxis" : { "labels" : { "style" : { @@ -20,14 +11,24 @@ }, "type" : "category" }, - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } + "title" : { + "text" : "Perl Weekly Challenge Contributions - 2019" }, "series" : [ { + "name" : "Contributions", + "dataLabels" : { + "color" : "#FFFFFF", + "format" : "{point.y:.0f}", + "enabled" : "true", + "rotation" : -90, + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + }, + "y" : 10, + "align" : "right" + }, "data" : [ [ "Blog", @@ -35,29 +36,28 @@ ], [ "Perl 5", - 886 + 887 ], [ "Perl 6", 526 ] - ], - "name" : "Contributions", - "dataLabels" : { - "y" : 10, - "color" : "#FFFFFF", - "align" : "right", - "format" : "{point.y:.0f}", - "enabled" : "true", - "rotation" : -90, - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - } + ] } ], + "subtitle" : { + "text" : "Last updated at 2019-08-22 11:31:00 GMT" + }, + "chart" : { + "type" : "column" + }, "tooltip" : { "pointFormat" : "{point.y:.0f}" + }, + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 45227be1ac..6405d8e5d1 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,34 +1,155 @@ { - "legend" : { - "enabled" : "false" + "series" : [ + { + "name" : "Perl Weekly Challenge Languages", + "data" : [ + { + "drilldown" : "001", + "y" : 123, + "name" : "#001" + }, + { + "name" : "#002", + "drilldown" : "002", + "y" : 104 + }, + { + "y" : 66, + "drilldown" : "003", + "name" : "#003" + }, + { + "drilldown" : "004", + "y" : 84, + "name" : "#004" + }, + { + "y" : 66, + "drilldown" : "005", + "name" : "#005" + }, + { + "drilldown" : "006", + "y" : 47, + "name" : "#006" + }, + { + "drilldown" : "007", + "y" : 55, + "name" : "#007" + }, + { + "name" : "#008", + "drilldown" : "008", + "y" : 68 + }, + { + "name" : "#009", + "drilldown" : "009", + "y" : 66 + }, + { + "name" : "#010", + "drilldown" : "010", + "y" : 59 + }, + { + "name" : "#011", + "y" : 78, + "drilldown" : "011" + }, + { + "name" : "#012", + "drilldown" : "012", + "y" : 82 + }, + { + "name" : "#013", + "drilldown" : "013", + "y" : 75 + }, + { + "name" : "#014", + "y" : 95, + "drilldown" : "014" + }, + { + "name" : "#015", + "drilldown" : "015", + "y" : 91 + }, + { + "name" : "#016", + "drilldown" : "016", + "y" : 65 + }, + { + "y" : 78, + "drilldown" : "017", + "name" : "#017" + }, + { + "y" : 74, + "drilldown" : "018", + "name" : "#018" + }, + { + "drilldown" : "019", + "y" : 93, + "name" : "#019" + }, + { + "name" : "#020", + "drilldown" : "020", + "y" : 92 + }, + { + "name" : "#021", + "drilldown" : "021", + "y" : 62 + }, + { + "name" : "#022", + "y" : 5, + "drilldown" : "022" + } + ], + "colorByPoint" : "true" + } + ], + "chart" : { + "type" : "column" }, "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-08-21 14:16:42 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-08-22 11:31:00 GMT" + }, + "tooltip" : { + "pointFormat" : "Challenge {point.name}: {point.y:f}
", + "followPointer" : "true", + "headerFormat" : "" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } }, "plotOptions" : { "series" : { "borderWidth" : 0, "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" + "format" : "{point.y}", + "enabled" : 1 } } }, "title" : { "text" : "Perl Weekly Challenge Language" }, - "xAxis" : { - "type" : "category" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, "drilldown" : { "series" : [ { "id" : "001", + "name" : "001", "data" : [ [ "Perl 5", @@ -42,11 +163,11 @@ "Blog", 10 ] - ], - "name" : "001" + ] }, { "name" : "002", + "id" : "002", "data" : [ [ "Perl 5", @@ -60,8 +181,7 @@ "Blog", 9 ] - ], - "id" : "002" + ] }, { "data" : [ @@ -78,8 +198,8 @@ 8 ] ], - "name" : "003", - "id" : "003" + "id" : "003", + "name" : "003" }, { "id" : "004", @@ -100,6 +220,8 @@ ] }, { + "id" : "005", + "name" : "005", "data" : [ [ "Perl 5", @@ -113,12 +235,11 @@ "Blog", 11 ] - ], - "name" : "005", - "id" : "005" + ] }, { "id" : "006", + "name" : "006", "data" : [ [ "Perl 5", @@ -132,11 +253,9 @@ "Blog", 6 ] - ], - "name" : "006" + ] }, { - "name" : "007", "data" : [ [ "Perl 5", @@ -151,7 +270,8 @@ 9 ] ], - "id" : "007" + "id" : "007", + "name" : "007" }, { "id" : "008", @@ -173,6 +293,7 @@ }, { "name" : "009", + "id" : "009", "data" : [ [ "Perl 5", @@ -186,8 +307,7 @@ "Blog", 12 ] - ], - "id" : "009" + ] }, { "data" : [ @@ -208,8 +328,8 @@ "id" : "010" }, { - "id" : "011", "name" : "011", + "id" : "011", "data" : [ [ "Perl 5", @@ -226,8 +346,6 @@ ] }, { - "id" : "012", - "name" : "012", "data" : [ [ "Perl 5", @@ -241,10 +359,13 @@ "Blog", 10 ] - ] + ], + "name" : "012", + "id" : "012" }, { "id" : "013", + "name" : "013", "data" : [ [ "Perl 5", @@ -258,12 +379,11 @@ "Blog", 12 ] - ], - "name" : "013" + ] }, { - "id" : "014", "name" : "014", + "id" : "014", "data" : [ [ "Perl 5", @@ -298,6 +418,8 @@ "id" : "015" }, { + "name" : "016", + "id" : "016", "data" : [ [ "Perl 5", @@ -311,11 +433,10 @@ "Blog", 11 ] - ], - "name" : "016", - "id" : "016" + ] }, { + "name" : "017", "id" : "017", "data" : [ [ @@ -330,11 +451,9 @@ "Blog", 11 ] - ], - "name" : "017" + ] }, { - "name" : "018", "data" : [ [ "Perl 5", @@ -349,9 +468,11 @@ 12 ] ], - "id" : "018" + "id" : "018", + "name" : "018" }, { + "id" : "019", "name" : "019", "data" : [ [ @@ -366,11 +487,9 @@ "Blog", 11 ] - ], - "id" : "019" + ] }, { - "id" : "020", "data" : [ [ "Perl 5", @@ -385,9 +504,12 @@ 12 ] ], + "id" : "020", "name" : "020" }, { + "name" : "021", + "id" : "021", "data" : [ [ "Perl 5", @@ -401,16 +523,13 @@ "Blog", 6 ] - ], - "name" : "021", - "id" : "021" + ] }, { - "id" : "022", "data" : [ [ "Perl 5", - 3 + 4 ], [ "Perl 6", @@ -421,134 +540,15 @@ 0 ] ], + "id" : "022", "name" : "022" } ] }, - "series" : [ - { - "name" : "Perl Weekly Challenge Languages", - "colorByPoint" : "true", - "data" : [ - { - "drilldown" : "001", - "y" : 123, - "name" : "#001" - }, - { - "drilldown" : "002", - "y" : 104, - "name" : "#002" - }, - { - "drilldown" : "003", - "y" : 66, - "name" : "#003" - }, - { - "drilldown" : "004", - "y" : 84, - "name" : "#004" - }, - { - "name" : "#005", - "y" : 66, - "drilldown" : "005" - }, - { - "name" : "#006", - "y" : 47, - "drilldown" : "006" - }, - { - "drilldown" : "007", - "name" : "#007", - "y" : 55 - }, - { - "drilldown" : "008", - "y" : 68, - "name" : "#008" - }, - { - "y" : 66, - "name" : "#009", - "drilldown" : "009" - }, - { - "drilldown" : "010", - "name" : "#010", - "y" : 59 - }, - { - "drilldown" : "011", - "y" : 78, - "name" : "#011" - }, - { - "drilldown" : "012", - "name" : "#012", - "y" : 82 - }, - { - "name" : "#013", - "y" : 75, - "drilldown" : "013" - }, - { - "y" : 95, - "name" : "#014", - "drilldown" : "014" - }, - { - "name" : "#015", - "y" : 91, - "drilldown" : "015" - }, - { - "y" : 65, - "name" : "#016", - "drilldown" : "016" - }, - { - "drilldown" : "017", - "y" : 78, - "name" : "#017" - }, - { - "drilldown" : "018", - "y" : 74, - "name" : "#018" - }, - { - "drilldown" : "019", - "y" : 93, - "name" : "#019" - }, - { - "y" : 92, - "name" : "#020", - "drilldown" : "020" - }, - { - "y" : 62, - "name" : "#021", - "drilldown" : "021" - }, - { - "name" : "#022", - "y" : 4, - "drilldown" : "022" - } - ] - } - ], - "tooltip" : { - "headerFormat" : "", - "followPointer" : "true", - "pointFormat" : "Challenge {point.name}: {point.y:f}
" + "legend" : { + "enabled" : "false" }, - "chart" : { - "type" : "column" + "xAxis" : { + "type" : "category" } } diff --git a/stats/pwc-leaders.json b/stats/pwc-leaders.json index 23fe790261..f7ada17a26 100644 --- a/stats/pwc-leaders.json +++ b/stats/pwc-leaders.json @@ -1,307 +1,49 @@ { - "chart" : { - "type" : "column" - }, - "subtitle" : { - "text" : "Click the columns to drilldown the score breakdown. Last updated at 2019-08-21 14:16:39 GMT" - }, - "series" : [ - { - "data" : [ - { - "name" : "#1: Joelle Maslak", - "y" : 228, - "drilldown" : "Joelle Maslak" - }, - { - "drilldown" : "Laurent Rosenfeld", - "y" : 222, - "name" : "#2: Laurent Rosenfeld" - }, - { - "drilldown" : "Jaldhar H. Vyas", - "y" : 178, - "name" : "#3: Jaldhar H. Vyas" - }, - { - "drilldown" : "Ruben Westerberg", - "y" : 156, - "name" : "#4: Ruben Westerberg" - }, - { - "y" : 136, - "drilldown" : "Adam Russell", - "name" : "#5: Adam Russell" - }, - { - "drilldown" : "Athanasius", - "y" : 134, - "name" : "#6: Athanasius" - }, - { - "name" : "#7: Arne Sommer", - "drilldown" : "Arne Sommer", - "y" : 118 - }, - { - "name" : "#8: Kian-Meng Ang", - "drilldown" : "Kian-Meng Ang", - "y" : 118 - }, - { - "drilldown" : "E. Choroba", - "y" : 102, - "name" : "#9: E. Choroba" - }, - { - "drilldown" : "Francis Whittle", - "y" : 92, - "name" : "#10: Francis Whittle" - }, - { - "y" : 92, - "drilldown" : "Simon Proctor", - "name" : "#11: Simon Proctor" - }, - { - "drilldown" : "Dave Jacoby", - "y" : 90, - "name" : "#12: Dave Jacoby" - }, - { - "name" : "#13: Andrezgz", - "drilldown" : "Andrezgz", - "y" : 80 - }, - { - "name" : "#14: Feng Chang", - "drilldown" : "Feng Chang", - "y" : 80 - }, - { - "name" : "#15: Daniel Mantovani", - "drilldown" : "Daniel Mantovani", - "y" : 72 - }, - { - "drilldown" : "Duncan C. White", - "y" : 72, - "name" : "#16: Duncan C. White" - }, - { - "name" : "#17: Gustavo Chaves", - "y" : 72, - "drilldown" : "Gustavo Chaves" - }, - { - "drilldown" : "Yozen Hernandez", - "y" : 70, - "name" : "#18: Yozen Hernandez" - }, - { - "drilldown" : "Steven Wilson", - "y" : 68, - "name" : "#19: Steven Wilson" - }, - { - "name" : "#20: Jo Christian Oterhals", - "y" : 56, - "drilldown" : "Jo Christian Oterhals" - }, - { - "name" : "#21: Roger Bell West", - "y" : 52, - "drilldown" : "Roger Bell West" - }, - { - "drilldown" : "Guillermo Ramos", - "y" : 46, - "name" : "#22: Guillermo Ramos" - }, - { - "name" : "#23: Mark Senn", - "y" : 46, - "drilldown" : "Mark Senn" - }, - { - "drilldown" : "Dr James A. Smith", - "y" : 44, - "name" : "#24: Dr James A. Smith" - }, - { - "name" : "#25: Ozzy", - "y" : 44, - "drilldown" : "Ozzy" - }, - { - "drilldown" : "Veesh Goldman", - "y" : 42, - "name" : "#26: Veesh Goldman" - }, - { - "name" : "#27: Kevin Colyer", - "drilldown" : "Kevin Colyer", - "y" : 38 - }, - { - "name" : "#28: Lubos Kolouch", - "drilldown" : "Lubos Kolouch", - "y" : 38 - }, - { - "y" : 32, - "drilldown" : "Duane Powell", - "name" : "#29: Duane Powell" - }, - { - "y" : 32, - "drilldown" : "Nick Logan", - "name" : "#30: Nick Logan" - }, - { - "name" : "#31: Noud", - "drilldown" : "Noud", - "y" : 32 - }, - { - "name" : "#32: Lars Balker", - "y" : 28, - "drilldown" : "Lars Balker" - }, - { - "y" : 24, - "drilldown" : "Jaime Corchado", - "name" : "#33: Jaime Corchado" - }, - { - "name" : "#34: Maxim Nechaev", - "y" : 24, - "drilldown" : "Maxim Nechaev" - }, - { - "name" : "#35: Randy Lauen", - "drilldown" : "Randy Lauen", - "y" : 24 - }, - { - "name" : "#36: Alicia Bielsa", - "drilldown" : "Alicia Bielsa", - "y" : 22 - }, - { - "name" : "#37: Doug Schrag", - "y" : 20, - "drilldown" : "Doug Schrag" - }, - { - "name" : "#38: Neil Bowers", - "drilldown" : "Neil Bowers", - "y" : 18 - }, - { - "drilldown" : "Dave Cross", - "y" : 16, - "name" : "#39: Dave Cross" - }, - { - "name" : "#40: Pete Houston", - "drilldown" : "Pete Houston", - "y" : 16 - }, - { - "y" : 16, - "drilldown" : "Robert Gratza", - "name" : "#41: Robert Gratza" - }, - { - "y" : 14, - "drilldown" : "John Barrett", - "name" : "#42: John Barrett" - }, - { - "drilldown" : "Khalid", - "y" : 14, - "name" : "#43: Khalid" - }, - { - "y" : 14, - "drilldown" : "Walt Mankowski", - "name" : "#44: Walt Mankowski" - }, - { - "y" : 12, - "drilldown" : "Aaron Sherman", - "name" : "#45: Aaron Sherman" - }, - { - "drilldown" : "Donald Hunter", - "y" : 12, - "name" : "#46: Donald Hunter" - }, - { - "name" : "#47: Kivanc Yazan", - "y" : 12, - "drilldown" : "Kivanc Yazan" - }, - { - "y" : 12, - "drilldown" : "Maxim Kolodyazhny", - "name" : "#48: Maxim Kolodyazhny" - }, - { - "drilldown" : "Philippe Bruhat", - "y" : 12, - "name" : "#49: Philippe Bruhat" - }, - { - "y" : 12, - "drilldown" : "Sergio Iglesias", - "name" : "#50: Sergio Iglesias" - } - ], - "colorByPoint" : "true", - "name" : "Perl Weekly Challenge Leaders" + "yAxis" : { + "title" : { + "text" : "Total Score" } - ], + }, "drilldown" : { "series" : [ { - "name" : "Joelle Maslak", "id" : "Joelle Maslak", + "name" : "Joelle Maslak", "data" : [ [ "Perl 6", 55 ], - [ - "Perl 5", - 55 - ], [ "Blog", 4 + ], + [ + "Perl 5", + 55 ] ] }, { + "id" : "Laurent Rosenfeld", "data" : [ - [ - "Blog", - 28 - ], [ "Perl 5", 42 ], + [ + "Blog", + 28 + ], [ "Perl 6", 41 ] ], - "id" : "Laurent Rosenfeld", "name" : "Laurent Rosenfeld" }, { + "id" : "Jaldhar H. Vyas", "name" : "Jaldhar H. Vyas", "data" : [ [ @@ -316,11 +58,10 @@ "Perl 5", 42 ] - ], - "id" : "Jaldhar H. Vyas" + ] }, { - "name" : "Ruben Westerberg", + "id" : "Ruben Westerberg", "data" : [ [ "Perl 5", @@ -331,11 +72,16 @@ 39 ] ], - "id" : "Ruben Westerberg" + "name" : "Ruben Westerberg" }, { "id" : "Adam Russell", + "name" : "Adam Russell", "data" : [ + [ + "Blog", + 22 + ], [ "Perl 6", 3 @@ -343,48 +89,42 @@ [ "Perl 5", 43 - ], - [ - "Blog", - 22 ] - ], - "name" : "Adam Russell" + ] }, { - "name" : "Athanasius", + "id" : "Athanasius", "data" : [ [ "Blog", 3 ], - [ - "Perl 5", - 44 - ], [ "Perl 6", 20 + ], + [ + "Perl 5", + 44 ] ], - "id" : "Athanasius" + "name" : "Athanasius" }, { + "id" : "Arne Sommer", + "name" : "Arne Sommer", "data" : [ - [ - "Blog", - 20 - ], [ "Perl 6", 39 + ], + [ + "Blog", + 20 ] - ], - "id" : "Arne Sommer", - "name" : "Arne Sommer" + ] }, { - "name" : "Kian-Meng Ang", "id" : "Kian-Meng Ang", "data" : [ [ @@ -395,66 +135,67 @@ "Blog", 25 ] - ] + ], + "name" : "Kian-Meng Ang" }, { - "name" : "E. Choroba", - "id" : "E. Choroba", "data" : [ - [ - "Blog", - 17 - ], [ "Perl 5", 34 + ], + [ + "Blog", + 17 ] - ] + ], + "name" : "E. Choroba", + "id" : "E. Choroba" }, { "name" : "Francis Whittle", "data" : [ - [ - "Perl 6", - 37 - ], [ "Blog", 9 + ], + [ + "Perl 6", + 37 ] ], "id" : "Francis Whittle" }, { + "id" : "Simon Proctor", "data" : [ [ - "Perl 6", - 35 + "Perl 5", + 4 ], [ "Blog", 7 ], [ - "Perl 5", - 4 + "Perl 6", + 35 ] ], - "id" : "Simon Proctor", "name" : "Simon Proctor" }, { - "name" : "Dave Jacoby", "id" : "Dave Jacoby", + "name" : "Dave Jacoby", "data" : [ - [ - "Blog", - 18 - ], [ "Perl 5", 26 ], + [ + "Blog", + 18 + ], [ "Perl 6", 1 @@ -462,17 +203,17 @@ ] }, { + "id" : "Andrezgz", "data" : [ [ "Perl 5", 40 ] ], - "id" : "Andrezgz", "name" : "Andrezgz" }, { - "id" : "Feng Chang", + "name" : "Feng Chang", "data" : [ [ "Perl 5", @@ -483,91 +224,90 @@ 21 ] ], - "name" : "Feng Chang" + "id" : "Feng Chang" }, { - "name" : "Daniel Mantovani", - "id" : "Daniel Mantovani", "data" : [ [ "Perl 5", 36 ] - ] + ], + "name" : "Daniel Mantovani", + "id" : "Daniel Mantovani" }, { - "name" : "Duncan C. White", "id" : "Duncan C. White", "data" : [ [ "Perl 5", 36 ] - ] + ], + "name" : "Duncan C. White" }, { + "name" : "Gustavo Chaves", "data" : [ - [ - "Perl 5", - 32 - ], [ "Blog", 4 + ], + [ + "Perl 5", + 32 ] ], - "id" : "Gustavo Chaves", - "name" : "Gustavo Chaves" + "id" : "Gustavo Chaves" }, { + "id" : "Steven Wilson", "data" : [ [ "Perl 5", - 21 + 32 ], [ "Blog", - 14 + 3 ] ], - "id" : "Yozen Hernandez", - "name" : "Yozen Hernandez" + "name" : "Steven Wilson" }, { - "id" : "Steven Wilson", + "name" : "Yozen Hernandez", "data" : [ [ "Blog", - 3 + 14 ], [ "Perl 5", - 31 + 21 ] ], - "name" : "Steven Wilson" + "id" : "Yozen Hernandez" }, { - "name" : "Jo Christian Oterhals", + "id" : "Jo Christian Oterhals", "data" : [ - [ - "Perl 6", - 15 - ], [ "Blog", 7 ], + [ + "Perl 6", + 15 + ], [ "Perl 5", 6 ] ], - "id" : "Jo Christian Oterhals" + "name" : "Jo Christian Oterhals" }, { "name" : "Roger Bell West", - "id" : "Roger Bell West", "data" : [ [ "Perl 6", @@ -581,11 +321,12 @@ "Perl 5", 16 ] - ] + ], + "id" : "Roger Bell West" }, { - "name" : "Guillermo Ramos", "id" : "Guillermo Ramos", + "name" : "Guillermo Ramos", "data" : [ [ "Perl 5", @@ -594,21 +335,22 @@ ] }, { + "name" : "Mark Senn", "data" : [ - [ - "Blog", - 7 - ], [ "Perl 6", 16 + ], + [ + "Blog", + 7 ] ], - "id" : "Mark Senn", - "name" : "Mark Senn" + "id" : "Mark Senn" }, { "id" : "Dr James A. Smith", + "name" : "Dr James A. Smith", "data" : [ [ "Perl 6", @@ -618,36 +360,35 @@ "Perl 5", 12 ] - ], - "name" : "Dr James A. Smith" + ] }, { - "name" : "Ozzy", "data" : [ [ "Perl 6", 22 ] ], + "name" : "Ozzy", "id" : "Ozzy" }, { - "name" : "Veesh Goldman", "id" : "Veesh Goldman", "data" : [ - [ - "Perl 6", - 2 - ], [ "Perl 5", 16 ], + [ + "Perl 6", + 2 + ], [ "Blog", 3 ] - ] + ], + "name" : "Veesh Goldman" }, { "name" : "Kevin Colyer", @@ -661,27 +402,26 @@ }, { "name" : "Lubos Kolouch", - "id" : "Lubos Kolouch", "data" : [ [ "Perl 5", 19 ] - ] + ], + "id" : "Lubos Kolouch" }, { - "id" : "Duane Powell", "data" : [ [ "Perl 5", 16 ] ], - "name" : "Duane Powell" + "name" : "Duane P