Time Nick Message 03:11 VanessaE anyone awake? I really need someone else to take a look at my biome_lib code 03:12 VanessaE not just to help me find the cause of mapblocks occasionally (and thankfully, rarely) ending up unpopulated by plants, but also to test the non-minetest_game option (clone, apply this patch over master, see the bottom of API.txt, https://gitlab.com/VanessaE/biome_lib/-/snippets/2097514) 03:14 VanessaE also I wouldn't mind if someone could compare generating speed at 353ca0cb or older, against how it is now at HEAD (for me, HEAD definitely feels faster) 03:15 VanessaE second opinions and all that. 03:37 MTDiscord Hi 03:37 MTDiscord you need help debugging is that it? 03:42 VanessaE yeah 03:43 VanessaE the "unpopulated" part is debugging, the others are just that I need someone who can test things and give me an objective opinion 03:44 VanessaE (actually, I suppose I'm really asking for a SUBjective opinion on the speed question ;) ) 03:45 MTDiscord (ok, the unpopulated happens with the patch applied or without it?) 03:45 VanessaE the patch I mentioned is unrelated 03:45 VanessaE this is three separate, unrelated questions/issues 03:45 MTDiscord ok, sorry now I'm lost \o/ 03:46 VanessaE heh 03:46 MTDiscord let me see if I got 1) check from HEAD if I can reproduce some unpopulated blocks 2) check if head is faster than 353ca0cb and 3) peer review and test the patch --- I got them right? 03:48 VanessaE if you're inclined to help, try this: clone plantlife and biome_lib (https://gitlab.com/VanessaE/plantlife_modpack and https://gitlab.com/VanessaE/biome_lib). Install. Create a new world (minetest_game, preferably with the flat mapgen), and enable those two mods. Test, observe how fast it is. Now roll biome_lib back to commit 353ca0cb, delete your map.sqlite, and go again 03:48 MTDiscord Perfect! I'll give it a got 03:48 MTDiscord *go 03:49 VanessaE (to me 353ca0cb is much slower than HEAD, which is what I'm hoping is the case for others) 04:12 MTDiscord I'm not very good at testing... I used my notebook in single player and it kind of felt the same to me ? 04:12 VanessaE huh 04:13 MTDiscord My test mode was not ideal tho, I randomly walked with fast mode 04:13 VanessaE well as long as 353ca0cb definitely isn't faster :) 04:13 VanessaE the difference might not be too apparent in singleplayer I guess 04:14 MTDiscord Do you have some map or seed that could trigger the most of biome generation? 04:14 VanessaE the gaol is to reduce apparent lag as everyone else sees it, if and when some chowderhead goes off into neverland and starts thrashing the mapgen to make new terrain 04:15 VanessaE well I used the flat mapgen, which happens to make lots of grass 04:15 VanessaE seed...um 04:15 VanessaE *checks* 04:15 MTDiscord I used 1 with flat mapgen, and behave like the crowderhead but as I as also the other player I probably just saw myself lagging myself 04:16 MTDiscord I'm not sure what I typed actually makes sense ¬¬ 04:16 VanessaE 5791653907587404959 04:16 VanessaE there we go 04:16 MTDiscord cool 04:16 MTDiscord I'll reset things, testing the 353 first this time 04:16 VanessaE it makes sense :) 04:17 VanessaE except it's cHowderhead, not cRowderhead ;) 04:17 MTDiscord lol thanks! 04:18 MTDiscord I was feeling crowded 04:18 VanessaE heh 04:23 MTDiscord so I can't paste the seed ... 04:23 VanessaE split into 4 digit groups so you can type it in: 5791 6539 0758 7404 959 04:23 VanessaE (well 4's and a 3) 04:33 MTDiscord ok, now I could see that HEAD was indeed faster 04:33 VanessaE oh good 04:33 MTDiscord on shutdown, from master, I noticed a higher time, and picked this message: 2021-03-30 01:31:59: INFO[Main]: Executing shutdown hooks [biome_lib] Stand by, playing out the rest of the aircheck mapblock log (there are 10175 entries)... 04:33 VanessaE that's pretty normal 04:34 MTDiscord cool 04:34 VanessaE 1 chunk is 125 entries 04:34 VanessaE so that ^ would be around 9 or 10 entries as reported by 353ca0cb or earlier 04:35 MTDiscord grep 'Stand by' *.log -A 1 353.log:[biome_lib] Stand by, playing out the rest of the aircheck mapblock log 353.log-(there are 12 entries)... -- HEAD.log:[biome_lib] Stand by, playing out the rest of the aircheck mapblock log HEAD.log-(there are 10175 entries)... 04:35 VanessaE it shouldn't take more than a few tens of seconds on a slow machine 04:35 MTDiscord I have the verbose log of both runs, if they help somehow? 04:35 VanessaE nah, don't need it 04:36 VanessaE I didn't add any debug statements related to the faster code 04:36 MTDiscord it ware a few tens of sec. indeed... I'm not sure my machine is "fast", but it's not slow (Ryzen 7 3700U with 16G RAM) 04:37 VanessaE I figured in normal use, even if someone goes off and tortures the mapgen, they won't last very long before they either get bored and sign off, or they find an area to play in, either way the mapgen will probably settle back down to idle before the next regular shutdown 04:38 VanessaE so that hook usually won't have anything to do 04:38 MTDiscord makes sense 04:38 MTDiscord oh, I see... the second time I waited less time before shutting down, that is why it took more time right? 04:39 VanessaE man I can't math 04:39 MTDiscord neither do I... 04:39 VanessaE 10000 odd entries now is 80ish under the old code 04:39 VanessaE that's a LOT 04:40 MTDiscord I am considering to write a small script to test before-after and record 04:40 MTDiscord would that be useful? 04:40 VanessaE during my tests I've never managed to get more than 50 or so "old" entries stacked up (typically about half that) 04:40 VanessaE do you just have a really fast flight configured or something? :) 04:40 MTDiscord maybe? 04:41 VanessaE my machine must be slower than I thought then :) 04:41 MTDiscord I do have some waaaay to far view distance (or something) in my conf 04:41 VanessaE Phenom II X6 1055T, 2.8 GHz (it's 6 cores but of course MT can only use one when Lua is involved) 04:41 MTDiscord doubletap_jump = false aux1_descends = false menu_last_game = minetest autojump = true screen_w = 1291 screen_h = 945 remote_port = 30000 name = pedro address = mercurio.ronoaldo.net fast_move = true keymap_cmd_local = KEY_PERIOD maintab_LAST = local enable_fog = true noclip = false viewing_range = 500 keymap_decrease_viewing_range_min = KEY_MINUS keymap_increase_viewing_range_min = KEY_PLUS mute_sound = false free_move = false 04:41 MTDiscord pitch_move = true fixed_map_seed = 5791653907587404959 selected_world_path = /home/ronoaldo/Software/minetest/minetest-5.4.0-ronoaldo-linux/bin/../worlds/biomeworld mainmenu_last_selected_world = 3 mg_name = flat world_config_selected_mod = 3 language = pt_BR fullscreen = false enable_damage = true creative_mode = false mgflat_spflags = nolakes,nohills,nocaverns enable_waving_plants = false fsaa = 0 anisotropic_filter = false mip_map = false 04:41 MTDiscord enable_waving_water = false tone_mapping = false trilinear_filter = false bilinear_filter = false leaves_style = fancy enable_waving_leaves = false enable_shaders = false node_highlighting = box mg_flags = light,nodecorations,ores,nocaves,biomes,nodungeons 04:41 VanessaE I guess a Ryzen 7/3700 is like 3-4x as fast 04:42 MTDiscord I am terrible with hardware so I don't know for sure ... I barelly know the CPU version or something 04:42 VanessaE you might want to limit your paste size when you're in the "IRC" channels there on the discord 04:42 MTDiscord oops sorry 04:43 VanessaE anyway, as long as the new code feels faster, it's doing its job :) 04:43 MTDiscord it does for my tests now 04:45 VanessaE oh yeah... if I let it get way behind and then quit without letting it catch up, 04:45 VanessaE (there are 21839 entries)... 04:45 VanessaE heh 04:45 VanessaE took about 20s for it to finish. 04:46 MTDiscord yeah, but this test was just an edge case tho, on real world usage this would not happen at shutdown 04:46 VanessaE (maybe 30, I didn't time it closely) 04:46 VanessaE yeah, that was flat mapgen, flying at full speed and not looking back or stopping, then quitting without pausing more than a moment 04:46 VanessaE worst possible case 04:47 VanessaE 20-30s to process 21839 action entries is pretty good 04:47 VanessaE :) 04:47 MTDiscord indeed 04:47 MTDiscord it's like 1000 entities/s 04:47 VanessaE entries 04:48 MTDiscord entries makes more sense .... 04:49 MTDiscord ok, out of curiosity, from here https://gitlab.com/VanessaE/biome_lib/-/snippets/2097514#LC123 04:49 MTDiscord why not initialize all the default replacement tables like the final ones (c3, c4 and c5)? 04:50 VanessaE because string.split() returns a table, {foo, bar, baz, meh} if given "foo,bar,baz,meh" as in input, and those last three can take the tables in that form 04:50 MTDiscord c1 and c2 are initialized with if/else blocks but the c3-c5 ones are initialized with an oneliner 04:51 MTDiscord hmm, c1 and c2 are string:bool "maps" right? 04:52 VanessaE but the first two need tables in the form of {["foo"] = true, ["bar"] = true,.....} so that I can just do test = "foo" if table[test] then.... i.e. if the element specified by 'test' is present at all in the table 04:53 VanessaE (like at like 139 of the snippet) 04:53 MTDiscord ok 04:53 VanessaE line* 04:53 MTDiscord got it 04:54 MTDiscord the only "edge" case I see is if strings.split("default:dirt, default:air") is used, second entry will have a leading space 04:54 MTDiscord is a trim needed? 04:54 VanessaE string:bool maps.. um.. maybe. :) there's a name for this kind of {["foo"] = true, ...} table but I can't remember it 04:54 VanessaE I think spaces are stripped-off? 04:55 VanessaE * `include_empty`: boolean, default: `false` 04:55 VanessaE I assume that trims whitespace as well as things like foo,,,bar 04:56 VanessaE (and if it doesn't, well, the user should remove the spaces from the minetest.conf entry ;) ) 04:56 luk3yx VanessaE: It doesn't look like it does trim whitespace 04:56 VanessaE ok. 04:56 VanessaE maybe I can just use that string.trim() call 04:57 VanessaE https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L3235-L3244 04:57 VanessaE maybe not 04:58 MTDiscord I tought that was a lua stdlib function. It's defined by minetest right/ 04:58 MTDiscord ? 04:58 luk3yx Both string.trim and string.split are defined by Minetest 04:59 luk3yx They're defined in https://github.com/minetest/minetest/blob/6c9be39db0d8ae2759cc8d6d5c4b952d13cf4f64/builtin/common/misc_helpers.lua#L171-L208 05:01 VanessaE local function trim(s) 05:01 VanessaE local s1=string.gsub(s, ", ", ",") 05:01 VanessaE return string.trim(string.gsub(s1, " ,", ",")) 05:01 VanessaE end 05:01 VanessaE that ought to cover it. 05:01 luk3yx And string.trim doesn't work? 05:01 luk3yx You'd have to run it over every list entry in split 05:01 VanessaE it just says it drops leading and trailing whitespace 05:02 luk3yx Say `for k, v in ipairs(my_list) do my_list[k] = v:trim() end` 05:02 VanessaE not if I trim the string before splitting it. 05:02 MTDiscord the issue is that the split will produce intermediate values that need to be trimmed 05:02 VanessaE e.g. string.split(trim(s)) (trim being the above funt) 05:03 luk3yx So if you wanted to use string.trim you'd have to iterate over the result of string.split 05:03 VanessaE no 05:03 luk3yx But otherwise making your own trim function is probably easier 05:03 VanessaE string.gsub will perform its substitution across the WHOLE string 05:03 MTDiscord what about local s = strings.split ; then use biome_lib.default_water_nodes[s(i)] = true 05:03 VanessaE not just the first match. 05:04 MTDiscord spaces are ilegal in node names right? 05:04 VanessaE yep., 05:04 VanessaE but they're legal in table keys. 05:04 MTDiscord ok, full replace before split fixes that 05:04 VanessaE so I have to pack the string before splitting it into a table. 05:05 MTDiscord what is pack the string? 05:05 VanessaE as in pack out the spaces 05:05 VanessaE compact 05:05 MTDiscord ok, got it... why not just plain replace(" ", "") from the cfg value then split? 05:06 VanessaE eh? 05:06 VanessaE oh, string.gsub can use an empty string as the replacement? 05:07 MTDiscord sorry, I'm new to lua but most string subs allow that, It may not be the case ? 05:07 VanessaE it can. 05:07 VanessaE > =string.gsub("foo bar baz", " ", "") 05:07 VanessaE foobarbaz 2 05:07 VanessaE that simplifies it a bit :) 05:07 MTDiscord cool ? 05:07 MTDiscord ok, so edge case fixed then. 05:08 MTDiscord LGTM 05:09 VanessaE there, reload the split 05:09 VanessaE er 05:09 VanessaE there, reload the *snippet* 05:10 VanessaE (I guess you have to re-download it, git reset biome_lib to HEAD, and re-apply it) 05:12 MTDiscord I did not applied the patch, was just reading the diff ? 05:12 VanessaE ok :) 05:13 VanessaE thanks for catching that though :) 05:14 MTDiscord ok, so 2/3 help, it's 2am now I'll go sleep before I start typing stranger things 05:14 VanessaE good night :) 09:53 celeron55 offtopic but interesting https://helplbrysavecrypto.com/ 09:56 sfan5 I thought "crypto" meant cryptography, weird ;) 10:09 VanessaE it still does :P 10:15 MTDiscord Is configuration being a pain again? 10:56 rubenwardy Cryptocurrency does seem more like a security than a currency 10:56 rubenwardy Blockchain bros are so cringe 11:06 rubenwardy https://twitter.com/SaishyKitty/status/1368999942061236232 16:37 Krock no idea how the camera works but I'm getting there sooner or later. https://krock-works.uk.to/u/rotations-2021-03-30_18.36.15.mp4 16:56 Krock https://krock-works.uk.to/u/rotations-2021-03-30_18.56.01.mp4 16:56 Krock how about that 17:03 Krock uhm it's kinda glitchy when colliding with stuff. not sure if depending it on the movement direction is a good idea 18:03 rubenwardy What is that? 18:09 Krock rubenwardy: alternative 3d view, using the same rotation and control mechanisms as seen in other games 18:10 Krock but since there's no "focus lock" for actions (dig, place, punch), it's just pure eye candy at best 18:19 MTDiscord That seems like it could be rather helpful for certain types of games, I feel like adding intractability would be worthwhile 21:22 MTDiscord Krock: one flaw, it applies with first person attachments 21:22 MTDiscord Is that really a flaw? 21:22 MTDiscord Sounds like a feature™️ 21:31 MTDiscord dewpends 21:31 MTDiscord depends even 21:31 MTDiscord IRL you sidestep 21:32 MTDiscord not rotate your body 90 degrees 21:32 MTDiscord if it only applies to local players that's fine