Re: [Plplot-devel] Questions about the Lua bindings and examples

2009-02-17 Thread Alan W. Irwin
On 2009-02-17 11:29+0100 Werner Smekal wrote:

 Hi Alan,
 
 
 Here are the present results:
 
 lua
  Missing examples:  09 14 14a 15 16 17 19 20 21 22 23 25 26 27 
 28 29 30 31
  Differing postscript output :  08 11 12 13 18
  Missing stdout  :
  Differing stdout  :


 With the latest svn revision I get:

 lua
 Missing examples:
 Differing postscript output :
 Missing stdout  :
 Differing stdout:

For the record, what platform produced the above result?

I get the same result here (for installed examples tree make test) for
my 64-bit Debian Lenny platform.

Congratulations, Werner, at the amazing speed with which you put these
complete lua bindings and examples together.

 [...]I'll 
 set ENABLE_lua=ON by default if nobody is against that move.

Please go ahead.  Also, don't forget to advertise your work in
README.release so our ordinary users will know about it.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Questions about the Lua bindings and examples

2009-02-01 Thread Alan W. Irwin
On 2009-01-30 10:13+0100 Werner Smekal wrote:

 I'm just trying to run the test. One note: in lua.cmake you use VERSION_LESS 
 but this is obviously not available for cmake 2.6.0 which is installed by 
 default on Ubuntu 8.10. I had to apt-remove cmake, install the latest 
 executable 2.6.2 and then cmake was able to consider. We need just make sure, 
 that if people enable lua, that they have cmake 2.6.2.

Thanks for drawing my attention to that issue.

I just (revision 9427) changed the logic in cmake/modules/lua.cmake so
that it works for all versions of CMake 2.6.x including 2.6.0.

At some point (probably in a year or so) I will bump the minimum version
again, but for now we have to work around some of the minor deficiencies of
2.6.0 since that is the version provided by a lot of Linux distributions (as
you just discovered).

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
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


Re: [Plplot-devel] Questions about the Lua bindings and examples

2009-01-31 Thread Alan W. Irwin
I have now implemented full testing of the Lua examples in the installed
examples tree (using make test there).  If anybody else wants to try
this use -DENABLE_lua=ON.

Examples 1 and 8 have been added to the list of what is tested (since
they no longer have run-time errors).  Since Lua example 1 is now run, no
touch workarounds are needed any more to get ctest in the build tree
or make test in the installed examples tree to work

Here are the present results:

lua
   Missing examples:  09 14 14a 15 16 17 19 20 21 22 23 25 26 27 28 
29 30 31
   Differing postscript output :  08 11 12 13 18
   Missing stdout  :
   Differing stdout   :

The examples actually run for this test (see plplot_test/test_lua.sh.in) are
now

01 02 03 04 05 06 07 08 10 11 12 13 18 24

which implies

01 02 03 04 05 06 07 10 24

are now perfect.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
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


Re: [Plplot-devel] Questions about the Lua bindings and examples

2009-01-30 Thread Werner Smekal
Hi Alan,

thanks a lot for the test script. This helps a lot!

 I now (revision 9415) have ctest implemented for Lua.

 [ ]


 are currently perfect.

 Can you run ctest with the suggested workaround for missing example  
 01 to
 confirm these results as well?  The current result of roughly one- 
 fourth the
 Lua examples being perfect is excellent for this early in the game.   
 Indeed,
 you are working quite hard on extending and updating the Lua  
 examples so
 with luck the list of perfect Lua examples should rapidly increase  
 in the
 next little while.

I'm just trying to run the test. One note: in lua.cmake you use  
VERSION_LESS but this is obviously not available for cmake 2.6.0 which  
is installed by default on Ubuntu 8.10. I had to apt-remove cmake,  
install the latest executable 2.6.2 and then cmake was able to  
consider. We need just make sure, that if people enable lua, that they  
have cmake 2.6.2.

Thanks again,
Werner



 Alan
 __
 Alan W. Irwin

 Astronomical research affiliation with Department of Physics and  
 Astronomy,
 University of Victoria (astrowww.phys.uvic.ca).

 Programming affiliations with the FreeEOS equation-of-state  
 implementation
 for stellar interiors (freeeos.sf.net); PLplot scientific plotting  
 software
 package (plplot.org); the libLASi project (unifont.org/lasi); the  
 Loads of
 Linux Links project (loll.sf.net); and the Linux Brochure Project
 (lbproject.sf.net).
 __

 Linux-powered Science
 __

 --
 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

--
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


Re: [Plplot-devel] Questions about the Lua bindings and examples

