lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Nov 03, 2013 at 02:45:46PM +0100, Emeka wrote:
> Hello All,
> 
> I was discussing Lua with a friend, he told be that he heard that Lua is
> only(mainly) used to embed in other applications. So, I have decided to
> have real data before responding to him. So, I would need this: list of
> applications on the web where Lua is used in a standalone mode
> 

Web applications, or applications which can be downloaded from the web? Or
just something you can link to?

At my company--a large Silicon Valley network security company which I've
been asked not to be conspicuous about--I've introduced Lua into several of
our core products. In most cases it's embedded, in others Lua is used for
standalone Unix daemons. Much of it is doing high-performance,
high-concurrency (both multi-threaded and non-blocking/polling) processing,
whether embedded or not. Lua helps hide the complexity to make it easier to
implement and iterate business logic, without forcing us into particular
context management models or causing too much of a performance hit. Even the
stock Lua VM is dramatically faster than Perl, Python, or Ruby, and of
course Lua's coroutine implementation is second to none.

In my latest project we're using C, C++, Lua, and Perl all from the same
process, with Lua at the core.

It's probably a truism, though, that most Lua usage is embedded within
larger C or C++ applications or frameworks. Although in many such projects
Lua is still used to implement most of the business logic.

The nice thing about Lua is it lets you tier your code, and use the best
language for a particular task without having to create a bunch of different
services communicating over IPC. If Lua isn't used as the core "loader" of
an application, it's not because it can't be used that way, it's just that
languages like C are better suited to it. Something like Python makes it
ugly to mix code that way (as opposed to emebedding C within Python), and so
it's not a practical option. In Lua it is an easy option, so it's much more
common.