Minetest logo

IRC log for #minetest-dev, 2021-11-20

| Channels | #minetest-dev index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:31 Taoki joined #minetest-dev
00:36 proller joined #minetest-dev
00:40 Alias2 joined #minetest-dev
02:13 kilbith joined #minetest-dev
02:36 Alias joined #minetest-dev
02:57 kilbith joined #minetest-dev
03:04 kilbith joined #minetest-dev
03:13 olliy joined #minetest-dev
03:15 pmp-p joined #minetest-dev
03:28 queria^clone joined #minetest-dev
03:33 queria^clone joined #minetest-dev
05:00 MTDiscord joined #minetest-dev
05:39 fluxionary joined #minetest-dev
07:07 YuGiOhJCJ joined #minetest-dev
07:57 Fleckenstein joined #minetest-dev
08:26 tekakutli joined #minetest-dev
09:28 calcul0n__ joined #minetest-dev
10:06 Fixer joined #minetest-dev
10:09 Fleckenstein joined #minetest-dev
12:34 calcul0n_ joined #minetest-dev
14:18 erlehmann joined #minetest-dev
14:27 kilbith joined #minetest-dev
15:27 sfan5 opinions wanted on #11775 whether this is considered breakage or not
15:27 ShadowBot https://github.com/minetest/minetest/issues/11775 -- New handling of direction key bits is not fully backwards-compatible
15:29 MTDiscord <Jonathon> Yes, as it affects some already existing mods
15:51 appguru joined #minetest-dev
16:03 Extex joined #minetest-dev
16:42 GreenXenith joined #minetest-dev
17:04 Extex joined #minetest-dev
17:31 MTDiscord <luatic> sfan5: yes - modders have few controls to use, leading them to use every key combo they can get
17:48 fluxionary joined #minetest-dev
17:49 erle_on_a_train joined #minetest-dev
17:50 erle_on_a_train sfan5 i am not logged into github on this device, but the gist of it is that malicious players usually coerce the game/mod into doing the dirty out of bounds work for them. limiting player positions does not change much about that. besides, *most* out of bounds player positions do not cause a crash.
17:50 MTDiscord <SX> as it is supposed to be engine instead of game imo it should allow all possible combinations, not just combinations used in some game
17:51 erle_on_a_train sfan5 besides, something like compilers and ubsan will greatly help if the boundaries for functions are s16, they will be of no help if the max/min is +/-31000, unless you conjure a magical datatype that gets an unsigned integer overflow at that boundary.
17:51 sfan5 erle_on_a_train: well yes, limiting player position (or even player interaction) outside of bounds wouldn't do much
17:53 erle_on_a_train sfan5 my proposal to fix the various overflows would be to scrap the idea that the mapgen limit protects against overflows and make all functions well-behaved for all legal values of v3s16 they can get. this would be relatively easy.
17:55 erle_on_a_train sfan5 btw i have seen stuff like lua mapgen functions that place schematics, then try to read the nodes of the area to figure out how much of it got placed and possibly repeat it to fix mapgen griefing. i bet there is a way to coerce them into looping forever if you can place nodes that you can not read. OTOH, if you crash on placing stuff out of
17:55 erle_on_a_train bounds, i'd bet money on *that* being abused by griefers.
17:56 sfan5 I have still not seen indication that mapgen touches 31000
17:57 sfan5 if lua mapgens place stuff far outside of their indicated area it is on them to deal with consequences or handle edge cases
17:57 erle_on_a_train mapgen doesn't need to touch it actually. i do have a world that actually renders up to 31007, which i find a bit weird, bc i thought minetest does not render the outermost shell.
17:58 erle_on_a_train the thing with using gadgets is used a lot btw
17:58 erle_on_a_train like making the game do things for you
17:59 erle_on_a_train i have used two different ways to make water in a nether dimension (where players can't place water) by coercing the game to place it there (and no, not by melting ice). i also removed unremovable blocks (“bedrock”) by making minetest spawn a structure
17:59 erle_on_a_train inside the unremovable blocks
18:01 erle_on_a_train sfan5 a good start would be to try emerging stuff outside bounds btw.
18:01 sfan5 a good start to what?!
18:02 erle_on_a_train to get mapgen to place stuff there, i think? i tought emerge makes mapgen do wok
18:02 erle_on_a_train work
18:02 erle_on_a_train maybe i am wrong?
18:02 erle_on_a_train as i pointed out, the only real breakdown of mapgen is that at 31000 biomes are hardcoded to stop working. but the whole mapgen stuff does not matter.
18:04 erle_on_a_train in the end, all functions should work inside an area. and that area has bounds. if you choose the bounds of s16, you get assistance in making the functions work from compiler warnings and ubsan. if you choose +/- 31000 (which seems weird, bc s16 bounds are asymmetric around 0, they are +32767/-32768 i think), no instrumentation will help you.
18:05 erle_on_a_train and besides that, you'll get a lot of bugs at the boundary, but i keep saying that and i'm kinda sick of it.
18:05 erle_on_a_train i just want a) griefers to not crash servers b) mod authors to do as little as possible
18:07 erle_on_a_train sfan5 i have the feeling that others think i have some hidden nefarious reason for wanting another boundary. do you think that?
18:08 sfan5 I just think it doesn't make sense
18:09 erle_on_a_train that's because you do not think about it from the perspective of an attacker, i guess
18:10 erle_on_a_train i really think it's that. everyone in this chat is smart enough to crash minetest if given the task.
18:10 erle_on_a_train but you do not try, because why should you.
18:10 erle_on_a_train meanwhile, the anarchy server “cheats are allowed” crowd encounters ppl that find it really funny to take down servers
18:11 erle_on_a_train i mean, other servers encounter them too
18:11 erle_on_a_train but in the anarchy server context, those ppl boast about it, then someone say “haha i do not believe it”, then they do it, we get a trace and try to fix it
18:12 erle_on_a_train and also the cheat client devs fix the most glaring issues themselves
18:13 erle_on_a_train sfan5 i think the focus on “but mapgen would not place anything there” is totally misleading. what if someone manages to spawn a nether portal at the coordinates?
18:13 erle_on_a_train (it was fleckenstein i believe who fixed entityspeed exploit?)
18:14 erle_on_a_train sfan5 btw you can keep asking how specific crashes work, but when i am being intentionally vague, then it is because the bad ppl read bug reports too.
18:15 erle_on_a_train not because i want to make fun of you or appear overly smug
18:15 erle_on_a_train (i think i appear smug enough tbh)
18:15 Pexin hahahaha
18:15 sfan5 if you want bugs fixed that you think deserve secrecy report them privately
18:15 sfan5 being vague in public helps exactly nobody
18:16 erle_on_a_train i have said before, i am keeping back with stuff that i have not seen in the wild unless i have a fix.
18:16 erle_on_a_train bc i think it is much less likely that ppl will latch onto the wrong solution if i say “here is the problem and here is the patch”
18:16 erle_on_a_train i mean they can still criticize the patch
18:17 sfan5 okay, I conclude you are not actually interested in fixing crash bugs
18:17 erle_on_a_train i am
18:17 sfan5 doing a disservice to everyone is your choice but don't expect not to be criticized for it
18:18 erle_on_a_train true
18:18 erle_on_a_train but the thing is, i think that some of the fixes make it *worse* than doing nothing
18:19 sfan5 hard to imagine by which measure going from "crash" to "no crash" could not be considered an improvement
18:19 erle_on_a_train sfan5 i do not believe privately reporting anything would change it
18:20 erle_on_a_train well i have a working lua solution for the minetest.get_nodes_in_area thing
18:21 erle_on_a_train so it's not like it can get *better* from my POV unless the engine matches that.
18:22 erle_on_a_train (it can get worse though, by making other stuff not work)
18:22 erle_on_a_train cora even offered it to minetest_game
18:27 erle_on_a_train regarding clamping on the player position, that is misrepresenting the problem a lot
18:27 erle_on_a_train i do not know about minetest, but in other applications you can for example have problems with denormals
18:27 erle_on_a_train https://en.wikipedia.org/wiki/Subnormal_number
18:29 erle_on_a_train sfan5 we may fundamentallly agree on how to write reliable software though, could that be? i think the only way to be sure is to define a grammar for each function and make sure that everything that matches the grammar works and everything that does not match the grammar returns with a status code indicating error. if one component gives data to
18:29 erle_on_a_train another, the best way to make that work is to make illegal stuff unrepresentable.
18:30 erle_on_a_train sfan5 i guess you have a different opinion?
18:31 erle_on_a_train (in this case: having fuctions work with every possible v3s16 means that out of v3s16 bounds coords are truly unrepresentable, whereas ±31000 bounds mean that they are still representable in v3s16)
18:32 erle_on_a_train btw, one case of a sanitization bug that is abused is that players tp to illegal coordinates, then log out
18:32 erle_on_a_train they will be at their spawn after login
18:46 nrz joined #minetest-dev
19:25 appguru joined #minetest-dev
19:48 x2048 joined #minetest-dev
20:07 erle_on_a_train joined #minetest-dev
21:09 Flitzpiepe joined #minetest-dev
22:24 v-rob joined #minetest-dev
22:29 v-rob Hey all, slowly trying to get back into development here again, specifically in the proper Unicode text rendering sector. So, my question: how do we deal with potentially adding hard dependencies?
22:30 v-rob Since there's no way to do Unicode right without external libraries
22:42 sfan5 which library are you thinking about
22:53 v-rob Well, I'm not entirely certain, since there are a few possibilities (I'm still researching), but one such library is Pango, which is what GTK and Firefox on Linux uses for text-rending internally.
22:56 v-rob But mostly libraries that are probably of moderate size
23:02 sfan5 haven't worked with pango but I don't think I'll be a fan
23:03 v-rob Honestly, I'm not either, but the quest is to find a text layout engine, of which Pango appears to be the most popular
23:04 v-rob For instance, Pango prefers to use Cairo, so that'd be two dependencies unless I write my own OpenGL backend for it
23:07 v-rob Short of a text-layout engine, I'd need to use a lower level text-shaping library, which would make perfect single-line Unicode, but there's no guarantee that I'd get the paragraph-level Unicode right
23:08 sfan5 what does a text layout engine do that we couldn't do ourselves or with help of smaller libraries?
23:12 ShadowNinja joined #minetest-dev
23:13 v-rob So, a bit of context: text-shaping is taking a string and turning it into positions for you to draw glyphs at. This is totally infeasible to do ourselves, which is the source of a lot of our Unicode problems. There's basically only one cross-platform library for this, which is HarfBuzz.
23:14 v-rob As for text-layout, that's everything else, i.e. bidirectionality, fonts that change style in the middle, line breaking and paragraphs, hyphenation, etc.
23:14 v-rob This sums it up: https://harfbuzz.github.io/what-harfbuzz-doesnt-do.html
23:17 v-rob I don't fully know if it's feasible to implement text-layout if we have a text-shaping library, but I'm erring on the side of probably not.
23:18 sfan5 well fribidi would take care of the first, changing style is what we do ourselves anyway
23:18 v-rob There's a lot to consider that I don't know anything about, e.g. how different languages lay out paragraphs or how word breaking occurs for them
23:18 sfan5 linebreaking, paragraphs: dunno, doesn't hypertext in formspecs have this already?
23:19 v-rob I mean with Unicode and different languages. How does e.g. Chinese break lines and paragraphs? I have no idea myself.
23:21 v-rob It's not fun :/
23:22 sfan5 and generally I think the aim should be to do text rendering reasonably well (better than now); MT is a game engine which also needs to display text, but that's not its primary purpose
23:23 sfan5 ...because getting the last 10% right is probably 90% of the work
23:23 v-rob Heh, yeah
23:24 v-rob So, I'd say that the minimum libraries we'd need for pretty good Unicode are probably HarfBuzz and fribidi
23:24 v-rob HarfBuzz and ICU for slightly better, but ICU's pretty chunky
23:24 sfan5 those are unproblematic
23:24 v-rob And Pango for the best, but gross
23:24 sfan5 (hb + fribidi I mean)
23:25 v-rob That sounds reasonable. I guess I will work with those then.
23:27 v-rob If I find a better/smaller/nicer text-layout engine than Pango, I'll bring it up.
23:30 MTDiscord <exe_virus> It's always interesting how dependencies are chosen based on simplicity and size. It's not just us, but jsut about everyone. It's not something often thought about when designing a library. I.e. reducing loc
23:32 v-rob It's also dependency chains -- I don't want to bring in Cairo.
23:32 MTDiscord <exe_virus> fair
23:33 MTDiscord <exe_virus> on the topic of dependencies.... What about small file type deps like gltf, webp, avix, midi, opus, etc?
23:33 MTDiscord <exe_virus> generally okay?

| Channels | #minetest-dev index | Today | | Google Search | Plaintext