From 5cdaa96487bf91a52a0bdfc689bb855a9d1e920c Mon Sep 17 00:00:00 2001 From: Mark <53903062+andemark@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:40:00 +0000 Subject: Challenge 240 Solutions (Raku) --- challenge-240/mark-anderson/perl/ch-1.pl | 14 -------------- challenge-240/mark-anderson/perl/ch-2.pl | 9 --------- challenge-240/mark-anderson/raku/ch-1.raku | 15 ++++++++++++++- 3 files changed, 14 insertions(+), 24 deletions(-) delete mode 100644 challenge-240/mark-anderson/perl/ch-1.pl delete mode 100644 challenge-240/mark-anderson/perl/ch-2.pl diff --git a/challenge-240/mark-anderson/perl/ch-1.pl b/challenge-240/mark-anderson/perl/ch-1.pl deleted file mode 100644 index 9abad2e64e..0000000000 --- a/challenge-240/mark-anderson/perl/ch-1.pl +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env perl -use List::Util qw/all zip/; -use experimental qw/signatures/; -use Test2::V0; -plan 3; - -ok acronym([qw/Perl Python Pascal/], 'ppp'); -ok not acronym([qw/Perl Raku/], 'rp'); -ok acronym([qw/Oracle Awk C/], 'oac'); - -sub acronym($arr, $ck) -{ - all { uc $_->[1] eq substr $_->[0], 0, 1 } zip $arr, [split //, $ck] -} diff --git a/challenge-240/mark-anderson/perl/ch-2.pl b/challenge-240/mark-anderson/perl/ch-2.pl deleted file mode 100644 index 604c5ea8ba..0000000000 --- a/challenge-240/mark-anderson/perl/ch-2.pl +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env perl -use experimental qw/signatures/; -use Test2::V0; -plan 2; - -is build_array([0,2,1,5,3,4]), [0,1,2,4,5,3]; -is build_array([5,0,1,2,3,4]), [4,5,0,1,2,3]; - -sub build_array($arr) { [ @$arr[@$arr] ] } diff --git a/challenge-240/mark-anderson/raku/ch-1.raku b/challenge-240/mark-anderson/raku/ch-1.raku index 10e7e3f8c7..bfc89678c9 100644 --- a/challenge-240/mark-anderson/raku/ch-1.raku +++ b/challenge-240/mark-anderson/raku/ch-1.raku @@ -5,7 +5,20 @@ ok acronym(, 'ppp'); nok acronym(, 'rp'); ok acronym(, 'oac'); +# This solution gives a warning but I don't think it should. + +# Whitespace is insignificant in raku regexes but it gives a warning +# that whitespace is insignificant? + +# It only does this when there is 1 whitespace character. If there +# are 2 or more it doesn't. + +# For example, from docs.raku.org/language/regexes +# say so "I used Photoshop®" ~~ m:i/ photo shop /; # OUTPUT: «True␤» +# gives a warning but if there are 2 spaces between photo and shop then +# there is no warning. + sub acronym(@a, $ck) { - so all map { .[0].starts-with(.[1].uc) }, (@a Z $ck.comb) + so $ck ~~ m:i/ <{ "@a.match(/ <|w> <:Lu> /, :g)" }> / } -- cgit From 3b93a59b03a79729da8e247e8c494db6e41a647e Mon Sep 17 00:00:00 2001 From: Mark <53903062+andemark@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:58:57 +0000 Subject: Challenge 240 Solutions (Raku) --- challenge-240/mark-anderson/raku/ch-1.raku | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/challenge-240/mark-anderson/raku/ch-1.raku b/challenge-240/mark-anderson/raku/ch-1.raku index bfc89678c9..2a8a84bc88 100644 --- a/challenge-240/mark-anderson/raku/ch-1.raku +++ b/challenge-240/mark-anderson/raku/ch-1.raku @@ -10,12 +10,11 @@ ok acronym(, 'oac'); # Whitespace is insignificant in raku regexes but it gives a warning # that whitespace is insignificant? -# It only does this when there is 1 whitespace character. If there -# are 2 or more it doesn't. +# It only does this when there is 1 whitespace character. # For example, from docs.raku.org/language/regexes # say so "I used Photoshop®" ~~ m:i/ photo shop /; # OUTPUT: «True␤» -# gives a warning but if there are 2 spaces between photo and shop then +# gives a warning but if there are 2 spaces between 'photo' and 'shop' # there is no warning. sub acronym(@a, $ck) -- cgit From ac7fb40147cf4f29f3099aa991fe34c66e271c79 Mon Sep 17 00:00:00 2001 From: Mark <53903062+andemark@users.noreply.github.com> Date: Tue, 24 Oct 2023 23:04:16 +0000 Subject: Challenge 240 Solutions (Raku) --- challenge-240/mark-anderson/raku/ch-1.raku | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-240/mark-anderson/raku/ch-1.raku b/challenge-240/mark-anderson/raku/ch-1.raku index 2a8a84bc88..1521e3c205 100644 --- a/challenge-240/mark-anderson/raku/ch-1.raku +++ b/challenge-240/mark-anderson/raku/ch-1.raku @@ -7,7 +7,7 @@ ok acronym(, 'oac'); # This solution gives a warning but I don't think it should. -# Whitespace is insignificant in raku regexes but it gives a warning +# Whitespace is insignificant in Raku regexes but it gives a warning # that whitespace is insignificant? # It only does this when there is 1 whitespace character. -- cgit From 3ceb97e25c19ce4d6981ea07ee4299fafba34574 Mon Sep 17 00:00:00 2001 From: Mark <53903062+andemark@users.noreply.github.com> Date: Tue, 24 Oct 2023 23:12:26 +0000 Subject: Challenge 240 Solutions (Raku) --- challenge-240/mark-anderson/raku/ch-1.raku | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-240/mark-anderson/raku/ch-1.raku b/challenge-240/mark-anderson/raku/ch-1.raku index 1521e3c205..befd600794 100644 --- a/challenge-240/mark-anderson/raku/ch-1.raku +++ b/challenge-240/mark-anderson/raku/ch-1.raku @@ -19,5 +19,5 @@ ok acronym(, 'oac'); sub acronym(@a, $ck) { - so $ck ~~ m:i/ <{ "@a.match(/ <|w> <:Lu> /, :g)" }> / + so $ck ~~ m:i/^ <{ "@a.match(/ <|w> <:Lu> /, :g)" }> $/ } -- cgit From 2c2329835cbc517ae6cbf5adddecd5cb7457fe81 Mon Sep 17 00:00:00 2001 From: Mark <53903062+andemark@users.noreply.github.com> Date: Wed, 25 Oct 2023 01:23:40 +0000 Subject: Challenge 240 Solutions (Raku) --- challenge-240/mark-anderson/raku/ch-1.raku | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenge-240/mark-anderson/raku/ch-1.raku b/challenge-240/mark-anderson/raku/ch-1.raku index befd600794..506c44c4aa 100644 --- a/challenge-240/mark-anderson/raku/ch-1.raku +++ b/challenge-240/mark-anderson/raku/ch-1.raku @@ -12,8 +12,9 @@ ok acronym(, 'oac'); # It only does this when there is 1 whitespace character. -# For example, from docs.raku.org/language/regexes +# For example, # say so "I used Photoshop®" ~~ m:i/ photo shop /; # OUTPUT: «True␤» +# from docs.raku.org/language/regexes#Sigspace # gives a warning but if there are 2 spaces between 'photo' and 'shop' # there is no warning. -- cgit From 904a452b6982c42b45ac703272219b3f9ff83f0d Mon Sep 17 00:00:00 2001 From: "Jaldhar H. Vyas" Date: Wed, 25 Oct 2023 10:15:58 -0400 Subject: Challenge 240 by Jaldhar H. Vyas. --- challenge-240/jaldhar-h-vyas/blog.txt | 1 + challenge-240/jaldhar-h-vyas/perl/ch-1.sh | 3 +++ challenge-240/jaldhar-h-vyas/perl/ch-2.sh | 3 +++ challenge-240/jaldhar-h-vyas/raku/ch-1.sh | 3 +++ challenge-240/jaldhar-h-vyas/raku/ch-2.sh | 3 +++ 5 files changed, 13 insertions(+) create mode 100644 challenge-240/jaldhar-h-vyas/blog.txt create mode 100755 challenge-240/jaldhar-h-vyas/perl/ch-1.sh create mode 100755 challenge-240/jaldhar-h-vyas/perl/ch-2.sh create mode 100755 challenge-240/jaldhar-h-vyas/raku/ch-1.sh create mode 100755 challenge-240/jaldhar-h-vyas/raku/ch-2.sh diff --git a/challenge-240/jaldhar-h-vyas/blog.txt b/challenge-240/jaldhar-h-vyas/blog.txt new file mode 100644 index 0000000000..57622a8c92 --- /dev/null +++ b/challenge-240/jaldhar-h-vyas/blog.txt @@ -0,0 +1 @@ +https://www.braincells.com/perl/2023/10/perl_weekly_challenge_week_240.html diff --git a/challenge-240/jaldhar-h-vyas/perl/ch-1.sh b/challenge-240/jaldhar-h-vyas/perl/ch-1.sh new file mode 100755 index 0000000000..cd86ddd136 --- /dev/null +++ b/challenge-240/jaldhar-h-vyas/perl/ch-1.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +perl -E 'say shift eq (join q{},map{lc substr $_,0,1}@ARGV)?"true":"false"' "$@" \ No newline at end of file diff --git a/challenge-240/jaldhar-h-vyas/perl/ch-2.sh b/challenge-240/jaldhar-h-vyas/perl/ch-2.sh new file mode 100755 index 0000000000..07980b87aa --- /dev/null +++ b/challenge-240/jaldhar-h-vyas/perl/ch-2.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +perl -E 'say q{(},(join q{, },map{@ARGV[$_]}@ARGV),q{)}' "$@" \ No newline at end of file diff --git a/challenge-240/jaldhar-h-vyas/raku/ch-1.sh b/challenge-240/jaldhar-h-vyas/raku/ch-1.sh new file mode 100755 index 0000000000..8e2a35a8c3 --- /dev/null +++ b/challenge-240/jaldhar-h-vyas/raku/ch-1.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +raku -e 'say @*ARGS[0] eq @*ARGS[1..*].map({$_.substr(0,1).lc}).join(q{})' "$@" \ No newline at end of file diff --git a/challenge-240/jaldhar-h-vyas/raku/ch-2.sh b/challenge-240/jaldhar-h-vyas/raku/ch-2.sh new file mode 100755 index 0000000000..0663bcc979 --- /dev/null +++ b/challenge-240/jaldhar-h-vyas/raku/ch-2.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +raku -e 'say q{(},@*ARGS.map({@*ARGS[$_]}).join(q{, }),q{)}' "$@" \ No newline at end of file -- cgit From 606c7757261834508835608b15adfcd20b0c2bdf Mon Sep 17 00:00:00 2001 From: Bob Lied Date: Wed, 25 Oct 2023 11:40:38 -0500 Subject: Week 240 solutions and blog reference --- challenge-240/bob-lied/README | 6 ++--- challenge-240/bob-lied/blog.txt | 1 + challenge-240/bob-lied/perl/ch-1.pl | 50 +++++++++++++++++++++++++++++++++++++ challenge-240/bob-lied/perl/ch-2.pl | 42 +++++++++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 challenge-240/bob-lied/blog.txt create mode 100644 challenge-240/bob-lied/perl/ch-1.pl create mode 100644 challenge-240/bob-lied/perl/ch-2.pl diff --git a/challenge-240/bob-lied/README b/challenge-240/bob-lied/README index 770b310f25..152add2898 100644 --- a/challenge-240/bob-lied/README +++ b/challenge-240/bob-lied/README @@ -1,4 +1,4 @@ -Solutions to weekly challenge 239 by Bob Lied +Solutions to weekly challenge 240 by Bob Lied -https://perlweeklychallenge.org/blog/perl-weekly-challenge-239/ -https://github.com/boblied/perlweeklychallenge-club/tree/master/challenge-239/bob-lied +https://perlweeklychallenge.org/blog/perl-weekly-challenge-240/ +https://github.com/boblied/perlweeklychallenge-club/tree/master/challenge-240/bob-lied diff --git a/challenge-240/bob-lied/blog.txt b/challenge-240/bob-lied/blog.txt new file mode 100644 index 0000000000..a836f78439 --- /dev/null +++ b/challenge-240/bob-lied/blog.txt @@ -0,0 +1 @@ +https://dev.to/boblied/pwc-240-just-a-slice-no-loop-please-ill-eat-it-here-3l0l diff --git a/challenge-240/bob-lied/perl/ch-1.pl b/challenge-240/bob-lied/perl/ch-1.pl new file mode 100644 index 0000000000..297dc52f9f --- /dev/null +++ b/challenge-240/bob-lied/perl/ch-1.pl @@ -0,0 +1,50 @@ +#!/usr/bin/env perl +# vim:set ts=4 sw=4 sts=4 et ai wm=0 nu: +#============================================================================= +# ch-1.pl Perl Weekly Challenge 240 Task 1 Acronym +#============================================================================= +# Copyright (c) 2023, Bob Lied +#============================================================================= +# You are given an array of strings and a check string. +# Write a script to find out if the check string is the acronym of the +# words in the given array. +# Example 1 Input: @str = ("Perl", "Python", "Pascal") $chk = "ppp" +# Output: true +# Example 2 Input: @str = ("Perl", "Raku") $chk = "rp" +# Output: false +# Example 3 Input: @str = ("Oracle", "Awk", "C") $chk = "oac" +# Output: true +#============================================================================= + +use v5.38; +use builtin qw/true false/; no warnings "experimental::builtin"; + +use Getopt::Long; +my $Verbose = 0; +my $DoTest = 0; + +my $Check = ""; + +GetOptions("check:s" => \$Check, "test" => \$DoTest, "verbose" => \$Verbose); +exit(!runTest()) if $DoTest; + +die "Usage: $0 -c check stringlist..." unless $Check and @ARGV > 0; + +say acronym($Check, @ARGV) ? "true" : "false"; + +sub acronym($chk, @str) +{ + return $chk eq join("", map { lc substr($_, 0, 1) } @str) +} + +sub runTest +{ + use Test2::V0; + use builtin qw/false true/; no warnings "experimental::builtin"; + + is( acronym( "ppp", qw(Perl Python Pascal)), true, "Example 1"); + is( acronym( "rp" , qw(Perl Raku )), false, "Example 2"); + is( acronym( "oac", qw(Oracle Awk C )), true, "Example 3"); + + done_testing; +} diff --git a/challenge-240/bob-lied/perl/ch-2.pl b/challenge-240/bob-lied/perl/ch-2.pl new file mode 100644 index 0000000000..855742b6cc --- /dev/null +++ b/challenge-240/bob-lied/perl/ch-2.pl @@ -0,0 +1,42 @@ +#!/usr/bin/env perl +# vim:set ts=4 sw=4 sts=4 et ai wm=0 nu: +#============================================================================= +# ch-2.pl Perl Weekly Challenge 240 Task 2 Build Array +#============================================================================= +# Copyright (c) 2023, Bob Lied +#============================================================================= +# You are given an array of integers. +# Write a script to create an array such that new[i] = old[old[i]] +# where 0 <= i < new.length. +# Example 1 Input: @int = (0, 2, 1, 5, 3, 4) +# Output: (0, 1, 2, 4, 5, 3) +# Example 2 Input: @int = (5, 0, 1, 2, 3, 4) +# Output: (4, 5, 0, 1, 2, 3) +#============================================================================= + +use v5.38; + +use Getopt::Long; +my $Verbose = 0; +my $DoTest = 0; + +GetOptions("test" => \$DoTest, "verbose" => \$Verbose); +exit(!runTest()) if $DoTest; + +say "(", join(", ", buildArray(@ARGV)->@*), ")"; + +sub buildArray(@int) +{ + + return [ @int[@int] ]; +} + +sub runTest +{ + use Test2::V0; + + is( buildArray(0,2,1,5,3,4), [0,1,2,4,5,3], "Example 1"); + is( buildArray(5,0,1,2,3,4), [4,5,0,1,2,3], "Example 2"); + + done_testing; +} -- cgit From d55c3f72c71856fd8916f648b433b949cbb50bad Mon Sep 17 00:00:00 2001 From: Mariano Spadaccini Date: Thu, 26 Oct 2023 16:05:00 +0200 Subject: PWC-240 in Perl --- challenge-240/spadacciniweb/perl/ch-1.pl | 49 ++++++++++++++++++++++++++++++++ challenge-240/spadacciniweb/perl/ch-2.pl | 35 +++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 challenge-240/spadacciniweb/perl/ch-1.pl create mode 100644 challenge-240/spadacciniweb/perl/ch-2.pl diff --git a/challenge-240/spadacciniweb/perl/ch-1.pl b/challenge-240/spadacciniweb/perl/ch-1.pl new file mode 100644 index 0000000000..79f77757e6 --- /dev/null +++ b/challenge-240/spadacciniweb/perl/ch-1.pl @@ -0,0 +1,49 @@ +#!/usr/bin/env perl + +# Task 1: Acronym +# Submitted by: Mohammad S Anwar +# +# You are given an array of strings and a check string. +# Write a script to find out if the check string is the acronym of the words in the given array. +# +# Example 1 +# Input: @str = ("Perl", "Python", "Pascal") +# $chk = "ppp" +# Output: true +# +# Example 2 +# Input: @str = ("Perl", "Raku") +# $chk = "rp" +# Output: false +# +# Example 3 +# Input: @str = ("Oracle", "Awk", "C") +# $chk = "oac" +# Output: true + +use strict; +use warnings; + +my @arrays = ([ ["Perl", "Python", "Pascal"], + "ppp" + ], + [ ["Perl", "Raku"], + "rp" + ], + [ ["Oracle", "Awk", "C"], + "oac" + ] + ); + + +foreach my $strings (@arrays) { + my $str1 = join '', map { lc(substr $_, 0, 1) } + @{$strings->[0]}; + printf "[%s] acronym? '%s' -> %s\n", (join ', ', map { sprintf '"%s"', $_ } + @{$strings->[0]} + ), + $strings->[1], + ($str1 eq $strings->[1]) + ? 'true' + : 'false'; +} diff --git a/challenge-240/spadacciniweb/perl/ch-2.pl b/challenge-240/spadacciniweb/perl/ch-2.pl new file mode 100644 index 0000000000..a84a9f449f --- /dev/null +++ b/challenge-240/spadacciniweb/perl/ch-2.pl @@ -0,0 +1,35 @@ +#!/usr/bin/env perl + +# Task 2: Build Array +# Submitted by: Mohammad S Anwar +# +# You are given an array of integers. +# Write a script to create an array such that new[i] = old[old[i]] where 0 <= i < new.length. +# +# Example 1 +# +# Input: @int = (0, 2, 1, 5, 3, 4) +# Output: (0, 1, 2, 4, 5, 3) +# +# Example 2 +# Input: @int = (5, 0, 1, 2, 3, 4) +# Output: (4, 5, 0, 1, 2, 3) + +use strict; +use warnings; + +my @arrs = ([0, 2, 1, 5, 3, 4], + [5, 0, 1, 2, 3, 4] + ); + +foreach my $arr (@arrs) { + foreach my $e (@$arr) { + if ($e >= scalar @$arr) { + print "Element too big\n"; + exit 1; + } + } + printf "(%s) -> Output: (%s)\n", + (join ', ', @$arr), + (join ', ', map { $arr->[$_] } @$arr) +} -- cgit From 143325162b221d525f04fa92ec100d2c8845514b Mon Sep 17 00:00:00 2001 From: razetime Date: Thu, 26 Oct 2023 23:14:12 +0800 Subject: challenge 240 solutions --- challenge-240/razetime/bqn/ch-1.bqn | 6 ++++++ challenge-240/razetime/bqn/ch-2.bqn | 4 ++++ challenge-240/razetime/factor/ch-1.factor | 6 ++++++ challenge-240/razetime/factor/ch-2.factor | 5 +++++ challenge-240/razetime/prolog/ch-1.P | 9 +++++++++ challenge-240/razetime/prolog/ch-2.P | 7 +++++++ challenge-240/razetime/raku/ch-1.raku | 8 ++++++++ challenge-240/razetime/raku/ch-2.raku | 6 ++++++ 8 files changed, 51 insertions(+) create mode 100644 challenge-240/razetime/bqn/ch-1.bqn create mode 100644 challenge-240/razetime/bqn/ch-2.bqn create mode 100644 challenge-240/razetime/factor/ch-1.factor create mode 100644 challenge-240/razetime/factor/ch-2.factor create mode 100644 challenge-240/razetime/prolog/ch-1.P create mode 100644 challenge-240/razetime/prolog/ch-2.P create mode 100644 challenge-240/razetime/raku/ch-1.raku create mode 100644 challenge-240/razetime/raku/ch-2.raku diff --git a/challenge-240/razetime/bqn/ch-1.bqn b/challenge-240/razetime/bqn/ch-1.bqn new file mode 100644 index 0000000000..818e4770c1 --- /dev/null +++ b/challenge-240/razetime/bqn/ch-1.bqn @@ -0,0 +1,6 @@ +LC←+⟜(32×1="A["⊸⍋) +Ch1←{𝕨≡LC⊑¨𝕩} + +! 1 ≡ ⟨"Perl", "Python", "Pascal"⟩ Ch1˜ "ppp" +! 0 ≡ ⟨"Perl", "Raku"⟩ Ch1˜ "rp" +! 1 ≡ ⟨"Oracle", "Awk", "C"⟩ Ch1˜ "oac" diff --git a/challenge-240/razetime/bqn/ch-2.bqn b/challenge-240/razetime/bqn/ch-2.bqn new file mode 100644 index 0000000000..a1f7ca99fb --- /dev/null +++ b/challenge-240/razetime/bqn/ch-2.bqn @@ -0,0 +1,4 @@ +Ch2←⊏˜ + +! ⟨0, 1, 2, 4, 5, 3⟩ ≡ Ch2 ⟨0, 2, 1, 5, 3, 4⟩ +! ⟨4, 5, 0, 1, 2, 3⟩ ≡ Ch2⟨5, 0, 1, 2, 3, 4⟩ diff --git a/challenge-240/razetime/factor/ch-1.factor b/challenge-240/razetime/factor/ch-1.factor new file mode 100644 index 0000000000..409eb33561 --- /dev/null +++ b/challenge-240/razetime/factor/ch-1.factor @@ -0,0 +1,6 @@ +USING: kernel sequences ascii ; +IN: pwc-240-1 +: ch-1 ( str seq -- t/f ) [ first ] "" map-as >lower = ; +"ppp" { "Perl" "Python" "Pascal" } ch-1 t assert= +"rp" { "Perl" "Raku" } ch-1 f assert= +"oac" { "Oracle" "Awk" "C" } ch-1 t assert= diff --git a/challenge-240/razetime/factor/ch-2.factor b/challenge-240/razetime/factor/ch-2.factor new file mode 100644 index 0000000000..bdff6ba71a --- /dev/null +++ b/challenge-240/razetime/factor/ch-2.factor @@ -0,0 +1,5 @@ +USING: kernel sequences ; +IN: pwc-240-1 +: ch-1 ( seq -- seq' ) dup nths ; +{ 0 2 1 5 3 4 } ch-1 { 0 1 2 4 5 3 } assert= +{ 5 0 1 2 3 4 } ch-1 { 4 5 0 1 2 3 } assert= diff --git a/challenge-240/razetime/prolog/ch-1.P b/challenge-240/razetime/prolog/ch-1.P new file mode 100644 index 0000000000..1fb21bda2c --- /dev/null +++ b/challenge-240/razetime/prolog/ch-1.P @@ -0,0 +1,9 @@ +:- use_module(library(lambda)). +:- use_module(library(lists)). +:- use_module(library(charsio)). + +fl(X,Y):-nth0(0,X,Z),char_type(Z,to_lower(Y)). +fl([],false). + +ch1(S,C,true):-maplist(fl,S,C). +ch1(_,_,false). diff --git a/challenge-240/razetime/prolog/ch-2.P b/challenge-240/razetime/prolog/ch-2.P new file mode 100644 index 0000000000..4246a13b4b --- /dev/null +++ b/challenge-240/razetime/prolog/ch-2.P @@ -0,0 +1,7 @@ +:- use_module(library(lists)). +:- use_module(library(lambda)). + +ch2(A,B):-maplist(\X^Y^nth0(X,A,Y),A,B). + +?- ch2([0, 2, 1, 5, 3, 4],[0, 1, 2, 4, 5, 3]). +?- ch2([5, 0, 1, 2, 3, 4],[4, 5, 0, 1, 2, 3]). diff --git a/challenge-240/razetime/raku/ch-1.raku b/challenge-240/razetime/raku/ch-1.raku new file mode 100644 index 0000000000..52374d350c --- /dev/null +++ b/challenge-240/razetime/raku/ch-1.raku @@ -0,0 +1,8 @@ +use Test; +sub ch1{([~] @^a.map({.substr(0,1)})).lc===$^b} + +plan 3; + +ok ch1( ["Perl", "Python", "Pascal"], "ppp"), 'Test Case 1'; +ok !ch1(["Perl", "Raku"], "rp"), 'Test Case 2'; +ok ch1(["Oracle", "Awk", "C"], "oac"), 'Test Case 3'; diff --git a/challenge-240/razetime/raku/ch-2.raku b/challenge-240/razetime/raku/ch-2.raku new file mode 100644 index 0000000000..e70642927e --- /dev/null +++ b/challenge-240/razetime/raku/ch-2.raku @@ -0,0 +1,6 @@ +use Test; + +sub ch2(@a){@a.map({@a[$_]})} + +ok (ch2((0, 2, 1, 5, 3, 4)) == (0, 1, 2, 4, 5, 3)), 'Test 1'; +ok (ch2((5, 0, 1, 2, 3, 4)) == (4, 5, 0, 1, 2, 3)), 'Test 2' -- cgit From 1c6aa04c99a7392b5c761f2fd168408b67d536a1 Mon Sep 17 00:00:00 2001 From: arnesom Date: Thu, 26 Oct 2023 20:39:14 +0200 Subject: Arne Sommer --- challenge-240/arne-sommer/blog.txt | 1 + challenge-240/arne-sommer/perl/acronym-map.pl | 13 +++++++++++++ challenge-240/arne-sommer/perl/acronym.pl | 16 ++++++++++++++++ challenge-240/arne-sommer/perl/build-array-perl | 12 ++++++++++++ challenge-240/arne-sommer/perl/ch-1.pl | 13 +++++++++++++ challenge-240/arne-sommer/perl/ch-2.pl | 12 ++++++++++++ challenge-240/arne-sommer/raku/acronym | 7 +++++++ challenge-240/arne-sommer/raku/build-array | 7 +++++++ challenge-240/arne-sommer/raku/ch-1.raku | 7 +++++++ challenge-240/arne-sommer/raku/ch-2.raku | 7 +++++++ 10 files changed, 95 insertions(+) create mode 100644 challenge-240/arne-sommer/blog.txt create mode 100755 challenge-240/arne-sommer/perl/acronym-map.pl create mode 100755 challenge-240/arne-sommer/perl/acronym.pl create mode 100755 challenge-240/arne-sommer/perl/build-array-perl create mode 100755 challenge-240/arne-sommer/perl/ch-1.pl create mode 100755 challenge-240/arne-sommer/perl/ch-2.pl create mode 100755 challenge-240/arne-sommer/raku/acronym create mode 100755 challenge-240/arne-sommer/raku/build-array create mode 100755 challenge-240/arne-sommer/raku/ch-1.raku create mode 100755 challenge-240/arne-sommer/raku/ch-2.raku diff --git a/challenge-240/arne-sommer/blog.txt b/challenge-240/arne-sommer/blog.txt new file mode 100644 index 0000000000..c645b2e80f --- /dev/null +++ b/challenge-240/arne-sommer/blog.txt @@ -0,0 +1 @@ +https://raku-musings.com/acronymous-array.html diff --git a/challenge-240/arne-sommer/perl/acronym-map.pl b/challenge-240/arne-sommer/perl/acronym-map.pl new file mode 100755 index 0000000000..b71aa4675b --- /dev/null +++ b/challenge-240/arne-sommer/perl/acronym-map.pl @@ -0,0 +1,13 @@ +#! /usr/bin/env perl + +use strict; +use warnings; + +die "At least 2 elements required" unless @ARGV > 1; + +my $chk = shift(@ARGV); +my @str = @ARGV; + +join("", map { lc(substr($_,0,1)) } @str) eq lc($chk) + ? print "true\n" + : print "false\n"; diff --git a/challenge-240/arne-sommer/perl/acronym.pl b/challenge-240/arne-sommer/perl/acronym.pl new file mode 100755 index 0000000000..50d6663ea9 --- /dev/null +++ b/challenge-240/arne-sommer/perl/acronym.pl @@ -0,0 +1,16 @@ +#! /usr/bin/env perl + +die "At least 2 elements required" unless @ARGV > 1; + +my $chk = shift(@ARGV); +my @str = @ARGV; +my $acronym = ""; + +for my $str (@str) +{ + $acronym .= lc(substr($str,0,1)); +} + +$acronym eq lc($chk) + ? print "true\n" + : print "false\n"; diff --git a/challenge-240/arne-sommer/perl/build-array-perl b/challenge-240/arne-sommer/perl/build-array-perl new file mode 100755 index 0000000000..1c4906dd1c --- /dev/null +++ b/challenge-240/arne-sommer/perl/build-array-perl @@ -0,0 +1,12 @@ +#! /usr/bin/env perl + +use Perl6::Junction "all"; + +die "At least one value" unless @ARGV > 0; +die "Non-negative integers only" unless all(@ARGV) == qr/^\d+$/; + +my @int = @ARGV; +my $last_index = @int -1; +my @output = map { $int[$int[$_]] } (0 .. $last_index); + +print "(", join(", ", @output), ")\n"; diff --git a/challenge-240/arne-sommer/perl/ch-1.pl b/challenge-240/arne-sommer/perl/ch-1.pl new file mode 100755 index 0000000000..b71aa4675b --- /dev/null +++ b/challenge-240/arne-sommer/perl/ch-1.pl @@ -0,0 +1,13 @@ +#! /usr/bin/env perl + +use strict; +use warnings; + +die "At least 2 elements required" unless @ARGV > 1; + +my $chk = shift(@ARGV); +my @str = @ARGV; + +join("", map { lc(substr($_,0,1)) } @str) eq lc($chk) + ? print "true\n" + : print "false\n"; diff --git a/challenge-240/arne-sommer/perl/ch-2.pl b/challenge-240/arne-sommer/perl/ch-2.pl new file mode 100755 index 0000000000..1c4906dd1c --- /dev/null +++ b/challenge-240/arne-sommer/perl/ch-2.pl @@ -0,0 +1,12 @@ +#! /usr/bin/env perl + +use Perl6::Junction "all"; + +die "At least one value" unless @ARGV > 0; +die "Non-negative integers only" unless all(@ARGV) == qr/^\d+$/; + +my @int = @ARGV; +my $last_index = @int -1; +my @output = map { $int[$int[$_]] } (0 .. $last_index); + +print "(", join(", ", @output), ")\n"; diff --git a/challenge-240/arne-sommer/raku/acronym b/challenge-240/arne-sommer/raku/acronym new file mode 100755 index 0000000000..025f709e59 --- /dev/null +++ b/challenge-240/arne-sommer/raku/acronym @@ -0,0 +1,7 @@ +#! /usr/bin/env raku + +unit sub MAIN ($chk, *@str where @str.elems > 0); + +say @str>>.substr(0,1).join.lc eq $chk.lc + ?? 'true' + !! 'false'; diff --git a/challenge-240/arne-sommer/raku/build-array b/challenge-240/arne-sommer/raku/build-array new file mode 100755 index 0000000000..5a51903d52 --- /dev/null +++ b/challenge-240/arne-sommer/raku/build-array @@ -0,0 +1,7 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@int where @int.elems > 0 && all(@int) ~~ UInt && @int.max <= @int.end); + +my @output = (^@int.elems).map({ @int[@int[$_]] }); + +say "({ @output.join(", ") })"; diff --git a/challenge-240/arne-sommer/raku/ch-1.raku b/challenge-240/arne-sommer/raku/ch-1.raku new file mode 100755 index 0000000000..025f709e59 --- /dev/null +++ b/challenge-240/arne-sommer/raku/ch-1.raku @@ -0,0 +1,7 @@ +#! /usr/bin/env raku + +unit sub MAIN ($chk, *@str where @str.elems > 0); + +say @str>>.substr(0,1).join.lc eq $chk.lc + ?? 'true' + !! 'false'; diff --git a/challenge-240/arne-sommer/raku/ch-2.raku b/challenge-240/arne-sommer/raku/ch-2.raku new file mode 100755 index 0000000000..5a51903d52 --- /dev/null +++ b/challenge-240/arne-sommer/raku/ch-2.raku @@ -0,0 +1,7 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@int where @int.elems > 0 && all(@int) ~~ UInt && @int.max <= @int.end); + +my @output = (^@int.elems).map({ @int[@int[$_]] }); + +say "({ @output.join(", ") })"; -- cgit From 068fea5965668f9ff7381c131c7ac479802a34f8 Mon Sep 17 00:00:00 2001 From: Jörg Sommrey <28217714+jo-37@users.noreply.github.com> Date: Mon, 23 Oct 2023 22:23:22 +0200 Subject: Solution to task 1 --- challenge-240/jo-37/perl/ch-1.pl | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 challenge-240/jo-37/perl/ch-1.pl diff --git a/challenge-240/jo-37/perl/ch-1.pl b/challenge-240/jo-37/perl/ch-1.pl new file mode 100755 index 0000000000..dcbfc1f5e5 --- /dev/null +++ b/challenge-240/jo-37/perl/ch-1.pl @@ -0,0 +1,63 @@ +#!/usr/bin/perl -s + +use v5.24; +use Test2::V0; + +our ($tests, $examples, $acronym); + +run_tests() if $tests || $examples; # does not return + +die < "Perl", "Python", "Pascal"), 'example 1'; + ok !is_acronym("rp" => "Perl", "Raku"), 'example 2'; + ok is_acronym("oac" => "Oracle", "Awk", "C"), 'example 3'; + } + + SKIP: { + skip "tests" unless $tests; + + ok is_acronym("äöü" => "Ärger", "Öde", "Übel"), 'umlaute'; + } + + done_testing; + exit; +} -- cgit From 3bcda3d0efe27a5eeecbd0212fb047719099e101 Mon Sep 17 00:00:00 2001 From: Jörg Sommrey <28217714+jo-37@users.noreply.github.com> Date: Mon, 23 Oct 2023 22:23:35 +0200 Subject: Solution to task 2 --- challenge-240/jo-37/perl/ch-2.pl | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 challenge-240/jo-37/perl/ch-2.pl diff --git a/challenge-240/jo-37/perl/ch-2.pl b/challenge-240/jo-37/perl/ch-2.pl new file mode 100755 index 0000000000..6df72e95c8 --- /dev/null +++ b/challenge-240/jo-37/perl/ch-2.pl @@ -0,0 +1,54 @@ +#!/usr/bin/perl -s + +use v5.24; +use Test2::V0; + +our ($tests, $examples); + +run_tests() if $tests || $examples; # does not return + +die < Date: Sat, 28 Oct 2023 21:51:07 +0200 Subject: challenge-240-kjetillll --- challenge-240/kjetillll/perl/ch-1.pl | 10 ++++++++++ challenge-240/kjetillll/perl/ch-2.pl | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 challenge-240/kjetillll/perl/ch-1.pl create mode 100644 challenge-240/kjetillll/perl/ch-2.pl diff --git a/challenge-240/kjetillll/perl/ch-1.pl b/challenge-240/kjetillll/perl/ch-1.pl new file mode 100644 index 0000000000..bc34a76e64 --- /dev/null +++ b/challenge-240/kjetillll/perl/ch-1.pl @@ -0,0 +1,10 @@ +use v5.10; use strict; use warnings; + +sub is_acronym { lc pop eq lc "@_"=~s/(\S)\S*\s*/$1/gr } + +for my $test ( + { str => ["Perl", "Python", "Pascal"], chk => "ppp", output => 1 }, + { str => ["Perl", "Raku"], chk => "rp", output => 0 }, + { str => ["Oracle", "Awk", "C"], chk => "oac", output => 1 } +) +{ say is_acronym( @{ $$test{str} }, $$test{chk} ) == $$test{output} ? '✓' : '☠' } diff --git a/challenge-240/kjetillll/perl/ch-2.pl b/challenge-240/kjetillll/perl/ch-2.pl new file mode 100644 index 0000000000..77d993a06a --- /dev/null +++ b/challenge-240/kjetillll/perl/ch-2.pl @@ -0,0 +1,13 @@ +use v5.10; use strict; use warnings; + +sub build_array { map $_[$_], @_ } + +for my $test ( + { input => [0, 2, 1, 5, 3, 4], output => [0, 1, 2, 4, 5, 3] }, + { input => [5, 0, 1, 2, 3, 4], output => [4, 5, 0, 1, 2, 3] } +) +{ + say "@{[ build_array(@{ $$test{input} }) ]}" + eq "@{ $$test{output} }" + ? '✓' : '☠' +} -- cgit From 5bc6ce02e03374b99919bcf2db5e278ae47c8994 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Sat, 28 Oct 2023 21:26:41 +0100 Subject: - Added solutions by Mariano Spadacinni. - Added solutions by Raghu R. - Added solutions by Bob Lied. - Added solutions by Jaldhar H. Vyas. - Added solutions by Arne Sommer. - Added solutions by Jorg Sommrey. - Added solutions by Kjetil Skotheim. --- stats/pwc-current.json | 299 ++++-- stats/pwc-language-breakdown-summary.json | 80 +- stats/pwc-language-breakdown.json | 1624 ++++++++++++++--------------- stats/pwc-leaders.json | 810 +++++++------- stats/pwc-summary-1-30.json | 46 +- stats/pwc-summary-121-150.json | 42 +- stats/pwc-summary-151-180.json | 36 +- stats/pwc-summary-181-210.json | 100 +- stats/pwc-summary-211-240.json | 128 +-- stats/pwc-summary-241-270.json | 102 +- stats/pwc-summary-271-300.json | 44 +- stats/pwc-summary-31-60.json | 116 +-- stats/pwc-summary-61-90.json | 122 +-- stats/pwc-summary-91-120.json | 132 +-- stats/pwc-summary.json | 76 +- 15 files changed, 1939 insertions(+), 1818 deletions(-) diff --git a/stats/pwc-current.json b/stats/pwc-current.json index f19afb6974..7a649aafbe 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,76 +1,130 @@ { + "xAxis" : { + "type" : "category" + }, + "subtitle" : { + "text" : "[Champions: 25] Last updated at 2023-10-28 20:24:23 GMT" + }, + "tooltip" : { + "followPointer" : 1, + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
" + }, + "title" : { + "text" : "The Weekly Challenge - 240" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, "series" : [ { - "name" : "The Weekly Challenge - 240", + "colorByPoint" : 1, "data" : [ { "name" : "Ali Moradi", - "drilldown" : "Ali Moradi", + "y" : 5, + "drilldown" : "Ali Moradi" + }, + { + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", "y" : 5 }, + { + "drilldown" : "Bob Lied", + "name" : "Bob Lied", + "y" : 3 + }, { "drilldown" : "Dave Jacoby", "y" : 2, "name" : "Dave Jacoby" }, { - "name" : "David Ferrone", "y" : 2, + "name" : "David Ferrone", "drilldown" : "David Ferrone" }, { - "name" : "E. Choroba", "drilldown" : "E. Choroba", + "name" : "E. Choroba", "y" : 2 }, { - "drilldown" : "Lubos Kolouch", "y" : 5, - "name" : "Lubos Kolouch" + "name" : "Jaldhar H. Vyas", + "drilldown" : "Jaldhar H. Vyas" }, { - "drilldown" : "Luca Ferrari", + "name" : "Jorg Sommrey", + "y" : 2, + "drilldown" : "Jorg Sommrey" + }, + { + "name" : "Kjetil Skotheim", + "y" : 2, + "drilldown" : "Kjetil Skotheim" + }, + { + "y" : 5, + "name" : "Lubos Kolouch", + "drilldown" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", "y" : 10, - "name" : "Luca Ferrari" + "drilldown" : "Luca Ferrari" + }, + { + "drilldown" : "Mariano Spadaccini", + "y" : 2, + "name" : "Mariano Spadaccini" }, { + "y" : 2, "name" : "Mark Anderson", - "y" : 4, "drilldown" : "Mark Anderson" }, { - "name" : "Matthew Neleigh", + "drilldown" : "Matthew Neleigh", "y" : 2, - "drilldown" : "Matthew Neleigh" + "name" : "Matthew Neleigh" }, { - "drilldown" : "Niels van Dijke", + "name" : "Niels van Dijke", "y" : 2, - "name" : "Niels van Dijke" + "drilldown" : "Niels van Dijke" }, { + "drilldown" : "Peter Campbell Smith", "name" : "Peter Campbell Smith", - "y" : 3, - "drilldown" : "Peter Campbell Smith" + "y" : 3 }, { + "name" : "Peter Meszaros", "y" : 2, - "drilldown" : "Peter Meszaros", - "name" : "Peter Meszaros" + "drilldown" : "Peter Meszaros" + }, + { + "drilldown" : "Raghu R", + "name" : "Raghu R", + "y" : 2 }, { - "name" : "rcmlz", + "drilldown" : "rcmlz", "y" : 2, - "drilldown" : "rcmlz" + "name" : "rcmlz" }, { - "drilldown" : "Robbie Hatley", + "name" : "Robbie Hatley", "y" : 3, - "name" : "Robbie Hatley" + "drilldown" : "Robbie Hatley" }, { - "name" : "Robert DiCicco", "y" : 4, + "name" : "Robert DiCicco", "drilldown" : "Robert DiCicco" }, { @@ -79,27 +133,43 @@ "name" : "Roger Bell_West" }, { + "y" : 4, "name" : "Thomas Kohler", - "drilldown" : "Thomas Kohler", - "y" : 4 + "drilldown" : "Thomas Kohler" }, { + "y" : 4, "name" : "Ulrich Rieke", - "drilldown" : "Ulrich Rieke", - "y" : 4 + "drilldown" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", "y" : 3, + "name" : "W. Luis Mochan", "drilldown" : "W. Luis Mochan" } ], - "colorByPoint" : 1 + "name" : "The Weekly Challenge - 240" } ], + "chart" : { + "type" : "column" + }, + "legend" : { + "enabled" : 0 + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, "drilldown" : { "series" : [ { + "name" : "Ali Moradi", "data" : [ [ "Perl", @@ -114,32 +184,91 @@ 1 ] ], - "id" : "Ali Moradi", - "name" : "Ali Moradi" + "id" : "Ali Moradi" + }, + { + "id" : "Arne Sommer", + "name" : "Arne Sommer", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] }, { "data" : [ [ "Perl", 2 + ], + [ + "Blog", + 1 ] ], + "name" : "Bob Lied", + "id" : "Bob Lied" + }, + { "id" : "Dave Jacoby", - "name" : "Dave Jacoby" + "name" : "Dave Jacoby", + "data" : [ + [ + "Perl", + 2 + ] + ] }, { - "id" : "David Ferrone", + "data" : [ + [ + "Perl", + 2 + ] + ], "name" : "David Ferrone", + "id" : "David Ferrone" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "E. Choroba", + "id" : "E. Choroba" + }, + { + "id" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", "data" : [ [ "Perl", 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 ] ] }, { - "id" : "E. Choroba", - "name" : "E. Choroba", + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", "data" : [ [ "Perl", @@ -148,6 +277,17 @@ ] }, { + "name" : "Kjetil Skotheim", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Kjetil Skotheim" + }, + { + "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -162,10 +302,10 @@ 1 ] ], - "name" : "Lubos Kolouch", "id" : "Lubos Kolouch" }, { + "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -176,46 +316,51 @@ 8 ] ], - "id" : "Luca Ferrari", "name" : "Luca Ferrari" }, { - "id" : "Mark Anderson", - "name" : "Mark Anderson", + "id" : "Mariano Spadaccini", "data" : [ [ "Perl", 2 - ], + ] + ], + "name" : "Mariano Spadaccini" + }, + { + "name" : "Mark Anderson", + "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Mark Anderson" }, { - "id" : "Matthew Neleigh", - "name" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Matthew Neleigh", + "id" : "Matthew Neleigh" }, { + "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] ], - "name" : "Niels van Dijke", "id" : "Niels van Dijke" }, { - "name" : "Peter Campbell Smith", "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -228,18 +373,28 @@ ] }, { + "id" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] ], - "id" : "Peter Meszaros", "name" : "Peter Meszaros" }, { - "name" : "rcmlz", + "name" : "Raghu R", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Raghu R" + }, + { "id" : "rcmlz", + "name" : "rcmlz", "data" : [ [ "Raku", @@ -248,7 +403,6 @@ ] }, { - "id" : "Robbie Hatley", "name" : "Robbie Hatley", "data" : [ [ @@ -259,11 +413,12 @@ "Blog", 1 ] - ] + ], + "id" : "Robbie Hatley" }, { - "name" : "Robert DiCicco", "id" : "Robert DiCicco", + "name" : "Robert DiCicco", "data" : [ [ "Perl", @@ -286,10 +441,11 @@ 2 ] ], - "id" : "Roger Bell_West", - "name" : "Roger Bell_West" + "name" : "Roger Bell_West", + "id" : "Roger Bell_West" }, { + "id" : "Thomas Kohler", "data" : [ [ "Perl", @@ -300,8 +456,7 @@ 2 ] ], - "name" : "Thomas Kohler", - "id" : "Thomas Kohler" + "name" : "Thomas Kohler" }, { "id" : "Ulrich Rieke", @@ -318,6 +473,7 @@ ] }, { + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -328,43 +484,8 @@ 1 ] ], - "name" : "W. Luis Mochan", "id" : "W. Luis Mochan" } ] - }, - "legend" : { - "enabled" : 0 - }, - "subtitle" : { - "text" : "[Champions: 18] Last updated at 2023-10-24 15:11:21 GMT" - }, - "title" : { - "text" : "The Weekly Challenge - 240" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1, - "headerFormat" : "{series.name}
" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "chart" : { - "type" : "column" - }, - "xAxis" : { - "type" : "category" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index b761bbdecc..a056fe0ea6 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,63 +1,63 @@ { - "xAxis" : { - "type" : "category", - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - } - }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" - }, - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } - }, - "chart" : { - "type" : "column" - }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2023]" - }, - "legend" : { - "enabled" : "false" - }, - "subtitle" : { - "text" : "Last updated at 2023-10-24 15:11:21 GMT" - }, "series" : [ { + "name" : "Contributions", "data" : [ [ "Blog", - 4109 + 4112 ], [ "Perl", - 12352 + 12362 ], [ "Raku", - 7119 + 7125 ] ], - "name" : "Contributions", "dataLabels" : { + "y" : 10, + "rotation" : -90, + "align" : "right", + "enabled" : "true", "style" : { "fontFamily" : "Verdana, sans-serif", "fontSize" : "13px" }, - "y" : 10, - "color" : "#FFFFFF", "format" : "{point.y:.0f}", - "enabled" : "true", - "rotation" : -90, - "align" : "right" + "color" : "#FFFFFF" } } - ] + ], + "legend" : { + "enabled" : "false" + }, + "chart" : { + "type" : "column" + }, + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } + }, + "tooltip" : { + "pointFormat" : "{point.y:.0f}" + }, + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2023]" + }, + "xAxis" : { + "labels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, + "type" : "category" + }, + "subtitle" : { + "text" : "Last updated at 2023-10-28 20:24:23 GMT" + } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 72c559bc26..e842319505 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,13 +1,23 @@ { - "title" : { - "text" : "The Weekly Challenge Language" + "chart" : { + "type" : "column" }, - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2023-10-24 15:11:21 GMT" + "legend" : { + "enabled" : "false" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } }, "drilldown" : { "series" : [ { + "name" : "001", "data" : [ [ "Perl", @@ -22,12 +32,9 @@ 12 ] ], - "id" : "001", - "name" : "001" + "id" : "001" }, { - "name" : "002", - "id" : "002", "data" : [ [ "Perl", @@ -41,9 +48,13 @@ "Blog", 10 ] - ] + ], + "name" : "002", + "id" : "002" }, { + "id" : "003", + "name" : "003", "data" : [ [ "Perl", @@ -57,11 +68,10 @@ "Blog", 9 ] - ], - "name" : "003", - "id" : "003" + ] }, { + "id" : "004", "data" : [ [ "Perl", @@ -76,12 +86,9 @@ 10 ] ], - "id" : "004", "name" : "004" }, { - "name" : "005", - "id" : "005", "data" : [ [ "Perl", @@ -95,9 +102,12 @@ "Blog", 12 ] - ] + ], + "name" : "005", + "id" : "005" }, { + "name" : "006", "data" : [ [ "Perl", @@ -112,12 +122,11 @@ 7 ] ], - "name" : "006", "id" : "006" }, { - "name" : "007", "id" : "007", + "name" : "007", "data" : [ [ "Perl", @@ -152,8 +161,8 @@ ] }, { - "name" : "009", "id" : "009", + "name" : "009", "data" : [ [ "Perl", @@ -170,6 +179,7 @@ ] }, { + "id" : "010", "data" : [ [ "Perl", @@ -184,10 +194,10 @@ 11 ] ], - "name" : "010", - "id" : "010" + "name" : "010" }, { + "name" : "011", "data" : [ [ "Perl", @@ -202,10 +212,11 @@ 10 ] ], - "name" : "011", "id" : "011" }, { + "id" : "012", + "name" : "012", "data" : [ [ "Perl", @@ -219,12 +230,9 @@ "Blog", 11 ] - ], - "id" : "012", - "name" : "012" + ] }, { - "id" : "013", "name" : "013", "data" : [ [ @@ -239,9 +247,12 @@ "Blog", 13 ] - ] + ], + "id" : "013" }, { + "id" : "014", + "name" : "014", "data" : [ [ "Perl", @@ -255,13 +266,9 @@ "Blog", 15 ] - ], - "id" : "014", - "name" : "014" + ] }, { - "name" : "015", - "id" : "015", "data" : [ [ "Perl", @@ -275,10 +282,11 @@ "Blog", 15 ] - ] + ], + "name" : "015", + "id" : "015" }, { - "name" : "016", "id" : "016", "data" : [ [ @@ -293,9 +301,11 @@ "Blog", 13 ] - ] + ], + "name" : "016" }, { + "id" : "017", "data" : [ [ "Perl", @@ -310,11 +320,9 @@ 12 ] ], - "name" : "017", - "id" : "017" + "name" : "017" }, { - "name" : "018", "id" : "018", "data" : [ [ @@ -329,9 +337,11 @@ "Blog", 14 ] - ] + ], + "name" : "018" }, { + "name" : "019", "data" : [ [ "Perl", @@ -346,10 +356,11 @@ 13 ] ], - "name" : "019", "id" : "019" }, { + "id" : "020", + "name" : "020", "data" : [ [ "Perl", @@ -363,9 +374,7 @@ "Blog", 13 ] - ], - "name" : "020", - "id" : "020" + ] }, { "id" : "021", @@ -404,8 +413,6 @@ ] }, { - "name" : "023", - "id" : "023", "data" : [ [ "Perl", @@ -419,11 +426,12 @@ "Blog", 12 ] - ] + ], + "name" : "023", + "id" : "023" }, { "name" : "024", - "id" : "024", "data" : [ [ "Perl", @@ -437,9 +445,11 @@ "Blog", 11 ] - ] + ], + "id" : "024" }, { + "id" : "025", "data" : [ [ "Perl", @@ -454,10 +464,11 @@ 12 ] ], - "name" : "025", - "id" : "025" + "name" : "025" }, { + "id" : "026", + "name" : "026", "data" : [ [ "Perl", @@ -471,13 +482,11 @@ "Blog", 10 ] - ], - "id" : "026", - "name" : "026" + ] }, { - "name" : "027", "id" : "027", + "name" : "027", "data" : [ [ "Perl", @@ -494,8 +503,6 @@ ] }, { - "id" : "028", - "name" : "028", "data" : [ [ "Perl", @@ -509,9 +516,13 @@ "Blog", 9 ] - ] + ], + "name" : "028", + "id" : "028" }, { + "id" : "029", + "name" : "029", "data" : [ [ "Perl", @@ -525,11 +536,11 @@ "Blog", 12 ] - ], - "name" : "029", - "id" : "029" + ] }, { + "id" : "030", + "name" : "030", "data" : [ [ "Perl", @@ -543,12 +554,9 @@ "Blog", 10 ] - ], - "name" : "030", - "id" : "030" + ] }, { - "id" : "031", "name" : "031", "data" : [ [ @@ -563,7 +571,8 @@ "Blog", 9 ] - ] + ], + "id" : "031" }, { "data" : [ @@ -580,8 +589,8 @@ 10 ] ], - "id" : "032", - "name" : "032" + "name" : "032", + "id" : "032" }, { "data" : [ @@ -598,8 +607,8 @@ 10 ] ], - "id" : "033", - "name" : "033" + "name" : "033", + "id" : "033" }, { "data" : [ @@ -616,11 +625,10 @@ 11 ] ], - "id" : "034", - "name" : "034" + "name" : "034", + "id" : "034" }, { - "id" : "035", "name" : "035", "data" : [ [ @@ -635,7 +643,8 @@ "Blog", 9 ] - ] + ], + "id" : "035" }, { "id" : "036", @@ -674,8 +683,6 @@ "id" : "037" }, { - "name" : "038", - "id" : "038", "data" : [ [ "Perl", @@ -689,7 +696,9 @@ "Blog", 12 ] - ] + ], + "name" : "038", + "id" : "038" }, { "data" : [ @@ -710,8 +719,6 @@ "id" : "039" }, { - "name" : "040", - "id" : "040", "data" : [ [ "Perl", @@ -725,9 +732,12 @@ "Blog", 10 ] - ] + ], + "name" : "040", + "id" : "040" }, { + "name" : "041", "data" : [ [ "Perl", @@ -742,11 +752,9 @@ 9 ] ], - "id" : "041", - "name" : "041" + "id" : "041" }, { - "id" : "042", "name" : "042", "data" : [ [ @@ -761,9 +769,11 @@ "Blog", 11 ] - ] + ], + "id" : "042" }, { + "name" : "043", "data" : [ [ "Perl", @@ -778,11 +788,9 @@ 11 ] ], - "id" : "043", - "name" : "043" + "id" : "043" }, { - "name" : "044", "id" : "044", "data" : [ [ @@ -797,9 +805,11 @@ "Blog", 11 ] - ] + ], + "name" : "044" }, { + "id" : "045", "data" : [ [ "Perl", @@ -814,12 +824,10 @@ 11 ] ], - "name" : "045", - "id" : "045" + "name" : "045" }, { "name" : "046", - "id" : "046", "data" : [ [ "Perl", @@ -833,11 +841,12 @@ "Blog", 10 ] - ] + ], + "id" : "046" }, { - "name" : "047", "id" : "047", + "name" : "047", "data" : [ [ "Perl", @@ -854,6 +863,7 @@ ] }, { + "id" : "048", "data" : [ [ "Perl", @@ -868,10 +878,10 @@ 12 ] ], - "name" : "048", - "id" : "048" + "name" : "048" }, { + "name" : "049", "data" : [ [ "Perl", @@ -886,10 +896,10 @@ 12 ] ], - "id" : "049", - "name" : "049" + "id" : "049" }, { + "id" : "050", "data" : [ [ "Perl", @@ -904,10 +914,10 @@ 12 ] ], - "name" : "050", - "id" : "050" + "name" : "050" }, { + "name" : "051", "data" : [ [ "Perl", @@ -922,10 +932,11 @@ 11 ] ], - "name" : "051", "id" : "051" }, { + "id" : "052", + "name" : "052", "data" : [ [ "Perl", @@ -939,9 +950,7 @@ "Blog", 14 ] - ], - "name" : "052", - "id" : "052" + ] }, { "data" : [ @@ -962,6 +971,7 @@ "id" : "053" }, { + "id" : "054", "data" : [ [ "Perl", @@ -976,11 +986,9 @@ 18 ] ], - "id" : "054", "name" : "054" }, { - "name" : "055", "id" : "055", "data" : [ [ @@ -995,9 +1003,11 @@ "Blog", 14 ] - ] + ], + "name" : "055" }, { + "name" : "056", "data" : [ [ "Perl", @@ -1012,11 +1022,9 @@ 17 ] ], - "name" : "056", "id" : "056" }, { - "id" : "057", "name" : "057", "data" : [ [ @@ -1031,9 +1039,11 @@ "Blog", 15 ] - ] + ], + "id" : "057" }, { + "name" : "058", "data" : [ [ "Perl", @@ -1048,7 +1058,6 @@ 13 ] ], - "name" : "058", "id" : "058" }, { @@ -1070,8 +1079,6 @@ ] }, { - "name" : "060", - "id" :