The rise of minimalist Lua applications

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

The rise of minimalist Lua applications

cad_2009

Hello everyone,

 

I just wanted to point out what appears to be a very interesting trend in the Lua community: Lua applications are quietly and slowly, but surely, entering the arena of end-user applications. Of course, for at least 10-15 years Lua has been immensely popular, but that was only as glue language and as an embedded language, with hundreds/thousands of scripts being used all over the world. 

 

But what about end-user programs? I am particularly interested in minimalist programs and I remember looking for minimalist Lua-based programs a few years ago, and barely finding any. That was odd, as I was expecting for find lots of small end-user programs written in Lua, which is itself minimalist. I was rather disappointed.

 

But now, things seem to have changed. Hopefully there is a new trend coming up.

 

WordGrinder [1], a nice Lua-based console word-processor, was a pioneer among small Lua programs for the average end-user. It has been around for quite some time, and it is still developed.

More recently I discovered lumail [2], a minimalist console-based email client scripted in Lua (along the lines of mutt and and of the Ruby-based sup).

And now I see the file manager CFM [3] which, as mentioned in a recent message, consists of a single Lua file!

I am overwhelmed and overjoyed.

 

These late developments are really encouraging.  I do hope that this trend continues, with new simple end-user applications being created, so we will be able to dump a lot of those bloated and slow programs that are currently the only choice available.

 

Bye

 

Carlito

 

 

[1] http://wordgrinder.sourceforge.net

[2] http://www.lumail.org
[3] http://www.lua.org/wshop13.html#Manning
 
Reply | Threaded
Open this post in threaded view
|

Re: The rise of minimalist Lua applications

Ryan Pusztai
On Thu, Jan 16, 2014 at 2:35 PM, <[hidden email]> wrote:

Hello everyone,

 

I just wanted to point out what appears to be a very interesting trend in the Lua community: Lua applications are quietly and slowly, but surely, entering the arena of end-user applications. Of course, for at least 10-15 years Lua has been immensely popular, but that was only as glue language and as an embedded language, with hundreds/thousands of scripts being used all over the world. 

 

But what about end-user programs? I am particularly interested in minimalist programs and I remember looking for minimalist Lua-based programs a few years ago, and barely finding any. That was odd, as I was expecting for find lots of small end-user programs written in Lua, which is itself minimalist. I was rather disappointed.

 

But now, things seem to have changed. Hopefully there is a new trend coming up.

 

WordGrinder [1], a nice Lua-based console word-processor, was a pioneer among small Lua programs for the average end-user. It has been around for quite some time, and it is still developed.

More recently I discovered lumail [2], a minimalist console-based email client scripted in Lua (along the lines of mutt and and of the Ruby-based sup).

And now I see the file manager CFM [3] which, as mentioned in a recent message, consists of a single Lua file!

I am overwhelmed and overjoyed.

 

These late developments are really encouraging.  I do hope that this trend continues, with new simple end-user applications being created, so we will be able to dump a lot of those bloated and slow programs that are currently the only choice available.

 

Bye

 

Carlito

 

 

[1] http://wordgrinder.sourceforge.net

[2] http://www.lumail.org

I agree. Have you ever checked out TextAdept [1]? It is a fast, minimalist, and remarkably extensible cross-platform text editor with a GUI and console interface.
--
Regards,
Ryan

Reply | Threaded
Open this post in threaded view
|

Re: The rise of minimalist Lua applications

Rena
In reply to this post by cad_2009
On Thu, Jan 16, 2014 at 2:35 PM, <[hidden email]> wrote:

Hello everyone,

 

I just wanted to point out what appears to be a very interesting trend in the Lua community: Lua applications are quietly and slowly, but surely, entering the arena of end-user applications. Of course, for at least 10-15 years Lua has been immensely popular, but that was only as glue language and as an embedded language, with hundreds/thousands of scripts being used all over the world. 

 

But what about end-user programs? I am particularly interested in minimalist programs and I remember looking for minimalist Lua-based programs a few years ago, and barely finding any. That was odd, as I was expecting for find lots of small end-user programs written in Lua, which is itself minimalist. I was rather disappointed.

 

But now, things seem to have changed. Hopefully there is a new trend coming up.

 

WordGrinder [1], a nice Lua-based console word-processor, was a pioneer among small Lua programs for the average end-user. It has been around for quite some time, and it is still developed.

More recently I discovered lumail [2], a minimalist console-based email client scripted in Lua (along the lines of mutt and and of the Ruby-based sup).

And now I see the file manager CFM [3] which, as mentioned in a recent message, consists of a single Lua file!

I am overwhelmed and overjoyed.

 

These late developments are really encouraging.  I do hope that this trend continues, with new simple end-user applications being created, so we will be able to dump a lot of those bloated and slow programs that are currently the only choice available.

 

Bye

 

Carlito

 

 

[1] http://wordgrinder.sourceforge.net

[2] http://www.lumail.org

I think the increase in the number of useful libraries has helped a lot. For example now there's https://github.com/pavouk/lgi/ , which is a little awkward to get used to at first[1], but provides all of GTK, GDK, Glib, Webkit, etc for Lua to use. It wraps things in a Lua-friendly form too[2], so it's really easy to throw together a quick GTK app using Lua. (I just wish their manuals were more complete and less full of broken links, grumble grumble...)

