The Weekly Challenge - 281

Monday, Aug 5, 2024| 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: Check Color

10. TASK #2: Knight’s Move


HEADLINES


Welcome to the Week #281 of The Weekly Challenge.

Today is the first Monday of the month and time to declare our next champion. With great pride, I announce Andrew Schneider as the next Champion of the Month. As of today, he shared 20 solutions in Perl and 7 blog posts.

Welcome back, Adam Russell, and thanks for sharing solutions in Perl. And on top, we received bonus blog post.

Thank you, Ryan Thompson, for sharing solutions to Week #277 in Perl. We even received bonus blog post.

Thank you, Peter Meszaros, for sharing solutions in Tcl for the first time.

We now have another chart added about guest contributions breakdown per year. Please find below some interesting data.


    Year 2019: 809
    Year 2020: 1211
    Year 2021: 2840
    Year 2022: 2936
    Year 2023: 2628
    Year 2024: 2053

Year 2024 stats is as of today i.e. 2024-08-05.


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

  Week      Perl       Raku       Blog   
   276       62       32       27   
   277       66       30       29   
   278       57       28       24   
   279       56       28       16   
   280       56       28       27   

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

  Week      Guests       Contributions       Languages   
   276       16       74       21   
   277       16       53       18   
   278       13       68       21   
   279       16       66       21   
   280       14       63       22   

TOP 10 Guest Languages


We have seen some movements in the ranking of guest languages. Rust moved up one position, #3. Congratulation all Rust contributors.

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     (2688)
 2. Ruby       (713)
 3. Rust       (701)
 4. Haskell    (692)
 5. Lua        (628)
 6. C          (569)
 7. C++        (530)
 8. JavaScript (461)
 9. Go         (392)
10. BQN        (354)

Blogs with Creative Title


1. Asterisks Appear Twice by Adam Russell.

2. Count Twice by Arne Sommer.

3. Why Is This Interesting? by Dave Jacoby.

4. Regular Pairs by Jorg Sommrey.

5. grepping everything! by Luca Ferrari.

6. There Is More Than One Way To Regex by Matthews Muth.

7. Appear Twice, Count Once by Packy Anderson.

8. Counting the stars by Peter Campbell Smith.

9. The Sudden Appearance of Asterisks by Roger Bell_West.


GitHub Repository Stats


1. Commits: 39,336 (+123)

2. Pull Requests: 10,528 (+39)

3. Contributors: 250

4. Fork: 315

5. Stars: 175 (+1)



With start of Week #268, we have a new sponsor Lance Wicks for the entire year 2024. 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 - 280 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 #280.

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


Task 1: Check Color

Submitted by: Mohammad Sajid Anwar

You are given coordinates, a string that represents the coordinates of a square of the chessboard as shown below:

Week_281_Task_1

Write a script to return true if the square is light, and false if the square is dark.

Example 1

Input: $coordinates = "d3"
Output: true

Example 2

Input: $coordinates = "g5"
Output: false

Example 3

Input: $coordinates = "e6"
Output: true

Task 2: Knight’s Move

Submitted by: Peter Campbell Smith

A Knight in chess can move from its current position to any square two rows or columns plus one column or row away. So in the diagram below, if it starts a S, it can move to any of the squares marked E.

Write a script which takes a starting position and an ending position and calculates the least number of moves required.

Week_281_Task_2

Example 1

Input: $start = 'g2', $end = 'a8'
Ouput: 4

g2 -> e3 -> d5 -> c7 -> a8

Example 2

Input: $start = 'g2', $end = 'h2'
Ouput: 3

g2 -> e3 -> f1 -> h2


Last date to submit the solution 23:59 (UK Time) Sunday 11th August 2024.


SO WHAT DO YOU THINK ?

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

Contact with me