The Weekly Challenge - 308

Monday, Feb 10, 2025| Tags: Perl, Raku

TABLE OF CONTENTS


01. HEADLINES

02. SPONSOR

03. RECAP

04. PERL REVIEW

05. RAKU REVIEW

06. CHART

07. NEW MEMBERS

08. GUESTS

09. TASK #1: Count Common

10. TASK #2: Decode XOR


HEADLINES


Welcome to the Week #308 of The Weekly Challenge.

I noticed a big jump in guest contributions and this can’t be a random jump. This has been going strong steadily in my personal opinion. Having said, we still have strong support for Perl and Raku. And don’t underestimate the power of blog post.

Richard Park is back with bang with his contributions in APL.

Welcome back, Simon Dueck and thanks for your contributions in F#.

Welcome back, Steven Wilson and thanks for your contributions in Perl and Python.

Regular guest contributor, Conor Hoekstra, introduced us to a new programming language Kap alongwith his favourites BQN and Uiua.

With the addition of Kap, we now have 112 guest programming languages i.e. other than Perl and Raku. This number is rather huge, considering we started with just Python in the Week #018 by Orestis Zekai.

As we are talking about guest contributors, how can I ignore the silent but strong guest contributors. Every Monday as soon as the new challenge is out, I find first thing in my inbox from Eric Cheung. He has been regularly contributing in Python mostly. Two other giants guest contributors, I would like to mention is Ulrich Rieke and Roger Bell_West. I don’t need to say anything about their contributions, you all know what they do and do it consistently. There is also one name that I miss now a days and it is Luca Ferrari. Then there is Peter Meszaros who is going strong week after week with this contributions in Go and Python. How about Ali Moradi? Well he is like young boy having so many toys and not sure what to play with every week. I really enjoy his choice of language every week. Having said, there is a pattern if you look at his contributions closely. One more guest contributor who impressed me a lot and he is PokGoPun. He mostly contributes in Go and Python.

How about regular contributions? There are plenty to talk about but for me, every single contributor is special. Having said, I would like to mention few, Athanasius, Thomas Kohler, E. Choroba, Mark Anderson, Wanderdoc.

Two Perl contributors whose story telling in the form of blog post is the most in demand are Peter Campbell Smith and W. Luis Mochan.

There is another Perl contributor who promotes PDL and he is Jorg Sommrey. If you want to explore PDL then you should checkout his contributions.

If we talk about Raku then one name comes straight to my mind is, Arne Sommer. No one can beat him with his story telling ability. He is incredible. Also Jaldhar H. Vyas is another flag bearer for Raku but he also shares contributions in Perl as well.

I would like to thank members who send encouraging messages. It works like a magic, when I feel low. Even, just Thank you, is more than enough to charge me. There are few names, I always look forward to each week, for the cute little messages.

The weekly challenge that we all get on Monday every week for so long, the credit for this goes to the support of team of Early Bird Club. Their contributions is immense and I can’t thank them enough. Without their support, I wouldn’t have survived. Every week, I throw ideas of future challenge and they fine tune them. This is incredible. Best of all, they are humble and polite.

I mentioned few names this week as I had little time to replay what was in my head for so long. There is every possibility, I may have missed few names, so please excuse me for the ommision. It wasn’t deliberate, honestly speaking.

Let’s celebrate each others contributions and learn from them too.


Last 5 weeks mainstream contribution stats. Thank you Team PWC for your support and encouragements.

  Week      Perl       Raku       Blog   
   303       40       18       12   
   304       40       21       14   
   305       42       21       21   
   306       37       18       10   
   307       42       20       12   

Last 5 weeks guest contribution stats. Thank you each and every guest contributors for your time and efforts.

  Week      Guests       Contributions       Languages   
   303       8       37       15   
   304       9       49       21   
   305       9       46       17   
   306       9       40       15   
   307       15       61       23   

TOP 10 Guest Languages


Do you see your favourite language in the Top #10? If not then why not contribute regularly and make it to the top.

 1. Python     (3185)
 2. Rust       (844)
 3. Ruby       (769)
 4. Haskell    (745)
 5. Lua        (686)
 6. C          (590)
 7. C++        (587)
 8. JavaScript (532)
 9. Go         (456)
10. BQN        (412)

Blogs with Creative Title


1. Find the Check by Arne Sommer.

2. Sort And Compare by Jorg Sommrey.

3. Don’t Get Trapped in the Anagram Order! by Matthias Muth.

4. Orders and anagrams by Peter Campbell Smith.

5. Anagram Check by Roger Bell_West.

6. Sorting and counting by Simon Green.


GitHub Repository Stats


1. Commits: 42,225 (+94)

2. Pull Requests: 11,534 (+32)

3. Contributors: 257

4. Fork: 323

5. Stars: 185 (+3)



With start of Week #268, we have a new sponsor Lance Wicks until the end of year 2025. Having said we are looking for more sponsors so that we can go back to weekly winner. If anyone interested please get in touch with us at perlweeklychallenge@yahoo.com. Thanks for your support in advance.


RECAP


Quick recap of The Weekly Challenge - 307 by Mohammad Sajid Anwar.


PERL REVIEW


If you missed any past reviews then please check out the collection.


RAKU REVIEW


If you missed any past reviews then please check out the collection.


CHART


Please take a look at the charts showing interesting data.

I would like to THANK every member of the team for their valuable suggestions. Please do share your experience with us.


NEW MEMBERS


Please find out How to contribute?, if you have any doubts.

Please try the excellent tool EZPWC created by respected member Saif Ahmed of Team PWC.


GUESTS


Please check out the guest contributions for the Week #307.

Please find past solutions by respected guests. Please share your creative solutions in other languages.


Task 1: Count Common

Submitted by: Mohammad Sajid Anwar

You are given two array of strings, @str1 and @str2.

Write a script to return the count of common strings in both arrays.

Example 1

Input: @str1 = ("perl", "weekly", "challenge")
       @str2 = ("raku", "weekly", "challenge")
Output: 2

Example 2

Input: @str1 = ("perl", "raku", "python")
       @str2 = ("python", "java")
Output: 1

Example 3

Input: @str1 = ("guest", "contribution")
       @str2 = ("fun", "weekly", "challenge")
Output: 0

Task 2: Decode XOR

Submitted by: Mohammad Sajid Anwar

You are given an encoded array and an initial integer.

Write a script to find the original array that produced the given encoded array. It was encoded such that encoded[i] = orig[i] XOR orig[i + 1].

Example 1

Input: @encoded = (1, 2, 3), $initial = 1
Output: (1, 0, 2, 1)

Encoded array created like below, if the original array was (1, 0, 2, 1)
$encoded[0] = (1 xor 0) = 1
$encoded[1] = (0 xor 2) = 2
$encoded[2] = (2 xor 1) = 3

Example 2

Input: @encoded = (6, 2, 7, 3), $initial = 4
Output: (4, 2, 0, 7, 4)


Last date to submit the solution 23:59 (UK Time) Sunday 16th February 2025.


SO WHAT DO YOU THINK ?

If you have any suggestions or ideas then please do share with us.

Contact with me