Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pop Count practice exercise #1385

Merged
merged 5 commits into from
Oct 28, 2023
Merged

Add Pop Count practice exercise #1385

merged 5 commits into from
Oct 28, 2023

Conversation

kahgoh
Copy link
Member

@kahgoh kahgoh commented Oct 27, 2023

Adds Pop Count exercise

@github-actions
Copy link
Contributor

Thank you for contributing to exercism/elixir 💜 🎉. This is an automated PR comment 🤖 for the maintainers of this repository that helps with the PR review process. You can safely ignore it and wait for a maintainer to review your changes.

Based on the files changed in this PR, it would be good to pay attention to the following details when reviewing the PR:

  • General steps

    • 🏆 Does this PR need to receive a label with a reputation modifier (x:size/{tiny,small,medium,large,massive})? (A medium reputation amount is awarded by default, see docs)
  • Any exercise changed

    • 👤 Does the author of the PR need to be added as an author or contributor in <exercise>/.meta/config.json (see docs)?
    • 🔬 Do the analyzer and the analyzer comments exist for this exercise? Do they need to be changed?
    • 📜 Does the design file (<exercise>/.meta/design.md) need to be updated to document new implementation decisions?
  • Practice exercise changed

    • 🌲 Do prerequisites, practices, and difficulty in config.json need to be updated?
    • 🧑‍🏫 Are the changes in accordance with the community-wide problem specifiations?
  • Practice exercise tests changed

    • ⚪️ Are all tests except the first one skipped?
    • 📜 Does <exercise>/.meta/tests.toml need updating?

Automated comment created by PR Commenter 🤖.

@angelikatyborska
Copy link
Contributor

Hi! Thanks for this.

Two details jump out to me:

  • The CI is failing because the expected exercise order in the config file is to sort by difficulty first, then alphabetically. This new exercise should be right after perfect-numbers
  • In Elixir, all function names must use snake_case

- Use snake case for function names
- Fix exercise order
config.json Outdated
"bit-manipulation"
],
"prerequisites": [
"bit-manipulation"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder what other concepts are necessary here. Definitely not just bit-manipulation because on the Elixir track, you can learn bit-manipulation together with anonymous functions literally as a second exercise, right after basics.

Your solution uses multiple clause functions, guards, and tail call recursion. I assume it could also be solved with normal recursion? If it could be solved with normal recursion only, that would be better as a prerequisite than tail call recursion as it's easier.

Do you know which language already published this exercise and has some community solutions that I could look at?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some published on the Elm track.
Some use, tail recursion, recursion, some don't use recursion at all (Elm compile to JS, so you know you have at most 32 bits).

config.json Outdated Show resolved Hide resolved
kahgoh and others added 3 commits October 28, 2023 21:10
{
"authors": [
"kahgoh"
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since she suggested a new test, I would suggest to add @angelikatyborska to the list of contributors (currently empty therefore missing)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine, I have enough attributions on the Elixir track 😁 time to merge!

@angelikatyborska
Copy link
Contributor

Thanks again 🙏

@angelikatyborska angelikatyborska merged commit 05a92fa into exercism:main Oct 28, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants