lade...

Packy.dardan.com

Packy.dardan.com

an avatar

Packy’s Place Packy's just 'zis guy, you know?

The blog of Packy Anderson

🌐 Visit Packy.dardan.com 🌐 Packy.dardan.com besuchen

✍️Write rieview ✍️Rezension schreiben 🏷️Get Badge! 🏷️Abzeichen holen! ⚙️Edit entry ⚙️Eintrag bearbeiten 📰News 📰Neuigkeiten

Webfan Website Badge

Tags: anderson

Rieviews

Bewertungen

not yet rated noch nicht bewertet 0%

Be the first one
and write a rieview
about packy.dardan.com.
Sein Sie der erste
und schreiben Sie eine Rezension
über packy.dardan.com.

Packy.dardan.com News

Perl Weekly Challenge: Group the Reverse Position

https://packy.dardan.com/2025/04...

Still working on getting into the swing of weekly blogging again. Nothing jumped out at me for a musical theme this week, so I just picked King Crimson’s Cat Food off the top of my head. Having three cats sleeping … Continue reading

The post Perl Weekly Challenge: Group the Reverse Position first appeared on Packy’s Place.

25.4.2025 05:14Perl Weekly Challenge: Group the Reverse Position
https://packy.dardan.com/2025/04...

Perl Weekly Challenge: The Sequence Goes Round and Round…

https://packy.dardan.com/2025/04...

I haven’t been feeling like blogging lately. In November, my mother, the woman who taught me how to program and was for decades my default person to ask complex SQL questions, went into the hospital because she was having trouble … Continue reading

The post Perl Weekly Challenge: The Sequence Goes Round and Round… first appeared on Packy’s Place.

12.4.2025 01:16Perl Weekly Challenge: The Sequence Goes Round and Round…
https://packy.dardan.com/2025/04...

Perl Weekly Challenge: Compression and Matchsticks

https://packy.dardan.com/2024/11...

I’m not really feeling music recently. I’m not feeling much of anything, but I need to do the challenge. So here’s Perl Weekly Challenge 296. Task 1: String Compression You are given a string of alphabetic characters, $chars. Write a script … Continue reading

The post Perl Weekly Challenge: Compression and Matchsticks first appeared on Packy’s Place.

24.11.2024 21:20Perl Weekly Challenge: Compression and Matchsticks
https://packy.dardan.com/2024/11...

Perl Weekly Challenge: No music, only numbers

https://packy.dardan.com/2024/11...

I was able to work on task 1 on Monday, but I haven’t been able to focus since. Here’s three solutions for task 1 of Perl Weekly Challenge 294. Task 1: Consecutive Sequence You are given an unsorted array of integers, @ints. … Continue reading

The post Perl Weekly Challenge: No music, only numbers first appeared on Packy’s Place.

9.11.2024 19:22Perl Weekly Challenge: No music, only numbers
https://packy.dardan.com/2024/11...

Perl Weekly Challenge: Oh, oh, Domino!

https://packy.dardan.com/2024/11...

Don’t wanna discuss itThink it’s time for a changeYou may get disgustedStart thinking that I’m strange I mean, I guess I am strange for always wanting to include music in the weekly challenge, but with a first challenge like this, … Continue reading

The post Perl Weekly Challenge: Oh, oh, Domino! first appeared on Packy’s Place.

2.11.2024 03:16Perl Weekly Challenge: Oh, oh, Domino!
https://packy.dardan.com/2024/11...

Perl Weekly Challenge: One Challenge, Twice Large

https://packy.dardan.com/2024/10...

You didn’t know what the Weekly Challenge was / Until you met a hacker on a Github bus / I got there in the nick of time / Before he got his code across your git commit line… Yeah, yeah, … Continue reading

The post Perl Weekly Challenge: One Challenge, Twice Large first appeared on Packy’s Place.

27.10.2024 19:05Perl Weekly Challenge: One Challenge, Twice Large
https://packy.dardan.com/2024/10...

Perl Weekly Challenge: You Got to Know When to $HOLD Them

https://packy.dardan.com/2024/10...

This week’s Perl Weekly Challenge task 2 is about poker hands, so the musical theme this week has to be Kenny Rogers’ The Gambler. So ante up and let’s deal out for Perl Weekly Challenge 291. Task 1: Middle Index You … Continue reading

