<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div style="" class=""><span style="" class="">I think we're talking about the same thing.</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">In matju's scheme, the abstraction author can make it possible for a user to type something like this:</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica
 Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">[myabstraction, something 1 2 3, something_else blah]</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">After the objects inside myabstraction are instantiated, it would output this from the leftmost inlet inside the abstraction:</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color:
 transparent; font-style: normal;"><span style="" class="">something 1 2 3</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">something_else blah</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">Then the abstraction author can [route something something_else] in order to use those messages to initialize whatever they want inside the
 abstraction.  I assume this is what would happen in your scheme after the final [route bang] to the outlet at the end of the patch.</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""><span style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">In fact you can do this in Pd Vanilla and obviate the symbol parsing/conversion.  Try this:</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class="">[named-arguments
 foo bar, height 12, cats miaow look ma an arbitrary number of values for this last named "arg"]<br style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span style="" class=""></span></div>Break the list into sequences using [sel,].  It works because Pd's parser converts the comma atoms to symbols consisting of an escaped comma.<br><br>And you don't need [initbang] to do any of this.  It's just useful to describe functionality I'm talking about.<br><br>-Jonathan<br> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial,
 Lucida Grande, sans-serif; font-size: 16px;"> <div style="" class="" dir="ltr"> <font style="" class="" face="Arial" size="2"> On Friday, October 24, 2014 12:18 AM, Chris McCormick <chris@mccormick.cx> wrote:<br style="" class=""> </font> </div>  <br style="" class=""><br style="" class=""> <div style="" class="">Hi Jonathan,<br style="" class="" clear="none"><br style="" class="" clear="none">I am probably confused, or confusing here, but I was suggesting this as<br style="" class="" clear="none">a mechanism whereby the author of an abstraction could have the<br style="" class="" clear="none">abstraction accept named arguments set by a user of the abstraction.<br style="" class="" clear="none"><br style="" class="" clear="none">In that light I am confused by what you've written below, sorry about<br style="" class="" clear="none">that! You seem to be specifying a way for an abstraction to set up<br style="" class="" clear="none">internal
 defaults, is that right?<br style="" class="" clear="none"><br style="" class="" clear="none">I don't have access to "initbang" in the Pd I use yet.<br style="" class="" clear="none"><br style="" class="" clear="none">Cheers,<br style="" class="" clear="none"><br style="" class="" clear="none">Chris.<br style="" class="" clear="none"><br style="" class="" clear="none">On 24/10/14 12:11, Jonathan Wilkes via Pd-list wrote:<br style="" class="" clear="none">> Hi Chris,<br style="" class="" clear="none">> I prefer the idea of using the comma atom to send messages to an<br style="" class="" clear="none">> object/abstraction at init time.<br style="" class="" clear="none">> <br style="" class="" clear="none">> Example:<br style="" class="" clear="none">> [bar 15 25(<br style="" class="" clear="none">> |<br style="" class="" clear="none">> [foo]<br style="" class="" clear="none">> <br style="" class="" clear="none">> would be
 equivalent to<br style="" class="" clear="none">> <br style="" class="" clear="none">> [initbang]<br style="" class="" clear="none">> |<br style="" class="" clear="none">> [foo, bar 15 25]<br style="" class="" clear="none">> <br style="" class="" clear="none">> Benefits:<br style="" class="" clear="none">> * messages can be type-checked or arbitrary length, just like any pd message<br style="" class="" clear="none">> * eases development of externals.  For instance, sigmund~ would have had<br style="" class="" clear="none">> 96 fewer lines of code because this syntax would have done away with the<br style="" class="" clear="none">> need for flags<br style="" class="" clear="none">> * it looks like message-box syntax and behaves nearly the same<br style="" class="" clear="none">> * once implemented, it would automatically apply (consistently) to every<br style="" class="" clear="none">> internal/external
 object<br style="" class="" clear="none">> * matju already implemented it in Gridflow<br style="" class="" clear="none">> <br style="" class="" clear="none">> Drawbacks:<br style="" class="" clear="none">> * [expr], [list], [select], [route], and a few others would need to be<br style="" class="" clear="none">> treated specially to retain their current behavior regarding commas<br style="" class="" clear="none">> * abstractions require some mechanism to retrieve those init-time<br style="" class="" clear="none">> messages.  I believe matju had them shoot out the leftmost inlet of the<br style="" class="" clear="none">> abstraction, with the assumption that the user would have a [route]<br style="" class="" clear="none">> sitting there to parse them.  Another idea would be to retrieve them<br style="" class="" clear="none">> from an introspection object like [canvasinfo] (and maybe have another<br style="" class=""
 clear="none">> object which splits that into a sequence of messages).<br style="" class="" clear="none">> <br style="" class="" clear="none">> -Jonathan<br style="" class="" clear="none">> On Thursday, October 23, 2014 11:28 PM, Chris McCormick<br style="" class="" clear="none">> <<a href="" style="" class="" shape="rect" ymailto="mailto:chris@mccormick.cx">chris@mccormick.cx</a>> wrote:<br style="" class="" clear="none">> <br style="" class="" clear="none">> <br style="" class="" clear="none">> Hi all,<br style="" class="" clear="none">> <br style="" class="" clear="none">> Here's a design pattern for passing named arguments ("bar=true foo=12")<br style="" class="" clear="none">> into an abstraction.<br style="" class="" clear="none">> <br style="" class="" clear="none">> Cheers,<br style="" class="" clear="none">> <br style="" class="" clear="none">> Chris.<br style="" class="" clear="none">> <br
 style="" class="" clear="none">> -- <br style="" class="" clear="none">> <a href="" style="" class="" shape="rect" target="_blank">http://mccormick.cx/</a><br style="" class="" clear="none">> <br style="" class="" clear="none">> _______________________________________________<br style="" class="" clear="none">> <a href="" style="" class="" shape="rect" ymailto="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br style="" class="" clear="none">> UNSUBSCRIBE and account-management -><br style="" class="" clear="none">> <a href="" style="" class="" shape="rect" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br style="" class="" clear="none">> <br style="" class="" clear="none">> <br style="" class="" clear="none">> <br style="" class="" clear="none">> <br style="" class="" clear="none">> _______________________________________________<br style="" class="" clear="none">> <a href=""
 style="" class="" shape="rect" ymailto="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br style="" class="" clear="none">> UNSUBSCRIBE and account-management -> <a href="" style="" class="" shape="rect" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><div style="" class="" id="yqtfd47060"><br style="" class="" clear="none">> <br style="" class="" clear="none"><br style="" class="" clear="none"><br style="" class="" clear="none">-- <br style="" class="" clear="none"><a href="" style="" class="" shape="rect" target="_blank">http://mccormick.cx/</a><br style="" class="" clear="none"></div><br style="" class=""><br style="" class=""></div>  </div> </div>  </div> </div></body></html>