Time Nick Message 00:00 [MTMatrix] also, about mapgen - i use singlenode, but if remove some biomes params - minetest recreates it, but why? 00:01 [MTMatrix] also, about mapgen - i use singlenode, but if remove mp params (eg. mp_flag variable) - minetest recreates it, but why? 00:05 [MTMatrix] thanks! 00:14 [MTMatrix] was (-52, 8, 68), is really work 00:14 [MTMatrix] math magic 00:28 hare_hare_yukai guys can i do player:punch(mycustomvar) and handle it in register_on_punchplayer() ? 00:45 hare_hare_yukai guys quick lua question 00:45 hare_hare_yukai say i have a table 00:45 hare_hare_yukai thistable = {"string"} 00:45 hare_hare_yukai how do i check if thistable contains "string" in an if statement 00:46 hare_hare_yukai like if thistable["string"] then blah end 00:48 hare_hare_yukai besides iterating over the table using a for loop 01:22 luk3yx You can do if table.indexof(thistable, "string") > 0 then. table.indexof() is added by Minetest and is implemented with a for loop internally 01:26 hare_hare_yukai thanks 03:57 Ant2006 test 08:36 lissobone Hello, men. 08:41 [MTMatrix] test passed, hello 11:02 lissobone Test passed, replying: hello. Do you copy? 12:38 [MTMatrix] memcpy? 13:26 [MTMatrix] also minetest.delete_area(pos1, pos2), works as directly delete from database? 13:29 [MTMatrix] So... i guess no 13:45 MinetestBot 02[git] 04aegroto -> 03minetest/minetest_game: Add sapling growth APIs (#3053) 1359da46c https://github.com/minetest/minetest_game/commit/59da46c80b699970b232eb3f7d66dea87f2b2648 (152023-09-12T13:43:41Z) 16:11 [MTMatrix] well. I just create pos generator, and... just saved blocks when not in range save area 16:11 [MTMatrix] 50MB -> 3MB 16:11 [MTMatrix] awesome 16:11 [MTMatrix] 50MB+ -> 3MB 16:15 [MTMatrix] This works in my case, just share with that chat if useful (and only -1 mapblock by Y): 16:15 [MTMatrix] ``` 16:15 [MTMatrix] def gen(): 16:15 [MTMatrix] for x in range(-33,33+1): 16:15 [MTMatrix] for y in range(-33, 33+1): 16:15 [MTMatrix] yield (x, -1, y) 16:15 [MTMatrix] 16:15 [MTMatrix] savearea = [i for i in gen()] 16:15 [MTMatrix] print(f"delete from blocks WHERE pos not in {rawpos};") 16:15 ROllerozxa sigh 16:15 rubenwardy MisterE123: the bridge shouldn't past code blocks like that 16:15 Desour oh no, ShadowBot kicks the bridge 16:16 rubenwardy it should snip them or auto upload them to a pastebin (preferably the latter) 16:16 ROllerozxa don't paste your novels straight into a chat bridged to IRC, kids 16:17 muurkha hahaha 16:18 muurkha I wish Lua had list comprehensions 16:19 mrkubax10 "[MTMatrix] was kicked from #minetest by ShadowBot" lol 16:19 rubenwardy now do discord 16:22 MTDiscord muurkha: DIY :) 16:22 muurkha luatic: do you mean by writing a compiler targeting Lua? 16:22 MTDiscord I typically write myself a function to collect an iterator into a list. 16:23 MTDiscord I don't really need or want syntactic sugar for that. Why does Python even have list comprehensions given that it has list which can already be used to the same effect? 16:23 muurkha well, [i for i in gen()] is not the most inspiring use of a listcomp 16:24 MTDiscord Yes. Just list(gen()) would be more idiomatic. 16:24 Desour I love list comprehensions, they are super easy to write 16:24 muurkha http://canonical.org/~kragen/sw/dev3/sendmoremoney.py is some kind of argument in the "Why does Python even have {list,generator} comprehensions?" discussion, but I'm not sure if it's for or against 16:24 MTDiscord I'd still prefer list + map over a list comp though 16:24 MTDiscord esp. as it'd prevent people from abusing list comprehensions when iterators would've done the job just as well 16:25 muurkha I think a clearer example in favor might be http://canonical.org/~kragen/sw/netbook-misc-devel/bitwords.py\ 16:25 muurkha I mean http://canonical.org/~kragen/sw/netbook-misc-devel/bitwords.py 16:26 muurkha maybe the one inside render() in http://canonical.org/~kragen/sw/dev3/unimaze.py is also a good example 16:27 muurkha unimaze.go shows how I did the same thing in Golang, which doesn't have listcomps 16:28 muurkha where the corresponding code is in Maze.Show 16:30 muurkha rmq.py has the very nice all(xs[n] >= xs[k] for n in range(i, j)) 16:30 muurkha which I think is really dramatically more readable than the Lua or Golang or even Common Lisp versions 16:31 muurkha I mean http://canonical.org/~kragen/sw/dev3/rmq.py 16:56 MTDiscord meh, all(map(lambda n: xs[n] >= xs[k], range(i, j)) would be completely fine if lambda weren't quite as unwieldy 16:57 MTDiscord in lua it's unfortunately even more unwieldy due to there being no "arrow functions" 17:14 muurkha luatic: yeah, it's pretty cool how much mileage Smalltalk and Ruby get out of having terser syntax for lambdas 17:17 muurkha I think in Ruby that would just be (i...j).all? { |n| xs[n] >= xs[k] } 17:17 muurkha which is shorthand for (i...j).collect { |n| xs[n] >= xs[k] }.all? 21:27 [MTMatrix] how I can ask the engine no generate empty space blocks? Except mg limit 21:27 [MTMatrix] You can't. 21:27 erle why do you even want it 21:27 [MTMatrix] There's a good reason too; it's not necessarily trivial to just regenerate those "empty" mapblocks. 21:29 erle yes, cavegen will grief 21:29 [MTMatrix] Every time a mapblock is generated, it's run through every mod's on_generated callbacks, which can have arbitrarily high cost. IIRC there were proposals to not save mapblocks until they'd been changed from the generated state, and this (along with the complexity of decorations) was probably a big contributing factor to why that didn't work out. 21:29 erle Warr1024 it is even worse, these callbacks can also run when a mapblock was not generated. 21:29 MTDiscord localhost: have you measured the cost of empty blocks? 21:29 MTDiscord haha, yeah, cavegen is another issue too. You actually want a margin of untouched mapchunks around any mapchunk that contains actual builds, player changes, ABM changes, etc just to avoid those issues... 21:30 erle for example, i have a scenario in some world downloads where the world gets corrupted, possibly because the on_generated stuff runs partially again in world dls for some reason. 21:31 [MTMatrix] hmmm. What if I write mod for deleting the blocks on_generated callback? :D 21:31 MTDiscord localhost: then you will most probably invoke nasal demons 21:31 MTDiscord map generation runs on chunks, not blocks. So if you're trying to be clever and "optimize" your map by deleting unused mapblocks, you actually need to preserve the whole chunk that contains the block. 21:31 erle oh yes that was it 21:31 MTDiscord the null hypothesis here is that air-only blocks ought to be disk space efficient due to compression; please try to refute that before you attempt any optimizations 21:31 erle if something is only partially saved, you might run some on_generated stuff for the whole thing :( 21:32 erle whkat luatic says 21:32 MTDiscord Even if air-only mapblocks take non-trivial space, trying to optimize them out is still usually not worth the pain it causes. 21:32 erle and air can also contain things, don't forget that 21:32 erle for example, ghost inventories 21:33 erle so you can literally pluck items out of thin air 21:33 MTDiscord don't forget entities, lol 21:33 MTDiscord I assume what they're asking for is some way to detect a "purely blank" mapblock and remove those. Even still, it doesn't salvage the problem. 21:34 MTDiscord Also, for the case of general surface exploration, optimizing out empty mapblocks will do little to affect the disk size of a world in normal gameplay conditions because half of the mapblocks (and WAY more than half of the disk space) is actually generated terrain. 21:34 MTDiscord to remove "purely blank" mapblocks then you can try to delete mapblocks in the database that have a blob size under a certain threshold (just try to figure out what that threshold may be) 21:34 erle speaking like someone who never explored the end sky lol 21:35 MTDiscord oh yeah, note that air may store valuable param1 light info 21:35 erle ROllerozxa you are chaotic evil, anyone with thet little knowledge about the map db is going to delete things they like as well by accident! 21:35 MTDiscord Your options are probably either (1) set mapgen_limit, (2) install a mod that limits player movement so they can't explore too far (and maybe simplify mapgen outside that range by deleting terrain), (3) periodically take down your world to do complex cull scripts, or (4) live with it and buy bigger disks. 21:35 MTDiscord Amanda: shouldn't all purely blank mapblocks have the exact same blob, or is there something I'm missing? 21:35 MTDiscord erle: I was assuming they would at least make a backup before attempting such a task :P 21:36 erle ROllerozxa I BELIEVE YOU. YOU LOOK TRUSTWORTHY! :D 21:36 MTDiscord they would either make the backup, or they would learn an important lesson. 21:36 MTDiscord don't trust anyone who speaks through the discord bridge. we are all untrustworthy 21:37 MTDiscord old: the same blob hash? maybe 21:37 MTDiscord (er, i mean luatic) 21:37 MTDiscord I've done the culling script thing before, and it's complicated. I actually have a mod that keeps extensive statistitics on the usage of every mapblock (how many times a player has dug, placed, etc within that block) and it helped guide me where the actual builds were, but the logic to expand mapblocks to chunks, and then include the extra border chunks, was not trivial. 21:37 [MTMatrix] okay, I just make workaround - teleport on borders. Is simple and better solution, right? 21:38 Warr1024 People who talk directly in IRC aren't necessarily that much safer either 21:38 [MTMatrix] nor matrix 21:38 [MTMatrix] okay, I just do make workaround - teleport on borders. Is simple and better solution, right? 21:38 erle localhost do not trust other players, they lie, cheat and steal 21:38 MTDiscord teleport on borders is not bulletproof but it's a decent mitigation, probably. 21:39 [MTMatrix] no no. I mean if their position x,y,z then teleport on spawn 21:39 [MTMatrix] for example 21:39 erle that's actually what the engine does if you go out of bounds enough i think 21:39 MTDiscord Players who really want to cause you pain can teleport themselves to any arbitrary location they want. Hopefully though you won't have anybody trying to cause you intentional pain, and just preventing players from traveling too far will prevent them from accidentally causing you pain. 21:39 MTDiscord localhost: I think the ideal solution to map borders is to spawn actual solid border nodes - which may have airlike visuals - to prevent players leaving the borders using on_generated. 21:40 MTDiscord when someone leaves that "box" (penetrates the border nodes), you know it's a cheater 21:40 MTDiscord spawning dummy airlike solid nodes is what I do in my own servers (I can't use mapgen_limit because it doesn't support multiple dimensions with separate limites) 21:41 MTDiscord I've actually got a todo to publish that as a proper mod one of these days, actually 🤔 21:43 MTDiscord for voxelmanip classic I just clamp the player's position if they end up outside the invisible bedrock borders through one cheat or the other 21:44 erle ROllerozxa, why do you hate FUN 21:44 MTDiscord For NCC, I have one mod that generated the border solids, and the game itself has rules that if you're stuck in solids, you get randomly teleported, with a general bias toward 0,0,0 21:45 erle nice, a teleport trick 21:45 erle does this also work if i just dump sand on myself 21:45 MTDiscord Yep 21:46 MTDiscord generally speaking one of the rules of NodeCore is that players are "less tangible" than nodes, so the presence of a player cannot stop a machine from moving 21:46 erle i like how well-thought-out nodecore is in these terms 21:46 MTDiscord As a consequence it's pretty easy to have a machine just move something solid into place where you were standing, so being able to push a player out of solids is an important mechanic. 21:47 erle it reminds me of the philosophy of battle for wesnoth ”all movement and attacks have to work so that it *could* be a boardgame” which prevents useless mental accounting work 21:47 MTDiscord "well thought out" as in "it's nice to see a game that's built on consistently applying certain underlying principles" or as in "it's nice to see somebody who actually playtests and takes feedback seriously"? 😄 21:48 erle i meant the first but i appreciate both 21:48 erle i should probably point to nodecore next time ancient_mariner says that “bugs happen, we can't afford to put more work into it with our manpower” 21:49 erle i really appreciate gamedevs who consistently deliver quality 21:49 erle and have a vision 21:49 erle it's like the german concept of autorenfilm, a movie following the vision of a single author 21:50 MTDiscord Well, nodecore does have its share of bugs. Some of them are very tricky to fix, but they're subtle enough in gameplay that I've gotten away with not fixing them entirely... 21:50 erle that's just managing tech debt 21:51 MTDiscord Being able to make interest-only payments on tech debt is a nice way not to get overwhelmed all at once, but it's one of the most depressing ways of handling debt 😅 21:53 MTDiscord I think probably at least the level of quality I have in NodeCore was more or less inevitable when (1) I want to solve each problem only once and not have to keep solving it over again, and (2) I tend to see patterns in the problems, and consider the meta-problems as real problems too. 21:53 [MTMatrix] Ah yes. Also I find strange thing, if player have very big RTT - it can dig protected areas and walk in it 👀 21:54 MTDiscord ah, just like in classicube 21:54 MTDiscord erle: but out of bounds is meant to be out of bounds... >:P 21:54 erle Warr1024 seeing meta-patterns is a talent that some devs just don't have. 21:55 erle Warr1024 for example, there are a bunch of bug classes in mineclone2 (and forks) that are basically the same. 21:55 erle and they occur again and again 21:55 erle maybe also due to project churn 21:56 erle as past performance predicts future performance, maintainer burnout is inevitable with that project, so institutional knowledge gets lost 21:56 MTDiscord As a talent that some people have more of than others, I could see that, but I can't really imagine somebody ever making it as any kind of developer having a serious deficiency in that talent. It feels like it must be actually a core part of being a developer... 21:56 erle > I can't really imagine somebody ever making it as any kind of developer having a serious deficiency in that talent. 21:56 erle exhibit A: imagemagick 21:56 erle lol 21:56 MTDiscord honestly what upset me more than people building outside of the map boundary were people flying around and exploring obscene amounts of empty space, which generated a lot of junk in the database. from that I know that empty air mapblocks can, in fact, bloat up a map database if someone is determined enough 21:57 erle in mineclone2 i used to build: a) on the nether roof b) below the bedrock of the overworld c) in the void 21:57 erle the void thing was probably the most illegal 21:58 MTDiscord It seems like you couldn't prevent somebody from generating mapblocks outside of a designated area, but you could keep track of the mapblocks that shouldn't exist (persist them in mod_storage), and then just poll them to see if they're still loaded, and once you get ignores, you know they're not loaded anymore (only exist on disk) and then you can delete_blocks them or whatever, maybe in a slow background process, to keep things clean 21:58 MTDiscord automatically. 21:58 MTDiscord It's iffy whether the perf costs work out in your favor, but for disk space management, it's worth some experiements, maybe. 21:59 erle i think mod_storage + mapblocks was always racy somehow 21:59 erle definitely problematic in terms of crashes if you are not smart about it 21:59 erle i need to go to bed 21:59 MTDiscord erle: glitching on top of the nether roof feels like it's so common though it might as well be an intended game mechanic at this point 😆 21:59 [MTMatrix] Hm, I thins was a dumb workaround just make cleanup in map.sqlite via crontab, just save some pos, others will be deleted, but i'm not try it when game is running 21:59 MTDiscord Right, MT has no transactional safety there so you'll have to be content with it as a mitigation, not an absolute guarantee. 22:00 erle rollerozxa yes, but cora and me and li0n also built a nether canal with real water :P 22:00 MTDiscord localhost: you can ... actually kinda get away with surprisingly much while the game is running, even, if you use postgresql as a backend 😉 22:00 erle flooding the nether is not very common 22:00 MTDiscord water in the nether... o.o 22:00 MTDiscord nether gonna give you up 22:01 erle ROllerozxa also i once used an off-by-one-glitch in kay27 nether portals and built a HUGE overworld grid of portals that removed one layer of bedrock in a square. 22:01 MTDiscord that's hilarious 22:02 erle well they were spawning sometimes 1 node into the bedrock 22:02 erle deleting it 22:02 MTDiscord ugh, off by one errors are 2 of my least favorite things to deal with. 22:02 erle so i just exploited that 22:02 erle to chip away at the bedrock! 22:03 MTDiscord always found the strange ways people find out how to break bedrock in minecraft to be very interesting. so I'm glad there's just as many glitches (or intentional game mechanics? :)) that allow you to break bedrock in mineclone 22:05 erle ROllerozxa https://mister-muffin.de/p/y1CO.jpg 22:05 erle ROllerozxa it's just that devs are not particularly good at testing 22:05 erle and sometimes they don't even want to fix stuff 22:06 erle i mean, for a time i used mushrooms to break bedrock 22:06 MTDiscord Devs not being good at testing is no surprise, but you'd think people would at least take bug reports seriously, I guess... 22:07 MTDiscord At least most of the bugs I've ignored just involve the game doing dumb stuff sometimes, like a thing you think should work not working ... but for exploitation of boundaries like that, I'd at least put in some mitigation fast, even if I couldn't do a really proper fix. 22:08 erle the boundary thing is not a problem 22:08 erle destroying arbitrary nodes is 22:08 erle because you can use it for evil 22:08 MTDiscord erle: gosh those vehicles there are so cute 22:08 MTDiscord It should be hard to "accidentally" cheat. If it's something you can stumble on by accident without putting a real effort into, it shouldn't be something that either (1) can be exploited by players for gain, or (2) sucker-punches players and makes them lose something important unfairly. 22:08 erle for example. a mineclone 2 world used to have (probably still has) 3 portals to the end dimension i think 22:08 erle and 1 portal out of that dimension 22:08 erle if you grief, you can disable a whole dimension 22:09 erle or remove the exit hatch from it 22:09 erle i do actually stumble into most glitches on accident 22:09 erle a few friends i have do that as well 22:09 erle my theory is that everyone experiences about 100 or so software bugs per week 22:09 erle but most people just subconsciously dismiss them 22:09 MTDiscord Destroying things is actually supposed to be hard to do in NodeCore. The "pulverize" command is considered a cheat and you're warned you're cheating just from having the priv for it. 22:10 erle and those who get very irritated are good at noticing them and glitching 22:10 erle i like how nodecore deals with damage 22:10 erle what if 22:10 [MTMatrix] also. about area protected mitigation, just kick player when dig, is 100% works :D 22:10 erle minetest, but every time you take fall damage your item bar randomly reshuffles 22:10 MTDiscord Heh, I would probably agree with that 100 bugs a week figure, though for the most part, 95 of them are the same ones you saw last week, and only 5 or so are actually novel... 22:11 erle n8 n8 22:11 erle and please make that ticket for decompression Warr1024 22:11 erle you are less of a bitch than i am 22:11 erle so ig it has higher chances of success! 22:11 MTDiscord I've done the "items randomly shuffle" thing before actually. In an earlier modpack for MTG, I had items you throw on the ground turn into "pile of stuff" nodes if they sat there long enough, to preserve items and fix the "item decay" thing. 22:12 MTDiscord The piles had the same capacity as a chest, so you'd think "wait, what incentive does a player have to invest in chests then? Isn't this just a 'cheat' around chests?" Well, I made it impossible or organize the piles. 22:12 MTDiscord Any time you added or removed an item or tried to move something around, the whole mess would reshuffle. 22:12 erle lol 22:12 erle gib 22:13 MTDiscord https://gitlab.com/sztest/sztest/-/tree/master/sz_stuffpile and https://gitlab.com/sztest/sztest/-/tree/master/sz_tweak_item_pile, I think. Haven't been maintained since like 0.4.15 days or so though, so YMMV. 22:17 MTDiscord Haha, shit, it's also using my old metatable libraries 😅