cgit-lua: to jit or not to jit

Justin Cormack justin at specialbusservice.com
Tue Jan 14 09:09:15 CET 2014


On 14 Jan 2014 03:52, "Andrew Starks" <andrew.starks at trms.com> wrote:
>
>
>
> On Monday, January 13, 2014, Jason A. Donenfeld wrote:
>>
>> On Tue, Jan 14, 2014 at 3:37 AM, Andrew Starks <andrew.starks at trms.com>
wrote:
>> >
>> > I don't have LuaJit installed and would not install it (and migrate
>> > everything I do over to it) just to use a library. By way of example,
your
>> > library may as well have been written for Python, for as much good as
it
>> > would be to me.
>> >
>> > By contrast, if you stick to the subset of 5.2 that 5.1 supports, and
/ or
>> > use a bit of the luacomp library, then anyone with lua 5.1, luajit or
Lua
>> > 5.2 can use it.
>> >
>> > The question, from a user's perspective is: what benefit are you
giving me,
>> > in exchange for locking me into luajit, as a dependency?
>> >
>> > Even if I am using Luajit, that doesn't mean that I don't need to
support
>> > the current, mainline distribution and straight 5.1. So, I can't use
your
>> > library as a dependency, if this were the case.
>> >
>> > It's easier for you if you like what the FFI gives you. Supporting the
>> > common subset and using luacompat, as necessary, is the simplest, for
the
>> > user.
>> >
>> > IMHO, of course
>>
>> That's a fairly compelling opinion. The only thing against it is the
>> temptation of using FFI in the default scripts that we ship with cgit.
>> But I suppose for the sake of giving users choice later on, it might
>> be best, as you've said, to continue to support both, and let the user
>> choose.
>
>
> Jason,
>
> I also just remembered this:
>
> https://github.com/jmckaskill/luaffi
>
> Which is a luajit compatible FFI extension for Lua 5.1 and Lua 5.2, but
5.2 is listed as beta. It might be worth a shot, if it lets you gain some
of those conveniences and keep a broad support base.
>

Lua 5.2 support is fine for luaffi, but both are beta, and you have to fix
the bugs yourself as it is only intermittently being developed (by me).

The most important platform that LuaJIT is not available for is probably
softfloat MIPS (eg openwrt).

Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20140114/f451921c/attachment-0001.html>


More information about the CGit mailing list