Doing GUI stuff in Lua

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

Doing GUI stuff in Lua

Sebastien Lai
I was planning to teach myself what is possible to do with graphical
user interfaces in Lua.

Naturally my first step was to assemble a list of available toolkits,
but the result is kind of depressing-ish:

    + lqt - Qt is awesome, and if lqt had a documentation I suppose it
would be awesome too, but lqt is very much impossible to use without a
documentation (at least not without doing hours of attempting to
translate the official Qt documentation into Lua, which can be very
tiresome)
    + GTK - Haven't really looked into this one, mainly because i'd
like to keep the result platform independent, and the autohell hazzle
is a serious party pooper
    + IUP - same as GTK plus the fact that it pretty much limits
itself to Windows, Mac and Linux, and the API is, mildly put, strange


What GUI libraries do you use? Experiences? Please share. :-)

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Natanael Copa
On Mon, Mar 7, 2011 at 1:38 PM, Sebastien Lai <[hidden email]> wrote:
> I was planning to teach myself what is possible to do with graphical
> user interfaces in Lua.
>
> Naturally my first step was to assemble a list of available toolkits,
> but the result is kind of depressing-ish:
...
>    + GTK - Haven't really looked into this one, mainly because i'd
> like to keep the result platform independent, and the autohell hazzle
> is a serious party pooper

have a look at lgob:
http://oproj.tuxfamily.org/wiki/doku.php?id=lgob

--
Natanael Copa

Reply | Threaded
Open this post in threaded view
|

RE: Doing GUI stuff in Lua

Thomas Fletcher
In reply to this post by Sebastien Lai
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Sebastien Lai
> Sent: Monday, March 07, 2011 7:39 AM
> Subject: Doing GUI stuff in Lua
>
> I was planning to teach myself what is possible to do with graphical
> user interfaces in Lua.
>
> Naturally my first step was to assemble a list of available toolkits,
> but the result is kind of depressing-ish:
>
>     + lqt - Qt is awesome, and if lqt had a documentation I suppose it
> would be awesome too, but lqt is very much impossible to use without a
> documentation (at least not without doing hours of attempting to
> translate the official Qt documentation into Lua, which can be very
> tiresome)
>     + GTK - Haven't really looked into this one, mainly because i'd
> like to keep the result platform independent, and the autohell hazzle
> is a serious party pooper
>     + IUP - same as GTK plus the fact that it pretty much limits
> itself to Windows, Mac and Linux, and the API is, mildly put, strange
>
>
> What GUI libraries do you use? Experiences? Please share. :-)

Not so much a "library" but a complete development environment for embedded
user interfaces, you might want to take a look at Crank Storyboard

http://www.cranksoftware.com/storyboard

It uses standard images and fonts and control surfaces instead of 'widgets'
and then uses Lua for all of the system logic and connection glue among
elements.

Thomas ... disclaimer: I work for Crank Software =;-)




Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

steve donovan
In reply to this post by Sebastien Lai
On Mon, Mar 7, 2011 at 2:38 PM, Sebastien Lai <[hidden email]> wrote:
> What GUI libraries do you use? Experiences? Please share. :-)

LuaJava + Swing.[1]

Works surprisingly well, and runs pretty much anywhere.Java is a big
beast, but there's a lot in the kitchen sink. You can re-use just
about any Java libraries through the magic of reflection.

steve d.

[1] http://luafaq.org/#T6.2.1

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

steve donovan
In reply to this post by Sebastien Lai
On Mon, Mar 7, 2011 at 2:38 PM, Sebastien Lai <[hidden email]> wrote:
>    + IUP - same as GTK plus the fact that it pretty much limits
> itself to Windows, Mac and Linux, and the API is, mildly put, strange

Heh, what definition of cross-platform are you working with? ;)

The API is .. different. However, the documentation can be deeply confusing.

Should also mention wxLua, which I know some people swear by.

For a nostalgic retro experience, try ltcl which is a binding to Tcl/Tk.

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Hakki Dogusan-2
In reply to this post by Sebastien Lai
Hi,

07/03/2011 14:38, Sebastien Lai yazmış:
> I was planning to teach myself what is possible to do with graphical
> user interfaces in Lua.
>
> Naturally my first step was to assemble a list of available toolkits,
> but the result is kind of depressing-ish:
>

Because there are many options, isn't it? ;-)

>      + lqt - Qt is awesome, and if lqt had a documentation I suppose it
> would be awesome too, but lqt is very much impossible to use without a
> documentation (at least not without doing hours of attempting to
> translate the official Qt documentation into Lua, which can be very
> tiresome)
>      + GTK - Haven't really looked into this one, mainly because i'd
> like to keep the result platform independent, and the autohell hazzle
> is a serious party pooper
>      + IUP - same as GTK plus the fact that it pretty much limits
> itself to Windows, Mac and Linux, and the API is, mildly put, strange
>
>
> What GUI libraries do you use? Experiences? Please share. :-)
>
>

