|
We have already discussed this a billion times
Its not happening.
|
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
newproxies are still overrated, I realized just how slow they were and switched to tables with this little method to prevent rawset/table.insert to insert into the actual table:
do local real={}
fake=setmetatable({},{__index=real}) end
fake.blah |
|
|
@cnt
Whats the point of using do alone? No one ever told me :P |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Just opening a scope, so the "real" table can't be accessed but the "fake" can |
|
|
@CloneTrooper1019: What is so wrong with 5.2 from your standpoint? I'm just curious.
|
|
|
Did you not read my bit about why that can be bad, Cnt? That mem might not get cleaned up, and __gc won't work.
~LuaWeaver; Programmer, gamer, developer. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Oh, I forgot c; |
|
|
Again, why would those things EVER be needed in Roblox? |
|
KenetecJoin Date: 2009-11-26 Post Count: 1662 |
how about no
lua 5.2 is stupid |
|
|
GIVE a reason as to why rather than saying "it's stupid" |
|
|
So many things will break.
Roblox would probably have to re-write almost everything that makes RBX.Lua different to standard Lua.
Keyboard not found. Press F1 to continue. |
|
|
Lets see.
No global function environments
No newproxy
goto is for bloody lazy people
Everything would break
Its bad
|
|
MettaurSpJoin Date: 2010-03-20 Post Count: 3179 |
|
|
|
What would break exactly? And why? Lua is offered as an API, so it shouldn't be so embedded in Roblox Lua to require a full scale rewrite, unless they mixed the Lua library code with Roblox Lua implemention code ( which would be extremely unprofessional). Nothing really major minus the stuff already mentioned is changed, the C API generally has no changes put to it. Why would they have to rewrite EVERYTHING? |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Plus it is a bit trickier to sandbox qq |
|
|
Bytecode execution exploit fix
Don't know how difficult this would be, but yeah.
Keyboard not found. Press F1 to continue. |
|
|
There are ways around that. You see, since _ENV is the, well, environment, all you have to do to change the environment for a chunk is to change the variable. If you wanted to sandbox, you can do it like so:
function sandboxedcall(env, func, ...)
_ENV = env
return func(....) -- env is the environment for this function in this call: sandboxing!
end
function printLOLLFAIL()
print("LOLL FAIL")
end
sandboxedcall({}, printLOLLFAIL()) -- fails, since print is not in the new environment
printLOLLFAIL() -- would succeed!
----------
You guys seem to not even understand the new environment concepts for 5.2! Global environments technically still kind of exist, and as to the loss of _G's special status, there are better ways to share functions and data across scripts, such as StringValue objects and ModuleScripts.
|
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
'Plus it is a bit trickier to sandbox qq'
I did not say it's hard, nor did I say impossible... |
|
|
But the new change is not even a significant impediment! |
|
suremarkJoin Date: 2007-11-13 Post Count: 6315 |
I'm going to reiterate what I said. The GOTO statement in and of itself is not bad, but it is very abusable by newbie programmers. Structured programming must be taught first, or else irresponsible use of GOTO will lead to awful spaghetti code. I don't think most 9-14 year olds (ROBLOX's target demographic) would be immediately cognizant of this.
Now, about another thing you said:
"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."
Could you elaborate more? I really don't have any idea what you're talking about. LuaWeaver clearly pointed out the necessity of newproxy under certain circumstances. |
|
|
local _ENV = env
Fail on my part. Also, how now that I think of it, you could use _ENV to share stuff across scripts! |
|
|
What I meant was, in Roblox, I don't see a context where you would a proxy in the first place, since the primary reason for intercepting table accesses would be for security reasons (at least in my mind). But who are you protecting the table FROM? Yourself? If you wanted to do some extra computational stuff upon such an access, why don't you write a function that gets the value and does that extra stuff you wanted to do on the side? |
|
suremarkJoin Date: 2007-11-13 Post Count: 6315 |
Script builders-- that's the only real application of secure sandboxing. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Roblox's sandbox |
|
suremarkJoin Date: 2007-11-13 Post Count: 6315 |
I would imagine that ROBLOX's sandboxing is handled C-side-- the Lua API probably does the rest. |
|