<?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[Question: mnemonics for prepend&#x2F;append]]></title><description><![CDATA[<p>I wanted to ask if anyone had thought of clever mnemonics to get the order of prepend and append right. I usually get them backward!</p>
<p>I think my wrong thinking goes like this... just taking append as an example. &quot;Append&quot; has a direct and indirect object: I (the subject) append the direct object onto the indirect one: if I append &quot;food&quot; onto &quot;cat,&quot; I get cat food.</p>
<p>In my mind, the left inlet is the direct object, so then I think that the left-hand list should follow the right-hand list... but of course this is backward. (I get this so consistently wrong that I'm tempted to think, maybe the semantics are just wrong in both Pd and Max... but of course I just have to adapt my thinking.)</p>
<p>I guess I should think of it like: RHS is more consistent, LHS probably changes on every invocation. Prepend, the consistent part is a prefix; append, it's a suffix.</p>
<p>Any other ideas?</p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 13:11:35 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/13757.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 18 Dec 2021 05:13:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Sat, 18 Dec 2021 05:13:58 GMT]]></title><description><![CDATA[<p>I wanted to ask if anyone had thought of clever mnemonics to get the order of prepend and append right. I usually get them backward!</p>
<p>I think my wrong thinking goes like this... just taking append as an example. &quot;Append&quot; has a direct and indirect object: I (the subject) append the direct object onto the indirect one: if I append &quot;food&quot; onto &quot;cat,&quot; I get cat food.</p>
<p>In my mind, the left inlet is the direct object, so then I think that the left-hand list should follow the right-hand list... but of course this is backward. (I get this so consistently wrong that I'm tempted to think, maybe the semantics are just wrong in both Pd and Max... but of course I just have to adapt my thinking.)</p>
<p>I guess I should think of it like: RHS is more consistent, LHS probably changes on every invocation. Prepend, the consistent part is a prefix; append, it's a suffix.</p>
<p>Any other ideas?</p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Sat, 18 Dec 2021 05:13:58 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Sat, 18 Dec 2021 09:31:35 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a> Me too.<br />
You need to be thinking that it is the [list append contents/argument] that is pre/ap/pended.<br />
After all that is the list that is actually stored in the object (until it changes of course).<br />
I.e. read the text in the object box literally rather than thinking of the hot inlet.<br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/2</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Sat, 18 Dec 2021 09:31:35 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Sat, 18 Dec 2021 15:07:47 GMT]]></title><description><![CDATA[<p>Maybe you could think of object oriented languages like Java, c#, or c++, e.g.</p>
<pre><code>String firstName = &quot;John &quot;;
String lastName = &quot;Doe&quot;;
System.out.println(firstName.concat(lastName));
</code></pre>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/3</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Sat, 18 Dec 2021 15:07:47 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Sun, 19 Dec 2021 02:20:51 GMT]]></title><description><![CDATA[<p><img src="/uploads/files/1639880443700-bildschirmfoto-vom-2021-12-19-03-20-08.png" alt="Bildschirmfoto vom 2021-12-19 03-20-08.png" class="img-responsive img-markdown" /></p>
<p><a href="/uploads/files/1639880431387-reallife.pd">reallife.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/4</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Sun, 19 Dec 2021 02:20:51 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Sun, 19 Dec 2021 04:28:09 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> said:</p>
<blockquote>
<p>Maybe you could think of object oriented languages like Java...</p>
</blockquote>
<p>Ah I see, so, retrain myself to think of the left inlet as the receiver of the prepend or append message (though even here, the semantics are arbitrary).</p>
<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a> Very cute! I'll have to use that in class when talking about list operations <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title="wink" alt=":wink:" /></p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/5</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Sun, 19 Dec 2021 04:28:09 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Sun, 19 Dec 2021 04:35:25 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a> While I have never had an issue with prepend/append, I have never been able to remember if [list] was shorthand for prepend or append. Fixed.<img src="/uploads/files/1639888522517-untitled.png" alt="Untitled.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/6</guid><dc:creator><![CDATA[oid]]></dc:creator><pubDate>Sun, 19 Dec 2021 04:35:25 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Tue, 21 Dec 2021 04:34:16 GMT]]></title><description><![CDATA[<p>I like to think that [list] will do a &quot;list join&quot;, and then append is &quot;join the first list with the second&quot;...  prepend is like swapping the two lists before joining, so, in <strong>pre</strong>paration to join, swap first, the second comes first and the first goes last... maybe this help?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/7</guid><dc:creator><![CDATA[abreubacelar]]></dc:creator><pubDate>Tue, 21 Dec 2021 04:34:16 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Tue, 21 Dec 2021 23:42:06 GMT]]></title><description><![CDATA[<p>Hm, actually the thing about object oriented languages doesn't hold up, I think.</p>
<p>Object oriented languages are all about the state of an object, and the final arbiter of that object's state is <em>the object itself</em>. So you don't have a godlike actor to squish lists together. The only way to append/prepend in a paradigmatically OOP environment is to request one or the other list to append or prepend something else onto it. And here, the sensible semantic is:</p>
<pre><code>var a = [&quot;abc&quot;, &quot;def&quot;];

a.append([&quot;ghi&quot;]);
-&gt; [&quot;abc&quot;, &quot;def&quot;, &quot;ghi&quot;];
</code></pre>
<p>Max and Pd list operators are different from this: You are passing lists around, but the lists are passive. They're <em>not</em> objects, rather, messages. Probably this is where the confusion comes in: by casting the lists as operands, there's no hierarchy, and as a result, it's completely arbitrary whether <code>prepend(A, B)</code> means B-then-A or A-then-B. Both equally make sense. So then there's room for me to read it so that A is the direct object: &quot;prepend A onto B&quot; -&gt; A, B where I should be reading &quot;prepend the remembered list onto A&quot; <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/confounded.png" title="confounded" alt=":confounded:" /></p>
<p>I suppose I'll never really agree with the Max/Pd semantic on this. Makes no sense to me, tbh I think Miller made a mistake here. But every programming environment has these gotchas.</p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/8</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Tue, 21 Dec 2021 23:42:06 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Wed, 22 Dec 2021 01:56:45 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a> Oh, ha ha, I thought you had already pointed out the ridiculousness of my suggestion by framing OOP as message passing, i.e. &quot;Oh, so you're asking me to treat the Pd message as the object, and the Pd object as the message being passed to the Pd message asking it to transform itself?  Hey, thanks a lot, that clarifies everything!&quot;  I was already laughing.</p>
<p>In my (very weak) defense I was mostly thinking about order.  first.concat(last).  a.append(b).  But I was also thinking about the append method of an object.  I learned OOP not as message passing (e.g. Smalltalk) but as encapsulation.  Some early non-OOP languages (I can't remember, so long ago...Pascal?) had facilities to group data together with the functions that accessed/modified them within some scope, and unless you had access to that scope, then you couldn't just go do whatever you wished with the data.  Honestly, I used to try to do that in assembly language, though admittedly there was no encapsulation enforcement--it was just about hiding all the nasty details in a single compilation unit.  So if I were to come across the append method of a list object, I would assume that the list was thing that was being modified and that the argument was the...uh...argument to the modifier.</p>
<p>Remember that [list] and [list append] are synonyms.  Are you convinced yet?  <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>That said, I'm never shocked whenever someone tells me that my intuition is weird.  I think you're better served by <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a>'s and <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/oid">@oid</a>'s suggestions, which are unforgettable IMHO.  Unless you're too young to know who Queen is, in which case you substitute...uh...I dunno...Lil Nas X lyrics?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/9</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Wed, 22 Dec 2021 01:56:45 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Wed, 22 Dec 2021 19:38:23 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a> If this can work for you:<br />
<img src="/uploads/files/1640201862653-bildschirmfoto-vom-2021-12-22-20-35-58.png" alt="Bildschirmfoto vom 2021-12-22 20-35-58.png" class="img-responsive img-markdown" /><br />
Maybe this can in the same way?<br />
<img src="/uploads/files/1640201891571-bildschirmfoto-vom-2021-12-22-20-36-38.png" alt="Bildschirmfoto vom 2021-12-22 20-36-38.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/10</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Wed, 22 Dec 2021 19:38:23 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Sat, 25 Dec 2021 01:20:47 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> said:</p>
<blockquote>
<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a> Oh, ha ha, I thought you had already pointed out the ridiculousness of my suggestion by framing OOP as message passing...</p>
</blockquote>
<p>Oh, sorry, that wasn't my intent at all... when I initially read your previous post, I thought it made sense -- I wasn't trying to ridicule, but rather, sincerely trying to understand. Probably should have left it alone but I kept thinking about it.</p>
<p>I never intended any pejorative in any of these posts -- it's a confusing API and IMO we're all working together to find useful vocabulary for it.</p>
<p>With that said, <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ingox">@ingox</a> 's last one is probably the big winner... it had actually crossed my mind at some point that &quot;subtract B from A&quot; rolls off the tongue, so why could &quot;prepend B onto A&quot; not similarly roll off the tongue?</p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/11</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Sat, 25 Dec 2021 01:20:47 GMT</pubDate></item><item><title><![CDATA[Reply to Question: mnemonics for prepend&#x2F;append on Sat, 25 Dec 2021 06:18:42 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a> For me it is more visual. I see the main bang flowing down through the hot inlets, the cold inlets being prepared beforehand.</p>
<p>There is even this technique to structure complex code, with the convention that all the parts on the right side only feed into cold inlets:</p>
<p><img src="/uploads/files/1640413105385-bildschirmfoto-vom-2021-12-25-07-17-59.png" alt="Bildschirmfoto vom 2021-12-25 07-17-59.png" class="img-responsive img-markdown" /><br />
<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/13757/question-mnemonics-for-prepend-append/12</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13757/question-mnemonics-for-prepend-append/12</guid><dc:creator><![CDATA[ingox]]></dc:creator><pubDate>Sat, 25 Dec 2021 06:18:42 GMT</pubDate></item></channel></rss>