Lua 5.0 and tolua/SWIG ?

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Lua 5.0 and tolua/SWIG ?

Juergen Fuhrmann
Hi,

are there any efforts going on to develop Lua-5.0 compatible
versions of tolua or SWIG ?


Best regards
Juergen


Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Reuben Thomas-5
> are there any efforts going on to develop Lua-5.0 compatible
> versions of tolua or SWIG ?

I have an interest in SWIG: I'm using luaswig 1.2.1, and have made several 
enhancements. I've contacted the author about merging them, and some of 
them were late last year, but this year I've had no response to my emails, 
and the luagnome project doesn't seem to be updated any more.

I'm committed to using Lua 4.0 for the moment, but I will eventually want 
to produce a Lua 5.0 version, so I'd be happy to help anyone who wanted 
to, for example, by providing my version of luaswig as a basis (I've 
cleaned it up and improved functionality somewhat over the distributed 
version, although there are still more things I'd like to do given time).

-- 
http://www.mupsych.org/~rrt/ | Astrophysics: it's not exactly rocket science


Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Waldemar Celes
In reply to this post by Juergen Fuhrmann
I have plan to port tolua to Lua5.0, soon.

-- waldemar

At 17:28 2/9/2002 +0200, you wrote:

Hi,

are there any efforts going on to develop Lua-5.0 compatible
versions of tolua or SWIG ?


Best regards
Juergen


Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Jay Carlson

On Monday, September 2, 2002, at 01:19 PM, Waldemar Celes wrote:

I have plan to port tolua to Lua5.0, soon.

-- waldemar

Excellent.  Thank you.

Jay


Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

luagnom
In reply to this post by Juergen Fuhrmann
In reply to Juergen Fuhrmann <[hidden email]>:

> 
> Hi,
> 
> are there any efforts going on to develop Lua-5.0 compatible
> versions of tolua or SWIG ?
> 
> 
> Best regards
> Juergen
> 
> 

luaswig will be updated when the final version of Lua 5.0 hit the shelf. For the moment, the development of luagtk2 (using the new Gtk-2.0 environment) keeps me busy.

The luagnome project.

Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Juergen Fuhrmann
In reply to this post by Waldemar Celes
>  Mon, 02 Sep 2002 14:19:15 -0300
>  Waldemar Celes <[hidden email]> wrote:
>
>  I have plan to port tolua to Lua5.0, soon.
>  
Great!

Juergen

Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Juergen Fuhrmann
In reply to this post by luagnom
>  Tue, 03 Sep 2002 08:32:13 +0200 (MEST)
>  [hidden email] wrote:
>

>   luaswig will be updated when the  final version of Lua 5.0 hit the
>  shelf. For  the moment, the  development of luagtk2 (using  the new
>  Gtk-2.0 environment) keeps me busy.

Is there any  intention to use the newer versions of  SWIG (1.3+ ) for
that ?   I tried  luaswig, and  decided to prefer  tolua for  the time
being as  I found no canonical  way to specify  garbage collection tag
methods and such in a more  or less obvious fashion. My impression was
that the  last stable SWIG version was  not ripe enough to  do a clean
job, and SWIG evolved quite a lot since than.
 

Juergen

Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Reuben Thomas-5
> Is there any intention to use the newer versions of SWIG (1.3+ ) for
> that ?  I tried luaswig, and decided to prefer tolua for the time being
> as I found no canonical way to specify garbage collection tag methods
> and such in a more or less obvious fashion. My impression was that the
> last stable SWIG version was not ripe enough to do a clean job, and SWIG
> evolved quite a lot since than.

Why are you interested in using SWIG? I use it because it's better than 
tolua at understanding esoteric C constructs, but if I had the choice I'd 
rather use tolua.

-- 
http://www.mupsych.org/~rrt/ | Caution Children At Play Drive Slowly


Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Juergen Fuhrmann
>  Tue, 3 Sep 2002 09:31:33 +0100 (BST)
>  Reuben Thomas <[hidden email]> wrote:
>
>  > Is there any intention to use the newer versions of SWIG (1.3+ ) for
>  > that ?  I tried luaswig, and decided to prefer tolua for the time being
>  > as I found no canonical way to specify garbage collection tag methods
>  > and such in a more or less obvious fashion. My impression was that the
>  > last stable SWIG version was not ripe enough to do a clean job, and SWIG
>  > evolved quite a lot since than.
>  
>  Why are you interested in using SWIG? I use it because it's better than 
>  tolua at understanding esoteric C constructs, but if I had the choice I'd 
>  rather use tolua.

SWIG would contain the option to use other extension languages or JAVA
at the  same time. However,  in order to  realize it, quite  some work
still would be necessary to invest. 

Basically  I would  not think  about it  if we  would have  some lean,
consistent option  for an  UI toolkit working  together with  Lua. For
myself, I see two options:

a) Lua-FLTK of Jay Carlson but the currend binding needs the so-called
property patch to  tolua -- we would need to carry  over this patch to
5.0.  IMHO, unless wxwindows and IUP,  FLTK is very much in the spirit
of Lua: lean, fast, portable.