wxLua (wxWidgets binding).


--
Regards,
Hakki Dogusan
http://www.dynaset.org/dogusanh/


Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Pierre Chapuis
 On Mon, 07 Mar 2011 14:54:38 +0200, Hakki Dogusan wrote:

> wxLua (wxWidgets binding).

 I second that, although I've only used it for small things
 in Lua (but a lot more in other languages).

 Apparently Zed Shaw uses it too:

 http://twitter.com/#!/zedshaw/status/44463928952094720
 http://twitter.com/#!/zedshaw/status/44464469845352448

--
 Pierre 'catwell' Chapuis

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Mauro Iazzi
In reply to this post by Sebastien Lai
On 7 March 2011 13:38, Sebastien Lai <[hidden email]> wrote:

> I was planning to teach myself what is possible to do with graphical
> user interfaces in Lua.
>
> Naturally my first step was to assemble a list of available toolkits,
> but the result is kind of depressing-ish:
>
>    + lqt - Qt is awesome, and if lqt had a documentation I suppose it
> would be awesome too, but lqt is very much impossible to use without a
> documentation (at least not without doing hours of attempting to
> translate the official Qt documentation into Lua, which can be very
> tiresome)

What exactly were your problems with documentation?  Usually there is
a 1-1 correspondence between the C++ and Lua code. I guess it could be
possible to auto-generate docs for Lua from the coments of Qt if it is
really needed...

mauro

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Philippe Lhoste
In reply to this post by Sebastien Lai
On 07/03/2011 13:38, Sebastien Lai wrote:
> What GUI libraries do you use? Experiences? Please share. :-)

Lot of answers already in the What is your favorite Lua GUI toolkit? [1] thread.

[1] http://lua-users.org/lists/lua-l/2011-02/msg00250.html

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --


Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Sebastien Lai
In reply to this post by Mauro Iazzi
On Mon, Mar 7, 2011 at 2:21 PM, mauro iazzi <[hidden email]> wrote:
> What exactly were your problems with documentation?  Usually there is
> a 1-1 correspondence between the C++ and Lua code. I guess it could be
> possible to auto-generate docs for Lua from the coments of Qt if it is
> really needed...
>
If it's so easy, then how come it hasn't been done yet? :-)

Anyway, I've built wxLua, and I think i'd rather stick with lqt
(pictures say more than words:
http://img6.imagebanana.com/img/jmcrnhox/Selection_014.png) ...

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Hakki Dogusan-2
Hi,

07/03/2011 16:02, Sebastien Lai wrote:
> On Mon, Mar 7, 2011 at 2:21 PM, mauro iazzi<[hidden email]>  wrote:
>> [snip]
>
> Anyway, I've built wxLua, and I think i'd rather stick with lqt
> (pictures say more than words:
> http://img6.imagebanana.com/img/jmcrnhox/Selection_014.png) ...
>

Nice, isn't it ;-))

Btw. That is standard way.. You may build it as a single (monolithic)
file like me.


--
Regards,
Hakki Dogusan
http://www.dynaset.org/dogusanh/


Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Ryan Pusztai
Hakki,

On Mon, Mar 7, 2011 at 9:39 AM, Hakki Dogusan <[hidden email]> wrote:
Nice, isn't it ;-))

Btw. That is standard way.. You may build it as a single (monolithic) file like me.

Can you share your build settings for the completely monolithic wxLua? Maybe even off line? I have a single build working, but I am having trouble updating to using the latest wxLua.
--
Regards,
Ryan
Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Rena
On Mon, Mar 7, 2011 at 09:40, Ryan Pusztai <[hidden email]> wrote:

> Hakki,
>
> On Mon, Mar 7, 2011 at 9:39 AM, Hakki Dogusan <[hidden email]> wrote:
>>
>> Nice, isn't it ;-))
>>
>> Btw. That is standard way.. You may build it as a single (monolithic) file
>> like me.
>
> Can you share your build settings for the completely monolithic wxLua? Maybe
> even off line? I have a single build working, but I am having trouble
> updating to using the latest wxLua.
> --
> Regards,
> Ryan
>

I've used GTK via LuaGnome and found it very nice and easy. The only
big downside to GTK is it's rather ugly (graphically) on Windows, but
it's a fantastic API.

--
Sent from my toaster.

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

David Favro
In reply to this post by Philippe Lhoste
On 03/07/2011 08:39 AM, Philippe Lhoste wrote:
> On 07/03/2011 13:38, Sebastien Lai wrote:
>> What GUI libraries do you use? Experiences? Please share. :-)
>
> Lot of answers already in the What is your favorite Lua GUI toolkit? [1]
> thread.
>
> [1] http://lua-users.org/lists/lua-l/2011-02/msg00250.html

Also, http://lua-users.org/wiki/GraphicalUserInterfaceToolkits

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Michal Kottman
In reply to this post by Sebastien Lai
On Mon, 2011-03-07 at 13:38 +0100, Sebastien Lai wrote:
>     + lqt - Qt is awesome, and if lqt had a documentation I suppose it
> would be awesome too, but lqt is very much impossible to use without a
> documentation (at least not without doing hours of attempting to
> translate the official Qt documentation into Lua, which can be very
> tiresome)

Qt is awesome, and it is also HUGE. You cannot possibly keep the code
and documentation up-to-date manually. What we strive for is 1-to-1
mapping between C++ and Lua. That's the whole purpose of lqt. Apart from
a few quirks, which I tried to document on the wiki [1], you work with
all the Qt classes the same as you would work with them in C++.

Regarding the documentation - we do not write/copy the code (we generate
it from the headers), why should we write/copy the documentation, when
all you need is open the Qt docs? I always have 'Qt Assistant' open when
I use lqt, and I do not find it tiresome.

I would change the statement "lqt is very much impossible to use without
a documentation" into "Qt is very much impossible to use without a
documentation" :)


Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Michal Kottman
On Mon, 2011-03-07 at 20:17 +0100, Michal Kottman wrote:
> Qt is awesome, and it is also HUGE. You cannot possibly keep the code
> and documentation up-to-date manually. What we strive for is 1-to-1
> mapping between C++ and Lua. That's the whole purpose of lqt. Apart from
> a few quirks, which I tried to document on the wiki [1], you work with
> all the Qt classes the same as you would work with them in C++.

Of course I forgot the link:

[1] https://github.com/mkottman/lqt/wiki/Usage


Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Sebastien Lai
In reply to this post by Michal Kottman
On Mon, Mar 7, 2011 at 8:17 PM, Michal Kottman <[hidden email]> wrote:
> Regarding the documentation - we do not write/copy the code (we generate
> it from the headers), why should we write/copy the documentation, when
> all you need is open the Qt docs? I always have 'Qt Assistant' open when
> I use lqt, and I do not find it tiresome.
>
> I would change the statement "lqt is very much impossible to use without
> a documentation" into "Qt is very much impossible to use without a
> documentation" :)
>
Neat-o - didn't know lqt is actually just generated from the
headers... That certainly changes things a lot! I guess I'll
__definitely__ stick with lqt then ;-)

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Michal Kottman
On 7 March 2011 20:38, Sebastien Lai <[hidden email]> wrote:
> Neat-o - didn't know lqt is actually just generated from the
> headers... That certainly changes things a lot! I guess I'll
> __definitely__ stick with lqt then ;-)

