lua-users home
lua-l archive

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


On Tue, Feb 21, 2017 at 2:17 PM, Dibyendu Majumdar
<mobile@majumdar.org.uk> wrote:
> On 21 February 2017 at 21:45, Etiene Dalcol <dalcol@etiene.net> wrote:
>> I was mostly
>> only countering your argument that Lua should stay and be niche / scripting
>> small stuff.
>
> Perhaps I used the wrong words there. I am using Ravi/Lua as a
> scripting language - where the script is small but the task done is
> not necessarily small. That is, the script is used to invoke large
> operations. I don't know the right term to use here but maybe I am
> using Lua as a 'glue' language to pull together operations. This is
> relatively easy to do in Lua as it is easier to interface with C/C++
> in Lua than in other scripting languages.
>
> Front-end development is perhaps a domain where dynamic / scripting
> languages are useful because the front-end often is the most volatile
> part of the application - one that you want to change at quick notice,
> and change often.
>
> The rise of NodeJS is interesting - and has led to the rise of
> Typescript to allow Javascript applications to scale. I think for Lua
> too something like TypedLua if taken to the level of Typescript may
> prove helpful in building large scale applications.
>
> I think the question in my mind was about the need for JIT. For a
> server based application replacing Java or C# at the backend, JIT may
> be useful.
>
> Regards
> Dibyendu

IIRC Snabb uses LuaJIT to handle network packet filtering, so that's a
project with some pretty stringent performance requirements that a
non-compiled language would probably have difficulty meeting.

Game actors theoretically benefit from JIT as they're polled quite
frequently (60fps, obviously) and most of the time will have
predictable hot spots. I say "theoretically" because it would take a
lot of concurrent actors to make a difference between JIT and non-JIT
on modern PC / home console hardware (assuming an efficient
interpreter), but it would make a more significant impact on portable
consoles or in games that run zillions of concurrent actors. I would
definitely want a JIT if I were implementing any sort of real-time
large-scale simulation!

/s/ Adam