Please don't use the previous version of the multi-dimensional arrays!!!
First, I forget to get rid of one [drip] object. Second, I discovered that [pd drip] will create a stack overflow if there are more than ca. 300 elements! (Why???) So I replaced it with [list-drip] which works fine.
 
So here's the corrected pure vanilla version + a zexy version using [drip]. I prefer to use the latter one because it's waaaaay faster than all the drip abstractions based on [list split].
 
Vanilla: https://www.dropbox.com/s/wd0avxtaneqgdic/carray_vanilla.zip?dl=0
Zexy: https://www.dropbox.com/s/ea8kihwbdqhcajr/carray_zexy.zip?dl=0
 
Christof
 
PS:  I did a benchmark test of iterating through an array of 1 million elements, using [realtime], and here's what I found on my system:
 
[array get] + [drip] --> ca. 6.5-9ms
[until] + [tabread] --> ca. 120-200ms
[array get] + [list-drip] --> ca. 340-400ms
 
To me this result was a bit surprising...
 
You can test yourself with the attached patch.
Gesendet: Sonntag, 04. Oktober 2015 um 17:32 Uhr
Von: "Christof Ressi" <[email protected]>
An: "Matt Barber" <[email protected]>
Cc: Pd-List <[email protected]>
Betreff: Re: [PD] array-abs
Wow, looks cool!
 
Just a few days ago I reworked some of my personal table abstractions, which also make use of the [array] object. However, some of them depend on zexy externals (I hope I didn't miss any other dependencies). I haven't shared them yet so the documentation is quite poor (no help files, docs inside the abstraction) and they look a bit messy. But maybe you can get some inspiration for your library... https://www.dropbox.com/s/xvj031korqw8guf/ctab-abs.zip?dl=0
 
Additionally I've been working on three basic abstractions for creating, setting and reading multi-dimensional arrays of any number of dimensions. They are pure vanilla style and even come with a help file :-D.  (a object for array resizing is yet to be done...) https://www.dropbox.com/s/6xfgdyt697138e6/carray.zip?dl=0
 
Would be cool to hear your opinion on the multi-dimensional array stuff!
 
Christof
 
 
 
 
Gesendet: Samstag, 03. Oktober 2015 um 22:32 Uhr
Von: "Matt Barber" <[email protected]>
An: "IOhannes m zmölnig" <[email protected]>
Cc: Pd-List <[email protected]>
Betreff: Re: [PD] array-abs
Thanks.
 
Yes. Right now I'm just looking to see if these would be useful, if there's anything awful about the syntax, if they try to do too much or are too fussy, if anyone would want to contribute, etc. When I get them polished a bit I'll do a regular release on the normal channels (I can't remember if I have access to anything officially Pd related).
 
Matt
 
On Sat, Oct 3, 2015 at 4:22 PM, IOhannes m zmölnig <[email protected]> wrote:
hi,

great!

On 10/03/2015 07:36 PM, Matt Barber wrote:
>
> https://www.dropbox.com/s/45tk62dpz0z2mqo/array-abs.zip?dl=0
>

db?

would you like to put those on a version control system of sorts, e.g.
the puredata svn or some publicly available git repository (e.g. github)?

(read as: please let us not go back to the dark ages, where code was
shared by sending files around by on floppy disks and you never new
which version was the current one)

fgmards
IOhannes



_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
 
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
#N canvas 493 59 897 375 10;
#X obj 39 98 array get test;
#X obj 37 74 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 28 180 realtime;
#X obj 42 131 t b a b;
#X floatatom 22 219 5 0 0 0 - - -, f 5;
#X obj 70 233 drip;
#X obj 401 155 until;
#X obj 373 44 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 375 73 array size test;
#X obj 402 201 f;
#X obj 446 207 + 1;
#X msg 426 179 0;
#X floatatom 324 236 6 0 0 0 - - -, f 6;
#X obj 382 108 t b f b;
#X obj 400 230 tabread test;
#X obj 324 214 realtime;
#X obj 28 27 table test 1e+006;
#X obj 191 98 array get test;
#X obj 191 72 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 180 180 realtime;
#X obj 194 131 t b a b;
#X floatatom 174 219 5 0 0 0 - - -, f 5;
#X obj 222 233 list-drip;
#X obj 516 71 array get test;
#X obj 518 111 list split 100;
#X obj 514 33 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 532 199 realtime;
#X obj 550 150 t b a b;
#X floatatom 530 238 5 0 0 0 - - -, f 5;
#X floatatom 646 76 5 0 0 0 - - -, f 5;
#N canvas 335 209 450 300 drip 0;
#X obj 66 58 inlet;
#X obj 64 91 list split 1;
#X obj 95 151 list;
#X obj 57 123 t b f;
#X obj 64 178 outlet;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 1 1 2 1;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
#X connect 3 1 4 0;
#X restore 578 252 pd drip;
#X text 551 43 warning: might create stack overflow!;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 2 0 4 0;
#X connect 3 0 2 1;
#X connect 3 1 5 0;
#X connect 3 2 2 0;
#X connect 6 0 9 0;
#X connect 7 0 8 0;
#X connect 8 0 13 0;
#X connect 9 0 10 0;
#X connect 9 0 14 0;
#X connect 10 0 9 1;
#X connect 11 0 9 1;
#X connect 13 0 15 1;
#X connect 13 1 6 0;
#X connect 13 2 11 0;
#X connect 13 2 15 0;
#X connect 15 0 12 0;
#X connect 17 0 20 0;
#X connect 18 0 17 0;
#X connect 19 0 21 0;
#X connect 20 0 19 1;
#X connect 20 1 22 0;
#X connect 20 2 19 0;
#X connect 23 0 24 0;
#X connect 24 0 27 0;
#X connect 25 0 23 0;
#X connect 26 0 28 0;
#X connect 27 0 26 1;
#X connect 27 1 30 0;
#X connect 27 2 26 0;
#X connect 29 0 24 1;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to