generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Lets Make the Switch To Lua 5.2!

Previous Thread :: Next Thread 
TheScriptAdventurer is not online. TheScriptAdventurer
Joined: 14 Oct 2013
Total Posts: 137
16 Jan 2014 06:50 PM
Ok, once a upon a time, 5.1 was the latest Lua version.
That has changed. Indeed, Lua has changed considerably:

* Now yieldable pcall AND metamethods built in, instead of having to use the hackish ypcall!

* New library for bit operations BUILT in! Now that we can use the Internet in-game, and we might send sensitive data in such communications (such as signing into an account for some service in-game), we could use such a thing to create stuff like AES encryption implementations to encrypt such sensitive data!

* gotos! I just like them personally :).


What is NOT to love?! Why not switch? If you want to, you can show your support by saying "I support this" on this thread.


Report Abuse
Tridecimize is not online. Tridecimize
Joined: 18 Jul 2011
Total Posts: 3304
16 Jan 2014 06:59 PM
But no newproxy() :(

Keyboard not found. Press F1 to continue.
Report Abuse
TheScriptAdventurer is not online. TheScriptAdventurer
Joined: 14 Oct 2013
Total Posts: 137
16 Jan 2014 07:23 PM
What IS the use of newproxy though? It just gives you an empty userdata with no predefined metamethods (except comparison I think, which is just worthless for anything but references)
Report Abuse
MettaurSp is not online. MettaurSp
Joined: 20 Mar 2010
Total Posts: 3179
16 Jan 2014 07:35 PM
You can use getmetatable on it to gain a metatable and make it useful.
Report Abuse
TheScriptAdventurer is not online. TheScriptAdventurer
Joined: 14 Oct 2013
Total Posts: 137
16 Jan 2014 07:39 PM
just use a table in that case. Plus, I want to make an encryption module, and the lack of a bit manipulation module impedes that.
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
16 Jan 2014 08:06 PM
yes, let's simply just switch over to 5.2
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
16 Jan 2014 08:07 PM
no.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Jan 2014 08:33 PM
newproxy is overrated, in most cases (well, all that I can think of) it could literally be replaced with a table
Report Abuse
MettaurSp is not online. MettaurSp
Joined: 20 Mar 2010
Total Posts: 3179
16 Jan 2014 08:47 PM
rawset can ruin the point of using a table instead. newproxy would be better for when you want to create an object with tighter security (in my opinion).
Report Abuse
TheLuaWeaver is not online. TheLuaWeaver
Joined: 09 Feb 2010
Total Posts: 1504
16 Jan 2014 08:56 PM
Also, the fact that __index will only fire if the index is nil on a table = bad is some cases, especially where users are expected to use rawset. "Use a proxy!", you might say. But then you have two resources, and one resource might be freed while the other is still referenced, so that one is now leaked, = bad.

newproxy can solve these problems. Also, in Lua 5.2, we can't do as nice sandboxing because of fenv setup changes, = bad.

Sure, Lua 5.2 is good, but I do personally prefer 5.1.

~LuaWeaver; Programmer, gamer, developer.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Jan 2014 08:57 PM
Now that you say it that way
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
16 Jan 2014 09:15 PM
Its not that simple to switch to Lua 5.2
Report Abuse
OneTrueGodTheHolyCow is not online. OneTrueGodTheHolyCow
Joined: 24 Oct 2013
Total Posts: 9350
17 Jan 2014 10:21 AM
I don't like 5.2
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
17 Jan 2014 10:24 AM
Right, from what I have heard about Lua (Probably not that much) I dont see why they cannot simply take components from the current Lua version and plug them into Lua 5.2/5.3, then simply say "Deprecated (Do not use for new work)". Or simply remove them all together. Its not like they have not broken stuff before...
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
17 Jan 2014 12:52 PM
Because Lua does not come in parts.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
17 Jan 2014 01:00 PM
I thought it did, or something similar, which is why we have Instances and the Roblox Specific Functions and other things like that.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
17 Jan 2014 01:00 PM
And also why some of the default functions are excluded (os is one, I think there is a second)
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
17 Jan 2014 02:38 PM
And what if some of the lua source code uses newproxy?
Report Abuse
jode6543 is not online. jode6543
Joined: 16 Jun 2009
Total Posts: 5363
17 Jan 2014 02:56 PM
GOTO is evil; never use it.
Anyways, the bit library is probably the feature that I'd like access to the most, but Roblox could just make their own C-side implementation of it instead of doing a total conversion to Lua 5.2.

~Jode
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
17 Jan 2014 03:32 PM
I feel like if ROBLOX ever updates to 5.2 then 5.3 will come out like few months after. I asked this a long time ago, but forgot the answer if I was even given one. Does anyone know the ETA for 5.3?
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
17 Jan 2014 04:05 PM
I don't like GOTO statements, but regardless of my own opinion, GOTO will facilitate the developing of bad habits in newbie scripters. It will turn code into spaghetti.
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
17 Jan 2014 04:13 PM
lordrambo

From what i've seen, there's only about one new feature in 5.3. Following from their release schedule, i'm going to assume it's going to be released in several years.
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
17 Jan 2014 04:23 PM
^ Lol
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
17 Jan 2014 04:30 PM
@bohdan77
I'm sure there's going to be more than integer support in Lua 5.3 (assuming that's what you're talking about).
Report Abuse
TheScriptAdventurer is not online. TheScriptAdventurer
Joined: 14 Oct 2013
Total Posts: 137
21 Jan 2014 08:16 PM
I know it is late to talk about anything on this thread, but I want to reply to some objections.

"newproxy has some uses!"
First off, why would we in the context of Riblox EVER need to fake indexes in a table?! If you want to use the index metamethod to do some extra computation on the side whenever a certain index is used, why can't you use a get method instead?! It is just unnecessary in this context.

"Can't we just add a bit manipulation library instead of upgrading? After all, upgrading is hard work."
It is not. You would probably just need to replace the lua section part of the Roblox project file (I imagine that Roblox is a just a big project file they compile, but they might use different methods) if they put lua into its own section (which they should have as professional devs).


"Gotos are evil!" That is if you use it as your primary form of control transfer. But, a label must be in scope, and it is not visible to nested functions to work, which helps to prevent spaghetti code. Plus, gotos can be used as a kind of exception mechanism.

Feel free to challenge me. You might even change my mind if you are persuasive.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image