lua-users home
lua-l archive

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


On 16 August 2015 at 09:57, Nagaev Boris <bnagaev@gmail.com> wrote:
> I think, it would be more useful to start it as a library compatible
> with Ravi, Lua 5.1 (and LuaJIT), 5.2 and 5.3. If you start it as a
> part of Ravi, it would need extra work to factor it out. If you start
> it as a separate lib, you can then add Ravi-specific optimizations if
> it detects Ravi.

As I intend to expose a lot of the Lua data structures  in the LLVM
api (*) it is a lot more work to support prior Lua versions,
especially with the changes in 'number' types in 5.3. Certainly
nothing in the design would prevent supporting earlier versions.

I like to get things working quickly and then refactor - it is painful
but without having a working prototype I find it hard to think about
how best to refactor. Also given (*) above it is easier to start with
Ravi as I have already got ready made LLVM definitions I can expose.

Hopefully the refactoring will be soon and it won't be long before I
can make the LLVM bindings available for Lua 5.3.

> (By the way, what is the right way to detect Ravi
> from Lua?)
>

At present there is a global table present named 'ravi' so you can
test it like this:

if ravi then
  -- do stuff
end

Regards