Hi Alan,

On 24.01.2009, at 23:20, Alan W. Irwin wrote:

> Hi Werner:
>
> I have some questions about your Lua bindings and examples.
>
> * Are the bindings specific to Lua 5.0?

Not really, but I only test the bindings and the examples with lua 5.0  
at the moment. I made a test with lua 5.1 in an earlier stage and it  
was also working. Reason is, that I have bought the Lua Book  
(Programming in Lua) some time ago (5.0) and that this manual is also  
now free to browse: http://www.lua.org/pil/ . For lua 5.1 there is  
only the reference manual ( http://www.lua.org/manual/ ) and although  
there were not so much significant changes between 5.0 and 5.1 I still  
stick to 5.0 in the moment (since I have the book). Since many people  
still use 5.0 I want the lua bindings work for both 5.0 and 5.1.
>
>
> With a small build-system change I made locally, I was able to get the
> bindings to build for Lua-5.1 (the latest Lua version on Debian  
> testing).
> However, I don't know whether they will work.  I can switch back to  
> Lua-5.0
> if necessary, but I would be willing to try 5.1 if you feel there is
> a good chance it will work.

It should actually work. If it compiles you made the first step and  
the example should actually run on 5.0 and 5.1. I also propose that  
either 5.0 or 5.1 is the default and if you want to use the non  
default lua interpreter you need to set a -DWITH_LUA50=ON option or  
something similar.
>
>
> * Should your version check for exactly 5.0 in each example be  
> changed to
> 5.0 or greater? (This is related to the first question.)

No, this should be like that. 5.1 provided significantly progress in  
loading shared libraries, so the header part in the examples is needed  
that the examples run with 5.0 and 5.1. Older lua versions are not  
supported (at least not tested, the 4.x versions are really old).
>
> * How do you run the examples?

* Enable lua bindings with -DENABLE_lua=ON
* lua, lualib, lualiblib must be installed, plus developer packages  
(Ubuntu/Debian)
* cd build-directory/bindings/lua (here you should find plplotluac.so)
* lua source-directory/examples/lua/x05.lua

Not perfect, but at least for lua 5.0 there is no easy way to tell lua  
where the shared library is (apart from setting an absolut path in the  
source). Lua 5.1 allows to set an environment variable where lua looks  
for the shared library (I don't know which), therefor you could run  
the examples anywhere you want. Also some of the examples where not  
fully ported (e.g. x01 and x08) but already committed since I already  
did some work. So don't expect all committed examples to run.

>
> * Do you need help putting the test infrastructure (ctest and  
> install-tree
> equivalent) in place?

This would be great, especially since I have not much experience with  
the testing scripts. I was thinking about configuring the lua examples  
with a "@MODULEPATH" variable which is set via cmake to the directory  
where the lua bindings are, so that the examples could be run from  
anywhere. Or something like that. For 5.1 this wouldn't be needed  
since you could set the enviroment variable.
>
>
> I would be happy to help with that once I know how to run the  
> examples.

This would be great.

Regards,
Werner
>


--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: sme...@iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to