Luanti logo

IRC log for #luanti, 2026-01-25

| Channels | #luanti index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:05 MTDiscord <sheriff_u3> 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] <y5nw> sheriff_u3: hashing?
00:07 MTDiscord <luatic> 😬 just tostringing arbitrary floats using an arbitrary stringification is not a good idea
00:07 MTDiscord <luatic> depending on the implementation, this could suffer from -0 vs 0 problems for example
00:08 MTDiscord <sheriff_u3> Well I guess that I'll remove it then, just need to find where all this mod uses it.
00:08 MTDiscord <luatic> if it's for node positions, core.hash_node_position is preferable
00:08 MTDiscord <luatic> (it's not really a hash, it just bitpacks it)
00:08 MTDiscord <sheriff_u3> 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 <luatic> absolutely please don't
00:13 MTDiscord <luatic> it will work until it doesn't, the reason being that there is no order guarantee for pairs
00:13 MTDiscord <luatic> so xyz can be in whatever order
00:14 MTDiscord <luatic> 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 <luatic> and in fact, some lua implementations do seed their hashes now
00:14 MTDiscord <luatic> so this means that this order changes from one run to the next
00:14 MTDiscord <luatic> (may change)
00:15 MTDiscord <luatic> and then your strings are inconsistent, so if you used them in any kind of persistent storage you're screwed
00:16 MTDiscord <luatic> actually i have something for you
00:16 MTDiscord <luatic> 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 <luatic> odd
00:18 MTDiscord <luatic> whatever, imma throw it on gh gists
00:19 MTDiscord <luatic> 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 <luatic> 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 <luatic> 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 <luatic> though i would advise against any unpacking hacks when core.deserialize would do
00:29 MTDiscord <luatic> (or if you have untrusted input, JSON)
00:29 MTDiscord <luatic> 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:01 Oblomov joined #luanti
01:10 [MatrxMT] <Blockhead256> I am once again asking, if it's possible, can we just regex ban  reeltor in forum usernames?
01:24 Oblomov joined #luanti
01:37 Oblomov joined #luanti
01:40 MTDiscord <wsor4035> https://cdn.discordapp.com/attachments/749727888659447960/1464797056941162637/aia4qu.png?ex=6976c610&amp;is=69757490&amp;hm=80e5a273b10d94de976ca2b1da091694fc547d54a30cc52a3184200f83650a94&amp;
01:47 meldrian joined #luanti
01:47 meldrian joined #luanti
01:47 comrad joined #luanti
01:56 Oblomov joined #luanti
01:59 MTDiscord <suumycrafty> I'm level 1 Luanti WHO is reeltor
01:59 MTDiscord <suumycrafty> im ESSENTIALLY newgen
02:03 Oblomov joined #luanti
02:10 user333_ a spammer on the forums afaik
02:33 Bombo joined #luanti
02:33 Bombo joined #luanti
02:38 Oblomov joined #luanti
03:03 Oblomov joined #luanti
03:19 Oblomov joined #luanti
03:41 Oblomov joined #luanti
03:56 Oblomov joined #luanti
04:05 silverwolf73828 joined #luanti
04:16 Oblomov joined #luanti
04:36 Oblomov joined #luanti
04:50 Oblomov joined #luanti
04:59 Oblomov joined #luanti
05:00 MTDiscord joined #luanti
05:06 Oblomov joined #luanti
05:14 Oblomov joined #luanti
06:55 FeXoR joined #luanti
07:18 Oblomov joined #luanti
09:22 Warr1024 joined #luanti
09:47 Warr1024 joined #luanti
09:56 Oblomov joined #luanti
10:17 Cork joined #luanti
10:26 mrkubax10 joined #luanti
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
10:57 mrcheese_ joined #luanti
11:08 Talkless joined #luanti
11:20 Trifton_ joined #luanti
12:02 meldrian left #luanti
13:08 turtleman joined #luanti
13:19 ireallyhateirc joined #luanti
14:22 mrkubax10 joined #luanti
15:06 whylay joined #luanti
15:12 tzenfore joined #luanti
15:45 Talkless joined #luanti
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
16:44 chilledfrogs joined #luanti
17:01 tzenfore joined #luanti
17:03 Desour joined #luanti
17:14 Trifton joined #luanti
17:21 MTDiscord <greenxenith> Which would take into account mods who have releases after 202q that may have introduced ai content?
17:22 MTDiscord <greenxenith> 2021*
17:22 MTDiscord <greenxenith> Wouldn't*
17:26 MTDiscord <wsor4035> isnt that the latest release? rather than published date?
17:26 MTDiscord <wsor4035> dunno, unsure
17:33 rubenwardy Using the PackageRelease.created_at means it's the date of the last update
17:56 silverwolf73828 joined #luanti
18:05 mrkubax10 joined #luanti
18:18 MTDiscord <greenxenith> Ah, very good
18:18 qqq joined #luanti
18:21 Trifton joined #luanti
18:33 MTDiscord <sheriff_u3> 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 <sheriff_u3> *I'm
18:34 MTDiscord <wsor4035> unless its the most boring mod under the sun, i kinda doubt that
18:35 MTDiscord <wsor4035> 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 <wsor4035> 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 <sheriff_u3> 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 <sheriff_u3> *0.4.14
18:37 MTDiscord <wsor4035> did you try it on 5.15/something recent? lol
18:37 MTDiscord <sheriff_u3> Yep
18:37 user333_ also speaking of multicraft, i'm pretty sure they update their client fairly often
18:38 MTDiscord <wsor4035> 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 <wsor4035> 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 <wsor4035> 5 is formspec v1
18:41 MTDiscord <wsor4035> 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 <sheriff_u3> 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:43 ___nick___ joined #luanti
18:44 user333_ in fact i'm planning to use a 5.15.0 feature in it, so maybe not
18:47 ___nick___ joined #luanti
19:15 silverwolf73828 joined #luanti
19:39 Guest86 joined #luanti
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
19:55 fling_ joined #luanti
20:25 Trifton joined #luanti
20:59 lhofhansl joined #luanti
21:01 mrkubax10 joined #luanti
21:14 seasharp joined #luanti
21:36 silverwolf73828 joined #luanti
23:25 sys4 joined #luanti
23:30 mrcheese joined #luanti
23:30 mrcheese joined #luanti
23:33 panwolfram joined #luanti

| Channels | #luanti index | Today | | Google Search | Plaintext