Minetest logo

IRC log for #minetest, 2019-03-26

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

All times shown according to UTC.

Time Nick Message
00:44 galaxie How do I increase the pointing distance? As in, make it so I can dig/place nodes from a further distance.
00:46 rubenwardy range in the item de
00:46 rubenwardy +f
00:46 galaxie Oh, so it can be changed depending on what you are pointing at?
00:46 rubenwardy on what you're pointing with
00:47 paramat in tool definition
00:47 rubenwardy the hand is ""
00:47 rubenwardy so, to change it for all players you can do:    minetest.override_item("", { range = 300 })
00:47 rubenwardy actually
00:47 rubenwardy hmmm
00:47 paramat https://github.com/minetest/minetest_game/blob/dd3f3b2032242e57d23fc183430cebcbf6424b00/mods/creative/init.lua#L47
00:47 rubenwardy yeah
00:48 paramat beware larger ranges affect performance (i think)
00:48 rubenwardy note that     minetest.register_item(":", { })     is exactly the same as    minetest.override_item("", { range = 300 })
00:48 rubenwardy paramat: not that much
00:48 rubenwardy it was heavily optimised
00:48 paramat ok
00:48 rubenwardy you can have 100s now
00:48 rubenwardy and it's client side, so it only selected loaded blocks
00:49 rubenwardy so loading blocks is more of a bottleneck than the pointing
00:50 galaxie rubenwardy: I suppose using override_item would make more sense, still.
00:51 rubenwardy oops
00:51 rubenwardy note that     minetest.register_item(":", { range = 300 })     is exactly the same as    minetest.override_item("", { range = 300 })
00:51 rubenwardy but the latter should be used
00:57 galaxie Is there a nice mod that allows you to, say, print out the metadata of a clicked node to aid in debugging? Or any other mods that a mod dev might want?
00:58 kaeza I think inspector is what you want.
00:58 kaeza !mod inspector
00:58 MinetestBot kaeza: Chest Inspector [chest_inspector] by tjnenrtn - https://forum.minetest.net/viewtopic.php?t=17692
00:58 kaeza Uh, not that one.
01:00 kaeza !mod inspect
01:00 MinetestBot kaeza: Inspect nodes! [inspect] by bigfoot547 - https://forum.minetest.net/viewtopic.php?t=17092
01:00 bigfoot547 ooo
01:00 bigfoot547 someone used something I made
01:01 galaxie What about https://github.com/minetest-mods/inspector ?
01:01 kaeza That one.
01:02 kaeza >An in-game tool to inspect node parameters and metadata.
01:04 galaxie When you use set_pos and move_to, is there a way to make it move a set of blocks, so as to make it less clunky?
01:07 ANAND galaxie: set_pos and move_to only work on ObjectRefs (players and Lua entities), and won't work on nodes.
01:07 ANAND As of now, it's impossible to "move" nodes from one place to another
01:07 rubenwardy because that wouldn't make sense
01:08 rubenwardy nodes are directly tied to a position
01:08 p_gimeno except with pistons (in full node units)
01:08 galaxie So just remove and place again?
01:09 p_gimeno that's what pistons do
01:10 galaxie Hmmm, OK. Is it possible to make a node/entity light on and off? I saw light_source but it appears to be static and for all nodes.
01:11 ANAND Can be done to entities, but not possible to do to nodes as you observed.
01:11 ANAND For entities, it's simply a matter of setting `glow` in object properties
01:12 galaxie Alright. I assume you can make an entity look exactly like a node?
01:12 ANAND e.g. object:set_properties({glow = 10})
01:12 rubenwardy no
01:12 rubenwardy use two different node definitions
01:12 ANAND Not possible
01:12 ANAND Entities could resemble a node, but won't behave like one
01:13 paramat yeah use 2 nodes, one lit, and replace one with the other
01:13 ANAND ^
01:13 kaeza See e.g. furnaces.
01:14 galaxie And perhaps save the definition to a local table then change the light_source field for the second node?
01:14 ANAND No, both nodes have to be registered at startup
01:15 ANAND But yes, you can save the definition to a local table, and change `light_source` before registering the second node
01:15 rubenwardy could be useful to have minetest.extend_item(oldname, newname, overrides)
01:15 galaxie That exists? Or were you suggesting it?
01:15 ANAND It was a suggestion
01:15 rubenwardy that function doesn't exist
01:15 kaeza Don't do that. Make a copy of the table.
01:16 ANAND But that's actually a good idea.
01:16 rubenwardy you'll need to table.copy
01:17 kaeza I think register_* stores a reference to the telephonic you pass, so you need two independent copies.
01:17 rubenwardy telephonic?
01:17 kaeza ... How did that telephonic get there
01:17 rubenwardy on a phone?
01:17 kaeza Table*
01:17 kaeza Yes :p
01:17 rubenwardy as in, are you using a device with autocorrect?
01:17 rubenwardy not making a pun about telephonic
01:18 rubenwardy because that was a telephonic mistake
01:18 kaeza Hah
01:18 ANAND lol
01:19 MinetestBot [git] rubenwardy -> minetest/minetest: Prevent multi-line chat messages server-side (#8420) d0a1a29 https://git.io/fjU37 (2019-03-26T01:18:52Z)
01:23 galaxie For this sample code, is the minetest.after strictly necessary/recommended? https://pastebin.com/XgmJBQke
01:24 rubenwardy it shouldn't be needed
01:24 rubenwardy by on joinplayer, they should be in the game
01:24 rubenwardy prejoinplayer is before they join the game
01:26 testman joined #minetest
01:27 walle303 joined #minetest
01:32 galaxie So just replace the inside of the function with the insides of func but replace name with player:get_player_name() ?
01:36 galaxie Is there some way to make a node that can only be dug by an admin? I know there is area protection but I was hoping for something simpler, like a group or something.
01:50 Emerald2 Like in maptools mod?
01:50 ANAND One way to do this is to not set any group, except an arbitrary group (e.g. groups = {immortal = 1}), and register a custom pickaxe which can dig nodes with immortal group
01:51 ANAND with the arbitrary group*
01:51 Emerald2 https://github.com/minetest-mods/maptools
01:51 Emerald2 It has an admin pickaxe that can dig anything.
01:51 ANAND galaxie: See ^
01:51 ANAND That mod has a bunch of indestructible nodes.
01:52 ANAND and an admin pick, ofc
01:52 ANAND Btw, hey Emerald2 :)
01:54 Miner_48er joined #minetest
01:54 Emerald2 Hey ANAND.
01:56 DI3HARD139 joined #minetest
01:58 Emerald2 I remember having maptools stuff back in my MM-Survival days. :)
01:58 Emerald2 We had a bunch of fullclip nodes to keep the players out of the staff area.
02:20 Cornelia joined #minetest
02:25 Lia joined #minetest
02:30 Emerald2 I guess "vel" and "acc" got deprecated in 5.0?
02:40 milkt joined #minetest
02:41 Emerald2 Poor admin. People sprinting spams the server console badly. XD
02:46 cddepppp256 joined #minetest
03:04 XanT joined #minetest
03:05 XanT Hi there, is there a team member floating around I can talk to regarding the mod API support within Minetest?
03:05 rubenwardy regrettably, I'm off to sleep now
03:05 rubenwardy (most of the devs are european)
03:06 XanT it can wait till tomorrow then if that's better :)
03:07 rubenwardy it may be worth just asking
03:07 botch joined #minetest
03:17 Nezrok_ joined #minetest
03:23 ndrsn joined #minetest
03:24 paramat joined #minetest
03:57 MinetestBot [git] paramat -> minetest/minetest: Dungeons: Do not remove nodes that have 'is_ground_content = false' (… 5e7662c https://git.io/fjUGc (2019-03-26T03:56:57Z)
03:59 fling joined #minetest
04:09 paramat XanT go ahead and ask your question
04:38 amenji joined #minetest
04:46 kaeza joined #minetest
05:16 Ruslan1 joined #minetest
05:16 lumberJ joined #minetest
05:24 paramat joined #minetest
05:52 est31 joined #minetest
06:26 nowhere_man joined #minetest
06:33 SanskritFritz joined #minetest
06:47 Destructo joined #minetest
06:51 Destructo anyone online?
06:52 Destructo I have a problem
06:52 Emerald2 What's the problem?
06:53 Destructo the one I was facing yesterday..... I am not getting any solution.
06:54 Emerald2 Oh yes, you're having trouble signing up to the forum.
06:54 Destructo yes
06:54 milkt joined #minetest
06:55 Destructo I am not using any vpn or proxy
06:56 Destructo still it kicks me out.  : /
06:56 Emerald2 This is probably not the best time of day to find somebody to help.
06:56 lumberJ is your ip banned for some other reason? :)
06:56 Destructo no
06:56 ANAND Not sure about this, but forum moderators might be able to whitelist your IP/account
06:57 Emerald2 US area are sleeping and UK/Europe probably not here yet.
06:57 ANAND Europeans are probably still brushing their teeth :)
06:57 Destructo it just says that a lot of spams have got access through my ip         though i have not done anything
06:57 Destructo i am indian
06:57 Emerald2 Probably share an IP range with forum spammers then.
06:58 Destructo i do not understand such technical things
06:58 ANAND I faced a similar issue with Freenode recently - got banned in the middle of an IRC session, for connecting from a blacklisted IP.
06:58 Emerald2 Same internet service provider maybe.
06:58 * Emerald2 shrugs.
06:59 Destructo hey anand how did you got access to forums
06:59 Destructo i think you are from india too?
06:59 ANAND Uh... I signed up? :)
06:59 Destructo then why cant I ?
06:59 Emerald2 Vanessa pinged Calinou but he appears to be afk.
06:59 VanessaE left #minetest
07:00 Destructo i am not any spammer
07:00 Emerald2 Oops I think I scared her. :D
07:00 VanessaE joined #minetest
07:00 ANAND Yes, I am from India. But fortunately, I (probably) don't share my IP with spammers
07:00 Destructo someone help me sign in.....
07:00 Emerald2 Only certain forum moderators can help you, and I don't think they are available right now.
07:01 Destructo i dont do anything like spamming
07:01 ANAND sfan5 and rubenwardy are forum moderators too. I hope they might be able to help you.
07:01 Destructo I prefer peace.... :)
07:01 ANAND (And I hope that pings them :P)
07:01 ANAND I prefer peas....
07:01 Destructo are they online..
07:01 Emerald2 So is Shara.
07:02 Destructo any of them?
07:02 ANAND Yes, Shara too.
07:02 ANAND (uh-oh, double-pinged)
07:02 Emerald2 Well, if they answer they're here. Otherwise, nope.
07:02 Emerald2 I think it is still a bit early in their morning.
07:03 Destructo ahhhhhh
07:04 Destructo its already midday here :/
07:04 ANAND You can come here again a little after 9PM IST to catch them when they're awake.
07:04 Destructo 9PM ?
07:04 Emerald2 Some of them might be here in 2 hours?
07:04 Destructo <i have dinner then>
07:05 ANAND They'll surely be around in their evenings
07:05 ANAND Not many hang out on IRC in the mornings, as far as I can tell
07:06 Destructo oh!
07:06 ANAND Bah, time-zones...
07:06 ANAND So confusing :)
07:06 Destructo yeah :D
07:07 Destructo ummmmmm then can someone create an account for me?
07:07 lumberJ if your ip is banned it won't matter
07:07 Destructo or tell me how to change IP address
07:09 Destructo left #minetest
07:09 lumberJ lol, no time for answers
07:10 lumberJ was going to suggest a vpn :P
07:12 VanessaE don't hide behind proxies or VPNs to get on the forums.
07:12 lumberJ was a joke :)
07:17 Emerald2 Speaking of forum spammers. We sure had some word soup ones this past 2 days.
07:18 Emerald2 Or should I say 'word salad'.
07:18 Emerald2 Word soup makes as much sense as the spammers. :P
07:36 amenji joined #minetest
07:48 CWz joined #minetest
08:03 lumberJ left #minetest
08:13 Beton joined #minetest
08:15 SanskritFritz left #minetest
08:38 karamel joined #minetest
08:53 ensonic joined #minetest
09:20 proller joined #minetest
10:02 nowhere_man joined #minetest
10:03 Hirato_ joined #minetest
10:04 fling joined #minetest
10:05 twoelk joined #minetest
10:18 Ruslan1 joined #minetest
10:43 YuGiOhJCJ joined #minetest
10:52 proller joined #minetest
10:54 Calinou Emerald2: I had a look but I don't think I can create forum accounts (unless I do it manually for you, but I think your IP may still prevent you from logging in, not sure)
10:59 twoelk|2 joined #minetest
11:02 SmugLeaf joined #minetest
11:03 Emerald2 Calinou it's not me having the issue.
11:04 Emerald2 It's Destructo having the issue.
11:04 Calinou I know
11:11 Emerald2 So he just can't get a forum account? Or somebody could whitelist him?
11:16 riff-IRC joined #minetest
11:16 Emerald2 Ugh more forum spam.
11:16 Calinou I don't know if we have any control on the whitelist
11:16 Calinou (or the blacklist, actually)
11:19 twoelk|2 left #minetest
11:19 twoelk joined #minetest
11:19 Fixer joined #minetest
11:20 proller joined #minetest
11:21 ndrsn joined #minetest
11:21 p_gimeno I have the same problem but I do connect with Tor
11:22 ndrsn Hello folks!
11:27 ndrsn left #minetest
11:35 Fulgen joined #minetest
11:55 calcul0n joined #minetest
12:07 sonicpp joined #minetest
12:22 Emerald2 Calinou this spammer keeps posting new crap.
12:26 kurtzmusch_ joined #minetest
12:37 sonicpp joined #minetest
12:45 Emerald2 joined #minetest
12:45 Emerald2 joined #minetest
12:49 JDCodeIt joined #minetest
12:49 JDCodeIt Hi All, does minetest-mods have its own channel or do we discuss here?
13:04 aheinecke joined #minetest
13:07 calcul0n you can discuss here, afaik there's no specific chan for mods
13:28 Wuzzy joined #minetest
13:44 JDCodeIt VanessaE noted a problem with moreblocks, which I also hit recently. See https://github.com/minetest-mods/moreblocks/issues/130
13:45 JDCodeIt The issue might actually be in minetest.clear_craft - somehow corrupting the recipes.
13:45 milkt joined #minetest
13:49 ndrsn joined #minetest
14:16 kaeza joined #minetest
14:24 nowhere_man joined #minetest
14:56 nowhere_man joined #minetest
15:02 Megaf_ joined #minetest
15:24 galaxie What's the state of integrating LuaJIT in MT?
15:24 proller joined #minetest
15:28 sfan5 "integrating"?
15:31 galaxie Well, doesn't MT come bundled with Lua 5.1 by default? You have to build it yourself with LuaJIT and some of the forum posts seem to suggest not all the Lua code works with LuaJIT.
15:33 sfan5 building it with luajit is really easy on both linux and mac, and for windows the official downloads come with luajit
15:33 sfan5 never heard of the issue with "code not working"
15:35 JDCodeIt Anyone aware of a bug in clearCraftRecipesByInput() when it is deleting two or more crafts that match?
15:36 galaxie sfan5: Next time I should double-check dates. That was back in 2013, lol. But then, how much more performant is LuaJIT now that we have 5.0?
15:38 benrob0329 joined #minetest
15:38 sfan5 what do you mean? LuaJIT has always been far more performant than "normal" Lua and is recommend for use whenever available
15:38 galaxie sfan5: For instance, in https://dev.minetest.net/Lua_Optimization_Tips, for one of the tips, "Some benchmarks have shown the opposite to be true when using LuaJIT, this must be verified."
15:40 rubenwardy LuaJIT is pretty amazing
15:40 rubenwardy but rotting :(
15:40 sfan5 galaxie: i'm not sure how this edge case would say anything about the performance of LuaJIT in general
15:43 zarcade_droid joined #minetest
15:49 milkt joined #minetest
15:51 JDCodeIt ..because my question goes back to the core code, should I take the discussion in the minetest-dev channel?
15:52 p_gimeno JDCodeIt: if you've found a bug, the best place is the issue tracker
15:52 calcul0n joined #minetest
15:52 p_gimeno I'm interested, btw - have you found more details?
15:53 JDCodeIt I didn't locate it specifically, but have a question about a certain function where there may be a bug.
15:53 benrob0329 Quality of code is often more important for performance than raw execution speed.
15:54 JDCodeIt p_gimeno: did you have a look at the function that I mentioned above?
15:56 p_gimeno JDCodeIt: I'm starting to look into the code, trying to understand the chain of events, I'm pretty sure I'll end up in that function but I wanted some context first
15:56 p_gimeno just opened l_craft.cpp
15:56 JDCodeIt moreblocks call clear_craft with input {"default:papyrus", "default:papyrus", "default:papyrus"}
15:57 JDCodeIt If I comment that out, the dark_green wool recipe is not corrupted (produces dark_green wool instead of green wool)
15:59 p_gimeno yes, I got that from moreblocks#130
16:01 JDCodeIt At that point in the code there are two recipes defined with input of three papyrus - one produces 1 paper, the other produces 4 paper
16:03 nri joined #minetest
16:03 JDCodeIt ...misspoke - just the 1 paper craft recipe is there. So the code is clearing a craft and stating a new one with 4 paper output
16:04 nri Hello
16:12 AceNovo Heyas
16:16 p_gimeno JDCodeIt: I can't reproduce the bug in the issue in the first place. I get dark green wool.
16:17 p_gimeno ah wait, stable-0.4
16:18 JDCodeIt another clue - 5.0.0 doesn't happen?
16:19 p_gimeno I couldn't reproduce it there, is all I can say. I'm preparing to compile stable-0.4 now.
16:26 p_gimeno reproduced in stable-0.4
16:27 p_gimeno is stable-0.4 going to get any more commits?
16:28 rubenwardy unlikely
16:28 JDCodeIt So even if we find the bug, we wouldn't be able to backport?
16:29 p_gimeno in a private branch, sure
16:29 rubenwardy it can be backported to 5.0.1
16:30 p_gimeno ummmm, wait
16:30 p_gimeno I can reproduce with 5.0, I wasn't using a clean enough environment
16:30 proller joined #minetest
16:31 p_gimeno this is head-scratching
16:31 JDCodeIt we got a live one, then!
16:31 p_gimeno let me try to identify the definitive cause
16:32 p_gimeno I still have MTG rolled back to the commit specified in that issue, so there are still some factors to consider
16:34 YuGiOhJCJ joined #minetest
16:41 p_gimeno these two MTG commits fixed the issue: https://github.com/minetest/minetest_game/commits/6f80fd3737cd4de30e548dd48bc0ab8c288d9930
16:43 puzzlecube joined #minetest
16:44 JDCodeIt To get coral to generate in mgv7 are there any specific flags needed?
16:48 JDCodeIt p_gimeno: Color grouping...so upgrade MTG to get these improvements?
16:50 JDCodeIt p_gimeno: But still not quite clear why clear_craft causes the side-effect.
16:59 p_gimeno JDCodeIt: I can try to get to the bottom of it, but I wonder if it's worth the effort
17:00 JDCodeIt Seems rare, and if you say upgrading MTG fixes it, we can wait for another example, but like the stray pointer bugs, it could be hard to find
17:03 FrostRanger joined #minetest
17:16 Gael-de-Sailly joined #minetest
17:29 calcul0n joined #minetest
17:31 JDCodeIt Anyone have problems to generate coral reef in mgv7?
17:35 kurtzmusch_ can i find an explanation of each mapgen somewhere? like what features it tryes to generate, aswell as what types of noise it uses...
17:43 scr267 Anyone has any experience using Shara's other_worlds?
17:44 p_gimeno JDCodeIt: I believe I've found one cause
17:44 JDCodeIt Yes, how so...
17:46 JDCodeIt scr267: there is some info on the dev.minetest.net wiki about mapgen. I've tried to update it based on what I found in lua_api.txt
17:47 scr267 JDCodeIt, Thanks - I'm just asking because I'm having difficulties getting asteroids to generate.  Thanks for the link!
17:48 p_gimeno JDCodeIt: https://github.com/minetest/minetest/blob/5e7662ca168b47ed3e81901d53bff2eb712f571c/src/craftdef.cpp#L1005-L1013
17:49 JDCodeIt That's where I was looking - off by one bug?
17:49 p_gimeno JDCodeIt: that loop works by adding the items that are not cleared to new_vec_by_input, then swapping it (don't ask me why)
17:49 jluc joined #minetest
17:49 p_gimeno (instead of just removing the unwanted items)
17:49 twoelk left #minetest
17:49 p_gimeno BUT it iterates in reverse, while the items are added forwards
17:50 p_gimeno therefore, the new items are in reverse order, and that does make a difference in the case of dark green dye (not sure why)
17:51 nri scr267: did you ever get my link from VE about the day/night setting?
17:51 JDCodeIt what is that .swap that is inside the for loop?
17:51 p_gimeno JDCodeIt: I bet that if a new clear_recipe() is called, the issue disappears
17:51 scr267 nri: yes I sure did.  and I tried to respond to you to thank you.
17:51 scr267 Thanks very much!
17:51 nri NP
17:52 nri scr267: Did you figure out how to use it?
17:52 JDCodeIt ahhh - call it twice? I'll try it.
17:52 scr267 nri: Not yet, I did put it on my local dev but I'll get around to it :)
17:52 nri ok
17:53 p_gimeno JDCodeIt: because that will reverse it twice (if my hypothesis of what's going on is correct)
17:53 p_gimeno JDCodeIt: https://en.cppreference.com/w/cpp/container/vector/swap
17:53 nerzhul joined #minetest
17:53 p_gimeno I have to study the code better, but I think there's a bug right there
17:54 p_gimeno (in the swap)
17:54 JDCodeIt why will got_hit be true on the second call?
17:55 p_gimeno JDCodeIt: I mean to add another recipe just to be deleted
17:55 JDCodeIt Yes, could do...
17:56 p_gimeno JDCodeIt: that would also mean that there are TWO definitions of the recipe, one producing dark green wool and the other producing bright green wool
17:56 proller joined #minetest
17:56 p_gimeno changing the order implies changing which one is picked
17:57 p_gimeno I think that duplication is probably what the MTG commits I mentioned earlier fixed
17:58 ssieb joined #minetest
18:01 JDCodeIt Well at least for that recipe - it is confirmed - cleared the paper recipe, added the paper recipe, then cleared it a second time - dark green wool
18:03 JDCodeIt Dark green wool results also if you add back the recipe - so the twice cleared system works? But did it simply destroy a recipe I'm not looking at?
18:05 JDCodeIt I guess the funny(odd) thing is that I'm deleting the paper recipe, and it affects the dark green wool recipe.
18:06 JDCodeIt You're saying I think that the dark green wool has a wrong recipe that simply changes order by that routine.
18:06 p_gimeno the issue is that every time clear_recipe() clears something, the list order is inverted
18:07 JDCodeIt I always wondered about that - if a craft recipe is registered, I guess there is nothing that looks to see if there is a conflict - and issues a warning.
18:07 p_gimeno that makes the "bad" wool recipe to be found before the "good" one
18:08 p_gimeno yeah, duplicate recipes are possible
18:08 p_gimeno I'm creating a mod to dump the craft definitions of dark green wool and light green wool
18:08 JDCodeIt ...and does the engine answer back with two predicted outputs or just one?
18:10 sonicpp joined #minetest
18:12 p_gimeno the first match it finds, I guess
18:14 p_gimeno ok, found the recipes
18:14 p_gimeno Recipes for wool:green:
18:14 p_gimeno group:dye,basecolor_greengroup:wool
18:14 p_gimeno Recipes for wool:dark_green:
18:14 p_gimeno group:dye,unicolor_dark_greengroup:wool
18:14 JDCodeIt The second is of course "wrong"
18:15 p_gimeno the second?
18:15 p_gimeno it looks to me that the problem is that dark green dye matches basecolor_green
18:16 JDCodeIt sorry. my misread there - it is that the basecolor_green is both green and dark_green?
18:16 p_gimeno I would say so
18:16 JDCodeIt So inverting the list of recipes is not a bug.
18:17 p_gimeno well, it causes side effects, as can be seen above
18:17 p_gimeno so it's kind of a bug
18:17 JDCodeIt Any particular reason you can think of that the list is processed in reverse?
18:18 JDCodeIt I guess there could be some expectation that the first registered recipe takes precedence
18:18 p_gimeno as I said, the loop at lines 1005-1006 loops in reverse, but elements are added to the new list in the forward direction (line 1011)
18:19 p_gimeno as a quick test, I replaced push_back(def) with insert(new_vec_by_input.begin(), def), and I got dark green wool as expected
18:20 p_gimeno registering a recipe twice might be already caught somewhere - haven't checked. But in this case, the recipes were *different*.
18:20 JDCodeIt Just wondering if the processing order of reverse was a legacy thing - the author was removing nodes from the middle?
18:21 JDCodeIt but now a new list is built and swapped
18:21 p_gimeno to clarify, the processing order has not changed, the list is reversed in both stable-0.4 and master
18:21 JDCodeIt Yes, understood your solution.
18:22 p_gimeno what has changed, is how these recipes are registered, let me check the new definitions after these commits
18:23 JDCodeIt I was just wondering - why even process in reverse if you are not touching the original list.
18:24 p_gimeno Recipes for wool:green:
18:24 p_gimeno group:dye,color_greengroup:wool
18:24 p_gimeno Recipes for wool:dark_green:
18:24 p_gimeno group:dye,color_dark_greengroup:wool
18:24 JDCodeIt Seems very assembly - DEC, then JPZ
18:24 p_gimeno JDCodeIt: no idea... probably patch after patch after patch :)
18:25 p_gimeno what I wonder is why to make a new list in the first place
18:25 JDCodeIt Good point - what type of list is this? linked list?
18:26 p_gimeno std::vector, it's up to the implementation
18:26 p_gimeno that method may work better if massive deletions are expected, but in most cases, I doubt it
18:27 JDCodeIt by override or the base?
18:28 p_gimeno I don't understand the question
18:28 JDCodeIt Is it a template class or it has some base implementation?
18:30 p_gimeno it's part of the STL, it does have a base implementation that depends on the C++ library, but I think there are guidelines about the expected runtime of each operation (like e.g. std::vector::swap() does not depend on the number of elements etc)
18:30 JDCodeIt I read that std:vector<> is guaranteed to occupy contiguous memory - sounds like not linked list - but I would think you could override that
18:32 JDCodeIt Maybe was speed - but really, clear_craft should be called at startup, not while running, eh?
18:34 p_gimeno yeah
18:40 p_gimeno well, I sorta get it. Doing it this way is O(n) while doing it with vector::erase() it's O(n²).
18:49 p_gimeno remove_if <https://en.cppreference.com/w/cpp/algorithm/remove> seems like what should have been used here
18:51 JDCodeIt Where are we at C++11 - this is supported?
18:52 p_gimeno remove_if is previous to C++11, anyway Minetest has already switched to C++11
18:53 JDCodeIt it even supports parallelism - nice.
18:55 p_gimeno seems that the reverse loop is there since the beginning: https://github.com/minetest/minetest/commit/281e9f39fdffd106e79122ae23e2b5443a5daea3
18:55 JDCodeIt I'll add our findings to the original issue report - main thing is that there are essentially duplicate recipes in play.
18:58 p_gimeno yes, apparently the problem is that dark green dye matches basecolor_green
19:00 p_gimeno and that on top of that, clear_craft is reversing the internal recipes list
19:01 p_gimeno I'll add a report for the latter
19:01 JDCodeIt Issue https://github.com/minetest-mods/moreblocks/issues/130 comments added.
19:07 sonicpp joined #minetest
19:08 karamel joined #minetest
19:15 scr267 Anyone have issues with connected glass showing strange slab-shaped artifacts?
19:22 p_gimeno #8427
19:22 ShadowBot https://github.com/minetest/minetest/issues/8427 -- clear_craft() is reversing the recipes list
19:24 p_gimeno galaxie: whoever made that claim had no idea of how LuaJIT operates
19:24 troller joined #minetest
19:25 p_gimeno I wish there was a MediaWiki blame tool...
19:27 LMD joined #minetest
19:29 LMD joined #minetest
19:30 galaxie I saw the page on MVC programming for MT mods and all, but I'd still like to know a way to mock minetest. Just a simple table that does nothing for functions that get called, etc.
19:31 p_gimeno anyway, I've removed that sentence
19:32 rubenwardy galaxie: see the person that made the profiler
19:32 rubenwardy hmm
19:32 rubenwardy T4im
19:32 rubenwardy https://github.com/t4im?tab=repositories&amp;type=source
19:32 rubenwardy iirc there's some mocks in one of these repos
19:33 rubenwardy would be nice to have a standard mocking library for Minetest
19:34 JDCodeIt Can't seem to get the coral reef decoration to appear in mgv7 - I even commented out the biomes requirement - not looking hard enough or is there a trick?
19:35 galaxie rubenwardy: Which one would be the profiler? shakedown? coretest? Or is it integrated with MT?
19:35 Taoki joined #minetest
19:37 rubenwardy galaxie: the profiler is built in to minetest
19:38 AntumDeluge joined #minetest
19:41 galaxie ruberwardy: Apparently there's a minitest/mock
19:49 kurtzmusch_ guise, where can i configure the parameters for mapgen?
19:55 JDCodeIt mapgen params : https://dev.minetest.net/Mapgen_Parameters
20:00 kurtzmusch_ tx
20:00 nowhere_man joined #minetest
20:08 nri joined #minetest
20:15 Darcidride joined #minetest
20:31 FreeFull joined #minetest
20:39 nri joined #minetest
20:49 nri^AFK Nri went afk
20:52 kaeza AFK nicks/notices are cancer.
20:53 kaeza Also greetings.
20:53 nri^AFK lol
20:54 nri^AFK test
20:54 nri^AFK afk?!
20:55 nri^AFK left #minetest
20:55 nri joined #minetest
20:59 cddepppp256 joined #minetest
21:08 JDCodeIt Can anything be controlled on the priority of the emerge threads? Or anything to make less impact on the lag it can cause?
21:14 p_gimeno not really
21:14 p_gimeno the lag is due to locking
21:15 p_gimeno or that's what I presume
21:19 p_gimeno any idea what is/was worldedit_infinity / worldedit_limited for?
21:40 JDCodeIt size of the area to edit I think
21:45 YuGiOhJCJ joined #minetest
21:46 p_gimeno I mean, they are mods in the WorldEdit modpack
21:46 p_gimeno er, were
21:47 p_gimeno it keeps working when omitting both
21:48 JDCodeIt limited was "limited" to 30x30x30 volume and made a safe wrapper for the functions
21:48 JDCodeIt infinity has some kind of ray calculator I never used
21:48 p_gimeno ahh thanks
21:54 diemartin joined #minetest
22:01 riff-IRC joined #minetest
22:19 nowhere_man joined #minetest
22:39 YuGiOhJCJ joined #minetest
22:49 kaeza joined #minetest
22:56 nerzhul no lag is not due to locking
22:56 nerzhul we loose many time on lua callbacks generally
23:08 argyle77 joined #minetest
23:12 walle303 joined #minetest
23:42 Emerald2 Is there a way to stop the technic chainsaw massacring so much of the forest?
23:42 paramat joined #minetest
23:48 paramat !tell JDCodeIt coral reefs are intentionally slightly rare, see https://github.com/minetest/minetest_game/pull/2254#issuecomment-438866092
23:48 MinetestBot paramat: I'll pass that on when JDCodeIt is around
23:49 cddepppp256 joined #minetest

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