List for cgit developers and users
 help / color / mirror / Atom feed
From: Jason at zx2c4.com (Jason A. Donenfeld)
Subject: cgit-lua: to jit or not to jit
Date: Tue, 14 Jan 2014 02:25:20 +0100	[thread overview]
Message-ID: <CAHmME9oAUNM-dF8Bq3E6omDqSfx5fExriTFr=W0rszdZ6WYpLQ@mail.gmail.com> (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


             reply	other threads:[~2014-01-14  1:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14  1:25 Jason [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHmME9oAUNM-dF8Bq3E6omDqSfx5fExriTFr=W0rszdZ6WYpLQ@mail.gmail.com' \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).