<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[how does [list drip] actually work?]]></title><description><![CDATA[<p>Hi folks,</p>
<p>This is going to be a weird  and long post, because I am walking through my thinking as much as I am asking questions. Sorry for the length in advance.</p>
<p>I've recently become fascinated with the many possibilities afforded by the list-abs library, and what strikes me at is that <strong>[list-drip]</strong> seems to be at the heart of most of them. For those of you who don't know, <strong>[list-drip]</strong> works by separating (aka &quot;dripping&quot;) an incoming list into its individual elements (atoms?). This allows you to do a bunch of operations on these elements before repacking them into a new list. For example, <strong>[list-compare]</strong> functions like <strong>[==]</strong> but for lists by checking each list's elements against each other to give out a binary yes or no answer. And of course, <strong>[list-drip]</strong> is at the core here.</p>
<p>I would like to really figure out the logic behind <strong>[list-drip]</strong>, but the help file (well, really the abstraction itself) is deceptively simple. This is because <strong>[list-drip]</strong> itself is but an abstraction based on the clever use of <strong>[list-split]</strong> (which is not an abstraction but an external) and some strange binary math and triggering mechanisms that I don't understand.</p>
<p>Here's the <strong>[list-drip]</strong> extraction itself:</p>
<p><img src="/uploads/files/1444327014028-upload-025dff05-0498-4bba-8910-b27741ad5872" alt="upload-025dff05-0498-4bba-8910-b27741ad5872" class="img-responsive img-markdown" /></p>
<p>I'll just talk about this abstraction and ask questions along the way.</p>
<p><img src="/uploads/files/1444327166501-upload-6e3427f3-d73d-47d6-8325-e4aaaf1ee979" alt="upload-6e3427f3-d73d-47d6-8325-e4aaaf1ee979" class="img-responsive img-markdown" /></p>
<p>Here's the first part. Pretty simple. <strong>[trigger]</strong> is passing the entire list on, and then sending a bang. This seems weird but I've heard that pd will take care of all the operations starting at the right outlet of trigger first, so the bang is guaranteed to come after the list has been &quot;dripped.&quot;</p>
<p><img src="/uploads/files/1444327358407-upload-0413fd37-1fd1-4da1-97e5-e784ae8f5876" alt="upload-0413fd37-1fd1-4da1-97e5-e784ae8f5876" class="img-responsive img-markdown" /></p>
<p>Here's the second part, where we have <strong>[list split]</strong> doing a binary &quot;less than&quot;   operation on the list. &quot;<em>If the list is less than 2 elements long, it gets sent to the outlet and the [spigot] closes, else, open the spigot.</em>&quot; This <strong>[trigger]</strong> then passes a copy of the list onto <strong>[spigot]</strong> which is either open or closed based on the above result.</p>
<p><img src="/uploads/files/1444327897657-upload-3e999b4b-b449-4e2d-94d4-d73c1b08a3b4" alt="upload-3e999b4b-b449-4e2d-94d4-d73c1b08a3b4" class="img-responsive img-markdown" /></p>
<p>Ok now here is where things start to get crazy. The list is now fed into two identical <strong>[list split]</strong> mechanisms with some weird math going on, which are also feeding back into the top of the second <strong>[trigger]</strong>.</p>
<p>Let's break this down really quick:<br />
<img src="/uploads/files/1444328353522-upload-47208bfb-14cd-4bd8-bef0-6110c23a1e50" alt="upload-47208bfb-14cd-4bd8-bef0-6110c23a1e50" class="img-responsive img-markdown" /></p>
<p>First, we get the length of the list, then we feed it into <strong>[&gt;&gt; 1]</strong>. With some research in pd and the on the web, I come to the conclusion that we are basically dividing (integer division) by 2. This is setting the point for where <strong>[list split]</strong> outputs a list with only a certain number (but always half) of elements (using the first outlet). As I said before, this result is being fed back into the second <strong>[trigger]</strong>.</p>
<p>So I think basically what's happening is this:<img src="/uploads/files/1444329050344-upload-9c6a5484-f12c-4b46-bd22-742a0729cf8a" alt="upload-9c6a5484-f12c-4b46-bd22-742a0729cf8a" class="img-responsive img-markdown" /></p>
<p>...where the rest of the list is either exactly half the total list length (if it's an even number) or half + 1 (if the total length is an odd number of elements).</p>
<p><img src="/uploads/files/1444330119883-pd.png" alt="pd.png" class="img-responsive img-markdown" /></p>
<p>So we have two &quot;loops&quot; going on here, where on operates on the first half of the list (will call this the &quot;red&quot; loop, and the other operates on the second &quot;green loop&quot;.</p>
<p>Now in terms of trigger ordering, what is happening here? Are we constantly triggering the red loop until there are no more operations, and then moving on the green loop? And what does this mean in the context of the patch? I'm confused about how <strong>[trigger]</strong> acts in these situations with many nested loops.</p>
<p>To troubleshoot, I attached a print the outlets of both the red and green **[list split]**s, and sent the list <strong>[a b c d 1 2 3 4(</strong> to <strong>[list drip]</strong>. Here's the output from the console:</p>
<pre><code>first half: symbol a
second half: symbol b
first half: list a b
first half: symbol c
second half: symbol d
second half: list c d
first half: list a b c d
first half: 1
second half: 2
first half: 1 2
first half: 3
second half: 4
second half: 3 4
second half: 1 2 3 4
</code></pre>
<p>To me this output looks like it was printed backwards. Is there some weird interaction between <strong>[trigger]</strong> and <strong>[print]</strong> going on?<br />
Furthermore, how is the output of <strong>[list drip]</strong> organized so that each element is output in it's sequential order? How does the green loop know to wait for the red loop to finish?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 07:53:45 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/9547.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Oct 2015 19:13:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to how does [list drip] actually work? on Thu, 08 Oct 2015 19:13:06 GMT]]></title><description><![CDATA[<p>Hi folks,</p>
<p>This is going to be a weird  and long post, because I am walking through my thinking as much as I am asking questions. Sorry for the length in advance.</p>
<p>I've recently become fascinated with the many possibilities afforded by the list-abs library, and what strikes me at is that <strong>[list-drip]</strong> seems to be at the heart of most of them. For those of you who don't know, <strong>[list-drip]</strong> works by separating (aka &quot;dripping&quot;) an incoming list into its individual elements (atoms?). This allows you to do a bunch of operations on these elements before repacking them into a new list. For example, <strong>[list-compare]</strong> functions like <strong>[==]</strong> but for lists by checking each list's elements against each other to give out a binary yes or no answer. And of course, <strong>[list-drip]</strong> is at the core here.</p>
<p>I would like to really figure out the logic behind <strong>[list-drip]</strong>, but the help file (well, really the abstraction itself) is deceptively simple. This is because <strong>[list-drip]</strong> itself is but an abstraction based on the clever use of <strong>[list-split]</strong> (which is not an abstraction but an external) and some strange binary math and triggering mechanisms that I don't understand.</p>
<p>Here's the <strong>[list-drip]</strong> extraction itself:</p>
<p><img src="/uploads/files/1444327014028-upload-025dff05-0498-4bba-8910-b27741ad5872" alt="upload-025dff05-0498-4bba-8910-b27741ad5872" class="img-responsive img-markdown" /></p>
<p>I'll just talk about this abstraction and ask questions along the way.</p>
<p><img src="/uploads/files/1444327166501-upload-6e3427f3-d73d-47d6-8325-e4aaaf1ee979" alt="upload-6e3427f3-d73d-47d6-8325-e4aaaf1ee979" class="img-responsive img-markdown" /></p>
<p>Here's the first part. Pretty simple. <strong>[trigger]</strong> is passing the entire list on, and then sending a bang. This seems weird but I've heard that pd will take care of all the operations starting at the right outlet of trigger first, so the bang is guaranteed to come after the list has been &quot;dripped.&quot;</p>
<p><img src="/uploads/files/1444327358407-upload-0413fd37-1fd1-4da1-97e5-e784ae8f5876" alt="upload-0413fd37-1fd1-4da1-97e5-e784ae8f5876" class="img-responsive img-markdown" /></p>
<p>Here's the second part, where we have <strong>[list split]</strong> doing a binary &quot;less than&quot;   operation on the list. &quot;<em>If the list is less than 2 elements long, it gets sent to the outlet and the [spigot] closes, else, open the spigot.</em>&quot; This <strong>[trigger]</strong> then passes a copy of the list onto <strong>[spigot]</strong> which is either open or closed based on the above result.</p>
<p><img src="/uploads/files/1444327897657-upload-3e999b4b-b449-4e2d-94d4-d73c1b08a3b4" alt="upload-3e999b4b-b449-4e2d-94d4-d73c1b08a3b4" class="img-responsive img-markdown" /></p>
<p>Ok now here is where things start to get crazy. The list is now fed into two identical <strong>[list split]</strong> mechanisms with some weird math going on, which are also feeding back into the top of the second <strong>[trigger]</strong>.</p>
<p>Let's break this down really quick:<br />
<img src="/uploads/files/1444328353522-upload-47208bfb-14cd-4bd8-bef0-6110c23a1e50" alt="upload-47208bfb-14cd-4bd8-bef0-6110c23a1e50" class="img-responsive img-markdown" /></p>
<p>First, we get the length of the list, then we feed it into <strong>[&gt;&gt; 1]</strong>. With some research in pd and the on the web, I come to the conclusion that we are basically dividing (integer division) by 2. This is setting the point for where <strong>[list split]</strong> outputs a list with only a certain number (but always half) of elements (using the first outlet). As I said before, this result is being fed back into the second <strong>[trigger]</strong>.</p>
<p>So I think basically what's happening is this:<img src="/uploads/files/1444329050344-upload-9c6a5484-f12c-4b46-bd22-742a0729cf8a" alt="upload-9c6a5484-f12c-4b46-bd22-742a0729cf8a" class="img-responsive img-markdown" /></p>
<p>...where the rest of the list is either exactly half the total list length (if it's an even number) or half + 1 (if the total length is an odd number of elements).</p>
<p><img src="/uploads/files/1444330119883-pd.png" alt="pd.png" class="img-responsive img-markdown" /></p>
<p>So we have two &quot;loops&quot; going on here, where on operates on the first half of the list (will call this the &quot;red&quot; loop, and the other operates on the second &quot;green loop&quot;.</p>
<p>Now in terms of trigger ordering, what is happening here? Are we constantly triggering the red loop until there are no more operations, and then moving on the green loop? And what does this mean in the context of the patch? I'm confused about how <strong>[trigger]</strong> acts in these situations with many nested loops.</p>
<p>To troubleshoot, I attached a print the outlets of both the red and green **[list split]**s, and sent the list <strong>[a b c d 1 2 3 4(</strong> to <strong>[list drip]</strong>. Here's the output from the console:</p>
<pre><code>first half: symbol a
second half: symbol b
first half: list a b
first half: symbol c
second half: symbol d
second half: list c d
first half: list a b c d
first half: 1
second half: 2
first half: 1 2
first half: 3
second half: 4
second half: 3 4
second half: 1 2 3 4
</code></pre>
<p>To me this output looks like it was printed backwards. Is there some weird interaction between <strong>[trigger]</strong> and <strong>[print]</strong> going on?<br />
Furthermore, how is the output of <strong>[list drip]</strong> organized so that each element is output in it's sequential order? How does the green loop know to wait for the red loop to finish?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Thu, 08 Oct 2015 19:13:06 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Fri, 09 Oct 2015 01:15:34 GMT]]></title><description><![CDATA[<p>it's a recursive thing: I'll walk through part of an example:<br />
say the list has 5 elements.<br />
The list comes in, and goes into the open spigot.</p>
<p>so at this point the [t a a a a] is sending a list of 5 elements. the following is what happens to the right [list-split] at this moment:<br />
the first 2 elements of the list are sent back to the upper trigger, and go back into the spigot, where they are split again into lists of length 1. element 1 goes back into the upper trigger and out of the outlet, and then the second does as well.</p>
<p>All of this happens before the list of 5 elements is even sent to the left [list split], because of the trigger. A similar thing occurs:<br />
the last 3 elements of the 5-element list are sent to the upper trigger and into the open spigot, and then the first element of that is split off and sent out the outlet. Then the last 2 elements are sent through the spigot and split, and are sent out in order.</p>
<p>The crucial thing to understand is the recursive nature; it has to do with the depth-first message passing in pd.<br />
The first half of the list is split off before the second half, and sent to be split in half again before the second half of the original list is even processed. So it goes the first half of the first half of the first half, etc. until the first element is sent to the outlet. Then it goes back up the &quot;stack&quot; to the second halves of the lists that it missed in doing the first half every time (this happens because of the triggers). So after the first element is sent, the second element is sent. After that, elements 3 and 4 (in a list since they weren't even processed to be split yet) are split and sent out in order. then elements 5-8, which are still in a list, are sent back and processed in the same manner.</p>
<p>Hopefully that's somewhat clear..</p>
<p>(rambling extra stuff:)<br />
From a &quot;computer science&quot; perspective, you could say that you process the first half and put the second half on a &quot;stack&quot; , and then go into the first half, split it in half, put the second half on the &quot;stack&quot;, etc. And then after the 1st element is put out, repeat that process for each thing on the top of the stack until you end up with 1 element:</p>
<p>in &quot;pseudocode&quot; (with a datatype &quot;list&quot; and an assumed stack):</p>
<pre><code>function splitlist (list inlist) {
         list firsthalf;
         list secondhalf;
         if length(inlist) == 1 then {
                     output(inlist); -- pass the element
                     if stack exists then {
                            secondhalf = popstack(); -- get the next thing on the stack
                            splitlist(secondhalf); -- call the function recursively
                     }
        } else {
                   firsthalf, secondhalf = split(inlist); -- split the list, pass to variables
                   pushstack(second half); --- push the second half onto the stack
                   splitlist(firsthalf); -- call the function recursively
         }
}
</code></pre>
<p>I think that in reality most of this is taken care of in the computer's call stack, though not completely sure on how the memory for the lists is dealt with</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/2</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Fri, 09 Oct 2015 01:15:34 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Thu, 08 Oct 2015 22:44:25 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/seb-harmonik-ar">@seb-harmonik.ar</a> said:</p>
<blockquote>
<p>The crucial thing to understand is the recursive nature; it has to do with the depth-first message passing in pd.<br />
The first half of the list is split off before the second half, and sent to be split in half again before the second half of the original list is even processed. So it goes the first half of the first half of the first half, etc. until the first element is sent to the outlet. Then it goes back up the &quot;stack&quot; to the second halves of the lists that it missed in doing the first half every time (this happens because of the triggers). So after the first element is sent, the second element is sent. After that, elements 2 and 3 (in a list since they weren't even processed to be split yet) are split and sent out in order. then elements 4-8, which are still in a list, are sent back and processed in the same manner.</p>
</blockquote>
<p>Brilliant explanation. So basically we're constantly breaking down the list in half until we can't anymore, and then we pass on the individual elements?  So is it trigger the object that is somehow keeping track of all this under the hood?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/3</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Thu, 08 Oct 2015 22:44:25 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Thu, 08 Oct 2015 22:48:00 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/seb-harmonik-ar">@seb-harmonik.ar</a> said:</p>
<blockquote>
<p>I think that in reality most of this is taken care of in the computer's call stack, though not completely sure on how the memory for the lists is dealt with</p>
</blockquote>
<p>Ah just read your edit sorry!</p>
<p>Yeah this is what confused me at first because I couldn't tell by looking at the patch where at the list fragments were being stored when they weren't being worked on. So yeah all this is probably going on in computer memory land rather then pd land where we &quot;actually&quot; store lists in [list] objects (obviously that's not what happens but it's makes it easy to visualize with pd)</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/4</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Thu, 08 Oct 2015 22:48:00 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Thu, 08 Oct 2015 22:56:34 GMT]]></title><description><![CDATA[<p>yes I've been trying to figure out how pd actually allocates and de-allocates lists, so far I can't find it anywhere. However, within the structure of the list-drip patch, what happens is that the computer's call stack stores the pointer to the list elements and the number of elements it is holding (as arguments to the trigger_anything() function), so I don't think things are actually being changed in memory, the pointers to the list atoms and number of atoms to pass are being changed but stored on the computers call stack, and at each depth of the call stack the trigger has the same arguments stored in it's function arguments for trigger_anything.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/5</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Thu, 08 Oct 2015 22:56:34 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Thu, 08 Oct 2015 23:20:54 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/seb-harmonik-ar">@seb-harmonik.ar</a> Awesome info. Thanks a ton for your help that really demystified things for me.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/6</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Thu, 08 Oct 2015 23:20:54 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Thu, 08 Oct 2015 23:27:33 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/seb-harmonik-ar">@seb-harmonik.ar</a> said:</p>
<blockquote>
<p>From a &quot;computer science&quot; perspective, you could say that you process the first half and put the second half on a &quot;stack&quot; , and then go into the first half, split it in half, put the second half on the &quot;stack&quot;, etc.</p>
</blockquote>
<p>I am definitely not a computer science person by any means, so forgive me if this is a stupid question, but is a &quot;stack&quot; essentially what is allowing pd to &quot;see into the future&quot; and organize calculations, finish some before others, etc?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/7</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Thu, 08 Oct 2015 23:27:33 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Fri, 09 Oct 2015 01:44:04 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/rjp9">@rjp9</a> yup, basically you put items into a stack and take them out of the stack the reverse order, so it is used to remember what needs to be done next.</p>
<p>an example, the &quot;call stack&quot; is the term used for an area of RAM that stores which function a program is in, so if you have a &quot;main&quot; function:</p>
<pre><code>main(int argc, char ** argv) {
       somefunction()
       someotherfunction()
}
</code></pre>
<p>and the functions look like:</p>
<pre><code>somefunction() {
       int cat
      cat = somethirdfunction()
}
someotherfunction() {
       float dog
     somefunction()
}
somethirdfunction() {
       char lettera
         -- do nothing
}
</code></pre>
<p>then when the program runs the call stack will look like this at various times:<br />
when it starts main:</p>
<pre><code>main -- has space for function info and argc, argv
</code></pre>
<p>when somefunction is called:</p>
<pre><code>main (bottom of stack)
      somefunction - top of stack - has space for function info and an integer (cat)
</code></pre>
<p>then somethirdfunction is called and cat's value is set, while in somethirdfunction the stack looks like this:</p>
<pre><code>main (bottom of stack)
      somefunction - middle of stack
            somethirdfunction - top of stack, has space for lettera
</code></pre>
<p>since somethirdfunction doesn't do anything, it returns:</p>
<pre><code>main (bottom of stack)
      somefunction - middle of stack
</code></pre>
<p>some function exits:</p>
<pre><code>main (bottom of stack)
</code></pre>
<p>and someotherfunction is called:</p>
<pre><code>main (bottom of stack)
      someotherfunction - middle of stack
</code></pre>
<p>since someotherfunction calls somefunction which calls somethirdfunction, the call stack will eventually look like this when in somethirdfunction here:</p>
<pre><code>main (bottom of stack)
      someotherfunction - second member of stack
            somefunction - third member
                  somethirdfunction -top of stack
</code></pre>
<p>and this whole time the &quot;automatic variables&quot; and their values are remembered in the function info. This includes arguments to the function (like in trigger_anything) and other variables declared at the top of each function. and you can have a function call itself too, and have itself in it's own call stack eventually, as in recursive cases like this.<br />
in this case, the stack would be more like, if you have 8 elements:</p>
<pre><code>trigger_anything
 split off first 4 elements
    trigger_anything
      split off first 2 elements
        trigger_anything
           split off first element
             output first element
          split off second element
             output second element
      split off 3rd and 4th elements together (in 2nd trigger_anything)
         trigger anything
           split off 3rd argument
             output 3rd argument
          split off 4th
             output 4th
     split off last 4 elements (from 1st trigger_anything)
</code></pre>
<p>and repeat the exact same thing with the last 4</p>
<p>wikipedia has a good page on it <a href="https://en.wikipedia.org/wiki/Stack_(abstract_data_type)" rel="nofollow">https://en.wikipedia.org/wiki/Stack_(abstract_data_type)</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/8</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Fri, 09 Oct 2015 01:44:04 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Fri, 09 Oct 2015 10:56:46 GMT]]></title><description><![CDATA[<blockquote>
<p>To me this output looks like it was printed backwards. Is there some weird interaction between <strong>[trigger]</strong> and <strong>[print]</strong> going on?</p>
</blockquote>
<p>Not a computer science guy either, but I have learned from experience that you can't always trust [print] to represent the order of operations accurately, especially when you have more than one of them. [print] is part of the order of operations, after all, not independent of it.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/9</guid><dc:creator><![CDATA[LiamG]]></dc:creator><pubDate>Fri, 09 Oct 2015 10:56:46 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Fri, 09 Oct 2015 15:42:51 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/liamg">@LiamG</a> said:</p>
<blockquote>
<blockquote>
<p>To me this output looks like it was printed backwards. Is there some weird interaction between <strong>[trigger]</strong> and <strong>[print]</strong> going on?</p>
</blockquote>
<p>Not a computer science guy either, but I have learned from experience that you can't always trust [print] to represent the order of operations accurately, especially when you have more than one of them. [print] is part of the order of operations, after all, not independent of it.</p>
</blockquote>
<p>That actually makes a lot of sense when I looked at the output of my print in my original post and after reading @seb-harmonikar.ar 's comments. It looks like pd doesn't just blindly trigger these events but calculates the entire chain of events before processing it, so it knows which result should come out first. Pretty fascinating for a noob like me!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/10</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Fri, 09 Oct 2015 15:42:51 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Fri, 09 Oct 2015 15:45:40 GMT]]></title><description><![CDATA[<p>If anyone is curious, I made my own version of <strong>[list-drip]</strong> that might be a little easier to understand. The only real catch is that the second outlet of <strong>[list split]</strong> gives a result before the first outlet, so you have to add a few things to force the order of operations:<br />
<img src="/uploads/files/1444405536062-upload-86998ac3-6c77-4f8b-b3f2-493355b742d7" alt="upload-86998ac3-6c77-4f8b-b3f2-493355b742d7" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/11</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Fri, 09 Oct 2015 15:45:40 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Tue, 13 Oct 2015 16:43:18 GMT]]></title><description><![CDATA[<p>Hey, rjp9!<br />
Beware that you're 'normal' version of [list-drip] ist not linear, but rather exponential in computation time! This is because Pd will make a lot of copies of the list and you may end up with a stack overflow. Try, for example, sending a long list with a few hundred alements - Pd will most likely crash!<br />
The main reason why list-abs' [list-drip] abstraction makes use of this special algorithm is to keep the computation time linear.<br />
Coincidently, this has been discussed on the Pd mailing list just a couple of days ago, so you may want to have a look: <a href="http://lists.puredata.info/pipermail/pd-list/2015-10/111681.html" rel="nofollow">http://lists.puredata.info/pipermail/pd-list/2015-10/111681.html</a><br />
(Matt speaks about an abstraction that works basically the same way as your 'normal' one)</p>
<p>Cheers</p>
<p>PS: A good (and faster) alternative to list-abs' [list-split] is zexy's [drip].</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/12</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/12</guid><dc:creator><![CDATA[Spacechild1]]></dc:creator><pubDate>Tue, 13 Oct 2015 16:43:18 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Tue, 13 Oct 2015 20:32:19 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/spacechild1">@Spacechild1</a> Huh that is really interesting. Thanks for bringing that up.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/13</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/13</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Tue, 13 Oct 2015 20:32:19 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Tue, 13 Oct 2015 21:50:09 GMT]]></title><description><![CDATA[<p>BTW: As you might have seen in the mailling list, you shouldn't use the iterative approach either:<br />
<img src="/uploads/files/1444770828589-list-drip-iterative.jpg" alt="list-drip-iterative.JPG" class="img-responsive img-markdown" /><br />
It gets reeeeally slow for longer lists, but at least it won't give you a stack overflow.<br />
Ironically enough, it was Miller who was suggesting it, but then it turned out that it won't work as expected because of the copying. Miller somehow gave a hint that he might change the behaviour of [list] in a way that it won't make a copy if the left inlet only receives a bang. Then the iterative approach would work fine.</p>
<p>Finally I'd like to point out that list-abs' [list-drip] actually does two tricks: protecting against stack overflow by halfing the lists AND keeping computation time linear by avoiding all the [list objects] that do unnessecary copying. Pretty clever <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":-)" alt=":-)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/14</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/14</guid><dc:creator><![CDATA[Spacechild1]]></dc:creator><pubDate>Tue, 13 Oct 2015 21:50:09 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Tue, 13 Oct 2015 23:41:50 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/spacechild1">@Spacechild1</a> said:</p>
<blockquote>
<p>keeping computation time linear</p>
</blockquote>
<p>Could you elaborate on what that means and why it is important for noobs like me <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/15</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/15</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Tue, 13 Oct 2015 23:41:50 GMT</pubDate></item><item><title><![CDATA[Reply to how does [list drip] actually work? on Wed, 14 Oct 2015 16:38:41 GMT]]></title><description><![CDATA[<p>Put in a formal way, it means that computation time equals O(n).<br />
--&gt; <a href="https://en.wikipedia.org/wiki/Time_complexity#Table_of_common_time_complexities" rel="nofollow">https://en.wikipedia.org/wiki/Time_complexity#Table_of_common_time_complexities</a><br />
I give you a simple example regarding [list-split]: Let's suppose dripping 100 elements would take 0.01 ms, then dripping 1000 elements will take 0.1 ms; 10.000 elements will take 1 ms etc.</p>
<p>I think the algorithm of [list-drip] itself should be actually O(log(n)) but in Pd you'll end up with O(n). At least this is what I've measured... Please anyone correct me if I'm wrong</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/16</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9547/how-does-list-drip-actually-work/16</guid><dc:creator><![CDATA[Spacechild1]]></dc:creator><pubDate>Wed, 14 Oct 2015 16:38:41 GMT</pubDate></item></channel></rss>