The Weekly Challenge - 274

Monday, Jun 17, 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: Goat Latin

10. TASK #2: Bus Route


HEADLINES


Welcome to the Week #274 of The Weekly Challenge.

Last week, we had agressive contributions, thanks to every members of Team PWC.

Welcome back, Joelle Maslak and thanks for sharing solutions in Go, Perl and Raku.

Welcome back, Ian Goodnight and thanks for sharing solutions in Perl, Python and TypeScript.

Thank you, Andrew Schneider, for sharing solutions in C++, Julia, Perl and Rust.

Thank you, Mariano Spadaccini for sharing solutions in Elixir, Go, Perl and Python.



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

  Week      Perl       Raku       Blog   
   269       44       30       24   
   270       41       24       27   
   271       54       28       26   
   272       54       30       25   
   273       64       34       26   

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

  Week      Guests       Contributions       Languages   
   269       13       78       24   
   270       11       50       18   
   271       12       57       18   
   272       14       69       22   
   273       17       82       20   

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     (2583)
 2. Ruby       (694)
 3. Haskell    (676)
 4. Rust       (657)
 5. Lua        (614)
 6. C          (547)
 7. C++        (516)
 8. JavaScript (429)
 9. Go         (377)
10. BQN        (336)

Blogs with Creative Title


1. Trying to Be X Percent More Interesting by Andrew Schneider.

2. B of A by Arne Sommer.

3. Round Here by Dave Jacoby.

4. Looking After The Percentage by Jorg Sommrey.

5. quite easy! by Luca Ferrari.

6. Percentages and the ‘BnoA’ Regex by Matthias Muth.

7. Time to count B chars by Packy Anderson.

8. All about characters by Peter Campbell Smith.

9. Building Character by Roger Bell_West.

10. Finding things by Simon Green.


GitHub Repository Stats


1. Commits: 38,579 (+115)

2. Pull Requests: 10,264 (+32)

3. Contributors: 246

4. Fork: 311

5. Stars: 173 (+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 - 273 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 #273.

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


Task 1: Goat Latin

Submitted by: Mohammad Sajid Anwar

You are given a sentence, $sentence.

Write a script to convert the given sentence to Goat Latin, a made up language similar to Pig Latin.

Rules for Goat Latin:

1) If a word begins with a vowel ("a", "e", "i", "o", "u"), append
   "ma" to the end of the word.
2) If a word begins with consonant i.e. not a vowel, remove first
   letter and append it to the end then add "ma".
3) Add letter "a" to the end of first word in the sentence, "aa" to
   the second word, etc etc.

Example 1

Input: $sentence = "I love Perl"
Output: "Imaa ovelmaaa erlPmaaaa"

Example 2

Input: $sentence = "Perl and Raku are friends"
Output: "erlPmaa andmaaa akuRmaaaa aremaaaaa riendsfmaaaaaa"

Example 3

Input: $sentence = "The Weekly Challenge"
Output: "heTmaa eeklyWmaaa hallengeCmaaaa"

Task 2: Bus Route

Submitted by: Peter Campbell Smith

Several bus routes start from a bus stop near my home, and go to the same stop in town. They each run to a set timetable, but they take different times to get into town.

Write a script to find the times - if any - I should let one bus leave and catch a strictly later one in order to get into town strictly sooner.

An input timetable consists of the service interval, the offset within the hour, and the duration of the trip.

Example 1

Input: [ [12, 11, 41], [15, 5, 35] ]
Output: [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]

Route 1 leaves every 12 minutes, starting at 11 minutes past the hour (so 11, 23, ...) and takes 41 minutes. Route 2 leaves every 15 minutes, starting at 5 minutes past (5, 20, ...) and takes 35 minutes.

At 45 minutes past the hour I could take the route 1 bus at 47 past the hour, arriving at 28 minutes past the following hour, but if I wait for the route 2 bus at 50 past I will get to town sooner, at 25 minutes past the next hour.

Example 2

Input: [ [12, 3, 41], [15, 9, 35], [30, 5, 25] ]
Output: [ 0, 1, 2, 3, 25, 26, 27, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 55, 56, 57, 58, 59 ]


Last date to submit the solution 23:59 (UK Time) Sunday 23rd June 2024.


SO WHAT DO YOU THINK ?

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

Contact with me