Stream: contributing

Topic: Migrating code examples to the new compiler


view this post on Zulip Aurélien Geron (Jul 31 2026 at 11:10):

I created a draft PR to migrate all the code examples to the new compiler. I started by migrating all the code examples that can run on the echo platform, without any library dependency. That's 19 examples so far:

The only echo-platform-only example remaining is EncodeDecode, but I'm not sure how to handle this one.

If anyone wants to help migrate the rest, please let me know!

view this post on Zulip Aurélien Geron (Jul 31 2026 at 11:33):

Below are the remaining examples to migrate.

The following depend on basic-cli (e.g., cli.File or cli.Cmd), and sometimes on other libraries as well (e.g., rand, unicode, ...):

The following are integrations. I have no idea how to do this:

The following depend on the web platform:

Others:

view this post on Zulip Aurélien Geron (Aug 03 2026 at 05:53):

I migrated 7 more examples. 26 down, 9 to go!

The following remaining examples are tricky:

The following shouldn't be too hard:

view this post on Zulip Luke Boswell (Aug 03 2026 at 05:55):

This is the one you want now https://github.com/kili-ilo/roc-random -- it's been getting a lot of love recently from @Austin Clements

view this post on Zulip Luke Boswell (Aug 03 2026 at 05:56):

I'd drop DotNet and Go for now (or deprecate them until we have support for those). In theory I could probably figure it out but I'm already spread so thin I'm not about to start that.

view this post on Zulip Luke Boswell (Aug 03 2026 at 05:57):

I'd drop Scripting too for now

view this post on Zulip Luke Boswell (Aug 03 2026 at 05:58):

@Hannes would you mind porting roc-ascii?

view this post on Zulip Aurélien Geron (Aug 03 2026 at 06:06):

Migrated the RandomNumbers example. The rand library works like a charm! :grinning:

view this post on Zulip Hannes (Aug 03 2026 at 06:36):

I have a version of roc-ascii updated to the new compiler locally, just haven't got round to cleaning it up and pushing it yet, i'll see if I can get something out this week :)

view this post on Zulip Luke Boswell (Aug 03 2026 at 06:37):

Legendary

view this post on Zulip Aurélien Geron (Aug 03 2026 at 22:29):

I'm hitting a few issues for the 5 remaining examples:

Edit: I finally understood record builders. I've posted a minimal example if anyone else is struggling.

view this post on Zulip Anton (Aug 04 2026 at 11:44):

wouldn't it be a good idea to have a Wasm example as well, so both the frontend and backend are written in Roc?

Should we just use joy here?

view this post on Zulip Aurélien Geron (Aug 05 2026 at 11:17):

Just 3 examples to go: SortStrings, HelloWeb, and ElmWebApp. Perhaps we can put the rest of the examples online already, and add these three when they're ready?

view this post on Zulip Anton (Aug 05 2026 at 11:21):

Yes, I will try to review https://github.com/roc-lang/examples/pull/258 today

view this post on Zulip Niclas Ahden (Aug 05 2026 at 11:24):

@Aurélien Geron Let me know if I can help out with Joy, and I'd love to hear what you think of it and any issues you may run into! I'm chronically Roc'y, so just @ me :)

view this post on Zulip Aurélien Geron (Aug 05 2026 at 21:18):

Thanks @Niclas Ahden, I'm busy today and tomorrow, but I should have some time this weekend. :+1:

view this post on Zulip Aurélien Geron (Aug 10 2026 at 23:46):

@Niclas Ahden FYI I'm waiting for basic-webserver before I can update the web examples.

view this post on Zulip Luke Boswell (Aug 10 2026 at 23:47):

What do you need for basic-webserver?

view this post on Zulip Aurélien Geron (Aug 10 2026 at 23:51):

I'm blocked by issue #211

view this post on Zulip Luke Boswell (Aug 10 2026 at 23:59):

I'll try and get something out today

view this post on Zulip Aurélien Geron (Aug 11 2026 at 00:03):

Btw, now that we have many updated examples, perhaps the website could be updated to show them rather than point to the all-syntax code on GitHub?

view this post on Zulip Luke Boswell (Aug 11 2026 at 00:03):

Yeah I'm also working on that, and the web REPL too

view this post on Zulip Luke Boswell (Aug 11 2026 at 01:37):

@Aurélien Geron https://github.com/roc-lang/basic-webserver/releases/tag/0.16.0

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

It works! Here's PR #260 to update the HelloWeb and ElmWebApp examples.

I'll try to add a Joy example too.


Last updated: Aug 12 2026 at 12:35 UTC