Stream: beginners

Topic: ✔ Which Roc version does Exercism use?


view this post on Zulip Niklas Konstenius (Oct 18 2024 at 12:58):

I used the Str.dropPrefixfunction in a Exercism problem yesterday and it worked locally but when I submitted the solution I got the error:

The Str module does not expose `dropPrefix`:
....

I guess the Roc version on Exercism is older than the one I have locally? I tried to find info on Exercism about the Roc version but did not find any.

I'm also wondering if there's any plans on adding a Str.drop : Str, U64 -> Str (and take) to the stdlib? I really miss those ... :smile:

view this post on Zulip Anton (Oct 18 2024 at 13:41):

@Aurélien Geron can you look into updating exercism to the latest roc version?

view this post on Zulip Anton (Oct 18 2024 at 13:50):

I'm also wondering if there's any plans on adding a Str.drop : Str, U64 -> Str (and take) to the stdlib? I really miss those ...

No, that was a deliberate choice. That choice is explained in the unicode section on this page.

Depending on your use case you may be able to get away with Str.toUtf8 followed by List.dropFirst or List.dropLast or ... .

If you want the most robust solution, you can use the unicode package and use Grapheme.split followed by List.dropFIrst or dropLast ...

view this post on Zulip Niklas Konstenius (Oct 18 2024 at 13:53):

Thanks for the clarification on drop/take Anton. Makes sense. :+1:

view this post on Zulip Aurélien Geron (Oct 18 2024 at 20:09):

The roc-test-runner's build script fetches the latest Roc version, so I guess Exercism doesn't build it every day. I'll ask them to build it more frequently if they can. :+1:

view this post on Zulip Aurélien Geron (Oct 19 2024 at 03:27):

So as usual the Exercism team was really quick & helpful: in short, the roc-test-runner's docker image is only rebuilt when we push a change to the exercism/roc-test-runner repo on GitHub. Exercism does not automatically rebuild the images regularly: this explains why the roc compiler was getting a bit old on the website. The last time I pushed a change was yesterday, so it should be up to date now, but before that the last change was ~2 weeks ago (and before that it was roughly every week or two).
It's probably possible to schedule automatic builds on GitHub Actions, perhaps daily. Anyone know how to do that?
Also, you can check the current roc-test-runner image version on the Roc track's build page (scroll down to the Test Runner section).
Then you can look at the roc-test-runner repo's latest GitHub actions to find when the latest image was deployed.

view this post on Zulip Niklas Konstenius (Oct 19 2024 at 07:53):

Thanks for the investigation and fix to the runner, my solution is accepted now so I'm happy. :smiley:

I really appreciate your work on the Roc track on Exercism. It's very valuable for me as a Roc beginner. Thanks!

view this post on Zulip Notification Bot (Oct 19 2024 at 07:53):

Niklas Konstenius has marked this topic as resolved.

view this post on Zulip Anton (Oct 19 2024 at 09:29):

It's probably possible to schedule automatic builds on GitHub Actions, perhaps daily

You can use the following syntax just like we do here:

  schedule:
    - cron:  '0 9 * * *'

This is to build every day at 9 am utc


Last updated: Jul 06 2025 at 12:14 UTC