Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plain Lua Version #128

Open
alexbw opened this issue Oct 24, 2015 · 8 comments
Open

Plain Lua Version #128

alexbw opened this issue Oct 24, 2015 · 8 comments

Comments

@alexbw
Copy link
Contributor

alexbw commented Oct 24, 2015

With a plain-Lua FFI released, will Terra work with plain Lua? Asked another way, do any of Terra's internals depend on any LuaJIT internals, or does it just talk with LuaJIT via the FFI interface?

@zdevito
Copy link
Collaborator

zdevito commented Oct 25, 2015

99% of Terra goes through the LuaJIT FFI interface. The only thing that I
remember that doesn't is access to lj_strscan_scan, which could just be
copied over from LuaJIT as it is just a plain C file.

On Sat, Oct 24, 2015 at 6:40 AM, Alex Wiltschko notifications@github.com
wrote:

With a plain-Lua FFI released https://github.com/jmckaskill/luaffi,
will Terra work with plain Lua? Asked another way, do any of Terra's
internals depend on any LuaJIT internals, or does it just talk with LuaJIT
via the FFI interface?


Reply to this email directly or view it on GitHub
#128.

@Lupus
Copy link
Contributor

Lupus commented Nov 21, 2016

It seems that develop branch includes some work towards PUC Lua compatible version of Terra.

LuaJIT is slowly floating to oblivion (no active maintainer, no new features, no perf improvements), plain Lua version might make sense long term. @zdevito, could you please shed some light on the game plan here? What are your long-term objectives/plans for Terra regarding the Lua part? Dropping LuaJIT and moving towards 5.3 compatibility?

@zdevito
Copy link
Collaborator

zdevito commented Nov 21, 2016

Yes, I've made the first step for a plain Lua version using a hacked up
version of https://github.com/facebook/luaffifb. I haven't figured out how
to package it up yet, but it passes about 98% of the Terra test suite.
Currently it uses 5.1, but this is primarily a stepping stone to make sure
everything works first. Once it does, upgrading to 5.3 should not be too
difficult. My would be to continue to support luajit, but also support the
most recent PUC Lua as well.

On Mon, Nov 21, 2016 at 12:56 PM, Konstantin A. Olkhovskiy <
notifications@github.com> wrote:

It seems that develop branch includes some work towards PUC Lua compatible
version of Terra.

LuaJIT is slowly floating to oblivion (no active maintainer, no new
features, no perf improvements), plain Lua version might make sense long
term. @zdevito https://github.com/zdevito, could you please shed some
light on the game plan here? What are your long-term objectives/plans for
Terra regarding the Lua part? Dropping LuaJIT and moving towards 5.3
compatibility?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#128 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAWmGlX50oLlJNC2l3KAQIJO_mdR7SBDks5rAdtogaJpZM4GVA30
.

@saptarshiguha
Copy link

Thanks so much!

On Mon, Nov 21, 2016 at 10:56 AM, Zachary DeVito notifications@github.com
wrote:

Yes, I've made the first step for a plain Lua version using a hacked up
version of https://github.com/facebook/luaffifb. I haven't figured out how
to package it up yet, but it passes about 98% of the Terra test suite.
Currently it uses 5.1, but this is primarily a stepping stone to make sure
everything works first. Once it does, upgrading to 5.3 should not be too
difficult. My would be to continue to support luajit, but also support the
most recent PUC Lua as well.

On Mon, Nov 21, 2016 at 12:56 PM, Konstantin A. Olkhovskiy <
notifications@github.com> wrote:

It seems that develop branch includes some work towards PUC Lua
compatible
version of Terra.

LuaJIT is slowly floating to oblivion (no active maintainer, no new
features, no perf improvements), plain Lua version might make sense long
term. @zdevito https://github.com/zdevito, could you please shed some
light on the game plan here? What are your long-term objectives/plans for
Terra regarding the Lua part? Dropping LuaJIT and moving towards 5.3
compatibility?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#128 (comment),
or mute
the thread
<https://github.com/notifications/unsubscribe-
auth/AAWmGlX50oLlJNC2l3KAQIJO_mdR7SBDks5rAdtogaJpZM4GVA30>
.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#128 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAG6rAVWdDugWug3Gewl8NJtrA01quVjks5rAel4gaJpZM4GVA30
.

@bananu7
Copy link

bananu7 commented Nov 24, 2016

@Lupus Just because LuaJIT didn't see new features, I don't think it would be wise to drop support for it. It remains a good, fast Lua implementation.

@Lupus
Copy link
Contributor

Lupus commented Nov 24, 2016

@bananu7 I'm not suggesting to drop it right now, furthermore we have large codebase which is LuaJIT dependant. We just don't believe it will survive, and adding support for PUC Lua in terra makes us more confident about the future of terra.

@diggr-roguelike
Copy link

I'd like to suggest you prioritize this issue higher. Obsolescence of LuaJIT is not a theoretical worry, it's a very real problem right now.

LuaJIT's garbage collector has an internal limit of no more than 2 Gb of total allocations per process. This makes LuaJIT basically unsuitable for use in serious 64-bit programs.

Since LuaJIT is abandoned it will likely never get proper 64-bit support at all.

@elliottslaughter
Copy link
Member

I've cleaned up the develop branch and put this into a PR here: #320

The main thing is, all of the existing pure-Lua FFI implementations were non-portable. So for the moment, my "solution" has been to just cut out any functionality that can't be done in a portable way. At least for me this matters because my main reason for using non-LuaJIT Lua is to support PowerPC. The current solution is enough to build Terra code and call saveobj.

If anyone here is interested in helping that effort, there is still more to do, and we've got ideas for how to do full FFI support in a portable way. It just requires time that I don't have right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants