[PD] Lua and PD (update)
claudiusmaximus at goto10.org
Fri May 9 14:38:26 CEST 2008
Claude Heiland-Allen wrote:
> Mike McGonagle wrote:
>> 2. Lua access to PD tables
> Now implemented (lacking some things, like GUI refresh).
Now added: t:redraw(), see [ltabfill] example.
> Still lacking some niceness, should be able to do:
> local t = pd.Table:new():sync("mytable")
> t = 456
> local x = t
> return #t
> but that's not (currently) implemented.
And it looks like it won't be implemented for the foreseeable future:
"#t does not invoke the __len metamethod when t is a table."
See end of: http://lua-users.org/wiki/GeneralizedPairsAndIpairs
This means pd.Table will remain ugly, with :length() :set() :get(), at
least until Lua 5.2 (maybe).
Mike McGonagle also wrote:
> I am running Mac OS X 10.4.9, but the real trouble is that I don't have a
> internet connection at home. It is more a matter of time, and yes, a little
> bit of apprehension in doing something more.
Ok, using the Makefile.static you should be able to download two tarballs:
Unpack pdlua.tar.gz, then put lua-5.1.3.tar.gz directly inside pdlua/
Then edit pdlua/Makefile.static to change the PLATFORM= line to macosx,
and within pdlua/ run "make -f Makefile.static"
It should compile first Lua then pdlua, and then you can test it with
"pd -path src/ -lib lua"
Hope this works, let me know if not.
More information about the Pd-list