atom feed18 messages in at.iem.pd-devRe: [PD-dev] removing path and libs f...
FromSent OnAttachments
Hans-Christoph SteinerSep 16, 2011 10:05 am 
João PaisSep 18, 2011 11:08 am 
Hans-Christoph SteinerSep 18, 2011 12:31 pm 
Miller PucketteSep 19, 2011 10:25 am 
Hans-Christoph SteinerSep 19, 2011 10:32 am 
András MurányiSep 19, 2011 5:02 pm.tcl
Hans-Christoph SteinerSep 19, 2011 8:56 pm 
IOhannes m zmoelnigSep 20, 2011 12:30 am 
Andy FarnellSep 20, 2011 5:02 am 
Hans-Christoph SteinerSep 20, 2011 8:46 am 
Hans-Christoph SteinerSep 20, 2011 8:58 am 
Miller PucketteSep 20, 2011 11:15 am 
Hans-Christoph SteinerSep 20, 2011 11:37 am 
Miller PucketteSep 20, 2011 11:58 am 
Hans-Christoph SteinerSep 20, 2011 12:02 pm 
Hans-Christoph SteinerSep 20, 2011 12:33 pm 
Jonathan WilkesSep 20, 2011 1:19 pm 
Hans-Christoph SteinerSep 20, 2011 1:44 pm 
Subject:Re: [PD-dev] removing path and libs from Pd-extended preferences GUI
From:Hans-Christoph Steiner (ha@at.or.at)
Date:Sep 20, 2011 1:44:03 pm
List:at.iem.pd-dev

On Tue, 2011-09-20 at 13:19 -0700, Jonathan Wilkes wrote:

----- Original Message -----

From: Hans-Christoph Steiner <ha@at.or.at> To: IOhannes m zmoelnig <zmoe@iem.at> Cc: pd-@iem.at Sent: Tuesday, September 20, 2011 11:46 AM Subject: Re: [PD-dev] removing path and libs from Pd-extended preferences GUI

On Tue, 2011-09-20 at 09:31 +0200, IOhannes m zmoelnig wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

On 2011-09-19 19:32, Hans-Christoph Steiner wrote:

Hey Miller,

I actually think this would make switching between vanilla and extended easier because it would make people use [import] or [declare] to load libs, then when using vanilla, you'll know which libraries the patch needs. Can you think of examples where it would make things more difficult?

so the idea is to have tons of error messages when using pd-vanilla, of the kind: "import zexy... couldn't create" so that the user knows that they have to load the "zexy" library and henceforth ignore the "import zexy" line and only check the remaining "import foobar...couldn't create"?

i seem to remember that there was a recent email saying that "a patch relying on an error" was not to be considered as correct.

Either way, if you open a patch that uses zexy objects in Pd-vanilla, there will be "...couldn't create" errors. Having [import zexy] there at least gives a place to focus on. Or if people are interested in more portability, they are welcome to either use [declare] or "apt-get install puredata-import"

A few questions:

* What's the difference between [import foo] and [declare -lib foo]? Both seem to load the library into the patch's local namespace.

Underneath, they are the same thing. I could never remember the [declare] syntax so I wrote [import] and [classpath].

* Isn't there an issue between loading a lib in the patch's local namespace and the way the setup routine works globally for a library?

If I have

Patch #1 [import iemguts]

Patch #2 [sendcanvas] <- sendcanvas won't load, because its lib was only loaded for Patch
#1

But if I have

Patch #1 [import iemguts] [sendcanvas]

Patch #2 [sendcanvas] <- this loads, because instantiating [sendcanvas] in Patch #1
loaded the lib globally

Yes this is true. The namespaces stuff isn't fully implemented yet. The way to guarantee you are getting a specific object is to use the namespace prefix, i.e. [iemguts/sendcanvas].

Finally: * why did you develop [import] instead of improving [declare]?

Because what I wanted to do would have broken the syntax of [declare], and others wanted it the way it was.

.hc