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.
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.
Glad to hear that is in progress! I will take a look, but I am not too hopeful I will be able to help.
@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!
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