The Weekly Challenge - 166

Monday, May 23, 2022| 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: Hexadecimal Words

10. TASK #2: K-Directory Diff


HEADLINES


Welcome to yet another fun Week #166, thanks to the exciting tasks by Ryan Thompson.

Lets us welcome new member, Roman Kotelnikov with his guest contributions in J.

Talking about guest contributions, this week we had contributions in TypeScript by Julien Fiegehenn.

I was pleasantly surprised to see contributions by Saif Ahmed, our very Champion of The Weekly Challenge after a long break.

Well, we had another Champion of The Weekly Challenge, Wanderdoc, sharing the solutions in Perl after the break.

Good luck for the next challenge.


Blogs with Creative Title


1. Doubly Scalable by Arne Sommer.

2. straight through the point! by James Smith.

3. Dots, lines and whatever fits best by Peter Campbell Smith.

4. Scaling the Fits by Roger Bell_West.


GitHub Repository Stats


1. Commits: 25,363 (+131)

2. Pull Requests: 6,138 (+31)

3. Contributors: 195 (+2)

4. Fork: 248

5. Stars: 132



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 2022. 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 2022. 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 - 165 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


New guest Roman Kotelnikov joined the Team PWC.

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 checkout the guest contributions for the Week #165.

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


Task 1: Hexadecimal Words

Submitted by: Ryan J Thompson

As an old systems programmer, whenever I needed to come up with a 32-bit number, I would reach for the tired old examples like 0xDeadBeef and 0xC0dedBad. I want more!

Write a program that will read from a dictionary and find 2- to 8-letter words that can be “spelled” in hexadecimal, with the addition of the following letter substitutions:

  • o0 (e.g., 0xf00d = “food”)
  • l1
  • i1
  • s5
  • t7

You can use your own dictionary or you can simply open ../../../data/dictionary.txt (relative to your script’s location in our GitHub repository) to access the dictionary of common words from Week #161.

Optional Extras (for an 0xAddedFee, of course!)

  1. Limit the number of “special” letter substitutions in any one result to keep that result at least somewhat comprehensible. (0x51105010 is an actual example from my sample solution you may wish to avoid!)

  2. Find phrases of words that total 8 characters in length (e.g., 0xFee1Face), rather than just individual words.


Task 2: K-Directory Diff

Submitted by: Ryan J Thompson

Given a few (three or more) directories (non-recursively), display a side-by-side difference of files that are missing from at least one of the directories. Do not display files that exist in every directory.

Since the task is non-recursive, if you encounter a subdirectory, append a /, but otherwise treat it the same as a regular file.

Example

Given the following directory structure:

dir_a:
Arial.ttf  Comic_Sans.ttf  Georgia.ttf  Helvetica.ttf  Impact.otf  Verdana.ttf  Old_Fonts/

dir_b:
Arial.ttf  Comic_Sans.ttf  Courier_New.ttf  Helvetica.ttf  Impact.otf  Tahoma.ttf  Verdana.ttf

dir_c:
Arial.ttf  Courier_New.ttf  Helvetica.ttf  Impact.otf  Monaco.ttf  Verdana.ttf

The output should look similar to the following:

dir_a          | dir_b           | dir_c
-------------- | --------------- | ---------------
Comic_Sans.ttf | Comic_Sans.ttf  |
               | Courier_New.ttf | Courier_New.ttf
Georgia.ttf    |                 |
               |                 | Monaco.ttf
Old_Fonts/     |                 |
               | Tahoma.ttf      |


Last date to submit the solution 23:59 (UK Time) Sunday 29th May 2022.


SO WHAT DO YOU THINK ?

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

Contact with me