2009-01-29 Thread Alan W. Irwin
On 2009-01-27 15:13-0800 Alan W. Irwin wrote:

 For the Lua case, I suggest we include a file that is configured with the
 correct absolute location (build tree location for now) of plplotluac.

I have now (revision 9414) implemented that idea. The result is only lightly
tested (after running make, then lua x05.lua -dev xwin works for me in in
examples/lua subdirectory of the build tree.)

More to follow with the goals of getting (1) ctest in the build tree and (2)
make test in the installed examples tree to work for the Lua case.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
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


Re: [Plplot-devel] Questions about the Lua bindings and examples

2009-01-29 Thread Alan W. Irwin
On 2009-01-29 14:58-0800 Alan W. Irwin wrote:

 More to follow with the goals of getting (1) ctest in the build tree and (2)
 make test in the installed examples tree to work for the Lua case.

Hi Werner:

I now (revision 9415) have ctest implemented for Lua.

I had to remove the following examples from ctest (see
plplot-test/test_lua.sh.in)

# 01, 08, 09, 15, 16, 19, 22, 25, 30 are implemented but do not currently
work (various run-time errors).
# 14, 17, 20, 21, 23, 26, 27, 28, 29, 31 are not implemented.

That left the following list the ctest currently looks at:

02 03 04 05 06 07 10 11 12 13 18 24

Since 01 is not on that list, the test_diff.sh logic does not work correctly
(it assumes if 01 is missing the whole language is missing). To work around
that issue until example 1 can be added to the list of examples without
run-time errors you must run

touch plplot_test/x01lua.psc plplot_test/x01lua_psc.txt

from the top of the build tree to fool ctest -R compare (i.e., test_diff.sh)
into running the lua comparison.

With that workaround the current ctest results are as follows:

lua
   Missing examples:  08 09 14 14a 15 16 17 19 20 21 22 23 25 26 27 
28 29 30 31
   Differing postscript output :  01 03 11 12 13 18
   Missing stdout  :
   Differing stdout:  01

So from the above list of examples that ctest runs and the subset of those
where postscript output differs, Lua examples

02 04 05 06 07 10 24

are currently perfect.

Can you run ctest with the suggested workaround for missing example 01 to
confirm these results as well?  The current result of roughly one-fourth the
Lua examples being perfect is excellent for this early in the game.  Indeed,
you are working quite hard on extending and updating the Lua examples so
with luck the list of perfect Lua examples should rapidly increase in the
next little while.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
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


Re: [Plplot-devel] Questions about the Lua bindings and examples

2009-01-27 Thread Alan W. Irwin
On 2009-01-26 10:47+0100 Werner Smekal wrote:

 * 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

I have committed a small change (revision 9410) so that the user who has set
ENABLE_lua to ON has the HAVE_lua51 option available for building for
lua-5.1 rather than lua-5.0.  The HAVE_lua51 default is OFF (i.e., by
default the build will proceed for lua-5.0).

When I built for lua-5.0, the instructions above succeeded.  Specifically,
if I execute from the build-tree version of bindings/lua

lua ../../../plplot_cmake/examples/lua/x05.lua -dev xwin

I got the expected results.

However, when I built for lua-5.1 and followed the same run-time
instructions I got an error, e.g.,

softw...@raven lua ../../../plplot_cmake/examples/lua/x05.lua -dev xwin
lua: Table doesn't contain key 'n'.
stack traceback:
 [C]: in function 'parseopts'
 ../../../plplot_cmake/examples/lua/x05.lua:23: in main chunk
 [C]: ?

Probably you will want to concentrate on 5.0 for now, but at some point it
would be nice to get 5.1 working as well for the current examples.  Note, I
have all required packages for lua5.0 and lua5.1 installed from Debian
testing, and I use the update-alternatives Debian system script to symlink
/usr/bin/lua to the correct lua version for the type of build I want to do.

 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).

I think we should solve that problem in a similar way to what we do for
python. Every python example imports a file that is configured to tell it
the absolute location of the required python modules.  The file is configured
differently depending if it is for the build tree or install tree version.

For the Lua case, I suggest we include a file that is configured with the
correct absolute location (build tree location for now) of plplotluac.  A
quick google search indicates there is something called dofile for
including a file into a lua script. If you agree that is the right way to
deal with this situation, I can do the rest to get lua example scripts that
work from the examples/lua directory. Once that is accomplished, it is a
relatively small step to getting ctest for lua working.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
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


Re: [Plplot-devel] Questions about the Lua bindings and examples

2009-01-26 Thread Werner Smekal
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