On Thu, 5 Jul 2007, Alexandre Quessy wrote:
When inside an abstraction, let says foo/bar.pd, if you want to use an external that is named [bar], Pd complains : "error: bar: can't load abstraction within itself bar ... couldn't create"
This happens only when [bar] is not the name of an already-loaded external. If [bar] is loaded before [foo/bar] is, the above problem will not occur.
This kind of dependency on loading order is something that would usually be regarded as quite evil. It's sort of related to object numbering and wire numbering issues that are well known, but class loading order issues are the trickiest in that group of problems and the most difficult to get rid of.
And then, let say there is a "foo/counter.pd" in the same directory and that you wan to create a [counter], it will instanciate the "counter.pd" that is in that folder, and not the external that is in /usr/lib/pd/extra, for instance.
And yet, [/counter] will not pick up the toplevel [counter] name, because [counter] is looked up in -path, while [/whatever/the/name] never is. This is very much like the "shell" languages (bash, tcsh, ..., but not tclsh).
The filesystem<->namespaces mapping is very much varying from language to language, but usually, the thing called "namespace" is separate from the filesystem (e.g. C++,Tcl,Ruby) or maps to some kind of particular $PATH (e.g. Java), or is a "shell" language as defined above.
What I mean is that if Pd had "::" as in C++,Tcl,Ruby, then [::counter] would look for a prefixless "counter" but still in -path, as long as one is not already loaded. This could be the behaviour assigned to a plain "/" prefix, if one was willing to give up absolute folder names.
to change for a better one, if one exists. (maybe "$". "|", or "+", such as in "rgb$" or "rgb+" ?)
Even though $ as a suffix might be accepted by the current pd, I don't think it's a good idea to use it for anything else than variable substitution of some kind (either pd's or expr's).
By the way (regarding $args and $), I wrote a [flow/pak] that is a [pack] with all inlets hot ! (using dynamic patching)
[#pack] is also all-inlets-hot.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada