Stream: contributing

Topic: Updating the Exercism Roc Track


view this post on Zulip Aurélien Geron (Jun 09 2026 at 06:29):

Hi fellow Roc'ers,

I've started updating the Exercism track for the new Roc compiler. I have a few exercises passing all the tests, it feels pretty good! :blush: Big shoutout to everyone who maintained this track over the past year, in particular @Anton and @Isaac Van Doren. :thank_you:

I'm currently working on a local branch which I'll push to github.com/exercism/roc very shortly. Once most (or all) exercises are migrated, and once everyone is onboard, we can merge this branch into main and go live.
If anyone wants to help port the exercises, please let me know so we don't work on the same exercises.

Some exercises depend on external libraries:

Most (if not all) other exercises should be fairly easy to migrate today.

view this post on Zulip Richard Feldman (Jun 09 2026 at 06:30):

amazing, thank you so much for doing this!!! :star_struck:

view this post on Zulip Richard Feldman (Jun 09 2026 at 06:30):

lmk if you hit any bugs in the new compiler, happy to unblock!

view this post on Zulip Aurélien Geron (Jun 09 2026 at 06:33):

Thanks @Richard Feldman. So far I haven't run into anything serious. Perhaps https://github.com/roc-lang/roc/issues/9574 would be nice to fix, but I can workaround it so no rush at all.

view this post on Zulip Aurélien Geron (Jun 09 2026 at 07:27):

What's the best place to find the list of methods available in the builtins?

In particular, I'm looking for:

Edit
It looks like U64.to_u8 is now U64.to_u8_wrap or U64.to_u8_try. The other functions don't seem to exist yet, but they're not too hard to implement, e.g., compare = |a, b| if a < b { LT } else if a > b { GT } else { EQ }

view this post on Zulip Luke Boswell (Jun 09 2026 at 08:27):

https://github.com/roc-lang/roc/blob/main/src/build/roc/Builtin.roc

view this post on Zulip Aurélien Geron (Jun 09 2026 at 08:31):

Thanks @Luke Boswell , I'm not sure how I missed this! That said, it might be a good idea to point to this page here: https://www.roc-lang.org/builtins/main/

view this post on Zulip Anton (Jun 09 2026 at 11:54):

That page usually list all the functions like real docs :)
It's been broken because of multiple large changes to the codebase, I've been trying to fix it but keep hitting new issues

view this post on Zulip Isaac Van Doren (Jun 09 2026 at 12:43):

Awesome, thanks for doing this Aurélien!

view this post on Zulip Richard Feldman (Jun 09 2026 at 13:00):

Aurélien Geron said:

Perhaps https://github.com/roc-lang/roc/issues/9574 would be nice to fix, but I can workaround it so no rush at all.

fixed in https://github.com/roc-lang/roc/pull/9587

view this post on Zulip Richard Feldman (Jun 09 2026 at 13:09):

Anton said:

It's been broken because of multiple large changes to the codebase

Me: "We're all trying to find the guy who did this."

me

view this post on Zulip Richard Feldman (Jun 09 2026 at 14:26):

@Anton we should add ci/minici tests that generate the html and do some basic verification of them, like "should be at least ____ entries in the sidebar, each sidebar entry should have at least ____ html elements of this type" (where we fill in those blanks based on our knowledge of the actual number of builtins)

view this post on Zulip Anton (Jun 09 2026 at 14:32):

Yeah I already added a test for that :)

view this post on Zulip Aurélien Geron (Jun 09 2026 at 22:39):

I noticed that a few methods have not (yet?) been re-implemented in the new compiler, for example:

I suppose most of these will be under Iter rather than List. I don't mind reimplementing them for Exercism exercise solutions, but it would be good to know which ones are on the roadmap, and which ones have been dropped for good: if a function is on the roadmap, then I might provide it in the exercise stub.

Btw, what's the proper way to convert an iterator to a list? I don't see a to_list() method under Iter, or a from_iter() method under List.

view this post on Zulip Richard Feldman (Jun 09 2026 at 22:50):

