Time Nick Message 00:05 MTDiscord Just ran into an odd function in an old mod that I'm working on: lua pos_string = function(pos) return "{" .. pos.x .. "," .. pos.y .. "," .. pos.z .. "}" end Anyone know why you might want a pos in string format? 00:05 user333_ no idea... 00:06 user333_ although that's similar to core.serialize, which converts a table to a string 00:06 [MatrxMT] sheriff_u3: hashing? 00:07 MTDiscord 😬 just tostringing arbitrary floats using an arbitrary stringification is not a good idea 00:07 MTDiscord depending on the implementation, this could suffer from -0 vs 0 problems for example 00:08 MTDiscord Well I guess that I'll remove it then, just need to find where all this mod uses it. 00:08 MTDiscord if it's for node positions, core.hash_node_position is preferable 00:08 MTDiscord (it's not really a hash, it just bitpacks it) 00:08 MTDiscord k 00:11 user333_ you might be able to abuse core.serialize for that, just use a bit of string manipulation to remove the first 7 letters 00:13 MTDiscord absolutely please don't 00:13 MTDiscord it will work until it doesn't, the reason being that there is no order guarantee for pairs 00:13 MTDiscord so xyz can be in whatever order 00:14 MTDiscord the underlying reason being that it is a hash map 00:14 user333_ "it will work until it doesn't" that's a yes! 00:14 MTDiscord and in fact, some lua implementations do seed their hashes now 00:14 MTDiscord so this means that this order changes from one run to the next 00:14 MTDiscord (may change) 00:15 MTDiscord and then your strings are inconsistent, so if you used them in any kind of persistent storage you're screwed 00:16 MTDiscord actually i have something for you 00:16 MTDiscord user333_: http://vps.luatic.dev/dump/randomize_order.lua i wrote this beauty a while ago to help prevent such crimes 00:17 user333_ it doesn't load for some reason 00:18 MTDiscord odd 00:18 MTDiscord whatever, imma throw it on gh gists 00:19 MTDiscord https://gist.github.com/appgurueu/0a7c87ea6a8b18cbea477fba1949697d 00:23 user333_ huh 00:25 user333_ my method with core.serialize should still work if you use {x=1, y=2, z=3} instead of {1, 2, 3} though, assuming the code for unpacking that will support it 00:26 MTDiscord user333_: the problem is that {x=1,y=2} can be serialized as either {x=1,y=2} or {y=2,x=1} and both will happen 00:27 user333_ yes, and if you have the proper unpacking code it should still work 00:28 MTDiscord if you are using core.serialize just to turn something into a string that you wish to load later, yes, that's what it was designed for and will work for 00:28 MTDiscord though i would advise against any unpacking hacks when core.deserialize would do 00:29 MTDiscord (or if you have untrusted input, JSON) 00:29 MTDiscord what i'm talking about is that when you want these strings as keys in tables, core.serialize won't do 00:29 user333_ yea, due to the order not always being the same 01:10 [MatrxMT] I am once again asking, if it's possible, can we just regex ban reeltor in forum usernames? 01:40 MTDiscord https://cdn.discordapp.com/attachments/749727888659447960/1464797056941162637/aia4qu.png?ex=6976c610&is=69757490&hm=80e5a273b10d94de976ca2b1da091694fc547d54a30cc52a3184200f83650a94& 01:59 MTDiscord I'm level 1 Luanti WHO is reeltor 01:59 MTDiscord im ESSENTIALLY newgen 02:10 user333_ a spammer on the forums afaik 10:33 pgimeno @luatic, nice idea about randomizing pairs, though I'd change `return fk, fv` to `return fk, t[fk]` to prevent modifications within the loop 16:16 rubenwardy ContentDB now has AI disclosures. Please update your packages at https://content.luanti.org/user/ai-disclosure/ 16:20 Krock thanks for the button 16:21 rubenwardy :D 16:23 Krock Packages that were last updated prior to 2021 (or so) could be marked as no-AI automatically, if that helps anyone. 16:23 rubenwardy oh good idea 16:24 Krock I'd assume you could find that out by the most recent git commit date 16:26 rubenwardy I'll just use the PackageRelease date 16:32 rubenwardy done 16:32 Krock :D 17:21 MTDiscord Which would take into account mods who have releases after 202q that may have introduced ai content? 17:22 MTDiscord 2021* 17:22 MTDiscord Wouldn't* 17:26 MTDiscord isnt that the latest release? rather than published date? 17:26 MTDiscord dunno, unsure 17:33 rubenwardy Using the PackageRelease.created_at means it's the date of the last update 18:18 MTDiscord Ah, very good 18:33 MTDiscord I asked this on Discord, but want to hear your guy's opinions on it too: Question how much is too much support? A mod working on can currently support any client back to at least MineTest 0.4.14 and possibly before, while still working fine on Luanti 5.15... 18:33 MTDiscord *I'm 18:34 MTDiscord unless its the most boring mod under the sun, i kinda doubt that 18:35 MTDiscord given alpha changes in 5.4 for nodes, players 0.5 offset, etc 18:35 user333_ not to mention the lack of most features 18:35 sfan5 as a programmer working on any application you could also support windows 2000 18:35 sfan5 people typically don't do that, for a reason 18:36 MTDiscord as for your question, previous two versions is fine. if you care about multicraft, support back to 5.4 18:36 user333_ the engine itself supports down to windows 8 18:37 MTDiscord It's not be developed since MineTest 4.14 so that's why it can go back that far. 18:37 user333_ idk about linux but probably much older 18:37 MTDiscord *0.4.14 18:37 MTDiscord did you try it on 5.15/something recent? lol 18:37 MTDiscord Yep 18:37 user333_ also speaking of multicraft, i'm pretty sure they update their client fairly often 18:38 MTDiscord to be fair, i think the engine supporting windows 8 versions is basically just, it works till it doesnt, and then remove it unless its trival 18:38 user333_ multicraft's versioning scheme, afaik, is `2.0.(luanti minor)` 18:39 MTDiscord its all 5.4 with some cherry picks 18:39 user333_ oh so they just update the version numbers?... 18:40 sfan5 my personal opinion that the maximum reasonable compatibility for a mod is minetest 5.0. but this requires you to actually test it. 18:41 sfan5 for mods that actually interact with game content and do various visual things, entities or whatnot this is quickly unfeasible 18:41 MTDiscord 5 is formspec v1 18:41 MTDiscord 5.1 is v2 where you more sane cords 18:41 user333_ worldedit's modpack.conf: min_minetest_version = 5.0 18:41 sfan5 worldedit for example is tested on 5.0, but it's basically just some node manipulation and completely game-independent 18:43 MTDiscord Well unfortunately this mod's still dependent on default, only because of one texture though so I'm making a replacement. 18:43 user333_ my game needs at least 5.9.0 though i don't test it that often so it might be higher by now 18:44 user333_ in fact i'm planning to use a 5.15.0 feature in it, so maybe not 19:44 Guest86 luanti should have client sided events or interface, for graphical interfaces. Of course client-sided executing should be for obviously scripts. 19:51 user333_ did anyone else not understand that? it sounds like they want SSCSM