Hi,
I would like to know from the development team if there are any plans to
port the Lua interpreter on the engine to the new brand released version.
Best
Lua 5.2 released, is there a plan to use it?
Re: Lua 5.2 released, is there a plan to use it?
probably not anytime soon:
- few libraries have been ported so far, so anyone using... anything more than luasocket are going to have problems
- luajit isn't likely to support it for a while (apart from the occasional easy-to-port features) which could be a problem for some users, or for its theoretical adoption into löve
- some of the new features are nice, but for the most part aren't important enough for most users to care. _ENV breaks existing sandboxes, luajit or patches exist for uncrippled yields and xpcall, obviously parts of the C api are changed, etc
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Lua 5.2 released, is there a plan to use it?
I didn't know it was officially out!
Thanks for bringing that up.
I would not move LÖVE to 5.2 just yet - Maybe in LÖVE 1.0 ? Nevertheless, it's not that I can decide on those matters.
Thanks for bringing that up.
I would not move LÖVE to 5.2 just yet - Maybe in LÖVE 1.0 ? Nevertheless, it's not that I can decide on those matters.
When I write def I mean function.
Re: Lua 5.2 released, is there a plan to use it?
Note that you can start compiling Lua 5.2 with LÖVE right now and start reporting what breaks.
ALL CREATURE WILL DIE AND ALL THE THINGS WILL BE BROKEN. THAT'S THE LAW OF SAMURAI.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Lua 5.2 released, is there a plan to use it?
It's not like we can force you to use any specific version of lua with love, you decide upon that at compile-time, it's just that we'll make our source compatible with, and our binaries built with 5.1, until 5.2 is more common, it seems a bit weird to have code that depends on 5.2 when 90% of the people can't get it.
Re: Lua 5.2 released, is there a plan to use it?
90% of the people can't get it...? Are you counting all the people in Africa without any internet access or something?
Anyone (on the net) can download it from http://www.tecgraf.puc-rio.br/lua/ftp/lua-5.2.0.tar.gz
It compiles cleanly in a few seconds, and has no external dependencies... one of the most painless builds in existence.
What do you mean with the 90% can't get it?
Anyone (on the net) can download it from http://www.tecgraf.puc-rio.br/lua/ftp/lua-5.2.0.tar.gz
It compiles cleanly in a few seconds, and has no external dependencies... one of the most painless builds in existence.
What do you mean with the 90% can't get it?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Lua 5.2 released, is there a plan to use it?
Well, I'm the linux maintainer, and I like to overstate the amount of people running linux here. That said, even though it compiles cleanly, there will be few repos that actually have 5.2.
Re: Lua 5.2 released, is there a plan to use it?
I upgraded to Lua 5.2 this morning and I needed only small changes to get everything compiling and running.pk wrote:Note that you can start compiling Lua 5.2 with LÖVE right now and start reporting what breaks.
hey, at least my simple tetris clone is working!!
Not sure if something else gets broken, of course I don't use external lua modules and because I started modifying the engine to support another script language my code base is a bit different than head and maybe helped, if somebody wants to upgrade and get stuck just drop me a line.
I think I'll go with 5.2, having break at any place inside a block, the goto, the bit library and the more documented source code is a deal breaker for me.
Regards.
Re: Lua 5.2 released, is there a plan to use it?
After further tests, I was able to play Ortho Robot (awesome game by the way):
http://stabyourself.net/orthorobot/
with Lua 5.2, the only crashing part was math.mod(x, y) that I translated to: (x % y)
There was a bug in the math.mod 5.1 implementation anyway...
Therefore I don't see major problems to use new Lua 5.2 except maybe some heavily used modules used by the community
but I also don't think fixing them would take more than a day of work but I can be wrong (I don't use any)
I only needed to add a script.h header with:
and redirect all script access through this file in the engine and add the missing
to lauxlib.c and
to lauxlib.h in the Lua 5.2 distribution.
Are there some other hidden problems/bugs I'm not aware of?
http://stabyourself.net/orthorobot/
with Lua 5.2, the only crashing part was math.mod(x, y) that I translated to: (x % y)
There was a bug in the math.mod 5.1 implementation anyway...
Therefore I don't see major problems to use new Lua 5.2 except maybe some heavily used modules used by the community
but I also don't think fixing them would take more than a day of work but I can be wrong (I don't use any)
I only needed to add a script.h header with:
Code: Select all
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#if (LUA_VERSION_NUM > 501)
#define LUA_GLOBALSINDEX LUA_RIDX_GLOBALS
#define luaL_reg luaL_Reg
#define luaL_putchar(B,c) luaL_addchar(B,c)
#define lua_open luaL_newstate
#endif // #if (LUA_VERSION_NUM > 501)
Code: Select all
LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname) {
const char *msg = lua_pushfstring(L, "%s expected, got %s",
tname, luaL_typename(L, narg));
return luaL_argerror(L, narg, msg);
}
Code: Select all
LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname);
Are there some other hidden problems/bugs I'm not aware of?
Last edited by _ex_ on Thu Dec 29, 2011 12:30 am, edited 3 times in total.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Lua 5.2 released, is there a plan to use it?
Would you have a suggestion how to implement the sandbox of SELÖVE in Lua 5.2?
Help us help you: attach a .love.
Who is online
Users browsing this forum: No registered users and 1 guest