The Weekly Challenge - 225

Monday, Jul 10, 2023| 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: Max Words

10. TASK #2: Left Right Sum Diff


HEADLINES


Welcome to the Week #225 of The Weekly Challenge.

I would like to apologize for declaring Matthias Muth twice champion. It shows my mental state. Let me get this correct first.

So the champion of month, June 2023, is Avery Adams. He joined the Team PWC in the Week #205. As of today, he has shared 28 Perl solutions and 29 blog posts.

Talking about correction, I need to find new winner for the ebook #44 as I declared Peter Meszaros twice by mistake.

Andrew Shitov, our in-house Raku Reviewer, surprised us all with the blog post showing the power of new class feature of Perl v5.38.

Today, we are giving away Coupon #44 to Andreas Voegele for the book, Learning Perl Exercises by brian d foy. I will share the details with you in a separate email.

PAST WINNERS

  S. No.    Name S. No.  Name
1.  Cheok-Yin Fung 2.  W. Luis Mochan
3.  Robert DiCicco 4.  Kueppo Wesley
5.  Solathian 6.  Dario Mazzeo
7.  Peter Campbell Smith   8.  Kjetil Skotheim
9.  Neils van Dijke 10.  Laurent Rosenfeld  
11.  Duncan C. White 12.  Ali Moradi
13.  Jorg Sommrey 14.  James Smith
15.  Alexander Pankoff 16.  Simon Green
17.  Robbie Hatley 18.  Bob Lied
19.  Athanasius 20.  David Ferrone
21.  Thomas Kohler 22.  Adam Russell
23.  E. Choroba 24.  Pip Stuart
25.  Roger Bell_West 26.  Flavio Poletti
27.  Dave Jacoby 28.  Mariano Spadaccini
29.  Lubos Kolouch 30.  Matthew Neleigh
31.  Paulo Custodio 32.  Tyler Bird
33.  Carlos Oliveira 34.  Avery Adams
35.  Matthias Muth 36.  Leo Manfredi
37.  Peter Meszaros 38.  Arne Sommer
39.  Jaldhar H. Vyas 40.  Mark Anderson
41.  Rob Turner 42.  BarrOff
43.  Robert Ransbottom 44.  Andreas Voegele
45.  Jan Krnavek 46.  Steven Wilson
47.  Bruce Gray 48.
49. 50.

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

  Week      Perl       Raku       Blog   
   220       49       29       18   
   221       39       27       16   
   222       56       30       19   
   223       44       25       16   
   224       38       21       15   

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

  Week      Guests       Contributions       Languages   
   220       06       32       10   
   221       07       23       09   
   222       10       41       14   
   223       09       37       13   
   224       08       32       13   

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  (1641)
 2. Haskell (563)
 3. Ruby    (538)
 4. Lua     (483)
 5. C       (429)
 6. Rust    (391)
 7. C++     (385)
 8. BQN     (299)
 9. Go      (258)
10. Java    (238)

Blogs with Creative Title


1. Numbered Notes by Arne Sommer.

2. Passing Notes by Avery Adams.

3. Addictive additive by Matthias Muth.

4. Strings and sequences by Peter Campbell Smith.

5. Specially Additive Number Notes by Roger Bell_West.


GitHub Repository Stats


1. Commits: 33,161 (+78)

2. Pull Requests: 8,333 (+28)

3. Contributors: 226

4. Fork: 285

5. Stars: 159



Our solo sponsor Pete Sergeant has been a great support to keep us motivated. We are lucky that he agreed to continue the journey with us in the year 2023. I would like to personally thank Pete and his entire team for their generosity. It would be great if we could add few more to sponsor the prize money so that we could go back and declare weekly champions as we have done in the past. I hope and wish this will become possible in 2023. The amount doesn’t have to be huge. However, it would be nice to show off bunch of supporters. If an organisation comes forward and supports us then that would be the ultimate achievement.


RECAP


Quick recap of The Weekly Challenge - 224 by Mohammad S 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 #224.

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


Task 1: Max Words

Submitted by: Mohammad S Anwar

You are given a list of sentences, @list.


A sentence is a list of words that are separated by a single space with no leading or trailing spaces.


Write a script to find out the maximum number of words that appear in a single sentence.

Example 1

Input: @list = ("Perl and Raku belong to the same family.",
                "I love Perl.",
                "The Perl and Raku Conference.")
Output: 8

Example 2

Input: @list = ("The Weekly Challenge.",
                "Python is the most popular guest language.",
                "Team PWC has over 300 members.")
Output: 7

Task 2: Left Right Sum Diff

Submitted by: Mohammad S Anwar

You are given an array of integers, @ints.

Write a script to return left right sum diff array as shown below:


@ints = (a, b, c, d, e)

@left  = (0, a, (a+b), (a+b+c))
@right = ((c+d+e), (d+e), e, 0)
@left_right_sum_diff = ( | 0 - (c+d+e) |,
                         | a - (d+e)   |,
                         | (a+b) - e   |,
                         | (a+b+c) - 0 | )

Example 1:

Input: @ints = (10, 4, 8, 3)
Output: (15, 1, 11, 22)

@left  = (0, 10, 14, 22)
@right = (15, 11, 3, 0)

@left_right_sum_diff = ( |0-15|, |10-11|, |14-3|, |22-0|)
                     = (15, 1, 11, 22)

Example 2:

Input: @ints = (1)
Output: (0)

@left  = (0)
@right = (0)

@left_right_sum_diff = ( |0-0| ) = (0)

Example 3:

Input: @ints = (1, 2, 3, 4, 5)
Output: (14, 11, 6, 1, 10)

@left  = (0, 1, 3, 6, 10)
@right = (14, 12, 9, 5, 0)

@left_right_sum_diff = ( |0-14|, |1-12|, |3-9|, |6-5|, |10-0|)
                     = (14, 11, 6, 1, 10)


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


SO WHAT DO YOU THINK ?

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

Contact with me