I'd glanced at koka before, but only today really read through their documentation, and it looks like there are a lot of similarities to what roc is doing, including "reuse analysis" and their perceus reference counting system. https://koka-lang.github.io/koka/doc/book.html#sec-fbip
folkert used some stuff from that already I think, there was a paper in November 2020 he referenced. https://www.microsoft.com/en-us/research/uploads/prod/2020/11/perceus-tr-v1.pdf
Oh neat. Yeah I wonder how their merge sort compares
happy to discus this more btw. We use the RC insertion algorithm from "counting immutable beans", and then the ideas from "perceus" to cancel out RC operations . What we don't have yet is the re-use of allocations in recursive structures (e.g. in-place linked list map is not possible today)
but our List.map
is in-place when possible
Last updated: Jul 06 2025 at 12:14 UTC