List for cgit developers and users
 help / color / mirror / Atom feed
* cgit-lua: to jit or not to jit
@ 2014-01-14  1:25 Jason
       [not found] ` <CAF7MipWEwTYp2UJO8-kNoVDEK0mPCQFBay7pYeCZTrqKYevx6g@mail.gmail.com>
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Jason @ 2014-01-14  1:25 UTC (permalink / raw)


Hi folks,

Over at the cgit project [1], we're in the process of adding Lua
support. Things are going swimmingly, and I've just merged to the
master tree some commits adding full lua support [2] to our filter API
[3] and an example script [4]. At the moment we've got some moderately
messy logic in our makefile [6] that autodetects if LuaJIT is
installed, and if it isn't, falls back to mainline Lua.

What I'm wondering is -- what is the purpose of keeping around support
for mainline Lua? Why shouldn't we just go with LuaJIT and be done
with it? I'm unable to find any advantages mainline Lua has over
LuaJIT, which is why I'm emailing these lists. What features am I
forgetting about that would make some people prefer mainline Lua over
LuaJIT?

An additional motivation for wanting to go to LuaJIT is the FFI
library that comes with it [5]. It seems like this would make
packaging and swapping scripts a lot easier. For example, in the
gravatar script [4], I depend on luacrypto, which some users might not
want to install or have easily available. With FFI, I could instead
just wrap OpenSSL (which cgit already depends on). But perhaps there
are some obvious downsides to this approach that I also am missing.

My experience with embedding Lua inside cgit so far has been very
nice. What a clean simple API. I look forward to hearing your
responses and any feedback and suggestions you might have.

Thank you,
Jason Donenfeld


[1] http://git.zx2c4.com/cgit/about/
[2] http://git.zx2c4.com/cgit/tree/filter.c#n176
[3] http://git.zx2c4.com/cgit/tree/cgitrc.5.txt#n569
[4] http://git.zx2c4.com/cgit/tree/filters/email-gravatar.lua
[5] http://luajit.org/ext_ffi.html
[6] http://git.zx2c4.com/cgit/tree/cgit.mk#n30


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-01-15  1:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14  1:25 cgit-lua: to jit or not to jit Jason
     [not found] ` <CAF7MipWEwTYp2UJO8-kNoVDEK0mPCQFBay7pYeCZTrqKYevx6g@mail.gmail.com>
     [not found]   ` <CAHmME9pAXcyxypr0ogh4Or1DR-NBcyxDMed0m9uyu=6h=uRt5Q@mail.gmail.com>
2014-01-14  2:16     ` Jason
2014-01-14 19:53       ` fw
     [not found] ` <B0F514CB-B748-48EA-B771-D557DEA82913@gmail.com>
2014-01-14  2:22   ` Jason
2014-01-14  2:37     ` andrew.starks
2014-01-14  2:51       ` Jason
2014-01-14  3:17         ` andrew.starks
2014-01-14  3:51         ` andrew.starks
2014-01-14  8:09           ` justin
2014-01-14 13:03           ` Jason
     [not found] ` <20140114023403.GA31401@wilbur.25thandClement.com>
2014-01-14  2:45   ` Jason
2014-01-14 20:41 ` ewmailing
2014-01-14 20:50   ` chighland
2014-01-14 20:50     ` chighland
2014-01-15  1:32       ` malkia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).