Fork me on GitHub

Finally got around to solving a 2 year old bug in a project from the early days of my Clojure learning journey

parrot 16

First release of clope, a byte rope implementation for clojure and clojurescript.

💯 16
👍 4
paul a15:09:54

i have some cljs code where i store about 2 MB in a Uint8Array. i update some values in the byte array (no shortening or lengthening it) and then return it. is clope up my alley?


@UN0TDQ30T maybe, depending on your use case and performance requirements. the right way to update a portion of an immutable rope is to extract a subrope of the portion you want to update, copy it to a new buffer, mutate the buffer, wrap it in a new rope and finally join it with the unmodified subropes before and after. All these operations should be reasonably fast.

paul a16:09:56

i see, thanks!


mutate the underlying array in-place is at best hackish as it will break internal hashcode caching


Version 0.1.0 of the core.rrb-vector library has been released, with fixes for several bugs found in earlier releases. . Change log:

👍 28