> Hello Jonathan,> Thanks for your reply.> I'm not quite sure what you mean.> What pd-vanilla object do you use to implement "Variable number of keys of arbitrarily typed values"[text], [coll], etc.> or "set number of keys with set value types"?data structuresThe benefit of the latter is that you know the number of "slots" ahead of time so you can populatethe data without needing to allocate memory.> I should add that I'm interested ultimately in a data structure that I can populate from text files, read by PD.In that case I don't think the benefit I mentioned wrt data structures matters becausethe I/O speed will be your limiting factor.My suggestion would be to start with the more expressive vanilla object-- [text]-- and seeif it fulfills your needs. Keep in mind though that it is at core not a key/value store but insteada 2-dimensional array of atoms. E.g., you can decide that the first item in each line is yourkey, but the text class interface does nothing to prevent you from adding more lines thatduplicate that same key.-Jonathan> -aliOn Tue, Jul 18, 2017 at 1:16 PM, Jonathan Wilkes <jancsika@yahoo.com> wrote:Variable number of keys of arbitrarily typed values, orset number of keys with set value types?-Jonathan
From: Ali Momeni <batchku@gmail.com>
To: Pd-List <pd-list@lists.iem.at>
Sent: Tuesday, July 18, 2017 1:09 PM
Subject: [PD] your favorite key:value data structure?
______________________________ _________________Hello all,I'm looking for something analogous to the Max "coll" object, or a python dictionary, or anything with key value pairs.I'm aware of the 'cyclone' and its 'coll' object.i'm wondering if there is a pd-vanilla friendly alternative to this 3rd party external.any hints?thanks in advance,ali
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/ listinfo/pd-list
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list