The post Perl Weekly Challenge: You Got to Know When to $HOLD Them first appeared on Packy’s Place.

16.10.2024 06:43Perl Weekly Challenge: You Got to Know When to $HOLD Them
https://packy.dardan.com/2024/10...

Perl Weekly Challenge: Double Your Pleasure, Double Your Luhn

https://packy.dardan.com/2024/10...

Not every time is the music that the Perl Weekly Challenge inspires going to be a Broadway show tune, a banger from classic rock, or even a baroque fugue. Sometimes, it’s going to be a marketing jingle: 🎶 Double your … Continue reading

The post Perl Weekly Challenge: Double Your Pleasure, Double Your Luhn first appeared on Packy’s Place.

10.10.2024 00:11Perl Weekly Challenge: Double Your Pleasure, Double Your Luhn
https://packy.dardan.com/2024/10...

Perl Weekly Challenge: Tirhd Mumixam Prel Welkey Caelhlnge

https://packy.dardan.com/2024/10...

When I think about the second task and how it jumbled words, my mind immediately went to Lewis Carroll, and that meant that tonight’s musical theme needed to be Jefferson Airplane’s White Rabbit. So let’s feed your head on Perl Weekly … Continue reading

The post Perl Weekly Challenge: Tirhd Mumixam Prel Welkey Caelhlnge first appeared on Packy’s Place.

3.10.2024 04:45Perl Weekly Challenge: Tirhd Mumixam Prel Welkey Caelhlnge
https://packy.dardan.com/2024/10...

Perl Weekly Challenge: A Man, A Plan, A Canal… PANAMA!

https://packy.dardan.com/2024/09...

So, when someone mentions palindromes, my mind immediately jumps to my favorite book on mathematics, algorithms, music, art, and philosophy: Gödel, Escher, Bach by Douglas Hofstadter. This was the book that introduced me to the idea of a musical palindrome, … Continue reading

The post Perl Weekly Challenge: A Man, A Plan, A Canal… PANAMA! first appeared on Packy’s Place.

25.9.2024 05:31Perl Weekly Challenge: A Man, A Plan, A Canal… PANAMA!
https://packy.dardan.com/2024/09...

Comment on Perl Weekly Challenge: Bag! Bag! Bag! by Perl Weekly Challenge: Relatively Lucky | Packy’s Place

https://packy.dardan.com/2024/08...

[…] Task 1 last week, we want to use a Bag to count the occurrences of the integers, and then we filter the Bag to keep […]

27.8.2024 03:45Comment on Perl Weekly Challenge: Bag! Bag! Bag! by Perl Weekly Challenge: Relatively Lucky | Packy’s Place
https://packy.dardan.com/2024/08...

Comment on Perl Weekly Challenge: Split ’em away! by packy

https://packy.dardan.com/2024/07...

In reply to <a href="https://packy.dardan.com/2024/07/21/perl-weekly-challenge-split-em-away/#comment-362">Ali</a>. So it would be sub splitString($str) { return $str.lc.comb(/<[aeiou]>/).elems %% 2; }

5.8.2024 04:56Comment on Perl Weekly Challenge: Split ’em away! by packy
https://packy.dardan.com/2024/07...

Comment on Perl Weekly Challenge: Split ’em away! by Ali

https://packy.dardan.com/2024/07...

Great solutions. you can also use Raku's %% operator like .elems %% 2

23.7.2024 04:13Comment on Perl Weekly Challenge: Split ’em away! by Ali
https://packy.dardan.com/2024/07...

Comment on Perl Weekly Challenge: Word Reverse String Sort by Perl Weekly Challenge: Split ’em away! | Packy’s Place

https://packy.dardan.com/2024/07...

[…] a little disappointed, because this week’s Task 1 is pretty much last week’s Task 1 with the ordering being specified in a separate […]

22.7.2024 05:24Comment on Perl Weekly Challenge: Word Reverse String Sort by Perl Weekly Challenge: Split ’em away! | Packy’s Place
https://packy.dardan.com/2024/07...

Comment on Perl Weekly Challenge: Only Ones by packy

https://packy.dardan.com/2024/05...

