This looks really useful, thanks! I was just thinking about local storage for my Om app :)
On 20 May 2014 16:19, Henrik Eneroth <[email protected]> wrote: > Thanks for the feedback, Eduardo! > > Storage atom stores the entire atom on swap!, and it seemed to me that > storing increments might be more frugal. > > If you look at diff, you'll see that it diffs all collections, including > vectors and so on. I only want to diff maps, everything else counts as a > value, so the path of least resistance seemed to be to implement an > algorithm that did exactly that and nothing else. Perhaps diff can be > easily tweaked to achieve this, but I couldn't figure out how. > > > Best regards, > > Henrik > > > > > On 20 May 2014, at 16:48, Eduard Bondarenko <[email protected]> wrote: > > > > There is similar library - https://github.com/alandipert/storage-atom > > > > You can use clojure.diff to find differences - > > http://clojuredocs.org/clojure_core/clojure.data/diff > > Best regards, > > Eduard > > > > > >> On Tue, May 20, 2014 at 5:44 PM, Henrik <[email protected]> > wrote: > >> Plato is a ClojureScript library for storing and restoring atom content > to and from Local Storage. > >> > >> https://github.com/eneroth/plato > >> > >> The library grew out of a need to manage front end storage and > persistence in apps based on Om and Reagent. > >> > >> The arguably most useful function in the library is "keep-updated!", > which watches an atom for changes, and selectively updates local storage to > be consistent with the atom. The goal is for storage management to be > handled separately from all other application logic and not become (as it > was in my case anyway) interspersed with all other code. > >> > >> The library is very alpha, so all forms of feedback are welcome. :-) > >> > >> > >> Henrik > >> > >> -- > >> Note that posts from new members are moderated - please be patient with > your first post. > >> --- > >> You received this message because you are subscribed to the Google > Groups "ClojureScript" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > >> To post to this group, send email to [email protected]. > >> Visit this group at http://groups.google.com/group/clojurescript. > > > > -- > > Note that posts from new members are moderated - please be patient with > your first post. > > --- > > You received this message because you are subscribed to a topic in the > Google Groups "ClojureScript" group. > > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojurescript/LQDv7GAlKp8/unsubscribe. > > To unsubscribe from this group and all its topics, send an email to > [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/clojurescript. > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
