Lua for complex app?

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

Lua for complex app?

Dario Dominin
Guys,
I know that my question maybe be consider stupid .. but I can use LUA to build complex app? Like interaction with external website/server?

Like .. click the photo and upload somewhere...

Because in several guides that Im reading .. they explain you only how to build a simple game..

thx for the help

Dario
Reply | Threaded
Open this post in threaded view
|

Re: Lua for complex app?

Choonster TheMage
On 18 October 2013 01:22, Dario Dominin <[hidden email]> wrote:

> Guys,
> I know that my question maybe be consider stupid .. but I can use LUA to
> build complex app? Like interaction with external website/server?
>
> Like .. click the photo and upload somewhere...
>
> Because in several guides that Im reading .. they explain you only how to
> build a simple game..
>
> thx for the help
>
> Dario

Your question is a bit vague. Lua's standard library is fairly
minimal, but there are many third-party libraries for common tasks.

If you want to do networking (e.g. HTTP GET/POST requests) in Lua,
have a look at LuaSocket[1][2]. If you want filesystem functionality
not provided by the standard IO/OS libraries, have a look at
LuaFileSystem[3].

Both of these are also available through LuaRocks[4].

[1] http://w3.impa.br/~diego/software/luasocket/
[2] https://github.com/diegonehab/luasocket
[3] http://keplerproject.github.io/luafilesystem/
[4] http://www.luarocks.org/

Reply | Threaded
Open this post in threaded view
|

Re: Lua for complex app?

Andrew Starks
In reply to this post by Dario Dominin
On Thu, Oct 17, 2013 at 9:22 AM, Dario Dominin <[hidden email]> wrote:

> Guys,
> I know that my question maybe be consider stupid .. but I can use LUA to
> build complex app? Like interaction with external website/server?
>
> Like .. click the photo and upload somewhere...
>
> Because in several guides that Im reading .. they explain you only how to
> build a simple game..
>
> thx for the help
>
> Dario


Hey Dario,

People solve problems with the wrong language, every day! :)

Lua can certainly be used for complex applications and is. One of my
favorite examples is ZeroBrane Studio[1]. Along with some C libraries
(most notably wxwidgets/wxlua[2]), it's a complete and feature-rich
IDE.

On the web server front, openresty[3] (nginx + a collection of
packages) is pretty exciting and worth checking out.

-Andrew

[1] http://studio.zerobrane.com/
[2] http://wxlua.sourceforge.net/
[3] http://openresty.org/

Reply | Threaded
Open this post in threaded view
|

Re: Lua for complex app?

Laurent FAILLIE
On Unix word, with the help of LGI library you can also build very powerful GUI or open desktop integrated applications.

The difficult points is arguments passing b/w introspected libraries and their public documentation : have a look various discuss I initiated on this list :)

Bye

Laurent

From: Andrew Starks <[hidden email]>
To: Lua mailing list <[hidden email]>
Sent: Thursday, October 17, 2013 4:45 PM
Subject: Re: Lua for complex app?

On Thu, Oct 17, 2013 at 9:22 AM, Dario Dominin <[hidden email]> wrote:

> Guys,
> I know that my question maybe be consider stupid .. but I can use LUA to
> build complex app? Like interaction with external website/server?
>
> Like .. click the photo and upload somewhere...
>
> Because in several guides that Im reading .. they explain you only how to
> build a simple game..
>
> thx for the help
>
> Dario


Hey Dario,

People solve problems with the wrong language, every day! :)

Lua can certainly be used for complex applications and is. One of my
favorite examples is ZeroBrane Studio[1]. Along with some C libraries
(most notably wxwidgets/wxlua[2]), it's a complete and feature-rich
IDE.

On the web server front, openresty[3] (nginx + a collection of
packages) is pretty exciting and worth checking out.

-Andrew

[1] http://studio.zerobrane.com/
[2] http://wxlua.sourceforge.net/
[3] http://openresty.org/




Reply | Threaded
Open this post in threaded view
|

Re: Lua for complex app?

Steve Litt
In reply to this post by Dario Dominin
On Thu, 17 Oct 2013 16:22:56 +0200
Dario Dominin <[hidden email]> wrote:

> Guys,
> I know that my question maybe be consider stupid .. but I can use LUA
> to build complex app? Like interaction with external website/server?
>
> Like .. click the photo and upload somewhere...
>
> Because in several guides that Im reading .. they explain you only
> how to build a simple game..
>
> thx for the help
>
> Dario

Dario,

Years ago I occasionally got hired to write apps that were 25K lines of
code. Back then, there was no Lua, and that's a shame.

If I got hired today to make a 25K lines app, and the decision of
language would be mine alone, then I would choose Lua unless one of
these:

1) The problem domain required a specialized functionality for which
   I couldn't find a working and tested library, or
2) The app needed compiler runtime speed, in which case I'd code it in
   C. But maybe with Lua for the portions that weren't speed critical:
   C and Lua mix pretty well.

My belief is that because Lua's one and only data aggregator is the
table, building up the complex data structures is a snap, and you never
dead end with a wrong data type. Lua's First Class Functions (buzzword
meaning you can pass em around and store em like data) makes for
trivial use of callback functions, a powerful technique too seldom used
because it's such a PITA in C and some other languages.

Thankfully, Lua doesn't try to enforce All OOP All the Time like Java,
Smalltalk and the like. In fact, Lua has no Class or Object type.
Instead, you build things with data and functions joined together, with
encapsulation, inheritance (if you want, via metatables), and to some
extent, polymorphism. They're not called classes and objects, but they
sure do the same things.

I use Python and AWK a lot because today my programs are usually less
than 400 lines and need to get done in an hour or a day. With Python I
can be pretty sure it has the libraries I need, whereas with Lua I'd
need to research and experiment. But with a big project expected to take
months, taking even a week off for research and experimentation is no
big deal if the language itself enables you to shave a month off your
development time.

Thanks,

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance

Reply | Threaded
Open this post in threaded view
|

Re: Lua for complex app?

Marc Balmer
In reply to this post by Dario Dominin
Am 17.10.13 16:22, schrieb Dario Dominin:
> Guys,
> I know that my question maybe be consider stupid .. but I can use LUA to
> build complex app? Like interaction with external website/server?

yes.

>
> Like .. click the photo and upload somewhere...
>
> Because in several guides that Im reading .. they explain you only how
> to build a simple game..
>
> thx for the help
>
> Dario