[PD] *.lua => *.pd_lua or *.l_lua?

Hans-Christoph Steiner hans at eds.org
Mon Feb 11 03:03:11 CET 2008


On Feb 10, 2008, at 8:43 AM, Claude Heiland-Allen wrote:

> Frank Barknecht wrote:
>> Hi Claude and list,
>>
>> I'm thinking if a custom file extension for pdlua classes would make
>> sense? Currently pdlua loads all *.lua files, which complicates
>> working with *.lua modules not intended to be used as pd classes:
>> Those would have to be in a directory outside of Pd's search path to
>> not pollute Pd's namespace.
>
> Ah, true.
>
>> So my suggestion would be to use something like *.pd_lua, *.pdlua or
>> *.l_lua as extension. What do you think? The same question may become
>> an issue for other loaders as well, so a standard solution would be
>> nice.
>
> Ok, expect this change in the next release (sometime in March).  I'm
> leaning towards *.pd_lua personally, to match *.pd_linux and
> *.pd_darwin, but if anyone has strong objections let me know.

I think that we'd probably be better off not adding any more arcane  
file extensions.  That just adds one more hurdle to getting things  
working.  (I actually think that pd binaries should use the native  
extensions too, like .so, .bundle, .dll).

An easy way to avoid this is to have pdlua look for a setup function  
in the .lua it is trying to open.  If there is no setup function,  
then it wouldn't load that file.  That's really the key technique for  
loading pd binaries.  The differing file extensions aren't really  
necessary.

.hc



------------------------------------------------------------------------ 
----

"It is convenient to imagine a power beyond us because that means we  
don't have to examine our own lives.", from "The Idols of  
Environmentalism", by Curtis White








More information about the Pd-list mailing list