Please consider joining the lqt mailing list [1] to report any
problems (success stories welcome too :). Sometimes, there are things
that do not work (directly) in lqt. I try to fix bugs as soon as
possible, or at least suggest workarounds.

[1] http://groups.google.com/group/lqt-bindings

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Sebastien Lai
On Mon, Mar 7, 2011 at 9:37 PM, Michal Kottman <[hidden email]> wrote:

> On 7 March 2011 20:38, Sebastien Lai <[hidden email]> wrote:
>> Neat-o - didn't know lqt is actually just generated from the
>> headers... That certainly changes things a lot! I guess I'll
>> __definitely__ stick with lqt then ;-)
>
> Please consider joining the lqt mailing list [1] to report any
> problems (success stories welcome too :). Sometimes, there are things
> that do not work (directly) in lqt. I try to fix bugs as soon as
> possible, or at least suggest workarounds.
>
> [1] http://groups.google.com/group/lqt-bindings
>
So very bookmarked!
>

Reply | Threaded
Open this post in threaded view
|

Re: Doing GUI stuff in Lua

Peter Kuemmel
In reply to this post by Sebastien Lai
On 07.03.2011 15:02, Sebastien Lai wrote:

> On Mon, Mar 7, 2011 at 2:21 PM, mauro iazzi<[hidden email]>  wrote:
>> What exactly were your problems with documentation?  Usually there is
>> a 1-1 correspondence between the C++ and Lua code. I guess it could be
>> possible to auto-generate docs for Lua from the coments of Qt if it is
>> really needed...
>>
> If it's so easy, then how come it hasn't been done yet? :-)
>
> Anyway, I've built wxLua, and I think i'd rather stick with lqt
> (pictures say more than words:
> http://img6.imagebanana.com/img/jmcrnhox/Selection_014.png) ...
>

Hi Sebastien,

I'm affiliated to lqt but to be fair I wanna say that you also
have several libraries when you use Qt:

QtCore       : all the basic classes (reflection, event-loop, threading,
                UTF8 strings, an easy-to-use XML partser)
QtGui        : all the 2d widget classes and more
QtXml        : more XMl support
QtXmlPatterns: much more XML
QtOpenGL     : OpenGl
QtWebkit     : Webkit
QtScript     : JustInTime compiles for JS
QtNetwork    : network classes

But all the Qt classes have a very god documentation and
we try to make the building the binding to these libs
as simple as possible.

Peter#








12