lua-users home
lua-l archive

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


Hi:


> On Thu, Oct 3, 2013 at 10:51 AM, Francisco Olarte
> <folarte@peoplecall.com> wrote:
>> IMO this is a flaw in your application. I have some apps which need
>> 'sequences' ( and I mean easy and efficient ones), so they are coded
>> in languages which support them, not in a language which only has
>> dictionaries. If being coded in Lua is a requirement, then maybe the
>> flaws are in the requirement,
>
> You could keep the convenience of Lua and the raw power of C by using
> LuaJIT, since it's possible to allocate raw arrays of numbers
> (C-style) and manipulate them efficiently in LuaJIT using
> straightforward Lua code. If some bits _need_ to be in C (existing
> code, Lua _found_ to be inadequate) then LJ's ffi can bind to them
> directly and efficiently.

I'm not the one that has the problem, but using this is switching
language, which was my recomendation, so coding in lua must not be a
requirement. I hadn't got time to look into luajit, as my main use in
lua is scripting C++ programs, where it shines. Also, personally, for
me, lua is not per se a convenience. It's never been the first
language I reached to when having a problem, not due to performance
but because some of the dessign decisions go totally against my
programming 'style'. I can tolerate 1-based arrays easily, but having
only associative arrays and the deleting assigning nil trick are too
much for me when writing something non trivial, say, above a couple of
klocs. So I use it where it's good, normally as a glue language inside
a bigger project ( having been paid  to program for more than 30
years, I've learn quite a few languages, and I routinelly use several
of them, so I have options ).

> For most platforms where performance is an issue, there's a LuaJIT port.

The problem is not about performance. I don't know the OP problem in
detail, but it seems he needs to process 'sequences', so I think the
problem is choosing a language with has not sequences as primitives.
If sequences is just a small part of his problem and lua has
compensating advantage, he should code around. I processed 'sequences'
in 8080 and 6502 assembler, so it shouldn't be too difficult in Lua.

Francisco Olarte.