Time Nick Message 08:01 MTDiscord Well, x2048 left the community, so he won't be able to do reviews in the nearest time. My PR doesn't require high lore/skills to review, it is limited to the irrlicht stuff like setting material properties, drawing primitives list and that's all 09:13 MTDiscord It's sad that x2048 left, he did a lot of cool things.... I'll thank him as a regular player to the developer 11:32 sfan5 merging #13775, #13686, #13792 in 12m 11:32 ShadowBot https://github.com/minetest/minetest/issues/13775 -- Changed all core::unicode::ustring to std::u32string by calebabutler 11:32 ShadowBot https://github.com/minetest/minetest/issues/13686 -- Allow setting custom third person front view camera offset by grorp 11:32 ShadowBot https://github.com/minetest/minetest/issues/13792 -- Document air_equivalent as deprecated by sfan5 11:38 sfan5 it just occurred to me that we can now start using std::string_view 12:12 erle sfan5 what should be used instead of air_equivalent then? 12:31 MTDiscord <.niklp> nothing, air_equivalent doesn't do anything. 12:34 erle it does 12:34 erle the engine no longer uses it, but mods do: https://web.archive.org/web/20230911164208if_/https://content.minetest.net/zipgrep/501df1d6-4355-4fd8-8afb-947ea023aa6e/ 12:34 erle and removing it makes it falsy for air and ignore 12:35 erle since some mods only set it and others only check it, there should be a clear “do this instead” 12:35 erle and AFAIK it was not found last time this was discussed, but i may have missed something about it 12:35 MTDiscord <.niklp> The param is ignored by the engine for years now, where's the problem?... 12:35 erle it is because mods assume it is truthy for “stuff like air” and check for it, see that link 12:36 ROllerozxa it may be ignored by the engine, but games and mods rely on it 12:36 erle i suggest to ask one of the authors of those mods what they would want instead. many might not know. 12:36 MTDiscord <.niklp> there should be a clear “do this instead” - then sit down, open your ide, text editor or whatever and implement it instead of talking 12:38 erle okay, look: removing it would just break something 12:38 erle i hate this idea of deprecating stuff and not actually knowing what it is useful for. if people are using it and they are still around, they *probably* know. 12:39 erle but i do not 12:39 erle and because none of my mods uses air_equivalent, i can not actually sit down and implement “do this instead” 12:39 MTDiscord I think you should use a custom node group instead of air_equivalent 12:40 erle grorp then that should be in the documentation i guess 12:40 MTDiscord You can add it to builtin air and ignore using minetest.override_item 12:41 MTDiscord But there may be other alternatives as well, I don't know 12:41 erle yeah and that's the point 12:41 erle the people who do know (mod authors) have not commented on this as far as i can tell 12:41 erle except for warr1024 12:42 erle grorp i suggest to add your opinion to https://github.com/minetest/minetest/issues/13722 12:42 MTDiscord I shouldn't have responded at all 🤦 12:42 erle can i add it? 12:43 erle i mean, am i allowed to just copy your stuff and credit you 12:50 MTDiscord x2048: thank you, and good luck for the future 13:06 [MTMatrix] minetest.after have limit up to 65000 timers? 13:09 erle localhost, whatever you do, don't lol 13:10 erle i suggest to explain the problem in #minetest or the forums and see if there is another way than tens of thousands of timers 13:10 [MTMatrix] hm, okay, thanks. Where i can see queue timer manager in engine? 13:11 MTDiscord @grorp shouldn't the engine set a group on air to establish a convention? 13:13 erle and on ignore 13:13 erle luatic it would just be removed anyway as soon as someone™ finds out the engine does not use it internally ;) 13:14 erle luatic i suggest to post to #13722 grorp was already “i shouldn't have responded at all” 13:15 ShadowBot https://github.com/minetest/minetest/issues/13722 -- `air_equivalent` is undocumented 13:19 grorp luatic: you could also consider that a game responsibility 13:26 MTDiscord grorp: but then we will get a worse alternative to air_equivalent, as each game/mod comes up with its own name for the same thing.. air is an engine responsibility, and air_equivalent used to be an engine responsibility; at the very least I would suggest a certain name for this group in the docs as a convention, even if the engine doesn't enforce / use / set it at all. 14:11 erle luatic good luck convincing people, but given that a followup to people agreeing to not removing stuff for reasons has been “deprecate it later, without providing a suffcient replacement”, I doubt you can find a permanent solution here without addressing the underlying issue. 14:20 erle which, as i see it, is something “API consumers have no say, as API devs know best”. you can see where this goes from other projects, e.g. GNOME/MATE/Cinnamon, ffmpeg/libav or MineClone2/Mineclonia – it does not make those projects fail, it just alienates contributors to the ecosystem. 14:26 rubenwardy there is no sufficient replacement as `air_equivalent` has insufficient meaning 14:27 erle rubenwardy then what should developers do to get the previous behaviour? 14:27 rubenwardy depends based on what they actually want to do 14:28 erle that answer does not contain a context-free or regular suggestion for what to do 14:29 erle i personally would do what html5lib did: figure out how the thing is used, then see if this is useful or can be replaced 14:29 erle i would not do what imagemagick did: respond to everyone with “we never defined it that way, the user is wrong” 14:30 erle anyway, i don't see the use in deprecating things that are a) in use b) have no sufficient replacement. it certainly does not save work to do so. 14:31 erle i guess war1024 will have to figure it out (being the user that uses that thing the most so far) 14:32 erle and a lot of other stuff will just subtly break (unless some joker just writes a mod that sets this property again lol) 14:33 erle rubenwardy what advantage do you see here actually? like, is “removing things that were never defined properly” a goal in itself that ranks higher than compat? 14:33 erle i mean, that would be a consistent opinion 14:35 jonadab The most important feature of air, and the most important way something could be equivalent to it, is buildable_to 14:37 jonadab Second most important is I guess probably transparency? 14:37 ROllerozxa vegetation could be buildable_to 14:37 jonadab Well yes, it often is. 14:37 erle do not regard the name, think about how it is used 14:37 erle in mods 14:37 erle jonadab remember that ROllerozxa did a cdb search for this 14:38 jonadab I don't think I've ever seen air_equivalent used in a mod. Perhaps I'm not looking at the right mods? 14:38 erle you have not looked at the cdb search probably 14:38 ROllerozxa https://web.archive.org/web/20230911164208if_/https://content.minetest.net/zipgrep/501df1d6-4355-4fd8-8afb-947ea023aa6e/ 14:38 ROllerozxa nodecore uses air_equivalent, among others 14:39 erle for me, the first question is “why would anyone set this”. some mods have comments that indicate they cargo-culted it. others use it deliberately, as they indeed check for it. 14:39 jonadab Ah. 14:39 jonadab I see. 14:39 erle the second question is “if you check for this, what would you expect” and the simplest answer that has no meaning, but is consistent with past behaviour is “i would expect this to be truthy for air, ignore and all nodes that had air_equivalent set by mods” 14:40 jonadab Nodecore is a replacement game, so it theoretically doesn't care what MTG does. 14:40 erle this does not give you anything meaningful, but it does give you a pattern for what a solution would have to do 14:40 erle i.e. if you currently have a mod checking for air_equivalent, in the future you have to check for air_equivalent and air and ignore 14:40 erle otherwise it will break with these two that had set it by default 14:41 ROllerozxa iirc warr gave their 2 cents on the issue and mentioned that air_equivalent could work just as well as a node group 14:41 jonadab That makes sense to me. 14:41 erle yes, but a) the engine does not warn if you set air_equivalent b) it would have to be the same node group so that mods that set it can interact with those that read it 14:41 jonadab But yeah, backward compatibility doesn't always care about what makes sense. 14:43 erle in any case, this is a systemic issue: engine devs decide “this has to go” and neither “this is in use” nor “there is no clear replacement right now, we need to work it out” seem to be good counter arguments. 14:44 erle i don't have a mod using air_equivalent, but i see this in other parts of minetest again and again. it is what wuzzy describes as the “rug pull”. 14:44 erle and the response is often that it was clearly written down that this thing has to go, which is useful to assign blame to the mod devs, but does not address the breakage. 14:44 ROllerozxa anyways would be neat to get a second approval on #13847, it fixes the display of codeblocks in the HTML rendered lua API documentation which is currently broken 14:44 ShadowBot https://github.com/minetest/minetest/issues/13847 -- doc: fix improper code blocks parsing for lua_api_deploy by using pymdown-extensions by corpserot 14:45 erle i would like such stuff to be solved like the texture alpha thing was: let the engine annoy people about it until they fix it, then yank it. 14:45 erle (as soon as it is no longer in use in existing code) 14:47 erle see issue #10915 for how that was handled (lots of console spam, mods fixed it AFAIK) 14:47 ShadowBot https://github.com/minetest/minetest/issues/10915 -- use_texture_alpha warning spam 14:47 MTDiscord I suppose that when air_equivalent was removed, there should have been an official deprecation. We can strive to do this better in the future. 14:48 erle luatic as long as there is no policy for deprecation, this will continue 14:48 erle i mean for deprecation prerequisites 14:50 erle for the use_texture_alpha thing there was a spreadsheet in PR #10819 for example to show how this affects past, present and possible future clients 14:50 ShadowBot https://github.com/minetest/minetest/issues/10819 -- [DONT SQUASH] Rework use_texture_alpha by sfan5 18:14 grorp 5.8.0-dev enables shaders by default on Android, so you're at least less likely to experience this issue. 18:14 grorp whoops, wrong channel, sorry 19:23 Krock !tell x2048 @x2048 I am sad that we lose a very skilled developer. Still - thank you for your contributions and good luck with your life's journey. I'm looking forward to hear from you again :) 19:23 ShadowBot Krock: OK. 19:23 Krock <3 ShadowBot 19:23 ShadowBot ♥ Krock. 19:31 [MTMatrix] what if make same nearest blocks as symlinks (or mapblocks, just link data to nearest next same mapblock)? If possible of course 19:41 Krock which problem would you like to address with that? 19:47 erle is there even a plain file backend anymore 19:48 [MTMatrix] symlinks in fs vs sqlite (/joke) 20:17 [MTMatrix] also, i thins, sqlite may be faster than, if have up to 32 gb ram server and move the sqlite map to ram disk (or journal_mode = MEMORY) 20:17 [MTMatrix] also, i thinks*, sqlite may be faster than, if have up to 32 gb ram server and move the sqlite map to ram disk (or journal_mode = MEMORY) 20:17 [MTMatrix] 👀 20:21 [MTMatrix] But, I'm happy, minetest still can run on potato with 1 gb ram + swap + zram; minecraft can't :D 20:22 erle ha, and i thought with 2GB RAM i had the lowest-spec thing 20:32 MTDiscord localhost: Minetest already has an in-memory backend, no need to use SQLite for that. 20:32 MTDiscord (also, 1 GB RAM will probably only work with a very lightweight OS and game; Lua is not exactly memory-efficient) 20:38 erle something something creating many small strings lol 20:41 MTDiscord I haven't analyzed what exactly is usually responsible for huge memory consumption, but I'd be willing to go out on a limb and say it isn't the strings because those are interned and pretty space-efficient. I think the thiccness of tables is probably to blame. 20:45 erle luatic maybe analyze first before making grandiose statements :P 21:03 [MTMatrix] hm, lua is C based lang, it pretty lighweight, i guess 🤔 21:04 [MTMatrix] ofcourse if make 2^64 recursion returning it can't be lightweight 21:04 [MTMatrix] ofcourse if make 2^(64*1024) recursion returning it can't be lightweight 21:04 [MTMatrix] of course if make 2^(64*1024) recursion returning it can't be lightweight 21:06 MTDiscord localhost: That logic doesn't check out. It is very much possible to implement "heavyweight" / time- or memory-inefficient languages in an efficient language. Python is written in C too and it definitely isn't "pretty lightweight". 21:06 MTDiscord Is "C based" the same thing as "implemented in C"? 21:08 [MTMatrix] > Python is written in C too and it definitely isn't "pretty lightweight". 21:08 [MTMatrix] oops 21:08 [MTMatrix] good point 21:08 [MTMatrix] out.png 21:09 [MTMatrix] passive small server 21:10 [MTMatrix] you can see link on the attach? 21:10 MTDiscord One of Lua's main problems regarding memory efficiency is my opinion, as said, how large tables - pretty much the only compound data structure besides userdata and closures - are. All Lua tables have an array part, a hash part, and a metatable field. The hash part isn't particularly space-efficient - you need to store type-tagged key, value pairs (and IIRC a reference to the next entry on top of that, at least in PUC) for each entry. It 21:10 MTDiscord also grows dynamically, so it will allocate for the next power of two. 21:10 MTDiscord localhost: All I see (on Discord) is a text message saying "out.png". 21:11 [MTMatrix] bruh, matterbridge moment, and i know how fix it, but rebuild required 21:11 [MTMatrix] out.png: https://matrix.inex.rocks/_matrix/media/v3/download/inex.rocks/adBsbRvoosjcLqhXhgNWbPdh 21:11 MTDiscord As an extreme example for the inefficiency of Lua's tables, take a two-element table containing two numbers (a 2d-vector) {x=1,y=2}. See how large this table is. Now compare this to the equivalent C struct. The difference will be an order of magnitude. 21:11 MTDiscord the memory inefficiency, that is* 21:12 MTDiscord this is simply the cost at which "everything is a hash table + array list" comes 21:13 MTDiscord localhost: I see. Well, MTG is a pretty barebones game in my book. Without mods it shouldn't consume much memory. But wait until you see the memory consumption of a larger game like Mineclone. 21:14 erle look rather at mineclonia 21:14 erle like the new one (that is still developed) 21:14 erle mineclone2 is full of performance stupidities 21:14 [MTMatrix] also, 7 players on the server can feed ram, but zram and swap helps... (i'm tested before changes from it: https://forum.minetest.net/viewtopic.php?f=10&t=1825 21:14 erle while the fork is developed by people who can actually code their way out of a wet paper back 21:14 [MTMatrix] also, 7 players~ on the server can feed ram, but zram and swap helps... (i'm tested before changes from it: https://forum.minetest.net/viewtopic.php?f=10&t=1825 21:15 MTDiscord "code their way out of a wet paper back"? 21:15 MTDiscord (I understand what you're trying to say, but I have trouble parsing this figure of speech...) 21:15 erle luatic the implication that mineclone2 team could not code their way out of a wet paper bag ;) 21:15 erle like don't use mcl2 to shit on the minetest engine 21:15 [MTMatrix] oh sorry, my custom english 21:16 erle it basically does enough stuff wrong that the engine is not responsible 21:16 MTDiscord erle: I'm not shitting on the engine 21:16 MTDiscord I was shitting on Lua, actually 21:17 [MTMatrix] but alternatives? 21:17 MTDiscord Lua gave me consing PTSD /s 21:17 [MTMatrix] haven't 21:17 erle luatic prove that lua is the problem then 21:17 [MTMatrix] human readable and simple 21:17 MTDiscord localhost: if you want memory efficiency, you ultimately don't want lua 21:17 MTDiscord luckily most of the time memory efficiency is not that much of a problem 21:17 erle look at work we have lua on embedded devices 21:17 erle lua is small enough 21:17 [MTMatrix] yeah, assembler pls 21:18 [MTMatrix] with low-level ops 21:18 MTDiscord localhost: that's the fallacy of taking it to the extremes; something like Rust, Zig, or even Go may very well suffice already 21:18 [MTMatrix] joke 21:18 MTDiscord (will usually suffice, and often produce better assembly than if you insisted on handwriting everything) 21:18 erle and AFAIK the “memory consumption of a larger game like Mineclone” is influenced by the choice to include a lot of the background music – which the engine mitigates with the next release AFAIK 21:19 [MTMatrix] imagine, mods/huge_mod_go_with_150_MB.bin 21:19 MTDiscord erle: lua is definitely small, i'm not disputing that; but lua tables aren't small 21:20 erle prove that it matters luatic 21:20 erle in my experience, lua is CPU-limited before it becomes memory-limited (because of the hashes) 21:20 erle but i have never benchmarked it 21:22 MTDiscord localhost: Go using static linking is a different topic and more or less only tangentially related to memory consumption. 21:22 MTDiscord (yes, the executable code needs to be loaded into memory, but that's a one-time cost and usually the binaries are not nearly as large) 21:23 [MTMatrix] i think, maybe just write directly "mods" as attachment to engine on vanilla code, but is harder... But is super mega fast and lightweight (maybe) 21:24 [MTMatrix] oops, i forgot about clients... 21:24 [MTMatrix] rebuilding... 21:25 MTDiscord great, i just fired up mineclone and my minetest died 21:25 MTDiscord yeah i think it's being killed for too much memory usage... 21:28 [MTMatrix] default settings? 21:34 MTDiscord alright, took a look now and it seems Mineclone has about 100 MB base Lua memory usage, so indeed this is not at all the main factor in the 2 GB+ memory usage 21:37 [MTMatrix] just maybe active blocks eat too mush memory... 21:37 [MTMatrix] just maybe active blocks eat too much memory... 21:40 erle luatic delete the background music, then try again. then ponder where the engine is struggling here., 21:42 [MTMatrix] Ah yes... background music really may out of mem... It happenes 👀 21:43 MTDiscord erle: meh, I don't really care about Mineclone, but it is valuable to know that Lua does not seem to be the main culprit 21:43 erle how did you measure this? 21:47 erle also you are probably not surprised that “this game crashes the engine via OOM” is not taken seriously by the mcl2 dev team. unfortunately, it would probably be a lot of work if CDB would have checks for such stuff. :/ 21:47 erle (and also you can't run random lua and get away with it for long before someone drops a cryptominer mod) 21:47 MTDiscord erle: collectgarbage"count" 21:48 erle oh 21:48 erle i thought maybe you had a more general method 21:49 MTDiscord more general in what sense? 21:49 erle bc then i could see how much (if any) memory i can save with the unicode_text vs texmods 21:49 erle i.e. generate texture on server vs generate texture on client 22:39 [MTMatrix] possible add to the engine function lock controls? I mean, no need set position via while true bla bla, no need set unbreakable blocks around player; just lock controls - ignore their key presses temporally 22:42 [MTMatrix] or advice please efficient alternatives, safe and no cheatable 🤔 22:45 [MTMatrix] oh, again no correct channel for that question (maybe)...