On 13/11/2011, at 18.14, David Nolen wrote: > This would be awesome. From his talk it sounds like it shouldn't replace > PersistentVector at all, in fact you should be able to share structure with > PersistentVector right? > > David >
Yes, I think so. If I understand correctly, one cool thing is that the set of valid Clojure PersistentVector structures is actually a subset of the RRB structures (hence the word "relaxed"). This means that without breaking the contract of IPersistentVector one could transparently move from a Clojure vector to a RRB vector, say when concat'ed with another large vector. I haven't thought this completely through, but I think it would work. I'm, working at it right now, actually. I decided to go with a Java impl for round one. This is easier for me (yes, easy not simple :) since I've studied the persistent data structures in Java before, and I'm still not sure what the best way to implement low-level stuff like this is in Clojure. Once I get my head around the details of the algorithm, and I have a working Java version, I'll try and port it to Clojure (and I'll probably ask here for advice). /Karl > On Sun, Nov 13, 2011 at 10:02 AM, Krukow <karl.kru...@gmail.com> wrote: > By the way, I don''t see it as a replacement for PersistentVector, but > rather as an additional data structure, that could perhaps be put > somewhere in contrib if it turns out well. > > /Karl > > On Nov 13, 9:54 am, Karl Krukow <karl.kru...@gmail.com> wrote: > > Hi, > > Yes, Phil Bagwell presented that at the Conj. > > > > I'm really interested in this stuff, so as an exercise in Clojure, I've > > started thinking about how to implement it. At first I'll try and do it > > without looking at Scala - if I get stuck I might peek a bit :) > > > > If you're interested, I'll put it online once it is in a state that is > > fairly reasonable. > > > > /Karl > > On 12/11/2011, at 21.18, bernardH wrote: > > > > > > > > > > > > > > > > > hi, > > > > > I just stumbled upon a paper on en enhanced immutable data structure > > > [0] that could be useful for Clojure implementation. > > > > > Could it enable batter parallel programming semantics as discussed by > > > Guy Steel in this presentation [1] ? > > > > > I'd have to look deeper into it, but I'd be very interested in what > > > other Clojurian think of it. > > > > > Best Regards, > > > > > B. > > > > > [0]http://infoscience.epfl.ch/record/169879/files/RMTrees.pdf > > > > > Abstract. Immutable vectors are a convenient data structure for func- > > > tional programming and part of the standard library of modern > > > languages > > > like Clojure and Scala. The common implementation is based on wide > > > trees with a fixed number of children per node, which allows fast in- > > > dexed lookup and update operations. In this paper we extend the vector > > > data type with a new underlying data structure, Relaxed Radix Balanced > > > Trees (RRB-Trees), and show how this structure allows immutable vector > > > concatenation, insert-at and splits in O(logN ) time while maintaining > > > the > > > index, update and iteration speeds of the original vector data > > > structure. > > > > > [1]http://research.sun.com/projects/plrg/Publications/ICFPAugust2009Stee... > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Clojure" group. > > > To post to this group, send email to clojure@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+unsubscr...@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 post to this group, send email to clojure@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+unsubscr...@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 post to this group, send email to clojure@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+unsubscr...@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 post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en