they should be in List too, just didn't get added yet! :smile:

view this post on Zulip Luke Boswell (Jun 09 2026 at 22:51):

https://roc.zulipchat.com/#narrow/channel/397893-announcements/topic/Iterators/near/599963561

view this post on Zulip Anton (Jun 10 2026 at 13:43):

Anton said:

That page usually list all the functions like real docs :)
It's been broken because of multiple large changes to the codebase, I've been trying to fix it but keep hitting new issues

Fixed :)

view this post on Zulip Anton (Jun 10 2026 at 13:43):

https://roc-lang.org/builtins/main/

view this post on Zulip Tobias Steckenborn (Jun 10 2026 at 14:12):

Funny bug here, typing anything into the search seems to lead to scrolling up :sweat_smile:

view this post on Zulip Anton (Jun 10 2026 at 14:13):

Hmm, that does not happen in my browser. Can you share your OS and browser?

view this post on Zulip Tobias Steckenborn (Jun 10 2026 at 14:14):

Mac, Chrome (Version 148.0.7778.168)

CleanShot 2026-06-10 at 16.14.20.gif

view this post on Zulip Anton (Jun 10 2026 at 14:18):

Ok, I am able to reproduce and will make an issue

view this post on Zulip Anton (Jun 10 2026 at 14:20):

#9602

view this post on Zulip Aurélien Geron (Jun 11 2026 at 09:51):

Richard Feldman said:

lmk if you hit any bugs in the new compiler, happy to unblock!

I've run into a compiler panic while working on porting an exercism solution:

https://github.com/roc-lang/roc/issues/9614

See issue #9614 for more details. :folded_hands:

view this post on Zulip Aurélien Geron (Jun 11 2026 at 11:40):

I've pushed the new branch with 6 ported exercises (accumulate, acronym, affine-cipher, all-your-base, allergies, armstrong-numbers):

https://github.com/exercism/roc/tree/migrate-to-new-roc

If you want to try migrating some exercises:

Then for each exercise (e.g., foo-bar):

Since some builtins are still missing, you'll have to implement them locally. Please mark them with a TODO so we can switch to the actual built-in when available.

I find it quite fun and it's a good way to catch compiler bugs.

view this post on Zulip Aurélien Geron (Jun 13 2026 at 07:37):

10% of all exercises ported (12 / 111). Still a long way to go... :sweat_smile:

view this post on Zulip Aurélien Geron (Jun 14 2026 at 10:13):

FWIW, here's the list of builtins that are needed for the exercises I've worked on so far. For most of them, I wrote a quick & dirty version (and I'll remove them when the builtins are available), but for the math functions, I'm stuck. I'd love to have pow_int, pow, sqrt, cos, sin.

Also, an Iter.to_list() function would be very nice (as well as Iter.to_set() and possibly Iter.to_dict()).

view this post on Zulip Luke Boswell (Jun 14 2026 at 10:15):

The numerics are all implemented in https://github.com/roc-lang/roc/pull/9600 -- its taken me a while to land that PR

view this post on Zulip Aurélien Geron (Jun 14 2026 at 10:15):

That's great, thanks @Luke Boswell

view this post on Zulip Luke Boswell (Jun 14 2026 at 10:16):

TBH I suspect the failures are unrelated to the changes and more CI things we are ironing out

I looked closer at the numerics CI failure and it looks genuine, so trying to patch that nw

view this post on Zulip Luke Boswell (Jun 14 2026 at 10:16):

Also Dict is upgraded in https://github.com/roc-lang/roc/pull/9643 -- but also been blocked by CI issues which I suspect are unrelated

view this post on Zulip Luke Boswell (Jun 14 2026 at 10:17):

I was thinking of tackling List next but I see @Jared Ramirez has been doing a lot of work in that space so I was going to hold off a while

view this post on Zulip Jared Ramirez (Jun 14 2026 at 15:11):

im almost done implemented range syntax desugaring to itrs! hoping to land asap


Last updated: Jun 16 2026 at 16:19 UTC