<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>I'm also a bit hesitant, as with my patch you can already just do [declare -lib foo] - which might do nothing - and then just create [foo/bar], no matter how the library is compiled.</div>

<div> </div>

<div>We can still apply Jonathan's idea to [foo/bar]: as a last resort (before looking for abstractions) it could try to load "foo". (we just need to return true from sys_load_lib and new_anything well be called again, hopefully now finding "foo/bar"). the interesting thing is that you won't need the -lib flag when creating objects with a "namespace": [zexy/atoi] will automatically load zexy (if needed).</div>

<div> </div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Sonntag, 12. Mai 2019 um 17:56 Uhr<br/>
<b>Von:</b> "Alexandre Torres Porres" <porres@gmail.com><br/>
<b>An:</b> "Christof Ressi" <christof.ressi@gmx.at><br/>
<b>Cc:</b> Pd-List <pd-list@lists.iem.at><br/>
<b>Betreff:</b> Re: [PD] Full stop '.' in class namespace</div>

<div name="quoted-content">
<div>Just wanna say that this feature is great and helps a lot with cyclone, as I wanted to provide a single binary. Actually, you can already compile it as a single library. But then we have this issue of not being able to call an object with a libname prefix.
<div> </div>

<div>Of course one thing I'd have to do is add a class creator for every object in cyclone, but that's something that makes me cry if I think of it...</div>

<div> </div>

<div>So if this is worked out, I'd be free from this torture and could more easily provide a single binary for cyclone.<br/>
<br/>
Cyclone still has a couple of abstractions that are not part of its binary... but.... I'm dealing with that by making the cyclone binary load cyclone's path in Pd's path with the "add to path" message => <a href="https://github.com/porres/pd-cyclone/blob/master/cyclone_objects/binaries/cyclone_lib.c#L674" target="_blank">https://github.com/porres/pd-cyclone/blob/master/cyclone_objects/binaries/cyclone_lib.c#L674</a></div>

<div> </div>

<div>This is </div>

<div> </div>

<div>> <span style="color: rgb(38,40,42);font-family: Verdana;font-size: 12.0px;">Then I can do [declare -lib foo/bar] to load that library.</span></div>

<div> </div>

<div><span style="color: rgb(38,40,42);font-family: Verdana;font-size: 12.0px;">But that's not the idea, the idea is to use </span><span style="color: rgb(38,40,42);font-family: Verdana;font-size: 12.0px;">[declare -lib foo] and be able to load the object as [foo/bar]...</span></div>

<div> </div>

<div><span style="color: rgb(38,40,42);font-family: Verdana;font-size: 12.0px;">[declare -lib foo/bar]  would look for a bar binary inside a 'foo' folder inside Pd's paths.</span></div>

<div> </div>

<div><span style="color: rgb(38,40,42);font-family: Verdana;font-size: 12.0px;">I guess we're unnecessarily complicating things that are not pertinent and in line with the actual concept of using [declare] and all.</span></div>

<div> </div>

<div><span style="color: rgb(38,40,42);font-family: Verdana;font-size: 12.0px;">cheers</span></div>
</div>
 

<div class="gmail_quote">
<div class="gmail_attr">Em dom, 12 de mai de 2019 às 12:53, Christof Ressi <<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='mailto:christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>> escreveu:</div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div>anyway, I agree that ideally the structure of a library should be totally transparent to the user.</div>

<div> </div>

<div>> Theoretically you could have a loader branch that would look for the "foo" binary in that case, load it, and then 
<div>search for a "bar_setup" routine.</div>

<div> </div>

<div>that's not a bad idea. doesn't seem too complicated to me. I might give it a shot.</div>

<div> </div>
</div>

<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0.0px 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0.0px 0.0px 10.0px;"><b>Gesendet:</b> Sonntag, 12. Mai 2019 um 17:45 Uhr<br/>
<b>Von:</b> "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='mailto:christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>><br/>
<b>An:</b> "Jonathan Wilkes" <<a href="mailto:jancsika@yahoo.com" onclick="parent.window.location.href='mailto:jancsika@yahoo.com'; return false;" target="_blank">jancsika@yahoo.com</a>>, Pd-List <<a href="mailto:pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:pd-list@lists.iem.at'; return false;" target="_blank">pd-list@lists.iem.at</a>><br/>
<b>Betreff:</b> Re: [PD] Full stop '.' in class namespace</div>

