<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yiv6283850812"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div style="" class="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_4"><span style="" class="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_11">Hi Frank,</span></div><div class="yiv6283850812" 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;" id="yiv6283850812yui_3_16_0_7_1413832116841_13"><span style="" class="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_11">Let's take your demos one abstraction at a time:</span></div><div class="yiv6283850812"
 id="yiv6283850812yui_3_16_0_7_1413832116841_18" 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;">01_loadhere.pd:</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_26" class="yiv6283850812" 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;">[mylib/metaload here] -- doesn't load [$1], because you didn't supply any search paths anywhere.  So all the ce_path entries are empty, which means that Pd tries to load "here" in the directory of the metaload abstraction.  That directory doesn't contain here.pd, and so it fails to load.<br style=""></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_27" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_45"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_42" class="yiv6283850812" 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;">[mylib/metaload there] -- creates under the same logic outlined above.  "there.pd" is in metaload's directory.  Success.<br></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_48" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_53"></div><div
 id="yiv6283850812yui_3_16_0_7_1413832116841_50" class="yiv6283850812" 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;">[mylib/metaload mylib/there] -- The [metaload] abstraction's directory doesn't contain a subdirectory "mylib", so this fails.</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_55" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_60"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_57" class="yiv6283850812" 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;">[mylib/metaload nbx] and [mylib/metaload hsl] -- these are pointless.  [nbx] and [hsl] are internal objects, which means Pd finds them in the objectmaker method table before it even searches for libs to load.  Though I guess Hans wants them not to create by default in your situation.</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_72" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_77"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_74" class="yiv6283850812" 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;">Btw-- you
 forgot to include [mylib/metaload both] (which would create the both.pd from "mylib" since that's the abstraction's directory and it exists there) and [mylib/metaload mylib/both] (which would fail to create [$1] because [metaload]'s directory doesn't contain a subdirectory "mylib").<br style="" class="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_34"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_31" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_38"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_35" class="yiv6283850812" 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;">02_loadhere-declare-mylib.pd - [declare -path mylib] will go down and "infect" each abstraction's path.  (In fact Pd just searches it first when attempting to open the abstractions.)</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_83" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_87"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_84" class="yiv6283850812" 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;">The [declare] relative logic-- if you feed a
 relative path to declare, you'll get the concatenation of the toplevel patch's directory with the relative path specified to declare.  So in this patch, you'll get <path-to-this-patch>/mylib.  (After that I<br></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_91" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_96"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_93" class="yiv6283850812" 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;">[mylib/metaload here] -- still doesn't create because there's no "here.pd" file inside "mylib"</div><div
 id="yiv6283850812yui_3_16_0_7_1413832116841_98" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_103"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_100" class="yiv6283850812" 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;">[mylib/metaload there] -- creates, using the same logic</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_105" class="yiv6283850812" 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="yiv6283850812"
 id="yiv6283850812yui_3_16_0_7_1413832116841_110"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_107" class="yiv6283850812" 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;">[mylib/metaload mylib/there] -- won't create because there's no mylib directory inside mylib</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_115" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_120"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_117" class="yiv6283850812" 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;">[mylib/metaload both] and [metaload both] -- both create <path-to-this-patch>/mylib/both.pd since it exists</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_124" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_129"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_126" class="yiv6283850812" 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;">Also, notice that [metaload] creates because of [declare -path mylib].  If you didn't have that it'd fail.</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_131" class="yiv6283850812"
 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_136"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_133" class="yiv6283850812" 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;">Then why does [mylib/metaload] create?  Because after Pd _fails_ to find <path-to-this-path>/mylib/mylib/metaload, it falls back to searching inside the directory of the patch, which would be <path-to-this-patch>/ + mylib/metaload, which successfully creates.<br style="" class="yiv6283850812" id="yiv6283850812yui_3_16_0_1_1413832116841_29909"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_68" class="yiv6283850812"
 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_67"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_64" class="yiv6283850812" 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;">03_loadhere-declare-dot.pd</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_141" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_146"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_143"
 class="yiv6283850812" 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;">[declare -path .] concatenates <path-to-this-patch> with "." and gives that path precedence for all its objects plus infecting all objects inside the abstractions with that as the first path to search.</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_149" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_154"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_151" class="yiv6283850812" 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;">[mylib/metaload here] = [<path-to-this-patch>/./mylib/metaload here].  [$1] is searched first in the path from [declare], which would be <path-to-this-patch>/./here, which creates successfully.<br style="" class="yiv6283850812"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_157" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_166"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_163" class="yiv6283850812" 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;">[mylib/metaload there] =
 [<path-to-this-patch>/./mylib/metaload there].  [$1] is searched first as above, which fails, _but_ then Pd tries the abstraction's directory which holds "there.pd".  Success on 2nd try.</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_169" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_174"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_171" class="yiv6283850812" 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;">[mylib/metaload both] = [<path-to-this-patch>/./mylib/metaload].  [$1] is
 searched as above, and the toplevel patch's directory has a "both.pd" so that one succeeds.  (Thus one in the abstraction's dir is never searched.)</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_177" class="yiv6283850812" 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="yiv6283850812" id="yiv6283850812yui_3_16_0_7_1413832116841_182"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_179" class="yiv6283850812" 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;">[metaload both] = [<path-to-this-patch>/./metaload both].  "metaload.pd" isn't in the patch's main directory so this fails to create<br></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_159"
 class="yiv6283850812" 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 id="yiv6283850812yui_3_16_0_7_1413832116841_189"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_186" class="yiv6283850812" 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;">***</div><div id="yiv6283850812yui_3_16_0_7_1413832116841_209" class="yiv6283850812" 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></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_193" class="yiv6283850812" 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;">Do notice that Pd-l2ork's *info objects (or iemguts and hcs externals) are
 indispensable to figure out exactly what is going on here.  Pd Vanilla has no tools to actually see what's going on under the hood, so all you can do is pen-test and hope something meaningful comes out of that.<br></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_202" class="yiv6283850812" 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 id="yiv6283850812yui_3_16_0_7_1413832116841_207"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_204" class="yiv6283850812" 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;">Also, note that [declare -path .] is not the same as my suggestion for implicit path precendence for the abstraction's directory.  This is because any [declare] in a parent
 of the abstraction will take precedence.  At least
 that's what it looks like is happening inside canvas_open of g_canvas.c.<br><br>Finally, you're implicitly doing your own namespacing/namemangling by choosing the subdirectory name "mylib".  If you choose a subdir name that's the same as a loaded external library (or even an unloaded one that's in the global path), it will take precedence over your abstractions in the subdir.<br></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_213" class="yiv6283850812" 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 id="yiv6283850812yui_3_16_0_7_1413832116841_218"></div><div id="yiv6283850812yui_3_16_0_7_1413832116841_215" class="yiv6283850812" 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;">-Jonathan<br id="yiv6283850812yui_3_16_0_1_1413832116841_34610"></div> <div style="display: block;" id="yiv6283850812yui_3_16_0_7_1413832116841_7" class="yiv6283850812yahoo_quoted"> <div class="yiv6283850812" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div class="yiv6283850812" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div style="" class="yiv6283850812" dir="ltr"> <font style="" class="yiv6283850812" face="Arial" size="2"> On Monday, October 20, 2014 2:58 PM, Frank Barknecht <fbar@footils.org> wrote:<br style="" class="yiv6283850812"> </font> </div>  <br style="" class="yiv6283850812"><br style="" class="yiv6283850812"> <div style="" class="yiv6283850812">Hi,<br style="" class="yiv6283850812" clear="none"><br style="" class="yiv6283850812"
 clear="none">here's some more food for thought: How to deal with library abstractions that<br style="" class="yiv6283850812" clear="none">load other objects whose name is set at runtime? This is actually pretty<br style="" class="yiv6283850812" clear="none">common, for example in abstractions that decorate other abstraction with e.g.<br style="" class="yiv6283850812" clear="none">polyphony, or when writing soundfile/score loading objects.<br style="" class="yiv6283850812" clear="none"><br style="" class="yiv6283850812" clear="none">I attached a test case that illustrates various combinations one may meet in<br style="" class="yiv6283850812" clear="none">this case.<br style="" class="yiv6283850812" clear="none"><br style="" class="yiv6283850812" clear="none">Please start Pd in the directory "metaprog" and open:<br style="" class="yiv6283850812" clear="none"><br style="" class="yiv6283850812" clear="none">01_loadhere.pd<br style="" class="yiv6283850812"
 clear="none">02_loadhere-declare-mylib.pd<br style="" class="yiv6283850812" clear="none">03_loadhere-declare-dot.pd<br style="" class="yiv6283850812" clear="none"><br style="" class="yiv6283850812" clear="none">Ciao<br style="" class="yiv6283850812" clear="none">-- <br style="" class="yiv6283850812" clear="none">Frank<br style="" class="yiv6283850812" clear="none"><br style="" class="yiv6283850812" clear="none"><br style="" class="yiv6283850812" clear="none">On Mon, Oct 20, 2014 at 08:34:13AM -0700, Miller Puckette wrote:<br style="" class="yiv6283850812" clear="none">> Hi all,<br style="" class="yiv6283850812" clear="none">> <br style="" class="yiv6283850812" clear="none">> I think it might work simply to maintain a per-patch list of "externs" <br style="" class="yiv6283850812" clear="none">> currently loaded.  New patches would start out with an empty list, which
 would<br style="" class="yiv6283850812" clear="none">> then get filled in by that patch's own search procedures.<br style="" class="yiv6283850812" clear="none">> <br style="" class="yiv6283850812" clear="none">> There might be some complicated problems to resove about such searche within<br style="" class="yiv6283850812" clear="none">> abstractions (indeed, there are already severe problems the way that is set<br style="" class="yiv6283850812" clear="none">> up that I want to try to fix.)<br style="" class="yiv6283850812" clear="none">> <br style="" class="yiv6283850812" clear="none">> cheers<br style="" class="yiv6283850812" clear="none">> Miller<br style="" class="yiv6283850812" clear="none">> <br style="" class="yiv6283850812" clear="none">> Oe Sun, Oct 19, 2014 at 11:21:15AM -0700, Jonathan Wilkes via Pd-list wrote:<br style="" class="yiv6283850812" clear="none">> > Hi list,<br style="" class="yiv6283850812"
 clear="none">> > Let me describe a typical way to use Pd:<br style="" class="yiv6283850812" clear="none">> > 1) patch author makes a patch<br style="" class="yiv6283850812" clear="none">> > 2)<br style="" class="yiv6283850812" clear="none">> >  patch author abstracts out certain functions into Pd abstractions<br style="" class="yiv6283850812" clear="none">> > 3) patch author makes a self-contained collection of these abstractions (and maybe some helper abstractions)<br style="" class="yiv6283850812" clear="none">> > 4) patch author takes every _reasonable_ step to make their collection portable-- that is, to ensure that their abstractions and nested abstractions create correctly on any version of Pd and don't collide with anything in the standard library path.<br style="" class="yiv6283850812" clear="none">> > <br style="" class="yiv6283850812" clear="none">> > Currently a patch author cannot achieve
 this.  Pure data forces them to care about what names pre-existing externals might have (which is probably why many externals make a common name prefix part of the name of each object).  The reason is that an abstraction's directory is not
 the first place to be searched for externals or abstractions to be loaded.  It is superceded by the searchpath set by [declare] for all of that abstraction's parent canvases.<br style="" class="yiv6283850812" clear="none">> > <br style="" class="yiv6283850812" clear="none">> > If any of those parent canvases declare a path which<br style="" class="yiv6283850812" clear="none">> >  has an external or abstraction by the same name as one of the helper abstractions, the object in that path will get created instead of the helper abstraction.  Furthermore, if any of those parent canvases declare a path that happens to have the same name as the subdirectory containing the helper abstraction, then "path/objectname" will override "subdirectory/helper".  This is even true if you use "./subdirectory/helper".<br style="" class="yiv6283850812" clear="none">> > <br style="" class="yiv6283850812" clear="none">> > This
 means that if the patch author wants to grope toward portability
 they have to do this, too:<br style="" class="yiv6283850812" clear="none">> > 5) read/search all the libnames and object names in pd-extended, and all the other widely used libs and objects scattered about the internet.  Then come up with a name that is human readable, but also unique enough to prevent collisions with anything else out there.<br style="" class="yiv6283850812" clear="none">> > <br style="" class="yiv6283850812" clear="none">> > I think #5 is unreasonable, especially because creating a little zipped directory with abstractions (or even externals) is such a common way of<br style="" class="yiv6283850812" clear="none">> >  making ostensibly portable libraries in Pd.  Essentially we're asking users to do their own name-mangling.<br style="" class="yiv6283850812" clear="none">> > <br style="" class="yiv6283850812" clear="none">> > So why isn't an abstraction's directory the _first_ one to be
 searched by default in Pd?  I understand katja and Matt Barber's reasons
 for using [declare] to infect an entire running instance with different path priorities, but I think that's the exception rather than the rule.  Can we give abstraction directories precedence in the loading scheme, and maybe use a startup flag to trigger Pd's current behavior?<br style="" class="yiv6283850812" clear="none">> > <br style="" class="yiv6283850812" clear="none">> > -Jonathan<br style="" class="yiv6283850812" clear="none">> <br style="" class="yiv6283850812" clear="none">> > _______________________________________________<br style="" class="yiv6283850812" clear="none">> > <a href="" rel="nofollow" style="" class="yiv6283850812" shape="rect">Pd-list@lists.iem.at</a> mailing list<br style="" class="yiv6283850812" clear="none">> > UNSUBSCRIBE and account-management -> <a href="" rel="nofollow" style="" class="yiv6283850812" shape="rect">http://lists.puredata.info/listinfo/pd-list</a><div style=""
 class="yiv6283850812" id="yiv6283850812yqtfd66142"><br style="" class="yiv6283850812" clear="none">> <br style="" class="yiv6283850812" clear="none">> <br style="" class="yiv6283850812" clear="none">> _______________________________________________<br style="" class="yiv6283850812" clear="none">> <a href="" rel="nofollow" style="" class="yiv6283850812" shape="rect">Pd-list@lists.iem.at</a> mailing list<br style="" class="yiv6283850812" clear="none">> UNSUBSCRIBE and account-management -> <a href="" rel="nofollow" style="" class="yiv6283850812" shape="rect">http://lists.puredata.info/listinfo/pd-list</a></div><br style="" class="yiv6283850812" clear="none"><br style="" class="yiv6283850812" clear="none">-- <br style="" class="yiv6283850812" clear="none"> Frank Barknecht                                     _ ______footils.org__<div style=""
 class="yiv6283850812" id="yiv6283850812yqtfd55238"><br style="" class="yiv6283850812" clear="none"></div><br style="" class="yiv6283850812"><div style="" class="yiv6283850812" id="yiv6283850812yqtfd71753">_______________________________________________<br style="" class="yiv6283850812" clear="none"><a href="" rel="nofollow" style="" class="yiv6283850812" shape="rect">Pd-list@lists.iem.at</a> mailing list<br style="" class="yiv6283850812" clear="none">UNSUBSCRIBE and account-management -> <a href="" rel="nofollow" style="" class="yiv6283850812" shape="rect">http://lists.puredata.info/listinfo/pd-list</a><br style="" class="yiv6283850812" clear="none"></div><br style="" class="yiv6283850812"><br style="" class="yiv6283850812"></div>  </div> </div>  </div> </div></div></div></div></body></html>