Time Nick Message 00:13 MTDiscord or just yolo it 00:43 MTDiscord Haha, I was gonna say ... reverts are a thing, if you end up needing them. 06:01 nerzhul hah sfan5, tell me which one you need some review i will take some time 08:14 sfan5 nerzhul: #11136 or #11140, they're all pretty small just not trivial 08:14 ShadowBot https://github.com/minetest/minetest/issues/11136 -- CGUITTFont optimizations by sfan5 08:14 ShadowBot https://github.com/minetest/minetest/issues/11140 -- Irrlicht support code maintenance by sfan5 09:51 nerzhul sfan5 approved 11140 10:07 appguru Please have a look at #10515 10:07 ShadowBot https://github.com/minetest/minetest/issues/10515 -- Fix base64 validation by appgurueu 11:09 sfan5 merging #11140 in 5m 11:09 ShadowBot https://github.com/minetest/minetest/issues/11140 -- Irrlicht support code maintenance by sfan5 13:55 sfan5 >scale 16x16 to 64x64 with Irrlicht 13:55 sfan5 >non-square pixels in output 13:55 sfan5 ????? 14:03 MTDiscord ah yes 14:07 sfan5 this is apparently intentional 14:12 sfan5 (in general that is, it makes no sense in this specific case) 14:35 pgimeno appguru: what's the goal of validating base64? 14:38 MTDiscord pgimeno: fixing a broken function 14:38 MTDiscord base64 allows for padding, which used to not be accepted by minetest 14:46 pgimeno is the string "A" considered valid? 14:48 MTDiscord Why should it not be? For backwards-compatibility, omitting padding is of course allowed. 14:48 sfan5 @appguru don't you mean "with 5.4 and opengl"? 14:49 pgimeno appguru: because it does not complete a byte. Length % 4 == 1 should be illegal. 14:49 MTDiscord no, I mean with 5.4 and OpenGL ES 2 14:49 sfan5 huh how come you're using that? 14:50 MTDiscord https://cdn.discordapp.com/attachments/747163566800633906/826830747083341854/Bildschirmfoto_von_2021-03-31_16-50-02.png 14:51 pgimeno appguru: I'm not sure what the decoder will do in that situation. I know of one decoder that had a buffer overflow in that case, exposing server RAM to users. 14:51 MTDiscord sfan5: Can reproduce with OpenGL for that matter 14:52 sfan5 if you have that setting it's unlikely that you're actually using ogles 14:52 sfan5 does the ingame window title say [OpenGL ES X.Y ...]? 14:53 MTDiscord That ugly PR is 5.5-dev 14:53 sfan5 no, the driver name was always there 14:54 MTDiscord yeah my fault 14:54 MTDiscord I still consider fitting that in the title ugly tho xD 14:54 MTDiscord But yeah it says OpenGL 14:54 sfan5 you can also blame the engine for transparently falling back to opengl 14:54 MTDiscord and not ES 14:54 sfan5 (or does it print anything?) 14:54 MTDiscord Only prints texture size errors 14:57 sfan5 https://github.com/minetest/irrlicht/commit/7c7e1e4b8f575ea8913796f0af74f979caffd914 maybe I should just have thrown the entire thing away 14:58 sfan5 oh just noticed the width > 1 wasn't useless after all 14:58 MTDiscord pgimeno: should be fixed now https://github.com/minetest/minetest/pull/10515/files 14:59 sfan5 @appguru does that function have unittests? if not can you add them? 14:59 MTDiscord uhm sure, how do Minetest's unittests work? 15:00 sfan5 there is stuff inside src/unittest/ 15:00 sfan5 putting it in test_utilities.cpp should be fine 15:00 MTDiscord and how is that stuff run? 15:00 MTDiscord well, I could write Lua unittests... 15:01 pgimeno appguru: fixed where? I don't see anything that prevents padding == 3 (which is illegal) 15:01 sfan5 ./bin/minetest --run-unittests 15:01 sfan5 we have Lua unittests but those can only test pure-Lua code 15:03 don_flymoor That's cool. You can run Linux on Windows without using a VM. 15:03 don_flymoor That way you can get the best of both worlds 15:04 pgimeno and the other way around too 15:04 MTDiscord Other way using a VM is better IMO 15:04 sfan5 if you're referring to WSL, that is a VM internally 15:04 don_flymoor Not anymore, apperantly 15:04 pgimeno wine is not a VM either 15:04 pgimeno (off topic, anyway) 15:04 sfan5 no not "not anymore", the old WSL1 was not a VM, WSL2 is 15:05 don_flymoor It can help for developing minetest 15:05 MTDiscord most devs use Linux 15:06 don_flymoor True, it is much better for developing. 15:10 MTDiscord pgimeno: do you happen to have some base64 tests around? 15:22 pgimeno no, but testing different lengths including zero, different paddings including 4, padding not at the end, invalid chars and some combos of those, should cover most things 15:22 pgimeno the PR should include a unit test, now that you mention it 15:24 MTDiscord yeah I'm adding some right now 15:31 pgimeno preferably, add checks for base64_decode too, since the test cases can be useful there as well 15:35 pgimeno I've found this test suite: https://android.googlesource.com/platform/frameworks/native/+/b7cc1ec/common/tests/src/com/android/common/Base64Test.java 15:37 pgimeno another one: https://svn.python.org/projects/python/trunk/Lib/test/test_base64.py 16:08 MTDiscord But what about the licenses? First one appears to be Apache 2.0 16:15 pgimeno taking them as "templates" to make your own cases should not violate the licenses 17:16 pgimeno appguru: empty string should be valid, can you include that in tests? 17:20 pgimeno I think that the condition i == 0 prevents that 17:26 MTDiscord pgimeno: done 17:32 pgimeno just to be sure: the function should consider valid a string that constitutes proper base64, and proper base64 with padding removed, and reject everything else, right? 18:10 don_flymoor I got the linux version of minetest running on windows at 60 FPS. 18:14 MTDiscord How are you running gui? 18:15 MTDiscord pgimeno: yes 18:18 pgimeno http://www.formauri.es/personal/pgimeno/pastes/unit-tests-b64.cpp 18:19 pgimeno I should add some tests for the base64_encode function too 18:19 pgimeno and decode 18:20 pgimeno and hmm... I think isalnum depends on locale, right? 18:22 pgimeno updated, reload if you already opened the link 18:26 don_flymoor Jonathon: I'm using VcXsrv as the display 18:28 don_flymoor It's not hard to setup 18:31 don_flymoor This guide seems to work: https://medium.com/@japheth.yates/the-complete-wsl2-gui-setup-2582828f4577 18:32 MTDiscord isalnum depends on locale, which is why i got rid of it 18:33 pgimeno yea, best add it to the test suite so that no one makes that mistake again 18:33 MTDiscord warning: hex escape sequence out of range 615 | UASSERT(base64_is_valid("\xE1AAA") == false); 18:33 pgimeno uh 18:33 sfan5 chars are signed 18:34 sfan5 or: your compiler is doing something dumb 18:34 MTDiscord my compiler is GCC 18:34 sfan5 try "\xE1" "AAA" 18:34 pgimeno oh let's hope it's not that 18:34 MTDiscord that fixed it sfan 18:35 sfan5 dumb confirmed then 18:35 * pgimeno facepalms 18:36 MTDiscord it looks like the tests pass 18:37 MTDiscord how should I add an isalnum test though? Minetest sets the locale to C, which means that it should usually work 18:38 pgimeno hm yeah, it would need changing the locale before that test, and returning it back to C after 18:38 pgimeno \xE1 is á 18:38 sfan5 I don't consider that necessary, we know that we're not using isalnum 18:39 pgimeno that's alphanumeric in a Latin 1 locale 18:40 MTDiscord pushed pgimeno's tests 18:44 pgimeno from what I find, \x is followed by any number of hex digits in the C++ standard, and indeed in gcc, \x0E1 generates the same as \xE1 18:45 pgimeno so, my fault, I should have taken that into account 22:02 pgimeno I've just noticed that I missed a test that checks incomplete padding, e.g. "AA=" 22:05 pgimeno itI guess it should not validate, but it depends on the interpretation, since a string with no padding can also be seen as a string with incomplete padding 22:06 pgimeno s/itI/I/ 22:29 pgimeno otia, se ha adelantado la floración de los cerezos en Japón por el cambio climático 22:30 pgimeno difícil negarlo a estas alturas (el cambio climático) 22:39 appguru ? 22:50 DS-minetest who is otia? 22:51 DS-minetest and why should we care about the japanese cherry blossoms? 22:53 pgimeno wrong channel, sorry