Time Nick Message 04:30 SwissalpS good practice question: if an event only needs to run every 5 minutes, is it better to use minetest.after() loop or add a globalstep? 09:17 sfan5 minetest.after()'s event tracking code has to run anyway so that's technically better 09:48 SwissalpS thanks sfan5 :) 10:48 sunyibo I'm setting up a debian server for minetest. Where do I find my minetest directory? 10:48 sfan5 if you installed from apt I think that'S /var/lib/minetest 10:49 sfan5 maybe /var/lib/minetest/.minetest/ or smth 10:49 sunyibo thanks 11:11 sunyibo so I set up a server. How can I make it appear in the minetest 'Join Game' list? 11:15 sfan5 enable the server_announce setting and also make sure the game port is externally accessible 11:25 MTDiscord to be more specific {server_address}:{port} is externally accessible 16:09 MTDiscord Why would minetest.after be "tehcnically better"? 16:09 MTDiscord First of all, you miss out on the actual dtime 16:10 MTDiscord Second, it's usually not even less code 16:11 MTDiscord And third, I don't think that it's necessarily faster 16:11 MTDiscord Waits for modlib shill.... 16:11 MTDiscord There is one special case in which it could theoretically be faster 16:11 MTDiscord wsor: Yes, modlib has a heap-based after, which is pretty dope 16:11 MTDiscord The nice thing about minetest.after() is that if you no longer need a timer, you can just not register it again and its footprint becomes zero. If you're going to need a timer indefinitely though, then globalsteps are actually a bit better because there are inefficiencies in .after()'s scheduling that would show if you have a ton of stuff queued. 16:12 MTDiscord Not to mention the odd "reverse order of execution" 16:12 MTDiscord If you need your globalstep to run after those of other mods, you can hardly use after-loops for that 17:16 sfan5 the "technically better" was based on it having a lower footprint 17:34 MTDiscord Lower footprint? How so? 17:34 MTDiscord I'm pretty sure it has a higher memory footprint 17:34 MTDiscord Globalstep: One function, which is inserted in the registered_globalsteps table with one upvalue (timer) 17:35 MTDiscord minetest.after: One function, which has itself as upvalue, entry in minetest.after "queue" with empty argument list, timer and func fields 17:54 MTDiscord If your constantly running something, just use a globalstep. If your only running something because it was triggered by something else, use minetest.after. 17:54 MTDiscord *you're 17:55 MTDiscord The performance differences under sane circumstances are negligible 17:56 sfan5 @luatic because you do not add to the already numerous functions ran every globalstep 17:56 sfan5 whether this matters, debatable 18:47 MTDiscord sfan5: you do add to those, just that it is nested in yet another globalstep - which for instance reduces profiler helpfulness 18:48 sfan5 I thought it could profile those? 18:48 sfan5 if not that's an oversight in the profiler 18:56 MTDiscord sfan5: the profiler can't hook minetest.after loops comfortably 18:57 sfan5 depends on what comfortably means 18:57 MTDiscord well, with all the register_* functions it's pretty trivial: just wrap the func in a func that measures the time 18:58 MTDiscord minetest.after is intended for one-off-jobs though 18:58 MTDiscord so how should they be aggregated? 18:58 MTDiscord all the minetest.after callbacks per mod? 19:18 Bombo is it possible to toggle creative mode on a running server? without restarting? 19:19 MTDiscord technically yes 19:19 MTDiscord you will probably end up in a half broken state however 19:20 Bombo hm /privs shows i have 'creative' 19:20 MTDiscord to explain you can change the setting via the api or /set, but issues can arises for things not dynamically updating 19:22 Yad Is resume support for `git clone` still an unsolved problem? My reading on the topic suggests it was a known issue in 2010. 19:23 MTDiscord ....resume support?.... 19:24 MTDiscord I've rarely run into problems with it, but if you find an answer, I'm actually curious too. 19:24 Yad Jonathon: As in how the `pack` file is rather large. 19:24 Yad Warr: Nice! 19:24 MTDiscord Though tbh downloading the pack is usually less of an issue for me than just the server crapping out trying to make a pack. 19:25 MTDiscord I think at least one mitigation I've found is creating the repo, adding the remote, and then using fetch instead of clone, which gives you more options like pulling earlier commits and then working your way forward through the tree piece by piece. 19:25 Yad Here's the discussion I'm reading https://stackoverflow.com/questions/3954852/how-to-complete-a-git-clone-for-a-big-project-on-an-unstable-connection 19:25 Yad Warr: oooh, I'm not familiar with `fetch` :D 19:25 MTDiscord MOSTLY what I've done is create the repo and setup the remotes, and then just keep retrying the fetch until it goes through once, and like 99.9% of the time that works eventually. 19:26 MTDiscord Git clone is ALMOST just an alias for making a dir, doing a git init in it, setting up a remote, and then doing a git fetch and then git checkout inside, with the difference that if any of that fails, git clone will try to clean up everything 19:26 Yad Warr: It's not necessarily failure I'm dealing with, just slow speeds and the need to pause and resume the download so I can use the bandwidth for other tasks. 19:26 Yad Wow that's good to know! 19:27 MTDiscord seems you could make a simple script to run through a queue of stuff to clone while your asleep? 19:27 MTDiscord Most of the tools you use with git are themselves made of other smaller tools that you also have direct access to, so to some extent it's possible to break up the work into smaller chunks, though not always easy. 19:28 MTDiscord The one place where it fails is that I don't know of any way to break apart a single object, so if the repo is reasonable-sized in every way except they added some huge mutli-GB data file, then that one file will probably always be an issue. 19:28 MTDiscord Hopefully that's rare enough though. 19:28 MTDiscord Worst case, find a thumb drive and a friend with a better connection, I guess, and then make sure you never lose your local clone. Once you've got the initial pack, things tend to get saner after that. 19:29 sfan5 Bombo: if you don't have creative enabled globally you can just revoke the privilege 19:30 Yad Well the suggestion is often to download the `pack` through another protocol with resume support, but my concern is whether Git will reject it. 19:31 Yad Hmm, `fetch` seems to be behaving much more smartly. 19:35 Yad I'm thinking maybe resume support exists but is invisible. 19:36 Yad Because the `pack` completed impossibly fast this time. 19:40 Yad Ah yep, it looks like `git fetch` is creating a separate `tmp_pack_` file for each segment. Very nice! 19:43 Yad Hmm, perhaps not. The sum of the segments is much larger than the true `pack` 19:45 Bombo thx Jonathon sfan5 it half-works :) 19:52 MTDiscord Yad: after fetching, if you have a bunch of broken temp packs, you can do a gc to clean them up 19:53 MTDiscord I don't actually know how much git really attempts to find matching objects from broken previous fetches; it's possible it does, or it's possible you were just lucky this time. 19:53 MTDiscord but if it worked, I guess it worked ? 19:53 Yad Warr: Thank you, I actually need exactly that. However the resume feature is still lacking. Hopefully fetching new commits will be faster. 19:54 Yad Warr: I'm not seeing how to say it worked, as the segment which actually got the fetch done, was the same size as the full pack 19:55 MTDiscord I mean it IS possible that git is just finding stuff in old packs and copying it in. After all, that's how repacking works: it gathers the objects, writes them into a new pack, and then eventually cleans up the old packs. 19:55 Yad Warr: I guess this just goes to show most developers work over very fast connections :P 23:37 DarkSide Hi all 23:38 DarkSide MT Forum admin online? 23:52 MTDiscord @rubenwardy hopefully worthes a ping ^