Minetest logo

IRC log for #minetest-dev, 2020-04-18

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

All times shown according to UTC.

Time Nick Message
00:54 proller joined #minetest-dev
01:02 Taoki joined #minetest-dev
01:16 ANAND joined #minetest-dev
01:18 kilbith joined #minetest-dev
01:32 nephele_ joined #minetest-dev
02:02 ANAND Haven't resolved the merge conflict yet, but #7924 is ready for testing
02:02 ShadowBot https://github.com/minetest/minetest/issues/7924 -- [NO SQUASH] Allow binding dig, place actions to keys; remove LMB/RMB hardcoding by ClobberXD
02:03 ANAND Testers (if any :P), please go through testing instructions in the first post to know what to and what not to expect while testing.
04:17 webchat-user1234 joined #minetest-dev
04:18 webchat-user1234 joined #minetest-dev
04:20 webchat-user1234 Is nerzhul/nrzkt still active in here?
04:22 webchat-user1234 I wanted to make a bug report about the android client release but the contact email listed (contact@minetest.net) bounced with no such user, and I can't find a direct email for them on their github or blog.
04:30 EvergreenTree He is pretty active on the unofficial discord: https://discord.gg/kKN5Cp
04:30 webchat-user1234 Much appreciated c:
04:33 webchat-user1234 left #minetest-dev
05:51 erlehmann_ joined #minetest-dev
06:01 calcul0n joined #minetest-dev
06:22 nerzhul joined #minetest-dev
06:35 calcul0n_ joined #minetest-dev
08:32 ANAND WIP PR #9705
08:32 ShadowBot https://github.com/minetest/minetest/issues/9705 -- set_fov: Add support for time-based transitions by ClobberXD
08:39 ShadowNinja joined #minetest-dev
10:18 Fixer joined #minetest-dev
11:15 Kimapr joined #minetest-dev
12:28 turtleman joined #minetest-dev
12:58 proller joined #minetest-dev
14:01 kilbith joined #minetest-dev
14:19 Lone_Wolf joined #minetest-dev
15:01 Lone_Wolf joined #minetest-dev
15:08 sfan5 merging #9689, #9699, #9700, #9698 in 10 minutes
15:08 ShadowBot https://github.com/minetest/minetest/issues/9689 -- serverpackethandler: Reduce pkt->getPeerId() invocations and more by HybridDog
15:08 ShadowBot https://github.com/minetest/minetest/issues/9699 -- Apply a scrollbar's default value to scroll containers by Desour
15:08 ShadowBot https://github.com/minetest/minetest/issues/9700 -- Formspec: allow lists to change size and existence while the formspec is open by Desour
15:08 ShadowBot https://github.com/minetest/minetest/issues/9698 -- script: Move SAO usability check so that it covers all functions by sfan5
15:11 absurb joined #minetest-dev
15:28 DS-minetest joined #minetest-dev
15:34 ANAND #9705 is ready for review! :tada:
15:34 ShadowBot https://github.com/minetest/minetest/issues/9705 -- set_fov: Add support for time-based transitions by ClobberXD
15:40 Kimapr joined #minetest-dev
15:49 nerzhul bunch of MR merge, find :D
15:49 nerzhul fine*
15:50 nerzhul also i have an idea of a thing which should be in builtin, i saw each mod implementing a on step global callback just to loop through players. Cannot we just have a registration implementation to do a on_step for each player directly ?
15:51 nerzhul minetest.register_player_on_step(func) => in builtin minetest.on_step() func, for each get connected players(p) => cb(p)
15:51 nerzhul this permits to drop the always same registration model and reduce core on step callback number by generating a simple way to do on_step events on playerSAO, what do you think about ?
15:52 nerzhul i think pure lua implem is sufficient for this one :)
15:52 DS-minetest there are also many mods which don't do this on every step but only eg. each 5 seconds
15:52 nerzhul yep first is to have a on_step but we can imagine add timers for players too in builtin
15:53 nerzhul DS-minetest are you able to code a such thing ?
15:53 nerzhul if yes i may write the user story in our issues
15:53 nerzhul (i'm not very huge lua coder but i may do some work if needed)
15:55 DS-minetest timers would basically just duplicate core.after, as much as player-wise on_step would duplicate on_globalstep
15:55 DS-minetest implementing such a thing in lua should be easy
15:55 DS-minetest but is the performance gain really so high?
15:56 nerzhul here it's not for performance gain but to reduce modders dup code
15:56 DS-minetest hm, right
15:57 nerzhul i'm reading various mods and looking what can be our improvement paths, and i just see that each mod with player look just call get_connected_player which if i remember locks the server thread a tiny amount of time, then we can reduce very short the core locking between ServerThread and ConnectionThreads
15:57 DS-minetest if such a thing is added, it might maybe make sense to also add other callbacks that are also there for luaentities, like on_punch
15:57 nerzhul on_punch is not already called from core direct and overwritten by various mods ?
15:58 DS-minetest oh, right, possible
15:59 rubenwardy this should have low priority
15:59 rubenwardy register_on_punch_player already exists, btw
16:00 nerzhul low priority for coredevs maybe, but if it's not difficult to implement anybody can take the time to do it
16:00 nerzhul i'm writing the user story issue
16:01 nerzhul remember that we can have priorities but that doesn't mean we discard new ideas :D
16:01 DS-minetest it would be great if such a register_on_player_step (or whatever it's called) also had collision information
16:02 DS-minetest but that's prolly unrealistic, as the server doesn't do the player collision
16:03 rubenwardy I agree with reducing verbosity
16:08 nerzhul i just opened #9707, feel free to code :D
16:08 ShadowBot https://github.com/minetest/minetest/issues/9707 -- Add minetest.register_player_on_step (or find a better name)
16:29 ANAND joined #minetest-dev
16:34 DS-minetest joined #minetest-dev
16:46 kilbith joined #minetest-dev
16:51 DS-minetest nerzhul: #9708
16:51 ShadowBot https://github.com/minetest/minetest/issues/9708 -- Add minetest.register_player_on_step by Desour
16:52 Krock will push https://krock-works.uk.to/u/patches/0001-Shaders-Complete-478e753.-OpenGL-4.3-compatiblity.patch in 10 minutes. Fixes #9675
16:52 ShadowBot https://github.com/minetest/minetest/issues/9675 -- Bug with textures of grass, mushroom and others
16:58 sfan5 nerzhul: if you mean the env lock, it is always locked when ABMs/active object on_step/on_globalstep runs
16:58 sfan5 calling get_connected_players() one instead of 20 times can save cpu time, but it is not relevant for locking
17:03 Krock pushing patch
17:03 fluxflux joined #minetest-dev
17:08 Krock > it means on each step we will serialize multiple times the the LuaRef for the same player.
17:08 Krock why is that a problem, nerzhul ?
17:09 Krock the reference already exists in Lua, thus it's probably just creating another userdata reference to it, which takes next to no time
17:09 Krock and player:is_player() in this situation must not be needed
17:11 sfan5 it doesn't even create a new reference, it's just retrieved from a table
17:11 Krock entities are retrieved from a table - players too?
17:13 DS-minetest the table returned by get_connected_players would have to be built multiple times
17:21 Krock little effort
17:25 kilbith joined #minetest-dev
17:28 sfan5 Krock: yes
17:28 Krock til.
17:46 nerzhul sfan5 yep i checked locking is not there :)
17:46 nerzhul my point is this have a convenient medium level interface to register player steps
17:46 nerzhul no sense to have dozens of get_connected players to loop through them
17:47 nerzhul this will be easier for moder to implement function on player step like this without involving the previous code
17:47 nerzhul and yes little effort, but we need to have higher level API, in builtin too, for convenience, adoption and increase global modding code quality (nice improvements on 5.1 & 5.2 guys, about that, gg)
17:48 nerzhul i will maintain my position that having low level code only is counter productive for modders and the effort here is minimal on builtin compared to the gain on each new implementation :)
17:50 Krock low level is most generic, and doesn't clutter the API
17:51 nerzhul this PR is generic
17:52 nerzhul and low level is less performant, you take time to serialize & deserialize the lua state each time
17:53 Krock what exactly is (de)serialized each time?
17:53 nerzhul here the PR is not for performance but to increase code quality on mods and easiness to implement a step on players, preventing rebuilding the world. We should really stop talking only low level. Remember also if we provide higher level API it means when we need to do a maintenance it's easier for us to prevent brekage on users implementations because their code is tiner.
17:54 nerzhul on each step you have x callbacks on step to run on the server side. Each time there is C++ to lua transformation to do the step.
17:54 nerzhul on each registered step for the player you call get_connected_player which serialize the lua refs from core to lua for each player (ok we don't have thousands of players but it's really CPU duplication effort).
17:54 Krock one kind of callback only switches once from C++ to Lua and back
17:55 Krock run_callbacks() runs them all in Lua
17:55 nerzhul then for a regular survival server, you have between 3 and 10 times the same step call with the same get connected player
17:56 nerzhul i totally understand it's not the biggest perf bottleneck of minetest, and this one will be hard to track and fix (especially if we continue to provide only low levels api)
18:00 Krock In most cases the rate is limited by time inside on_globalstep. For example: HUDs that only run checks every second
18:01 Krock and that causes too much effort when individual player callbacks are run
18:01 Krock the only place where this callback would be useful is for mods that need it to run for every single step
18:02 Krock item pickup maybe..  what else?
18:06 nerzhul wieldview use that
18:06 nerzhul factory
18:06 nerzhul hudbars, with a timer calculation
18:07 nerzhul map with a timer
18:07 nerzhul mobkit relies on it to spawn mobs it seems
18:07 nerzhul player_api in mtg
18:07 nerzhul weather in mtg with a timer
18:08 nerzhul then it sounds with a regular server with not too many mods it's already called in multiple places :D
18:08 sfan5 such a callback isn't directly usable with a timer though
18:08 Krock ^ my point
18:08 nerzhul you have per player timer
18:08 nerzhul or mod timer directly
18:08 Krock that's quite annoying to set up
18:09 Krock you don't know how many players there are, so dtime calculations mod-wide add overhead
18:09 nerzhul this is already mod wide with the timers
18:09 nerzhul (when they uses timer)
18:09 Krock found register_globalstep 52 times in 339 mods
18:09 nerzhul wow your server has 339 mods :D
18:10 Krock and only few of those can make easy use of this callback
18:10 nerzhul also remind that LuaEntitySao as a on_step call
18:10 nerzhul it's just the same thing :D
18:10 sfan5 how would I convert this code to use the new register function? http://sprunge.us/4yZDEU?lua
18:11 nerzhul and honestly we should impelment at the end this call in snc in core, because the player stepping should be run by the PlayerSAO like the LuaEntitySAO does i think :)
18:11 Krock sfan5: good example, thanks.
18:11 sfan5 other than using a timer per-player timers (for which there is no need), I don't see a way
18:11 nerzhul for this one i don't see it's exact
18:12 Krock timer = timer + dtime / #minetest.get_connected_players()
18:12 Krock easy
18:12 sfan5 nerzhul: yes, but isn't this a common case?
18:12 nerzhul oka ignore my shit, it seems i always say shit :)
18:12 Krock that will increase the timer correctly depending on the player count. but wait, wasn't this also about reducing get_connected_players calls?
18:12 nerzhul in my mods it seems it's half of the cases
18:12 sfan5 no the proposal is not bad, but the question is how many mods can really use it
18:13 nerzhul it depends on how you want to set the player ref rich or not
18:13 nerzhul currently i just see the get_connected_players calls with grep, but do we have another way to do the same thing ?
18:17 nerzhul maybe by proposing it we will see more usages on this usecase with the callback ? honestly i don't know, but if i want to run hunger and other stats steps i may use a such thing with a timer yeah
18:17 Krock https://pastebin.com/raw/FatJLZfF  25 mods that use get_connected_players() and register_on_globalstep() in the same file
18:18 Krock not even 25 mods. and some of them are timer-limited
18:20 nerzhul is the new way appliables on some cases ? most of them or none ?
18:22 Krock checked half of them..  no suitable place found yet. I thought at least wield3d.. but that also uses a timer
18:22 sfan5 areas also uses a timer doesn't it?
18:24 Krock yes it does. not keen checking the rest, but I don't think any of those runs the code for every step
18:26 nerzhul okay then it sounds non coverable need, except if we add timer support in fact
18:26 Krock I think that was already planned as an extension to minetest.after
18:26 nerzhul maybe that can do the trick with embedded timer support, is this possible to update the current implementation without craziness to add that ?
18:26 Krock to add "jobs"
18:28 Krock #6118
18:28 ShadowBot https://github.com/minetest/minetest/issues/6118 -- Add named queuing system by octacian
18:28 Krock actually no, it's not that PR
18:39 GreenXenith joined #minetest-dev
19:05 Wuzzy joined #minetest-dev
19:35 nephele_ joined #minetest-dev
19:40 Kimapr joined #minetest-dev
20:02 fluxflux joined #minetest-dev
20:55 benrob0329 joined #minetest-dev
21:04 Kimapr_ joined #minetest-dev
21:12 sfan5 // Ordered for size, please do not reorder
21:13 sfan5 [later in the struct]: a shared_ptr and SColor after an u8
21:21 kilbith joined #minetest-dev
21:24 kilbith so we have benrob0329 -- a guy with zero contribution -- who dares to kick me on -hub
21:24 kilbith *clap*
21:25 rubenwardy not undeserved
21:25 kilbith you think so?
21:26 kilbith but if it's the case, maybe it's time for me to retire
21:27 kilbith -but
21:31 nephele_ what did you do for benrob to kick you? o_0
21:32 kilbith doesn't matter, that's the final end for me here
21:32 rubenwardy Jordach was wrong to say what he did, but your reaction was more than disproportionate. Your contributions don't make you immune to the rules
21:32 rubenwardy and... mised
21:32 nephele_ :(
21:33 rubenwardy Context: https://rwdy.uk/SN4yb.png
21:34 nephele_ benrob has a minetest channel on discord huh
21:36 benrob0329 It's not mine, but I am a mod there.
21:38 nephele also... 0 contributions? so... do i get more street cred, for having like half a contribution?
22:04 Lone_Wolf joined #minetest-dev
23:35 turtleman joined #minetest-dev
23:48 Taoki joined #minetest-dev
23:51 Sokomine joined #minetest-dev
23:58 Miner_48er joined #minetest-dev

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