[1] The names are not always what you'd expect because of namespacing. For example in C you'd write GTK_WINDOW_TOPLEVEL, but the obvious translations to lgi.Gtk.WINDOW_TOPLEVEL or lgi.Gtk.Window.TOPLEVEL don't work. If you look at the manual you'll see GTK_WINDOW_TOPLEVEL is a member of an enum GtkWindowType and so the actual symbol you want is lgi.Gtk.WindowType.TOPLEVEL. This took me a little getting used to, but it's easy once you get the hang of it.

[2] e.g. you can write myWindow = lgi.Gtk.Window {
    title = "My WIndow",
    type = lgi.Gtk.WindowType.TOPLEVEL,
    decorated = true,
    resizable = true,
    width = 400, height = 300,
    on_destroy = function(win) os.exit(true) end,
   
    lgi.Gtk.Label { id = 'my_label', label = "Hello" },
}
even though gtk_window_new() accepts only the "type" parameter; lgi will take care of setting all those other properties and signals for you. Then you can use myWindow like a Lua object:
    myWindow:show_all()
    myWindow.title = "My Super Cool Window"
    myWindow.child.my_lavek.label = "My label text"
so, lgi makes Gnome libraries available in a very Lua-friendly manner, so it becomes quite easy to develop GUI applications in Lua. It reads the libraries at runtime too, so it's forward-compatible with new versions. Makes me wish this kind of introspection magic worked with all libraries, and not just Gnome.

Of course, some might debate about whether using GTK disqualifies your app from being considered minimalist... :-)

--
Sent from my Game Boy.
Reply | Threaded
Open this post in threaded view
|

Re: The rise of minimalist Lua applications

steve donovan
In reply to this post by cad_2009
On Thu, Jan 16, 2014 at 9:35 PM,  <[hidden email]> wrote:
> And now I see the file manager CFM [3] which, as mentioned in a recent
> message, consists of a single Lua file!
>
> I am overwhelmed and overjoyed.

It's possible to push the single file idea ;) E.g. Lake [1] is a
3.5KLoc single file script.

Which is convenient (trivial install) but an obstacle to anyone else
wishing to hack it - it should move from a 3.5KL script to a 5KL
program, with actual modules ;)

[1] https://github.com/stevedonovan/Lake

Reply | Threaded
Open this post in threaded view
|

Re: The rise of minimalist Lua applications

David Favro
In reply to this post by cad_2009
On 01/16/2014 02:35 PM, [hidden email] wrote:
> [...] for at least 10-15 years Lua has been immensely popular, but that was only
 > as glue language and as an embedded language [...]
> But now, things seem to have changed. [...]
 > lumail [2], a minimalist console-based email client scripted in Lua

I took a quick look at lumail, and it seems to be almost 100% C++, with just
the user's configuration file as a Lua script (albeit the config file
contains all of the keybindings).  I'm not knocking it, it looks great,
maybe I'll even try it... but I really don't see it as an example of a trend
from "glue/embedded" to "written in Lua".


Reply | Threaded
Open this post in threaded view
|

Re: The rise of minimalist Lua applications

cad_2009
On 2014-01-19 20:23, David Favro wrote:
> I took a quick look at lumail, and it seems to be almost 100% C++, with just
> the user's configuration file as a Lua script (albeit the config file
> contains all of the keybindings).  I'm not knocking it, it looks great,
> maybe I'll even try it... but I really don't see it as an example of a trend
> from "glue/embedded" to "written in Lua".

Well, yes, you are right. I was mistaken by the fact that Lumail was
described as being "100% scripted and configured in Lua". However on
close inspection it appears that the underlying structure is written in C.
Nonetheless its Lua scripting capability is to be celebrated, because
there are no other email clients that support Lua scripting. So it's a
great gain.
Unfortunately, POP3 support has not been implemented (yet). But, again,
it's a start. A move in the right direction.
Hopefully Lumail will evolve into an all-round emal client, like mutt.


Reply | Threaded
Open this post in threaded view
|

Re: The rise of minimalist Lua applications

Pavel Holejsovsky-2
In reply to this post by Rena
On Thu, 16 Jan 2014 16:20:52 -0500, Rena wrote:

> [1] The names are not always what you'd expect because of namespacing.
> For example in C you'd write GTK_WINDOW_TOPLEVEL, but the obvious
> translations to lgi.Gtk.WINDOW_TOPLEVEL or lgi.Gtk.Window.TOPLEVEL don't
> work. If you look at the manual you'll see GTK_WINDOW_TOPLEVEL is a
> member of an enum GtkWindowType and so the actual symbol you want is
> lgi.Gtk.WindowType.TOPLEVEL. This took me a little getting used to, but
> it's easy once you get the hang of it.

It is also possible to use strings as names of constants instead of
symbolic names.  So whenever method accepts lgi.Gtk.WindowType value, it
is possible to use either lgi.Gtk.WindowType.TOPLEVEL or just 'TOPLEVEL'.  
This might ease the pain a bit.
 
Pavel