Stream: show and tell

Topic: Ordered Collections


view this post on Zulip Ben Plotke (May 21 2024 at 11:40):

I implemented a TreeSet and a TreeDict in roc using a red-black tree and opaque types - https://github.com/benplotke/roc-ordered-collections

I couldn't make them into packages because Sort has not been implemented yet and importing custom abilities does not work.

I am interested in contributing by working on either implementing Sort ability or implementing importing of custom abilities, but I am apprehensive given how little Rust I know and the complexity of the Roc compiler.

view this post on Zulip Anton (May 21 2024 at 11:43):

Cool stuff, @Jasper Woudenberg is working on the sort ability, he hit a curious error that you may be able to help figure out, even with limited Rust knowledge.

view this post on Zulip Ben Plotke (May 21 2024 at 11:53):

Glad to hear that is in progress! I will take a look, but I am not too hopeful I will be able to help.

view this post on Zulip Jasper Woudenberg (May 21 2024 at 12:45):

@Ben Plotke if you're interested, there might be some opportunities to collaborate on implementing Sort. Apart from the curious error Anton mentioned, we need low level implementations of the compare function for builtin types, which we could pick up in parallel. If you're interested let me know, we could maybe pair a bit to get oriented on the problem, or I could write up what I've learned so far. No pressure though!

view this post on Zulip Ben Plotke (May 21 2024 at 15:54):

I would love to pair to get up to speed and start contributing. I'll switch to DM for scheduling


Last updated: Jul 06 2025 at 12:14 UTC