Time Nick Message 07:03 nerzhul sfan5: fix here: https://github.com/minetest/minetest/pull/11245/files 07:03 nerzhul exe_virus, if you are affected try my pr 07:03 nerzhul it should do the trick 07:04 nerzhul i moved the function outside of the client, i forgot client is big but not enough to cover the main menu :) 07:05 nerzhul i had to tidy a bit the lua stack in order to store the filesys pointer properly, but it's fine 09:03 sfan5 "leaking" the IFileSystem into the scripting doesn't look like a good solution 09:03 sfan5 if the gui engine has access to the irrlicht stuff, can't a wrapper method be added there? 09:40 nerzhul i can put the IFileSystem inside it if you prefer 10:41 sfan5 GUIEngine has a m_rendering_engine, so it can wrap extractZip for use from the scripting 10:43 sfan5 ah that's not even needed, ModApiMainMenu can access private members of GUIEngine 10:44 sfan5 so you can do this: lua_pushboolean(L, fs::extractZipFile(getGuiEngine(L)->m_rendering_engine->get_filesystem(), zipfile, destination)); 12:47 Guest76367 What is v3s16 and similar types? 13:06 MTDiscord They are 3d vectors with specifically sized fields. For example v3s16 is a vector of 16 bit integers I think. 13:07 MTDiscord Does that answer your question? 13:28 nerzhul sfan5, it's exact, a bit ugly but exact, i can use that :) 13:34 nerzhul sfan5, PR is fixed, and far more tiny now :) 13:45 Guest76367 Thanks, josian_wi. 14:01 nerzhul who are you Guest76367 ? :p 14:01 nerzhul merging #11245, and mybad about the mistake :) 14:01 ShadowBot https://github.com/minetest/minetest/issues/11245 -- fix: extractZipFile is not part of Client but more generic. by nerzhul 17:09 Krock Will merge #11158 and #11039 in 15 minutes 17:09 ShadowBot https://github.com/minetest/minetest/issues/11158 -- Improve liquid documentation by Wuzzy2 17:09 ShadowBot https://github.com/minetest/minetest/issues/11039 -- Add metatables to lua vectors by Desour 17:10 sfan5 you can merge #11246 too 17:10 ShadowBot https://github.com/minetest/minetest/issues/11246 -- Fix build for newer versions of GCC by lhofhansl 17:10 Krock +1 17:11 pgimeno Krock: can you hold 11039 so I can take a look? 17:11 Krock no problem 17:12 pgimeno thanks, looking 17:12 Krock another PR which would be rather easy to review: #11031 (to anyone) 17:12 ShadowBot https://github.com/minetest/minetest/issues/11031 -- Fix misleading builtin command syntax of /shutdown by Wuzzy2 17:18 pgimeno + local v = setmetatable({x = x, y = y, z = z}, metatable) 17:18 pgimeno + return v 17:19 pgimeno why not return setmetatable, which would be a tail call? 17:20 sfan5 if you have a diff I can push it into the PR before we merge it 17:23 Krock merging (2) 17:24 Krock done 17:25 pgimeno http://www.formauri.es/personal/pgimeno/pastes/fast_new-tail-call.patch 17:29 pgimeno + -- scalar/vector makes no sense 17:30 pgimeno and vector/vector? 17:30 MTDiscord The local was apparently faster IIRC 17:30 MTDiscord Kinda makes sense as the immediate return would have to take multiple return values of setmetatable into account 17:31 pgimeno no it doesn't make sense, tail calls are transformed into jumps 17:31 pgimeno the latest function in the chain would return the value directly to the first caller 17:33 pgimeno that, or I'm not following your logic 17:36 pgimeno vector.divide can divide two vectors, but metatable.__div can't - isn't that inconsistent? 17:36 rubenwardy setmetatable only returns one thing, so multiple returns is irrelevant 17:37 pgimeno not that there's a lot of use for dividing two vectors, but if vector.divide supports them, so should __div IMO 17:38 MTDiscord rubenwardy: multiple returns are relevant, as Lua(JIT) can't know that, unless setmetatable is localized 17:38 pgimeno actually, same applies to __mul 17:38 rubenwardy it's not relevant as it has the same result but is faster 17:38 rubenwardy even PUC Lua supports tail calls 17:38 MTDiscord are you actually sure that it is faster? 17:39 rubenwardy tail calls are well documented to be faster 17:39 MTDiscord but multiple returns are slower 17:39 rubenwardy it may only be nonneglibly so when doing actual recursion 17:39 rubenwardy it's not multiple returns, it's a single return 17:39 MTDiscord multiple return values, to be precise 17:39 MTDiscord evil me could be doing _G["set" .. "metatable"] = function(...) return ... end 17:40 MTDiscord Lua has to account for that case 17:40 pgimeno hm, maybe appguru has a point 17:40 pgimeno http://wiki.luajit.org/NYI 17:40 pgimeno CALLT partial Tailcall. Some tailcalls to frames lower than the starting frame of the trace are not compiled. 17:40 MTDiscord https://github.com/minetest/minetest/pull/11039#discussion_r592596882 17:41 MTDiscord Should probably be tested 17:41 pgimeno if the tail call is going to break traces, that makes it inconvenient no doubt 17:41 pgimeno I am not sure what it means when it says "frames lower than the starting frame" though 17:57 pgimeno no other objections from me