[ANN] core.rrb-vector 0.1.0 -- bug fixes

259 views
Skip to first unread message

Andy Fingerhut

unread,
Sep 30, 2019, 8:21:05 PM9/30/19
to clo...@googlegroups.com
I am pleased to announce the 0.1.0 release of core.rrb-vector, a Clojure Contrib library extending the Clojure vector API with logarithmic-time concatenation and slicing:

  https://github.com/clojure/core.rrb-vector

  [org.clojure/core.rrb-vector "0.1.0"]

  <dependency>
    <groupId>org.clojure</groupId>
    <artifactId>core.rrb-vector</artifactId>
    <version>0.1.0</version>
  </dependency>

This release fixes several bugs that were found in previous releases of the library.  More details can be found in the change log:

  https://github.com/clojure/core.rrb-vector/blob/master/CHANGES.md

Cheers,
Michał Marczyk and Andy Fingerhut

Terje Dahl

unread,
Oct 2, 2019, 9:26:58 AM10/2/19
to Clojure
Nice list of fixes. Great work!

I use Vector as my text editor's char-buffer. 
I believe I have seen one or more of the fixed bugs surface, so I am upgrading immediately. :-D


Terje 

Andy Fingerhut

unread,
Oct 2, 2019, 1:31:29 PM10/2/19
to clo...@googlegroups.com
Excellent!  Please do file additional reports if you find any issues with the latest version.

Andy

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/cfed16b8-e941-45f3-95c1-3261e19e8340%40googlegroups.com.

Andy Fingerhut

unread,
Oct 2, 2019, 1:53:13 PM10/2/19
to clo...@googlegroups.com
Also, maybe you are doing this already, but note that you can save significant memory in Clojure and core.rrb-vector by using (vector-of :char ...) to create vectors that are restricted to contain only char's, if that is all you want to hold inside of them.  It is about a 3x more memory if you use a normal Clojure vector of arbitrary Object's because of the boxing of Character objects.  Same for :long and other vectors of primitives.

Andy

Terje Dahl

unread,
Oct 3, 2019, 8:15:10 AM10/3/19
to Clojure
Thanks.  Yes, I already do that.

And then implementing java.lang.CharSequence (for regex searches) or a reader is dead easy.

Also, because altered states of the rrb-vector share structure, maintaining a history (for UNDO/REDO) in a memory-efficient manner is simply a matter of holding on to references to the rrb-vector.  

:-)

Terje


On Wednesday, October 2, 2019 at 3:53:13 PM UTC+2, Andy Fingerhut wrote:
Also, maybe you are doing this already, but note that you can save significant memory in Clojure and core.rrb-vector by using (vector-of :char ...) to create vectors that are restricted to contain only char's, if that is all you want to hold inside of them.  It is about a 3x more memory if you use a normal Clojure vector of arbitrary Object's because of the boxing of Character objects.  Same for :long and other vectors of primitives.

Andy


For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages