Hi,
Attached is a rather unusual approach to programming in pd: It implements quicksort by capturing the state of a recursion in a command queue (realized with a textfile object). It's hopelessly inefficient but I thought the concept might be interesting to share.
I just saw list-drip from pd-extended (I work with vanilla). Is there any reason, why it is so complicated? I have always used the attached list-drip, which I made a couple of years ago. Can someone comment on that? I'm just trying to make sure my object doesn't screw up in some corner cases... (although it hasn't failed on me yet ;-)
-- Orm
On Tue, 12 Jul 2011, Orm Finnendahl wrote:
- I just saw list-drip from pd-extended (I work with vanilla). Is
there any reason, why it is so complicated? I have always used the attached list-drip, which I made a couple of years ago. Can someone comment on that? I'm just trying to make sure my object doesn't screw up in some corner cases... (although it hasn't failed on me yet ;-)
list-abs used to contain your kind of list-drip, until 2009.
The thing is, your kind of list-drip takes an amount of time proportional to the square of the number of elements, whereas my kind of list-drip takes a time proportional to the number of elements.
http://lists.puredata.info/pipermail/pd-list/2009-02/068306.html http://lists.puredata.info/pipermail/pd-list/2009-02/068316.html http://lists.puredata.info/pipermail/pd-list/2009-02/068326.html http://lists.puredata.info/pipermail/pd-list/2009-02/068339.html
It's also possible to make a tiny external that runs a lot faster than that. For example, GF's [foreach] already does.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC