SplitTheAtoms = 16ms VanillaRulz = 27ms Teddy = 23ms 1234.... = 140ms PdIsGreat = 30ms
using tclpd: under 0.05 ms for any of those.
size of the external: about 260 bytes.
and no symbol-table pollution, no memory leak.
I think this might underline how useful it would be for those of us who use vanilla Pd to have some symbol manipulation tools in vanilla, although I'm not convinced that I'm doing the symbol2list in the best way for vanilla either (I used to think it couldn't be done at all).
Matt
On Thu, 19 Nov 2009, Matt Barber wrote:
I think this might underline how useful it would be for those of us who use vanilla Pd to have some symbol manipulation tools in vanilla,
It's useless to underline it more than it's been underlined before. Just stop using vanilla. This fixes the problem.
Games like you've done can be fun though. I've had fun with the [list-drip] speed hacks in february. But it was only a game. In real life I use [foreach], which is written in C++, and it works fine and faster than what's possible to do as a regular Pd patch. The game was only for testing limits and demonstrating unusual techniques (i mean techniques that are unusual in the context of pd; they may be commonplace in some other programming language).
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
On Thu, Nov 19, 2009 at 7:44 PM, Mathieu Bouchard matju@artengine.ca wrote:
On Thu, 19 Nov 2009, Matt Barber wrote:
I think this might underline how useful it would be for those of us who use vanilla Pd to have some symbol manipulation tools in vanilla,
It's useless to underline it more than it's been underlined before. Just stop using vanilla. This fixes the problem.
I agree -- I don't use vanilla myself, but I know a lot of people do. As you suggest it's useful for testing the limits -- the sorting algorithms I implemented a year ago ([list-shellsort] in list-abs is one of them) are in this class of objects. I also think they're useful for teaching students who are intimidated by written code (almost all of my students are classically-trained composers) some things about algorithmic thinking.
By "underlining," I mean sometimes you don't know just how badly it's missing until you try to do it in Pd and check the results against the compiled libraries. [list-l2s] will never be as fast as [list2symbol] from zexy... etc.
MB
Games like you've done can be fun though. I've had fun with the [list-drip] speed hacks in february. But it was only a game. In real life I use [foreach], which is written in C++, and it works fine and faster than what's possible to do as a regular Pd patch. The game was only for testing limits and demonstrating unusual techniques (i mean techniques that are unusual in the context of pd; they may be commonplace in some other programming language).
Hi,
[foreach] sounds good - but i could not find it ... give me a hint, please. g.
Mathieu Bouchard schrieb:
On Thu, 19 Nov 2009, Matt Barber wrote:
I think this might underline how useful it would be for those of us who use vanilla Pd to have some symbol manipulation tools in vanilla,
It's useless to underline it more than it's been underlined before. Just stop using vanilla. This fixes the problem.
Games like you've done can be fun though. I've had fun with the [list-drip] speed hacks in february. But it was only a game. In real life I use [foreach], which is written in C++, and it works fine and faster than what's possible to do as a regular Pd patch. The game was only for testing limits and demonstrating unusual techniques (i mean techniques that are unusual in the context of pd; they may be commonplace in some other programming language).
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Fri, 20 Nov 2009, Georg Werner wrote:
[foreach] sounds good - but i could not find it ... give me a hint, please.
It's part of GridFlow.
http://gridflow.ca/help/foreach-help.png
http://gridflow.ca/download/gridflow-0.9.6.tar.gz http://gridflow.ca/download/packages/gridflow-0.9.6-macosx104-i386.tar.gz http://gridflow.ca/download/packages/gridflow-0.9.6-ubuntu-karmic-i386.tar.g...
\class ForEach : FObject { \constructor () {} \decl 0 list (...); }; \def 0 list (...) { t_outlet *o = outlets[0]; for (int i=0; i<argc; i++) { if (argv[i].a_type==A_FLOAT) outlet_float( o,argv[i]); else if (argv[i].a_type==A_SYMBOL) outlet_symbol(o,argv[i]); else RAISE("oops. unsupported."); } } \end class {install("foreach",1,1);}
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
On Fri, 20 Nov 2009, Mathieu Bouchard wrote:
[foreach] sounds good - but i could not find it ... give me a hint, please.
It's part of GridFlow.
Actually, the code could be shorter and support A_POINTER too. That's what it does now:
\class ForEach : FObject { \constructor () {} \decl 0 list (...); }; \def 0 list (...) { for (int i=0; i<argc; i++) outlet_atom(outlets[0],&argv[i]); } \end class {install("foreach",1,1);}
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801