#Interstellar
1 messages · Page 1 of 1 (latest)
what's the point of debug.global() is there ever a time where _G isn't the "true" global table?
local env = {}
env._G = env
setmetatable(env, { __index = _G })
setfenv(func, env)()
Something like that
ah yeah in a specific env
This is epic
one might say its interstellar even 
thx to srlion I've recently added a way to transfer functions with their upvalues cross-states, so... yea.
have fun with that now...
*just keep in mind transfering c-functions like player.GetAll may break, I noticed some state specific stuff in there for some reason.
interstellar lanes time
not without updating gmod's luajit
as threads are way more fun when you have ffi
yea might be getting close to that...
sick
@limber root do you know why all of gmod's functions for some reason, has this annoying call right before them, which makes them state-specific...
I am struggling to understand why its there and what purpose its for
which one exactly?
Try moving MsgC cross-state, you will just crash
this one?
i have no idea why that would crash though
yeah, seems to be just that, i dont think it should crash, cause the functions just... Set L in LuaBase to whatever they just received
im not sure though why they would do that in the first place
unless it receives the wrong LuaState it should be good
weird, its always the gmod funcs that crash however...
wtf is that arg1 + 0x48 right above
thats pulling right off the lua state
L->luabase...?
yeah, its part of the lua state struct in gmod
well I think thats the problem 😂
fresh lua_State structs have that as nothing
what I have now works just have to supply that with something valid
other than that I am just ironing out bugs, works fine, lots of mutexes tho
god is that how addresses now look on x64?
the bitmask shit again lol
dont tell rubat we dont have the high 17 bits set in gcobj addresses
yea they are long as fuck now
@limber root the concept for thread isolated lua states https://github.com/eprosync/interstellar_gmod/releases/tag/v1.2.0-alpha
obviously nowhere near complete
@limber root looks like you really can't call gmod's lua functions across threads without running into race conditions from CLuaInterface.
Only way is to create our own CLuaInterface which... is ultra geh.
this is a very bad idea either way
dont do that
welp looks like we aren't getting gmod funcs cross state then
even if you make your own lua interface it still breaks due to some other setup missing
you get funny errors like this:
[string "test"]:2: bad argument #1 to 'test' (table expected, got table)
stack traceback:
[C]: in function 'test'
[string "test"]:2: in function <[string "test"]:1>
[C]: at 0x80880ab2fef819ba