lua-users home
lua-l archive

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

On 26 February 2015 at 21:24, Javier Guerra Giraldez <> wrote:
> On Thu, Feb 26, 2015 at 3:22 PM, Dibyendu Majumdar
> <> wrote:
>> I was expecting "No, it won't ever happen" but hoping for "Sure, we will look
>> into it". It is good to know no answer means latter and not former.
> as i understand it, it means both.  as this is at least an interesting
> exercise, and also that "it won't ever happen" as it's a radical
> departure from the Lua design and intentions.

Yes I understand that hence the expectation of "No" as the
answer. JIT compilation doesn't fit into Lua for following reasons I think:
a) It breaks portability both from development view and deployment view
b) With something like LLVM it also breaks the idea of super small compact
library as LLVM is humongous

That's how I looked at it, but then the thought struck me that actually
JIT compilation need not an integral part of Lua - what if Lua simply provided
a Hook that can be used to install a JIT compiler by the user?

> take a look at the LuaJIT history.  at first it was _very_ Lua
> compatible, just another implementation, but faster.  and there never
> was any intention of "merging" it, or even "converging".  now it's a
> distinct dialect, and lots of people still use plain Lua, or both.

Agreed. But I think LuaJIT has deliberately stayed on 5.1.
And FFI makes it incompatible. My intention (good intentions!)
is to be 100% compatible with Lua 5.3 and above. No FFI support
- both because of its incompatibility and because it is dangerous
for the user community I have in mind.

> similarly, if you happen to hit a new sweet point in the ethernal
> struggle of type systems, then congratulations!  but it's not Lua, so
> it wouldn't make sense to somehow "incorporate" it.  it would be
> _your_ project, just as there are lots of other languages out there.

Yes, of course Ravi is my project. But with a suitable Hook maybe
the JIT compiler can be exploited even by Lua users. Just my attempt
to give something back.

Appreciate the feedback!