Time Nick Message 00:44 cmdskp Add find_total_nodes_in_area with optional limit: https://github.com/minetest/minetest/pull/3517 01:06 sofar Nice! 02:49 gregorycu Hello 02:49 gregorycu I wasn't aware netsplits were still a thing 02:49 sofar Ohhhh yes 02:50 sofar Not a daily thing but still happening 02:51 gregorycu I'd like to announce that I'm taking a break from minetest 02:51 gregorycu For about one hour 02:52 gregorycu I had you all worried didn't I 02:54 * VanessaE growls at gregorycu 02:56 gregorycu Too soon, sorry 02:57 gregorycu So, I spend up tree generation by like 70% 02:57 gregorycu Actually, let me be clear with the maths, it takes like 60% of the time it used to 02:57 VanessaE nice 03:04 * Fritigern would love to see that in action 03:51 VanessaE hmmmm: OOM crashes seem to be on the upswing. can something be added to the engine to tell the coder how much was *attempted* to allocate at the time? 03:51 VanessaE (as opposed to only the current usage) 03:52 sofar the failing allocation size should be dumped 03:52 VanessaE perhaps also which mod it was that attempted the allocation (if different from what's already reported) 03:54 sofar do people not use static in C++? 03:54 VanessaE idk 03:56 sofar seems silly to export functions to symbols if they're only used in the same cpp file. kinda goes against my coding ethics :) 04:29 gregorycu OOM? 04:30 gregorycu sofar: I generally agree with what you say 04:30 gregorycu In C++ however, there is a thing called anonymous namespaces 04:30 gregorycu Which are a little different but can serve the same purpose 04:33 sofar can we have a style comment about where to place opening { braces ? 04:33 sofar in http://dev.minetest.net/Code_style_guidelines 04:37 hmmmm VanessaE: no it can't, unless you modify the lua runtime library 04:37 hmmmm sofar: is it not self-descriptive? 04:38 sofar there's nothing explicit about where to put the opening brace 04:38 sofar I see plenty of code where it's 04:38 sofar if () { 04:38 sofar but also lots of 04:38 sofar } 04:38 sofar else 04:38 sofar { 04:39 hmmmm before the code style was unified, people did whatever they felt like 04:39 gregorycu It's unclear, I use that ambiguity to not give a shit about it 04:39 sofar lol, fair enough 04:39 sofar BUT IF IS NOT A FUNCTION 04:39 sofar lol 04:39 hmmmm our official code style is inherited from the linux kernel style 04:40 sofar yeah, that makes me happy 04:40 sofar since I've worked so much with it in the past 04:40 hmmmm i.e. the most common, non-weird, non-annoying style prevalent on the internet 04:40 sofar plus a ton of related projects I've worked with use it too 04:40 hmmmm { on the same line as the thing if it's not a function definition 04:40 hmmmm { on a separate line if it's a function definition 04:41 sofar that's what I tend to use 04:41 hmmmm right, it was chosen speficially because the majority of people use that 04:43 hmmmm paramat: will look into that, but can you summarize what it does for me? 04:44 hmmmm from what I understand, this generalizes liquid flowing so that it doesn't only flow into CONTENT_AIR, but rather any node that's marked as floodable? 04:44 sofar hmmmm: that's pretty much it - other air like nodes 04:45 hmmmm at first glance the implementation looks right 04:45 hmmmm except I think it's missing something 04:47 hmmmm paramat, the builtin definition of CONTENT_AIR is missing f.floodable = true 04:54 sofar you'd think that he'd have tested normal air 04:54 sofar ;^) 05:20 paramat hmmmm > "this generalizes liquid flowing so that it doesn't only flow into CONTENT_AIR, but rather any node that's marked as floodable?" correct 05:20 paramat thanks i hadn't thought of making "air" floodable 05:20 paramat currently it checks for 'air' or floodable 05:21 paramat so i can reduce that to 1 check 05:27 paramat my plan is to modify mgv5 first to use the 'mapgen air' alias (it seems suitable for alien terrain) and see what issues arise with the use of custom atmosphere or vacuum nodes 05:43 hmmmm errm speaking of which, all the mapgens still use CONTENT_AIR 05:43 hmmmm you need to make a PR that gets c_air from mapgen_air 05:44 sofar yikes, I need to touch collisionMoveSimple for this PR 05:44 hmmmm ugly function huh 05:44 paramat yeah i know 05:45 sofar not only that, I had it all coded up for content_mapblock.cpp, but none of the data I need is used or passed into collisionMoveSimple 05:45 hmmmm all the "old" code are in monolithic, huge, thousand-line functions 05:45 sofar so now I need to track down where to get handles to those bits for 05:45 hmmmm presumably celeron took this from carmack's advice to not create a separate function for code used only once 05:46 hmmmm that only works if you have code folding in your editor, use it, and also the code regions need to be well encapsulated for this strategy to work - but I still can't find any solid evidence that there's an advantage to doing so 05:46 sofar I'm pretty guilty of making it worse in PRs 05:46 sofar how do I split this out? nahhhh, copy+paste 05:46 hmmmm refactoring large functions into smaller functions is good because it makes things more easily testable 05:47 hmmmm it gives you a clear indication of what the inputs and outputs are 05:47 hmmmm etc. 05:47 hmmmm it's so much cleaner. I know carmack said so but carmack is not always correct 05:47 hmmmm if john carmack told you to jump off a cliff would you do it? 05:47 sofar minetest is already incredibly more complex than doom ever was 05:47 gregorycu carmack 05:48 gregorycu *sigh* 05:52 gregorycu hmmmm: Is there an area of code where performance is a real concern 05:52 gregorycu Apart from all of it 05:52 hmmmm see the real problem with minetest performance are the algorithms themselves 05:53 hmmmm all the low hanging fruit has been picked by this point 05:53 gregorycu I have some lighting optimisations here 05:54 gregorycu Exceptions in tight loops is not fun 05:54 hmmmm oh yeah - there's one thing 05:55 hmmmm lots of 'coding by exception' in old code - it caused bugs and performance issues 05:56 hmmmm it exists in the network processing loop as well for returning status codes 05:56 gregorycu *sigh* 05:56 gregorycu That's certainly something I can fix up 05:56 paramat is there proof that the change to 'normal verticies' affects performance even when shaders are disabled? 05:57 hmmmm yup 05:59 paramat i was thinking of bisecting and profiling that 06:02 hmmmm i already did just that, it's a 25% perf difference 06:02 paramat personally i feel the types of shaders that enabled are not, erm, visually suitable 06:03 gregorycu https://github.com/minetest/minetest/issues/3430 06:03 gregorycu paramat: "The moretrees shadows are a different issue, caused by using l-system generation during mapgen. before the mapchunk above has generated." 06:03 gregorycu What's the solution for that? 06:04 paramat that's the fault of moretrees mod, it should place saplings that grow later 06:04 gregorycu I don't know if I agree 06:05 gregorycu Has this got to do with trees specifically? 06:05 paramat however, if updateLighting finds an ungenerated chunk above, it should assume light if above water_level 06:05 paramat .. like everything else in MT 06:07 paramat maybe not specifically l-system trees, maybe more updateLighting running too soon after mapgen, when neighbouring chunks are still ungenerated 06:07 sofar ohhh that's sneaky, collision boxes for the fence are just -1/2,1/2 06:07 * sofar curses 06:08 * sofar fails at making proper collision boxes 06:09 paramat another shadow bug sometimes arises if many saplings grow rapidly in a short time, ie rapid use of updateLighting 06:10 gregorycu ? 06:10 VanessaE sofar: if you're working on that revision of how fences connect, PLEASE make the collision boxes fit the fences 06:10 sofar VanessaE: that's what I'm attempting 06:10 VanessaE ok 06:10 paramat a sapling growing into a tree uses 'place schematic' which calls 'update lighting' 06:11 gregorycu I don't understand how a lot of calls in quick succession can break it 06:11 * paramat doesn't either 06:11 VanessaE paramat: thread-unsafe? 06:12 VanessaE (just a random guess; sounds a lot like a race condition) 06:12 paramat maybe, i don't understand that stuff much 06:13 gregorycu All the calls happen in the one thread 06:14 * sofar oooohs some more in hope 06:14 blert when you get time would you please take a look at this... https://forum.minetest.net/viewtopic.php?f=6&t=13826 ... and tell me if you think the problem lies with LuaJit, Intel's drivers or something in minetest? thanks 06:15 paramat btw the shadows at y = 63 are caused by mapgen lighting calculations and are a separate issue, don't concern yourself with that 06:16 gregorycu oh 06:16 paramat yes luajit has a low memory limit, causes OOM 06:16 paramat one of my lua mapgens is enough to cause OOM due to use of noise 06:17 paramat mapgen has a seperate, faster set of lighitng code 06:17 sofar VanessaE: works! you can stand right up to the fence model I made and walking over it you go slightly up-and-down when you hit the pole vs. the rod connecting 06:17 * sofar does a YESSS 06:17 VanessaE sofar: good deal 06:18 VanessaE that's been something of a pet-peeve for me for the longest time :) 06:18 sofar checking localplayer.cpp next 06:18 VanessaE sofar: https://www.youtube.com/watch?v=CQTq88Ie5sU 06:18 VanessaE :) 06:19 sofar unfamiliar cultural phenomenon 06:20 VanessaE that's the tune my husband or I will sing whenever something goes exceptionally right. 06:20 VanessaE (the tra-la-la part anyways) 06:21 sofar I got that part :) 06:21 VanessaE (and now, you have the tune stuck in your head. :) ) 06:22 sofar my wife is sitting next to me watching facebook cat videos 06:22 sofar you're no match for her 06:22 VanessaE heh 06:22 VanessaE oh really? 06:22 VanessaE don't make me pull out URLs for videos involving blowing shit up, melting things, etc :) 06:22 VanessaE anyways, 06:23 sofar my has a grad in nanotechnology and physics 06:23 * sofar hears 06:24 VanessaE nah 06:29 sofar sweet, collision boxes are working nicely. sneaking works well as well. I'm not sure why I don't need to modify localplayer.cpp but it works fine 06:29 gregorycu So, I've made tree spawning faster by speeding up the lighting functions some more, paramat & hmmmm, what lighting related activities do you want me to do to test performance 06:29 gregorycu paramat: You've mentioned lava before 06:31 paramat l-system is faster due to faster 'update lighting'? 06:32 hmmmm gregorycu: if you want, you could optimize 3d perlin noise with NEON 06:32 hmmmm ;-) 06:32 paramat erm, perhaps test something with lots of light sources (because of the results i got) 06:33 paramat maybe a big l-system tree with glowing leaves or something 06:33 gregorycu I can do that 06:34 gregorycu treegen::spawn_ltree calls updateLighting 06:34 gregorycu In fact, updateLighting is 98.5% of the cost of spawn_ltree 06:35 sofar VanessaE: http://i.imgur.com/rRKZ1lR.png 06:35 paramat i'm still concerned about my apparent slowdown result when 350 glowing ores were present 06:35 sofar notice the 2 entities are right on the bars 06:35 VanessaE I see them 06:35 VanessaE nice 06:35 gregorycu That's fair enough 06:36 gregorycu It was a 112^3 chunk though 06:36 gregorycu Maybe I should make a massive tree with 350 glowing leaves? 06:36 paramat yeah, a rare use case 06:36 VanessaE 350 is "massive"? 06:36 VanessaE heh 06:36 VanessaE try 3000 06:36 gregorycu huh? 06:37 gregorycu Does such a thing already exist? 06:37 sofar just plant a spruce or sequoia from moretrees. Those crater your memory. 06:37 VanessaE I recall PilzAdam saying once that harvesting a single moretrees tree yielded him something like 2000 nodes. 06:37 gregorycu 2k? 06:37 * gregorycu runs it again 06:37 VanessaE something like that 06:37 sofar I cut down the wood in a spruce the other day. It gave me 250 trunk nodes and my diamond axe was completely USED UP 06:39 gregorycu Doesn't look like 2k 06:40 gregorycu Can I increase the size of these trees easily? 06:40 VanessaE turn up the number of iterations 06:40 VanessaE that'll increase the node count, to a point 06:40 VanessaE or add extra terms to the axiom and rules lines 06:40 VanessaE e.g. additional F's 06:40 gregorycu I want to approach lighting calculations to something near 1M 06:41 VanessaE erp 06:41 VanessaE I think you'd be better off spawning a few hundred trees in a small area 06:41 gregorycu I can't, because that's 100 calls to update lighting 06:41 gregorycu I need one massive call 06:41 VanessaE true 06:42 sofar easy enough ... use worldedit to create a schematic with lots of lights in it 06:42 sofar maybe use the random function? 06:43 gregorycu I don't exactly understand what schematics are 06:43 sofar spawn e.g. 20% glowstone 30% stone ? 06:43 sofar you do //1 //2 around the extremities 06:44 sofar then //mtschemcreate huge-thingamabob 06:44 sofar then in your test setup, do //1 in a spot, and //mtschemplace 06:44 sofar I believe that automatically calls updatelight 06:45 celeron55 07:45:37 <+hmmmm> presumably celeron took this from carmack's advice to not create a separate function for code used only once 06:45 celeron55 uhm 06:45 gregorycu You're in trouble now hmmmm 06:45 VanessaE busted :) 06:45 sofar large fish for sale 06:45 sofar large fish for sale 06:45 sofar get it fresh 06:47 celeron55 i don't know where the hell you got that from, but the actual reason for code like that is a design meant for a much simpler program bloated up by new features made by mostly other people than myself 06:47 paramat schems allow saving a cuboid of world as a file, then spawning that anywhere with 'place schematic', which calls 'update lighting' 06:47 hmmmm i'm pretty sure i got that from you, lol. 06:48 hmmmm a long time ago you said it 06:48 celeron55 i have said that, but in most cases it's not what has happened 06:48 celeron55 well 06:48 celeron55 i haven't quoted carmack for that 06:48 celeron55 but anyway 06:48 sofar eh, don't fret too much about it. just don't ever look at the kernel code I wrote. 06:50 gregorycu I hate it when mommy and daddy fight 06:50 VanessaE lol 06:50 paramat schems are very rarely larger than a mapchunk (500 000 nodes) 06:50 hmmmm how large they are is irrelevant 06:50 * sofar wonders how hard it is to have a lua nodedef option with groups that can be used to compare in c++ 06:51 hmmmm the problem is that Mapgen::updateLighting() makes several assumptions only possible because it knows it's operating in the context of map generaiton 06:51 gregorycu We are not discussing that function 06:51 sofar sounds like it needs fixing? 06:51 gregorycu We're talking about the other one :) 06:51 sofar or splitting up, even 06:51 hmmmm well 06:52 gregorycu The other one acts on an arbitrary area 06:52 gregorycu Actually, an arbitrary area of map blocks 06:52 hmmmm I think you might be able to generalize Mapgen::calcLighting() by clearing the existing light values in the specified area first 06:52 hmmmm I think 06:52 hmmmm maybe, possibly 06:52 hmmmm also you need to figure out the special overtop case 06:53 gregorycu overtop case? 06:53 hmmmm er... yea.. it's messy 06:53 gregorycu :/ 06:53 hmmmm just continue doing what you're doing :-) 06:53 hmmmm but I think a lot of the work done in Map::updateLighting() may possibly be not necessary 06:54 gregorycu I've done my optimisations, I just have to prove it's faster in all cases 06:54 hmmmm the fastest code is code that doesn't exist 06:54 hmmmm just remember that 06:55 gregorycu Yeah, which is why I culled some std sets 06:55 gregorycu That have lots of little allocations 06:55 gregorycu (Well, I replaced it with vectors) 06:55 hmmmm agreed, so many of these stl containers are like stds 06:56 gregorycu vector+sort+unique faster in this case 06:56 gregorycu And probably gives the app better performance in other areas because it doesn't have to touch the allocator so much 06:56 hmmmm the allocator ought to not be so slow to begin with 06:56 hmmmm I kind of wonder what it's doing.. 07:02 gregorycu Is there a binary of world edit anywhere? 07:03 gregorycu For windows 07:03 VanessaE a...binary? 07:03 VanessaE worldedit is an ordinary Lua mod... 07:03 gregorycu Oh, is it? 07:04 gregorycu I thought it was a stand alone exe 07:04 VanessaE https://github.com/Uberi/Minetest-WorldEdit 07:07 sofar effin libvirt 07:10 gregorycu sofar: How do I spawn a certain % of different things? 07:10 gregorycu Something like 80% air, 10% glowing stuff, 10% stone 07:15 sofar euhh I think that was a bukkit version thing 07:17 gregorycu bukkit 07:18 gregorycu I'll just have two spirals 07:18 sofar ignore, old memory servicing paging requests :( 07:47 gregorycu Generating a large spiral seems to have fucked my minetest 07:48 gregorycu Keeps printing 127 in the console 07:57 hmmmm 127 == CONTENT_IGNORE 07:59 gregorycu wow 07:59 gregorycu It actually finished 08:02 gregorycu What's a minetest_game block that glows? 08:04 VanessaE mese lamp 08:19 gregorycu Thank you 08:20 VanessaE yw 09:07 gregorycu *sigh* 09:08 VanessaE ? 09:11 Krock ?? 09:13 gregorycu ?? 09:13 gregorycu This shit isn't working 09:15 gregorycu Hey, I can make it crash 09:15 gregorycu Nice 09:16 gregorycu Anybody know about "mtschemprob" 09:16 VanessaE ya got me. 09:17 gregorycu So, i go mtschemprob start 09:17 gregorycu I punch a block and enter 10 09:17 gregorycu I then punch another block 09:17 gregorycu And i enter 10 09:17 gregorycu I call mtschemprob get 09:17 gregorycu And the pecentages are like 4.something % 09:17 gregorycu Which is not 10 09:18 gregorycu And when I go finish, nothing happens 09:22 VanessaE wish I knew, sorry 09:22 VanessaE sounds like it really might be easier to modify moretrees to create a couple big honkin' tree defs 09:24 gregorycu gargh 09:24 gregorycu When I go finish, is it meant to do it? 09:24 VanessaE dunno 09:24 VanessaE I know nothing at all about creating schematics 09:53 gregorycu lol 09:54 gregorycu Due to a coding bug, schematics are broken 09:54 gregorycu Who owns this component? 10:24 gregorycu Oh, I don't know what I'm doing 12:30 rubenwardy Pretty much a rewrite, reviews please: https://github.com/minetest/minetest_game/pull/579 12:31 rubenwardy (Add give_initial_stuff API) 12:31 rubenwardy Also, new PR: https://github.com/minetest/minetest_game/pull/768 (Add itemnames and count to chest log messages) 13:56 Warr1024 I think I once long ago asked about the idea of adding dynamic runtime textures to MT; does anyone know of any existing issues/PR's or other discussion relevant to this? 13:56 red-001 what do you mean? 13:56 red-001 dynamic runtime textures? 13:57 red-001 I don't think minetest has those 13:57 Warr1024 The idea was to allow the server to push modified textures to the client after connecting 13:57 red-001 why? 13:58 Warr1024 why would be covered in my issue report, assuming there isn't onen already that my search didn't find. 14:00 Warr1024 Last time I looked at the code, it looked pretty [deceptively?] simple to add... 14:00 red-001 would this have something to do with randomizing textures? 14:04 VanessaE celeron55: is your farmap PR, when applied to a client, supposed to "work" when connecting to a server that has not also been patched? 14:05 Warr1024 red-001: no. I want mods to be able to load completely new textures without requiring a server restart, and, ideally, not requiring all clients to reconnect. 14:06 red-001 well there are no open issues for that 14:06 Warr1024 well, by "load completely new textures", since I don't think node/ent defs change dynamically, it's more like "replace the content pf existing named textures" 14:08 red-001 aren't textures named after there 14:09 red-001 hash 14:09 red-001 so you would have to add an option to update node defs on the run 14:10 red-001 I don't think somethings like that would be easy to do 14:10 red-001 or to merge 14:10 celeron55 VanessaE: work as in run, yes 14:11 celeron55 VanessaE: but there will be no farmap 14:11 VanessaE ok. 14:11 VanessaE just making sure I didn't miss anything. 14:45 VanessaE well after some initial farting around, it looks good to me 14:45 VanessaE one thing of note: with the far map atlas node resolution set at 16, and HDX256 in use, loading a Dreambuilder world needs 8 GB of RAM with this setup, after flying around for a while. 14:45 VanessaE but that's probably expected. 18:29 red-001 Is there any work being do on rewriting falling code to C++ 20:16 paramat i'll might merge this later https://github.com/minetest/minetest/pull/3500 'Shaders: Reduce amplitudes of waving leaves and plants' fairly trivial tuning of my work on waving 21:46 paramat will merge 3518 and 3522 later (trivial updating of lua_api.txt) 21:52 paramat nore sfan5 this just needs a +1, code is checked https://github.com/minetest/minetest_game/pull/744 (add steel trapdoor) 21:53 paramat likewise https://github.com/minetest/minetest_game/pull/743 (register fences) 22:20 RealBadAngel those fences shall be merged together with fixed drawtype on the engine side 22:28 RealBadAngel Warr1024, adding new textures runtime is relatively easy, whats harder is to free them up when unused, otherwise you will eat all the ram sooner or later 22:28 RealBadAngel can be done (minimap is generating textures runtime all the time) 22:29 RealBadAngel but in case of mabplocks thats somehow tricky, you cant delete texture when block is loaded and displayed 22:31 RealBadAngel and another thing, where are you going to hold pointer to modified texture. atm meta is fucked up place thx to sending whole mapblock instead of single node 22:33 Warr1024 I was thinking of replacing existing textures in thencache by name 22:34 RealBadAngel easy to say, but what about one you gonna drop? 22:35 RealBadAngel you have to make sure no node is using old one 22:40 Warr1024 I was just going to drop the old one by the same name, and the updated texture would replace it... 22:41 RealBadAngel wont work, because you will have there blocks using that texture 22:41 RealBadAngel the same moment you will delete old one you will get crash 22:45 Warr1024 oh, so I'd have to clear all the meshes or something? 22:47 Warr1024 or I guess I could just assign a temp texture or something while I clear the old one 22:48 RealBadAngel some mechanism to texture source has to be added to remove unused textures 22:49 Warr1024 so I could just rename the old one, add the new one, and rebuild meshes using the old one, and let it gc the old one? 22:51 RealBadAngel you cant just rename texture. it is cached and being used 22:51 RealBadAngel to replace the texture with the same name you would need to remove old one then add another with the same name 22:54 RealBadAngel Warr1024, i will look for my signs code that does the textures on the fly, i just cant remember atm where i have it 22:54 RealBadAngel so you will see how i solved that 22:56 Warr1024 oooh, thanks 22:57 Warr1024 maybe I should file an issue too, as a placeholder for discussion? 22:57 Warr1024 and then hopefully follow it up with a pr someday... 22:58 RealBadAngel Warr1024, this code wont help until node meta problem is fixed, otherwise you dont have a place to store modified textures 22:59 RealBadAngel well, they are stored, but moving shit in chest, forces regeneration of 9 mapblocks meshes and all those stored textures 23:00 RealBadAngel my patch eliminates that, but theres still weird case that each action on node inv is causing two meta updates 23:01 RealBadAngel and i have no idea why that happens 23:04 Warr1024 I wasn't planning on storing modified textures in my patch, even; I figure the mod code could regen it on restart if needed... 23:06 RealBadAngel when we are talking about "storing" we mean client side renderer and its resources 23:16 RealBadAngel atm theres no way to remove texture runtime safely 23:40 Warr1024 I guess it's still worth poking at, since it sounds like there are already more pieces of the puzzle than last time I speculated about this.