Re: [code] [textadept] Future of LuaJIT Version

From: Simon Lundmark <>
Date: Wed, 17 Dec 2014 07:19:27 +0100


We're using LuaJIT with FFI for interacting with our tools (a debugger and
a few other things) and a few other c-libraries that we use. We use
textadept as a tool at our workplace and one of the main reasons why we
chose it is because you use LuaJIT. We've been using notepad++ previously
but struggled with a lot of the issues that is in that editor and decided
to move to textadept earlier this year. We will try to share some of our
modules in the future so that everyone can use them (although the ones we
can release in the near-future doesn't use ffi).

Changing away from LuaJIT is unfortunately a way that we can't follow if
that would be the choice, since we so heavily depend on FFI. Also we all
like the improved speed that LuaJIT also gives us, not to mention the easy
possibility to move things that are performance heavy from lua to c. LuaJIT
is essentially between 1.5 and over 100 times faster than normal lua
depending on what you are implementing. Just the parser improves the speed
by 1.5 to 5 times. (this is all x86/x64 numbers).

I'm not sure if you know but LuaJIT provides a bit.* interface for you to
use so you don't have to implement your own bitwise operators if you always
use LuaJIT for 5.1. LuaJIT also supports UTF-8 in loadfile() although I'm
not sure what you use utf8 to, so maybe that's not enough. There's also
quite a lot of 5.2-features that LuaJIT supports that everyone doesn't know
about, such as hex-escapes in strings, goto's, math.log, You enable these
with the -DLUAJIT_ENABLE_LUA52COMPAT buildflag.

For us, keeping LuaJIT would mean that we could continue keeping up-to-head
with the other things that you do with textadept. Our plan in the long term
is to release some of our tools open source and if that happens we will
release any modules related to those tools. We're also hoping that us using
the textadept-editor together with the Bitsquid Engine will help spread the
use of this amazing editor that textadept is - specifically if we release
our inhouse tools for free.


On Wed, Dec 17, 2014 at 5:51 AM, Michael Richter <>
> I'm utterly fine dropping LuaJIT support. I never use it anyway.
> On 17 December 2014 at 07:16, Rena <> wrote:
>> On Tue, Dec 16, 2014 at 4:30 PM, Mitchell <> wrote:
>> > Hi,
>> >
>> > With Lua 5.3 on the horizon (it's at the release candidate stage now),
>> I'd
>> > like to take the time to consider the future of Textadept's LuaJIT
>> version
>> > and get some feedback and opinions.
>> >
>> > LuaJIT is based on Lua 5.1 (which is now almost 9 years old!) and
>> appears to
>> > have no plans to support Lua 5.3's new features (at least not in the
>> near
>> > future), particularly bitwise operators and the UTF-8 library. Textadept
>> > would utilize both of these new features right away and thus would be
>> > incompatible with LuaJIT.
>> >
>> > Now, Textadept has always had some sort of Lua 5.2 compatibility layer
>> for
>> > LuaJIT, but I don't think this is viable anymore for 5.3, especially
>> when it
>> > comes to bitwise operators. Besides, I prefer not to reimplement code
>> (like
>> > a utf8 library) that already exists :)
>> >
>> > So this brings us to the question "what does LuaJIT offer"? Speed of
>> course,
>> > but in a text editor for programmers, I believe the speed difference is
>> > quite negligible. (This is addressed in the FAQ and text editors aren't
>> > exactly "power apps" either...) LuaJIT does have an FFI library, but in
>> the
>> > 7+ years of Textadept's existence, I haven't seen one FFI extension
>> posted
>> > to the wiki or mailing list. (In my opinion, the most likely candidate
>> is an
>> > extension to use Windows' native file chooser -- I cannot imagine any
>> other
>> > useful FFI extensions.)
>> >
>> > As it is, maintaining LuaJIT compatibility is a bit of a chore
>> (particularly
>> > when a new release comes out) and would be more so with the release of
>> Lua
>> > 5.3. I'd rather not stick with 5.2 either.
>> >
>> > That being said, I'm leaning towards dropping LuaJIT functionality and
>> going
>> > with Vanilla Lua 5.3 once it's released. However, I'd encourage any
>> > feedback, for or against, such a move. (We have some time until the
>> official
>> > release.) In particular, I'm curious to know who actually uses the
>> LuaJIT
>> > version, why, and are there good reasons to keep it around?
>> >
>> > All other feedback is welcome and appreciated.
>> >
>> > Cheers,
>> > Mitchell
>> > --
>> > You are subscribed to
>> > To change subscription settings, send an e-mail to
>> > To unsubscribe, send an e-mail to
>> >
>> I have noticed a considerable speed difference when starting Textadept
>> with a large session in JIT vs vanilla.
>> --
>> Sent from my Game Boy.
>> --
>> You are subscribed to
>> To change subscription settings, send an e-mail to
>> To unsubscribe, send an e-mail to
> --
> "Perhaps people don't believe this, but throughout all of the discussions
> of entering China our focus has really been what's best for the Chinese
> people. It's not been about our revenue or profit or whatnot."
> --Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.

*Simon Lundmark*
*Pixeldiet Entertainment AB*
You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 17 Dec 2014 - 01:19:27 EST

This archive was generated by hypermail 2.2.0 : Wed 17 Dec 2014 - 06:32:03 EST