Stream: ideas

Topic: Improving the examples


view this post on Zulip jan kili (Feb 12 2022 at 02:51):

I've been thinking about how to improve the examples/ for both newcomers (clarity, thoroughness) and veterans (reusability, maintainability).

My first idea is about organization: I want to make the examples/**/ subdirectories look more consistent, feel more navigable, and better display the app/platform boundary to users. I've proposed the following refactor in PR #2470, which mostly moves the app & interface *.roc files into app(s)/ subdirectories:
screenshot of refactored examples/

I'd like to hear what both newcomers and veterans think of this!

view this post on Zulip Brendan Hansknecht (Feb 12 2022 at 05:30):

I like it, but I am wondering if we should some more grouping. Like make hello with multiple languages within it or some other why to group repeated examples just with different platform languages.

view this post on Zulip Brendan Hansknecht (Feb 12 2022 at 05:31):

also, should hello-world be hello-c?

view this post on Zulip jan kili (Feb 12 2022 at 05:38):

In the PR, @Richard Feldman mentioned that he does like the current shorter paths (relative to repo root) like cargo run examples/hello-zig/Hello.roc. Grouping could extend these paths further (cargo run examples/hello-world/in-zig/app/Hello.roc), but I don't mind meaningfully-nested hierarchies when it comes to demonstration code.


Last updated: Jun 16 2026 at 16:19 UTC