I was working on my compiler project in Roc (which uses the basic-cli
platform), and it occurred to me that I may need some kind of persistent immutable hashmap that can handle a gigantic number of consecutive "read-then-write" operations in a hot loop. I was kinda thinking a hash array mapped trie (HAMT) might be the right approach, but that's a difficult thing to implement in Roc.
So...
Maybe I could just borrow a HAMT off the shelf from the host language? I was wondering how difficult it would be to simply fork and extend the platform.
Obviously I'm not at that point yet. Not even close. I would need to do some performance testing before that becomes a real concern. But it just got me thinking about the possibilities. Has anyone here ever done something like that?
Forking the platform and adding a couple of new effects is easy to do I think. I can help you if you need.
A PR like https://github.com/roc-lang/basic-cli/pull/380/files may be useful to see which files you need to alter
Awesome, I will take a look at the repos and see what I can dig up. Thanks for the info!
Last updated: Oct 18 2025 at 12:13 UTC