In reply to <a href="https://packy.dardan.com/2024/05/27/perl-weekly-challenge-only-ones/#comment-296">Laurent Rosenfeld</a>. And I really like <code>[+] $num.base(2).comb</code> as a way to get the Hamming Weight of <code>$num</code>!

30.5.2024 01:58Comment on Perl Weekly Challenge: Only Ones by packy
https://packy.dardan.com/2024/05...

Comment on Perl Weekly Challenge: Only Ones by packy

https://packy.dardan.com/2024/05...

In reply to <a href="https://packy.dardan.com/2024/05/27/perl-weekly-challenge-only-ones/#comment-296">Laurent Rosenfeld</a>. Ooh! Yeah, that is simple!

30.5.2024 01:55Comment on Perl Weekly Challenge: Only Ones by packy
https://packy.dardan.com/2024/05...

Comment on Perl Weekly Challenge: Only Ones by Laurent Rosenfeld

https://packy.dardan.com/2024/05...

The Raku sort function is at least as simple as the Perl sort function, it is actually simpler and more powerful. Check my blog post for an example: https://blogs.perl.org/users/laurent_r/2024/05/perl-weekly-challenge-271-sort-by-1-bits.html

28.5.2024 17:45Comment on Perl Weekly Challenge: Only Ones by Laurent Rosenfeld
https://packy.dardan.com/2024/05...

Comment on Perl Weekly Challenge: I’m The Greatest Target! by packy

https://packy.dardan.com/2024/04...

Ugh. Notes I want to make for myself to remember later: In reading <a href="https://blogs.perl.org/users/laurent_r/2024/04/perl-weekly-challenge-264-greatest-english-letter.html" target="_blank" rel="noopener nofollow ugc">laurent_r's solutions for task 1</a>, I note that rather than using <code>.split('', :skip-empty)</code> on the input string, he uses <code>.comb</code>. Also, rather than making hashes, he uses a Raku <a href="https://docs.raku.org/type/Set" target="_blank" rel="noopener nofollow ugc">Set</a>.

11.4.2024 04:22Comment on Perl Weekly Challenge: I’m The Greatest Target! by packy
https://packy.dardan.com/2024/04...

Comment on Perl Weekly Challenge: The Weakest Split by Perl Weekly Challenge: Odd Char Seems to be the Most Frequent Word | Packy’s Place

https://packy.dardan.com/2024/01...

[…] just like I did back in PWC 247 and PWC 253, I’d like to point out that Python’s Decorate-Sort-Undecorate idiom is really just […]

9.2.2024 04:30Comment on Perl Weekly Challenge: The Weakest Split by Perl Weekly Challenge: Odd Char Seems to be the Most Frequent Word | Packy’s Place
https://packy.dardan.com/2024/01...

Comment on Perl Weekly Challenge: Writing Letter Pairs to Santa by packy

https://packy.dardan.com/2023/12...

I wanted to see if anybody else had a better solution to restarting the Secret Santa solution if it ran out of possible assignments (basically where the only remaining recipient is also the only gifter who doesn't have a recipient, meaning they'd be giving a gift to themselves). On Facebook, the solutions I saw did either the same thing I did, or ignored the problem entirely by choosing a random number seed such that the problem didn't occur. So I went looking for solutions in the commits to the master archive. Choroba (https://github.com/choroba) had a decent one: https://github.com/choroba/perlweeklychallenge-club/blob/f6b060850716e80d482c0c847eae7dde5fae54fd/challenge-247/e-choroba/perl/ch-1.pl He's sacrificing some randomness but he winds up with an algorithm that doesn't produce the same results each time, so it's probably random enough. What he does is first he divides the names into families, then he counts how many people are in those families, then he sorts the names so the people with no other family members in the gift exchange are first, and those with family members follow. The variation in order happens because there's no sorting by last name: in the first example, Cross and Conway are always first but not always in the same order, and then the Anwars and the Walls are next (and always grouped together), but not in the same order. Then it builds a list of recipients by chopping the first list in half and swapping the halves. This mixes up the recipients enough that nobody's in the same position in both lists (thus preventing someone giving a gift to themselves) and if there's a large enough list, the likelihood of gifts being given within the same family is low.

14.12.2023 05:17Comment on Perl Weekly Challenge: Writing Letter Pairs to Santa by packy
https://packy.dardan.com/2023/12...
Subscribe

🔝

Datenschutzerklärung    Impressum