b) LuaJava  of Carlos Cassino  with JAVA Swing  classes.  As far  as I
understand, it did  not make it to Lua4.0.   The obvious advantage for
us is  that we can  find lots of  students etc. speaking Java  for GUI
jobs.

I very much would like to invest two weeks or so in order to get a) to
work, for b)  I feel not qualified enough. But I  am charged with lots
of other stuff and cannot allow this to myself...

In  the bottomline:  I  think lua  needs  a canonical  option for  GUI
building, and some  concentration of forces on that.  So that everyone
who asks  what to  use can be  told: Unless  your demands are  not too
exotic, use ... for your GUI.



Juergen





Reply | Threaded
Open this post in threaded view
|

LUa FLTK was Re: Lua 5.0 and tolua/SWIG ?

Björn De Meyer
Juergen Fuhrmann wrote:
> 
/snip
> a) Lua-FLTK of Jay Carlson but the currend binding needs the so-called
> property patch to  tolua -- we would need to carry  over this patch to
> 5.0.  IMHO, unless wxwindows and IUP,  FLTK is very much in the spirit
> of Lua: lean, fast, portable.
/snip
> 
> In  the bottomline:  I  think lua  needs  a canonical  option for  GUI
> building, and some  concentration of forces on that.  So that everyone
> who asks  what to  use can be  told: Unless  your demands are  not too
> exotic, use ... for your GUI.
> 
> Juergen

I myself am very pleased with FLTK, but not with 
the lack of stability of the current lua/fltk 
bindings. I am willing to be of some 
assistance for Lua 5.0 bindings to FLTK.
We will probaly need to wait for tolua to be 
ported to lua 5.0, I reckon. 


-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: LUa FLTK was Re: Lua 5.0 and tolua/SWIG ?

Jay Carlson
On Tue, 3 Sep 2002, Björn De Meyer wrote:

> Juergen Fuhrmann wrote:
> >
> /snip
> > a) Lua-FLTK of Jay Carlson but the currend binding needs the so-called
> > property patch to  tolua -- we would need to carry  over this patch to
> > 5.0.  IMHO, unless wxwindows and IUP,  FLTK is very much in the spirit
> > of Lua: lean, fast, portable.
> /snip
> >
> > In  the bottomline:  I  think lua  needs  a canonical  option for  GUI
> > building, and some  concentration of forces on that.  So that everyone
> > who asks  what to  use can be  told: Unless  your demands are  not too
> > exotic, use ... for your GUI.
> >
> > Juergen
>
> I myself am very pleased with FLTK, but not with
> the lack of stability of the current lua/fltk
> bindings.

What's broken?

Jay


Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

David Cuny
In reply to this post by Juergen Fuhrmann
Juergen wrote:

> a) Lua-FLTK ...
> b) LuaJava ...

I find it sort of puzzling to see Java Swing beat wxWindows as a solution for 
a "lean" UI toolkit.

For a lean toolkit, FLTK is hard to beat. That makes is a great match for 
Lua, which has a nice, small footprint.

Still, wxWindows provides a lot of stuff that you don't get with most other 
toolkits - for example, native widgets and printing support.

One size doesn't fits all. That's why it's nice to have several toolkits to 
choose from.

-- David Cuny

Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Juergen Fuhrmann
>  Wed, 4 Sep 2002 13:40:28 -0700
>  David <[hidden email]> wrote:
>
>  Juergen wrote:
>  
>  > a) Lua-FLTK ...
>  > b) LuaJava ...
>  
>  

Of course,  Java is not  _really_ lean. But  it seems to  be available
everywhere we want  to go, i.e.  UNIX workstations  & perhaps NT. This
means that porting would be lean somehow. and, as I said, we can count
on lots of students already aquainted to JAVA.

But  before this  becomes off-topic  --  my real  favourite indeed  is
Lua-FLTK,  and if we  would get  Lua-5, tolua,  Jay Carlson's  tolua -
property patch (necessary for lua-fltk), FLTK, and fluid-lua (fluid is
the GUI designer of FLTK) together in a reliable fashion, we certainly
would have something.


