Lua 5.2 released, is there a plan to use it?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
_ex_
Citizen
Posts: 65
Joined: Thu Dec 08, 2011 2:59 pm

Re: Lua 5.2 released, is there a plan to use it?

Post by _ex_ »

Hi Robin,
I checked your repo and as long as you add the proxy script.h to the engine and change all the files that use #include <lua.h> to #include "script.h"
I guess you'll be fine, you have a sandbox.lua that I think runs in Lua 5.2, but I'm not sure
I know nothing about sandboxed environments, just this morning I saw something like this in the lua list, but it was not in my radar
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Lua 5.2 released, is there a plan to use it?

Post by Boolsheet »

Are you compiling Lua in compatibility mode? Does luasocket compile cleanly with it?
_ex_ wrote:

Code: Select all

#define LUA_GLOBALSINDEX    LUA_RIDX_GLOBALS
That works different now. LUA_GLOBALSINDEX is a pseudo-index for the stack. LUA_RIDX_GLOBALS is a index for the registry.
Only the physics module uses the code with this macro.
Shallow indentations.
User avatar
_ex_
Citizen
Posts: 65
Joined: Thu Dec 08, 2011 2:59 pm

Re: Lua 5.2 released, is there a plan to use it?

Post by _ex_ »

Boolsheet wrote:Are you compiling Lua in compatibility mode? Does luasocket compile cleanly with it?
_ex_ wrote:

Code: Select all

#define LUA_GLOBALSINDEX    LUA_RIDX_GLOBALS
That works different now. LUA_GLOBALSINDEX is a pseudo-index for the stack. LUA_RIDX_GLOBALS is a index for the registry.
Only the physics module uses the code with this macro.
Ah! I forgot, I had defined the LUA_COMPAT_ALL at project level.
Yes luasocket compiles cleanly with my redefinitions, I don't know how to test it though...

LUA_GLOBALSINDEX I changed it using some advice I found online, I totally ignore if it's safe or not until more test.
Last edited by _ex_ on Thu Dec 29, 2011 12:28 am, edited 1 time in total.
User avatar
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?

Post by Robin »

_ex_ wrote:I know nothing about sandboxed environments, just this morning I saw something like this in the lua list, but it was not in my radar
Oh, the damage is not as bad as I thought. It doesn't use setfenv() after all, which I thought it did.
Help us help you: attach a .love.
User avatar
_ex_
Citizen
Posts: 65
Joined: Thu Dec 08, 2011 2:59 pm

Re: Lua 5.2 released, is there a plan to use it?

Post by _ex_ »

I had put a compiled version on my fork:

https://bitbucket.org/ex/love

I'm only using the VS2008 solution, if you want to compile it I think all the windows dependencies are there.

PS: Does somebody know how to set my icon avatar correctly in Bitbucket? I have my email set but maybe I'm missing something.
User avatar
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?

Post by bartbes »

You set your avatar on gravatar, iirc.
User avatar
_ex_
Citizen
Posts: 65
Joined: Thu Dec 08, 2011 2:59 pm

Re: Lua 5.2 released, is there a plan to use it?

Post by _ex_ »

bartbes wrote:You set your avatar on gravatar, iirc.
Yes my avatar appears in my account page, but whenever I commit I get a ex? user without icon, I found something like that in the forum but I think I'm forgetting to set my email in some place... I just starting to use TortoiseHG and can't find a place where to set that.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Lua 5.2 released, is there a plan to use it?

Post by Inny »

bartbes wrote: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.
In debian experimental, liblua5.2 is currently at version rc5. It'll be sometime before we even see it make it to sid, and even longer before it gets to wheezy where Ubuntu will pick it up. I'd say that _maybe_ we would see it in ubuntu 13.10. So, there's no rush to get it in.

That makes me a sad panda.
blueHat
Prole
Posts: 1
Joined: Thu Jan 12, 2012 5:23 pm

Re: Lua 5.2 released, is there a plan to use it?

Post by blueHat »

Inny wrote:
bartbes wrote: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.
In debian experimental, liblua5.2 is currently at version rc5. It'll be sometime before we even see it make it to sid, and even longer before it gets to wheezy where Ubuntu will pick it up. I'd say that _maybe_ we would see it in ubuntu 13.10. So, there's no rush to get it in.

That makes me a sad panda.
The Linux world does not only consist of Debian and Ubuntu. For instance distros like ArchLinux always like to have the newest stuff. And Lua5.2 has some great improvements in it, so that it is worthwhile to support it in the closer future.
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Lua 5.2 released, is there a plan to use it?

Post by coffee »

Didn't knew about GOTO introduction in LUA. Although not really needed I think it brings extra flexibility with labelled jump control. It's welcomed if appear in LOVE. Who thinks that is "evil" just don't use it, others should control their code as they want.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests