Skip to content

Implementing "say" exercise for R track#394

Merged
colinleach merged 4 commits into
exercism:mainfrom
frequenter-at-exercism:say
Jun 18, 2025
Merged

Implementing "say" exercise for R track#394
colinleach merged 4 commits into
exercism:mainfrom
frequenter-at-exercism:say

Conversation

@frequenter-at-exercism

Copy link
Copy Markdown
Contributor

Followed recipe at https://exercism.org/docs/building/tracks/practice-exercises with a little help from my friends IsaacG and colinleach in the Exercism Community.

@github-actions

Copy link
Copy Markdown
Contributor

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@github-actions github-actions Bot closed this Jun 17, 2025
@colinleach colinleach reopened this Jun 17, 2025
@colinleach

Copy link
Copy Markdown
Contributor

The notoriously tough R linter picked up a few details. No problems, this should be an easy fix.

changed `small.n` to `small_n` and added spaces aound `=` to fix linter warnings.
Added `# nolint` to a long line
@colinleach

Copy link
Copy Markdown
Contributor

These are the warnings the linter gave:

Warning: .meta/example.R,line=1,col=1,[b] Variable and function name style should match snake_case.
Warning: .meta/example.R,line=35,col=1,[b] Variable and function name style should match snake_case.
Warning: .meta/example.R,line=67,col=38,[f] Put spaces around all infix operators.
Warning: test_say.R,line=103,col=81,[a] Lines should not be more than 80 characters. This line is 130 characters.

To placate it, I changed small.n to small_n and say.group. to say_group, I added spaces around an =, and I added # nolint to a long line (the linter likes <= 80 characters).

I should stress that none of these is a syntax error, just a conflict with the style guide chosen for this track.

@colinleach

Copy link
Copy Markdown
Contributor

I've approved this, but I've left you to have the satisfaction of pressing the "Squash and merge" button (twice - it will ask you to confirm).

One other file that is probably worth adding at some point is .docs/hints.md. The documentation describes this as optional, but it is very, very useful to mentors as they help students through the exercise. A good set of hints will really boost your popularity! Not urgent, you can add it in a separate PR at some point.

@frequenter-at-exercism

Copy link
Copy Markdown
Contributor Author

I don't think I've seen hints on the R track. Can you link to an example?

I don't know how to execute this "squash and merge"

The linter prefers _ over . in variable names? I will remember that. That kind of puts it at odds with Nvim-R, where every time I type _ it changes it to <-. I'm assuming that's something I can change in its settings.

@colinleach

colinleach commented Jun 18, 2025

Copy link
Copy Markdown
Contributor

I don't know how to execute this "squash and merge"

On this website page, are you not seeing 3 green ticks and a big green button?
image

You just click the button, then a second button asking for confirmation. If there's a problem, I'll do it, but I thought the creator of the PR had authorization to do this once the PR is approved.

I don't think I've seen hints on the R track. Can you link to an example?

Maybe you found a problem, and this track has few hints (BAD, and something that needs fixing). I'll look into it more tomorrow, and if necessary I'll open an issue.

Also: linters are strange, and can be annoying. Sorry, this wasn't something I chose. I could make a case for relaxing the rules within Exercism, but I'm not sure whether I would get agreement.

@frequenter-at-exercism

Copy link
Copy Markdown
Contributor Author

The three green tick marks yes, the green button, no...screenshot of this page as it appears in my browser

@SleeplessByte

Copy link
Copy Markdown
Member

@colinleach likely only those with write access can merge ;)

@colinleach colinleach merged commit 503768e into exercism:main Jun 18, 2025
3 checks passed
@colinleach

colinleach commented Jun 18, 2025

Copy link
Copy Markdown
Contributor

Apologies, my mistake. I've now merged it, so you should (1) see the exercise appear on the Exercism website; (2) see a bunch of rep appear on your account.

@colinleach

Copy link
Copy Markdown
Contributor

I don't think I've seen hints on the R track. Can you link to an example?

Alarmingly, no I can't! I've opened Issue #398 to discuss this.

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