Juergen



Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Jay Carlson
On Wed, 4 Sep 2002, Juergen Fuhrmann wrote:

>
> >  Wed, 4 Sep 2002 13:40:28 -0700
> >  David <[hidden email]> wrote:
> >
> >  Juergen wrote:
> >
> >  > a) Lua-FLTK ...
> >  > b) LuaJava ...
> >
> >
>
> Of course,  Java is not  _really_ lean. But  it seems to  be available
> everywhere we want  to go, i.e.  UNIX workstations  & perhaps NT. This
> means that porting would be lean somehow. and, as I said, we can count
> on lots of students already aquainted to JAVA.
>
> But  before this  becomes off-topic  --  my real  favourite indeed  is
> Lua-FLTK,  and if we  would get  Lua-5, tolua,  Jay Carlson's  tolua -
> property patch (necessary for lua-fltk), FLTK, and fluid-lua (fluid is
> the GUI designer of FLTK) together in a reliable fashion, we certainly
> would have something.

I have the start of a parser for Fluid's ".fl" files written in Lua.
If you're interested, I can finish it up enough for casual use.

What I'd *really* like is an Fltk UI builder written in Lua itself.
Some of the effort I went through in the Lua-Fltk documentation was
toward that end---all the properties and methods (and their docs) of
the Lua-Fltk classes are easily available in Lua format.

The biggest technical failing of Lua-Fltk is not getting down-casts
right.  Say you have a Container, and you want to iterate through its
child widgets.  You're going to get back toLua objects of type Widget,
not their actual type.  Unless of course you have a live reference
elsewhere to that child Widget, in which case the magic of userdata
merging will give you back the reference you hold.  I expect this
could be fixed during the 5.0 upgrade pretty easily, now that I
understand the problem.

The biggest missing Lua-Fltk feature is free drawing.  There should be
a way for Lua apps to draw arbitrary stuff and respond to mouse events
freely.  I expect the right thing is a little like a Tk canvas: a
Canvas widget type that has a an ordered list of graphic objects to
draw during repaint, along with some event delivery logic.  I started
on this and got bogged down in C++ details---I am not a very strong
C++ programmer.

The biggest missing Fltk feature is a decent text widget.  The text
widgets available are not as good as the Tk text widget.  (This is a
problem with every widget set of course---the Tk text widget is one of
the best ever designed.)  It might be possible to steal the code from
Tk without too many changes.  That's what I concluded last year, at
least.

The biggest missing element in the Fltk design is advertising
preferred widget sizes.  Without this, it's not possible to build a
packing layout manager.  Should be fixed in Fltk 2.0, but there's no
release year, let alone release date...

Jay


Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 and tolua/SWIG ?

Björn De Meyer
Jay Carlson wrote:
> 
/snip 
> What I'd *really* like is an Fltk UI builder written in Lua itself.
> Some of the effort I went through in the Lua-Fltk documentation was
> toward that end---all the properties and methods (and their docs) of
> the Lua-Fltk classes are easily available in Lua format.
> 
/snip
> The biggest missing Lua-Fltk feature is free drawing.  There should be
> a way for Lua apps to draw arbitrary stuff and respond to mouse events
> freely.  I expect the right thing is a little like a Tk canvas: a
> Canvas widget type that has a an ordered list of graphic objects to
> draw during repaint, along with some event delivery logic.  I started
> on this and got bogged down in C++ details---I am not a very strong
> C++ programmer.
> 
> The biggest missing Fltk feature is a decent text widget.  The text
> widgets available are not as good as the Tk text widget.  (This is a
> problem with every widget set of course---the Tk text widget is one of
> the best ever designed.)  It might be possible to steal the code from
> Tk without too many changes.  That's what I concluded last year, at
> least.
> 
> The biggest missing element in the Fltk design is advertising
> preferred widget sizes.  Without this, it's not possible to build a
> packing layout manager.  Should be fixed in Fltk 2.0, but there's no
> release year, let alone release date...
> 
> Jay

Some quick remarks:

*) FLTK-Lua in lua sounds very cool. Much like Visual TCL/TK. 
I might be willing to assist you there.

*) I'm willing to help you a bit with the C++ if you like.
Mail me at my e-mail address (at the bottom of this mail)
if you're interested. 

*) The FLTK webpage seems to advise the use of the SCITE editor 
widget, which is not FLTK, but can AFAIK be integrated with it.

*) FL_Pack is a packing layout container widget in fltk 1.1.x. 
It doesn't solve all problems, but it helps a lot. 

-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
[hidden email]