<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div>ok, I see. you usually don't load individual classes with [declare -lib] but only (multi-objects-per-binary) libraries.</div>

<div> </div>

<div>the workaround usually is to do [declare -path zexy -lib zexy]. -path is for abstractions and single-object-binaries and -lib is for the multi-object-per-binary library (if it exists).</div>

<div> </div>

<div>the problem was that with single-object-binaries you can do [zexy/atoi] but with multi-object-binaries you can't (unless they added such creators). this is what my patch mainly tries to solve.</div>

<div> 
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0.0px 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0.0px 0.0px 10.0px;"><b>Gesendet:</b> Sonntag, 12. Mai 2019 um 17:33 Uhr<br/>
<b>Von:</b> "Jonathan Wilkes" <<a href="mailto:jancsika@yahoo.com" onclick="parent.window.location.href='mailto:jancsika@yahoo.com'; return false;" target="_blank">jancsika@yahoo.com</a>><br/>
<b>An:</b> "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='mailto:christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>><br/>
<b>Cc:</b> Pd-List <<a href="mailto:pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:pd-list@lists.iem.at'; return false;" target="_blank">pd-list@lists.iem.at</a>><br/>
<b>Betreff:</b> Re: Aw: Re: Re: Re: Re: [PD] Full stop '.' in class namespace</div>

<div>
<div class="gmail-m_-5603608477647138166ydp6341fce8yahoo-style-wrap" style="font-family: "Helvetica Neue" , Helvetica , Arial , sans-serif;font-size: 13.0px;">
<div> </div>

<div><span style="color: rgb(38,40,42);">> On Sunday, May 12, 2019, 10:58:52 AM EDT, Christof Ressi <<a href="mailto:christof.ressi@gmx.at" onclick="parent.window.location.href='mailto:christof.ressi@gmx.at'; return false;" target="_blank">christof.ressi@gmx.at</a>> wrote:</span></div>
</div>

<div class="gmail-m_-5603608477647138166ydp747fb2f7yahoo_quoted" id="gmail-m_-5603608477647138166ydp747fb2f7yahoo_quoted_7980615853">
<div style="font-family: "Helvetica Neue" , Helvetica , Arial , sans-serif;font-size: 13.0px;color: rgb(38,40,42);">
<div> </div>

<div><span style="font-family: Verdana;font-size: 12.0px;">>> that allows it to be built both as a single binary *or* with one class per binary.</span></div>

<div>
<div id="gmail-m_-5603608477647138166ydp747fb2f7yiv2266498462">
<div style="font-family: Verdana;font-size: 12.0px;">
<div> </div>

<div>> ah, of course that makes sense.</div>

<div> </div>

<div>>> with multi-binary style I can do [declare -lib foo/bar] whereas with the single-binary style that won't work.</div>

<div> </div>

<div>> I'm not sure I understand. Can give an example?</div>

<div> </div>

<div>That's the libdir prefix logic. Say I have a "foo" library where one of many binaries inside "extra/foo/" is </div>

<div>named bar.pd_linux. Then I can do [declare -lib foo/bar] to load that library.</div>

<div> </div>

<div>On the other hand, if "foo" was compiled as a single binary with many classes inside it, then there is </div>

<div>just "extra/foo/foo.pd_linux." In that case [declare -lib foo/bar] won't work.</div>

<div> </div>

<div>Theoretically you could have a loader branch that would look for the "foo" binary in that case, load it, and then </div>

<div>search for a "bar_setup" routine. But that's getting pretty damned complicated. And without a spec for </div>

<div>what the loader is supposed to be doing in the first place I'd be hesitant to add that.</div>

<div> </div>

<div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________ <a href="mailto:Pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:Pd-list@lists.iem.at'; return false;" target="_blank">Pd-list@lists.iem.at</a> mailing list UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a></div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br/>
<a href="mailto:Pd-list@lists.iem.at" onclick="parent.window.location.href='mailto:Pd-list@lists.iem.at'; return false;" target="_blank">Pd-list@lists.iem.at</a> mailing list<br/>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a></blockquote>
</div>
</div>
</div>
</div>
</div></div></body></html>