Time Nick Message 16:33 MinetestBot 02[git] 04wsor4035 -> 03minetest/minetest: Reword CMake message for LuaJIT detection 13df8afe3 https://github.com/minetest/minetest/commit/df8afe3dc418534111c0f2d7f0c67bf1caf6cda9 (152024-08-26T16:32:42Z) 16:33 MinetestBot 02[git] 04Desour -> 03minetest/minetest: Meshgen: Don't get lights for not drawn solid faces 13da1fc9a https://github.com/minetest/minetest/commit/da1fc9a5366b9ceace6d829783a9a56545616158 (152024-08-26T16:32:51Z) 16:33 MinetestBot 02[git] 04SmallJoker -> 03minetest/minetest: zstd: Fix minetest.decompress lockup when data ends too early 135583831 https://github.com/minetest/minetest/commit/5583831c40d51e5f63540ccfcda71b678564c21b (152024-08-26T16:32:59Z) 16:41 [MatrxMT] forum reporting still broken, here's a spam user (signature) https://forum.minetest.net/memberlist.php?mode=viewprofile&u=51563 16:42 [MatrxMT] MisterE: Thank you for fixing the bridge by the way, quite convenient this way 16:43 ROllerozxa forum signature spammers are dime a dozen on the forums if you look through the memberlist 16:44 [MatrxMT] this one made an actual post, I figured it was better to report the user. And I wouldn't keep posting it here if the report feature just worked again 16:45 ROllerozxa ah, yeah I saw that once the forums decided to load 16:51 rubenwardy I'd like to thank the forums for giving me nostalgia of using the internet in 2012 16:51 rubenwardy with crappy kbps rural internet 17:13 MTDiscord I am falling to problem like this with minetest 5.9.0 installed from arch packages: https://pastebin.com/jYbU7UZe When I am try to place or dig easel from painting 3 mod. Looks like a Arch packages problem probably. Is somebody witch arch linux able to reproduce? 17:18 MTDiscord SFENCE: somebody in some mod you have is redefining vector.zero. 17:19 MTDiscord It's a mod problem, not a minetest problem. 17:20 ROllerozxa yeah I can't reproduce, grep for any enabled mods that interfere with vector.zero 17:20 MTDiscord The fact that it's happening to the painting mod is also likely a red herring; any mod could be modifying vector and causing the issue. Search the code of all your mods for "vector.zero" and see where it's being redefined, then go hunt down the author of that mod and yell at them. 17:44 sfan5 you could also set a metatable on vector to catch it 18:02 MTDiscord ...said the guy who's in a position to set a metatable on vector in builtin so that we catch ALL such future misbehavior and emit appropriate warnings 🤔 18:03 MTDiscord Hmmm.... interesting... looks to be isolated to a specific world. 18:04 MTDiscord Could be a worldmods thing, but it could also just be that vector.zero only gets overwritten on a specific code path that only that world exercies. 18:05 sfan5 I polyfill some vector functions in my own code so that'd obviously be a bad idea 18:05 MTDiscord When I create new world with identical mods, it looks to be working well. 18:05 MTDiscord Polyfills wouldn't likely be affected in this case, since you're talking about stuff that didn't exist but now does. It's also not that hard to bypass the warnings on an "I'm sure I know what I'm doing" basis. 18:06 MTDiscord Warr1024: no we kind of don't want to do that 18:06 MTDiscord to set a metatable that catches overwriting a field we'd have to move that field to the metatable, which we don't want 18:06 MTDiscord I also do a fair amount of polyfilling. In fact, I replace register_abm with a version with several wrappers. 18:06 sfan5 replacing a function with a table is indeed nonsense 18:06 MTDiscord mod vector_extras overwrite vector.zero method. 18:06 MTDiscord But I have no idea why is it problem only sometimes. 18:06 sfan5 however that table could be callable 18:06 [MatrxMT] deprecation warnings is one thing, emitting warnings pre-emptively for possible bad behaviour is kind of heavy handed 18:07 [MatrxMT] it sounds like a job for a linter more than at runtime 18:07 MTDiscord Emitting warnings for possible bad behavior is a thing we already do with globals. But yes, the overwrite case is different from the add case, in terms of performance, and that may actually matter for low-level stuff like vectors. 18:07 MTDiscord I'd really like to see MT offer more "strict" options, they help a ton. 18:08 sfan5 anyway I was thinking some mod (or the engine) could provide an optional "strict mode" where many arguments/values/behaviors are checked more strictly than they could be 18:08 sfan5 another good example is registering recipes which source unknown items 18:08 MTDiscord As for linters ... they can catch a lot, but there are things they can't, and I don't think I've ever seen a linter for MT yet. Only for Lua so far, so you can only catch problems that are general to Lua overall, not specific to MT. 18:08 MTDiscord Blockhead256: update your luacheck https://github.com/lunarmodules/luacheck/pull/108/files ;) 18:08 MTDiscord Lars has a "strictest" mod ... I wonder how up to date it is... 18:09 MTDiscord There were IIRC some things like invalid formspec elements or invalid texture modifiers that MT was loose about and required runtime scanning to catch. 18:10 MTDiscord Caught a few instances of me using ^[combine instead of [combine as a texture 18:11 MTDiscord The fact that for some texture modifers ^[ is a de facto operator (like resize or opacity), and for others (like combine) they work like a separate ^ and [ operator feels weird. 18:11 MTDiscord wtf why is technic using vector_extras 18:12 MTDiscord this is bad 18:12 MTDiscord The MT (and probably other) ecosystem paradox: the most mature and popular shit is also the stuff that has the oldest, nastiest code. 18:12 MTDiscord can't even rip it out in a controlled manner since with all the metatable stuff it's basically impossible to find all usages 18:13 sfan5 https://github.com/HybridDog/vector_extras/commit/ed6b514057b7f8b8ed30c4b6e7a003d630361740 lol 18:15 MTDiscord is there anything that it adds NOW that's still not already built in? 18:16 MTDiscord This feels like a leftpad problem: somebody made a library that does something super trivial that you COULD just copy and paste everywhere, but now that it's been reused everywhere, problematic unexpected consequences are carried along everywhere too 18:16 MTDiscord it seems that commit didn't make its way to contentdb? 18:16 MTDiscord Warr1024: in typical hybriddog fashion, that library definitely does more than super trivial things, though people are probably only using the trivial parts x) 18:17 MTDiscord Making vector.zero a function instead of a constant already feels kind of weird; it feels like it was only done that way because Lua doesn't provide a better mechanism to prevent a static value from being poisoned. 18:18 MTDiscord Yes, it is not a problem with vector_extras from content db, only with vector_extras from git master. 18:18 MTDiscord SFENCE: huh, i would've expected the other way around 18:19 MTDiscord Warr1024: agreed, freezing tables is a sorely missed lua feature 18:20 ireallyhateirc you could implement it using metatables (creating a proxy table) but it's probably not worth it when you can simply call the function and get the value 18:21 ireallyhateirc lua 5.4 has const but when/if that gets to LuaJIT is another question 18:21 MTDiscord There is twoline function at least in vector_extras which is not in builtins. 18:25 MTDiscord ireallyhateirc: doesn't help here, it's a local variable attribute, inapplicable to table fields 18:25 sfan5 lua 5.4 features will never make their way to luajit 18:25 sfan5 *if* it ever happens then it will be a luajit fork/branch created because lua 6.0 or whatever just gained popularity 18:25 MTDiscord this needs the equivalent of Object.freeze in JS, basically a bit that indicates whether a table is frozen and if so, refuses any k-v-assignments 18:27 ireallyhateirc idk why someone made a language without such basic features (that's otherwise fine and well-ish made) 18:27 ireallyhateirc it even missed goto (which is helpful for escaping nested loops) 18:28 MTDiscord well to their credit they did add goto in 5.2 18:33 Krock and "continue" in 5.4? 18:45 MTDiscord Krock: to my knowledge "continue" has not been added yet 18:45 ROllerozxa it's part of the planned roadmap for luajit v3.0 18:48 MTDiscord ominous 18:51 [MatrxMT] I've written probably half a dozen Lua comments to the effect of "-- argh no continue in this language" 18:55 Krock I often end up offloading code to "repeat ... until 1" + break, or separate functions. there's always a way but not necessarily a convenient one 18:57 MTDiscord IIRC Lua's official position on the "continue" thing at the time was "if you just wrap the rest of the loop body in an if statement, it emits the same bytecode that a continue would have if there were a continue statement" ... it's just arguable about whether the extra nesting indentation makes the code more or less clear. 19:00 ireallyhateirc you can somehow workaround the lack of goto, continue and all that stuff by doing tail recursion too 19:00 MTDiscord yeah 19:01 MTDiscord Lack of goto feels more like a feature than a bug to me. I think the only situations where I didn't feel like using goto was wrong, I was already doing arcane pointer math. 19:02 MTDiscord In languages that support both goto, and more proper flow control structure, goto is pretty much strictly inferior. It's pretty much just for when you're either programming in assembly, or want to pretend you are. 19:02 ireallyhateirc the only good goto use case is exiting nested loops quickly, but you can do it with tail recursion so I guess it's fine until you cause a funny stack overflow 19:03 MTDiscord You mean like when you want to break out of multiple loops? Yeah, if you had a break keyword, it could support an integer arg like break(2) to handle that case ... but for now, you can just throw the loops into a separate function and then use a return instead. 19:04 MTDiscord I think the only times in MT that I'm doing nested loops and want an early exit are cases where I'd rather have the nested loops as an abstraction anyway. When I'm doing nested loops for vmanips, I rarely want an early exit. 19:05 MTDiscord ireallyhateirc: how would you cause a funny stack overflow when lua has TCO 19:05 MTDiscord Early exit only saves you on average half the iterating work anyway, and unreliably so, depending on where the thing you're searching for is found (you rely on the central limit theorem heavily to get consistent expected performance) so 🤷 19:05 MTDiscord It's actually easy to accidentally fail to meet the requirements of TCO 19:05 MTDiscord Actually, there are cases where I'm not even sure. 19:06 MTDiscord it's relatively simple to not fail to meet the requirements 19:06 ireallyhateirc I think I did it once with minetest.after + improper tail recursion 19:06 MTDiscord like if condition then return tailcall() else return end I'm pretty sure is TCO'd, but return condition and tailcall() I'm a lot less certain of. 19:06 MTDiscord return (expr)(...) -> TCO 19:06 MTDiscord It's not a question of whether or not it's simple to not fail, it's a question of whether it's easy to fail. 19:06 MTDiscord No warning is generated when you think you did it right but didn't. 19:07 MTDiscord Lua could really use a tcreturn statement or something that disallows non-tail calls or something to ensure it. 19:07 ireallyhateirc Basically I had if statements starting another instance of the function with minetest.after recursively, but I forgot to add a return statement after minetest.after 19:07 MTDiscord (I think maybe a linter could even solve that statically) 19:08 MTDiscord oh, yeah, forgetting the return entirely is a bigger problem 😄 19:08 MTDiscord Ironically I find myself using returns like that in JS, even though I don't think any JS implementation even attempts TCO, and without TCO returning the value should be slightly slower. 19:24 MinetestBot 02[git] 04appgurueu -> 03minetest/minetest: Make getting bone overrides return the "same" euler angles (#15007) 1321ed680 https://github.com/minetest/minetest/commit/21ed680b10aef84f58222a427aebffab48efa171 (152024-08-26T19:22:38Z) 19:24 MinetestBot 02[git] 04SmallJoker -> 03minetest/minetest: LocalPlayer: Restore 2u height sneak jump (#15015) 138109563 https://github.com/minetest/minetest/commit/8109563a02cbe4c6c3bff224d808e1061f3e4386 (152024-08-26T19:23:12Z) 21:57 cheek_pain Sneaky spammer -> https://forum.minetest.net/viewtopic.php?p=438752#p438752 22:00 MTDiscord why would someone do this..