[PD-dev] missing file from pd-MAIN and fftw version

Hans-Christoph Steiner hans at eds.org
Thu Sep 28 01:04:15 CEST 2006


On Sep 26, 2006, at 5:46 PM, Tim Blechmann wrote:

> On Tue, 2006-09-26 at 23:21 +0200, Frank Barknecht wrote:
>>> I should add, the next key step is to remove as many classes as
>>> possible from the root namespace (i.e. compiled into Pd).
>>
>> IMO this step should wait until we have the equivalent to Python's
>> "from pdcore import *" or C++'s "using namespace std"
>
> sorry for some 'implementation details', but this is not as trivial as
> it would be in a script language.
>
> i can think of two ways to implement a namespace:
> - a property of the canvas
> - a |using| or |import| object
>
> the first solution would be a contrary to pd's design principle (as
> written by miller in the pd docs, §2.6.2. persistence of data).
> for the second solution the creation time of the import object  
> would be
> crucial (which would also be a contrary to §2.6.2), or objects will  
> have
> to be reloaded when import objects are created/destroyed, which would
> increase the complexity of the implementation quite a bit...

Yes, that is a good principle, but its already violated in a number  
of places, like properties panels on GUI objects.  Properties on a  
canvas probably makes sense for a namespace.

Loading from a file shouldn't be too hard, the file could be loaded  
into memory, reordered as necessary, then executed.  The hard part  
would be when inserting an [import] statement into a patch, if that  
is going to take effect immediately and reload objects based on that  
[import].

For the next step, it could just change the loading statement, only  
affecting the load.  Then we can test the idea out, and see whether  
its worth the effort of making it take effect immediately.

I guess realtime languages don't usually have namespaces.  Anyone  
know of some examples?

.hc



More information about the Pd-dev mailing list