Skip to content

Conversation

@kahgoh
Copy link
Member

@kahgoh kahgoh commented Apr 19, 2025

This adds the recently added intergalactic-transmission exercise for the Elixir track.

@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 angelikatyborska self-requested a review April 22, 2025 13:56
Copy link
Member

@angelikatyborska angelikatyborska left a comment

Choose a reason for hiding this comment

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

This is a very fun exercise for a topic that doesn't get a lot of love 🙂 thank you very much!

I'm leaving a few requests for small changes.

@@ -0,0 +1,17 @@
defmodule Transmission do
Copy link
Member

Choose a reason for hiding this comment

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

The convention in elixir is that module names should match their filenames. You would need to commit to either to IntergalacticTransmission as the module name and rename this and the test module, or commit to Transmission and rename a bunch of files, as well as the module in the mix.exs file.

@@ -0,0 +1,17 @@
defmodule Transmission do
import Bitwise
Copy link
Member

Choose a reason for hiding this comment

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

It's possible to solve this exercise without bit operations (see below) so I would remove this import from the stub solution. If people use bit operations, then adding the right import should be part of the practice that they do 😁

  defp parity(bits) do
    list_of_bits =
      bits
      |> Stream.unfold(fn
        <<i::1, r::bitstring>> -> {i, r}
        <<>> -> nil
      end)
      |> Enum.into([])

    Integer.mod(Enum.sum(list_of_bits), 2)
  end

Copy link
Member Author

Choose a reason for hiding this comment

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

Totally agree - that shouldn't have been there 😅.

@kahgoh kahgoh force-pushed the exercise/intergalactic-transmission branch from cf9fdee to 7c7c64d Compare April 23, 2025 12:44
@kahgoh
Copy link
Member Author

kahgoh commented Apr 23, 2025

The comments seemed pretty straight forward to me. I've just pushed the updates.

@kahgoh kahgoh requested a review from angelikatyborska April 23, 2025 13:06
Copy link
Member

@angelikatyborska angelikatyborska left a comment

Choose a reason for hiding this comment

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

Thank you 🚀

@angelikatyborska angelikatyborska merged commit 22afebe into exercism:main Apr 23, 2025
9 checks passed
@kahgoh kahgoh deleted the exercise/intergalactic-transmission branch April 23, 2025 21:32
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.

2 participants