Minetest logo

IRC log for #minetest-dev, 2014-11-20

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

All times shown according to UTC.

Time Nick Message
01:48 khonkhortisan joined #minetest-dev
02:27 Zeno` joined #minetest-dev
02:44 chchjesus__ joined #minetest-dev
03:03 mrtux joined #minetest-dev
04:04 chchjesus__ joined #minetest-dev
04:12 mrtux joined #minetest-dev
04:35 Zeno` Any comments on #1829 ?
04:35 ShadowBot https://github.com/minetest/minetest/issues/1829 -- Fix raillike render on Android, and minor improvement to readability. by KodexKy
04:36 Zeno` The bug seems to be that on Android char is unsigned
04:36 Zeno` it's the only thing I can see different in the PR anyway, apart from the cosmetic changes
04:46 Zeno` Any opposition to me merging it?
04:51 shmancelot joined #minetest-dev
05:06 Miner_48er joined #minetest-dev
05:06 sol_invictus joined #minetest-dev
05:34 ShadowNinja Zeno`: Seems O.K.  Maybe int -> short though.
05:35 Zeno` short... ok, I guess (didn't realise memory was that limited, but I see your point)
05:42 Zeno` Ok I've changed to short and will merge
05:43 ShadowNinja Zeno`: It could be a long long for all that the memory matters, but that just isn't the right way to do it, it's just wasting space.
05:44 Zeno` yes, that's fair enough
05:45 ShadowNinja Zeno`: Also: 1. How do you want your line displayed in the credits menu (email? real name?) 2. Please include commit hashes when closing merged PRs.
05:45 Zeno` I didn't know about #2 (will do so from now on, thanks)
05:45 ShadowNinja (full ones, GitHub will automatically apreviate them)
05:45 Zeno` Umm, I dunno... Craig Robbins (Zeno) is fine I guess
05:47 ShadowNinja Zeno`: Oh, that reminds me.  You're entitled to zeno@minetest.net (or whatever usernane you prefer) if you want it.
05:48 Zeno` ShadowNinja, probably not at the moment thanks (I have enough trouble keeping up with my other 14 email accounts :))
05:49 Zeno` Is that a better way to close the PR? https://github.com/minetest/minetest/pull/1829
05:49 ShadowNinja Zeno`: Yep, great.  :-)
05:49 Zeno` k :)
06:02 Zeno` Maybe signed char would have been better than short
06:02 Zeno` too late now
06:04 Zeno` Is #1673 supposed to be closed?
06:04 ShadowBot https://github.com/minetest/minetest/issues/1673 -- Add in-game Change Key menu. by mushiden
06:18 ShadowNinja Zeno`: Er, yes...
06:21 ShadowNinja Done.
06:37 Hunterz joined #minetest-dev
06:49 Wheatley-555_ joined #minetest-dev
07:03 Anchakor_ joined #minetest-dev
07:07 rickmcfarley joined #minetest-dev
07:47 jin_xi joined #minetest-dev
07:53 darkrose joined #minetest-dev
08:11 kilbith joined #minetest-dev
08:35 selat joined #minetest-dev
09:04 Amaz joined #minetest-dev
09:59 chchjesus__ joined #minetest-dev
10:07 FR^2 joined #minetest-dev
10:17 ImQ009 joined #minetest-dev
11:00 Fritigern Oh my goodness..... I just pulled and built from git, and.... well.... Errors up the bum when i start minetestserver.... http://pastebin.com/ju4wAzHN
11:02 Fritigern All of those errors, except for the one on line 1, are new
11:02 kaeza joined #minetest-dev
11:03 kaeza Fritigern, it's a GoodThing™
11:03 Fritigern The build log is clean, aside from the costomary "tmpnam" error
11:03 Fritigern *cutomary
11:03 Fritigern whatever, i can;t type
11:04 Zeno` what the...
11:04 kaeza also mornings
11:04 Fritigern kaeza steward: Why is it a good thing, if i may be so bold to ask
11:05 Zeno` It's probably https://github.com/minetest/minetest/commi​t/a6ba042cf792d29cda4f7f7924a68a017d9b0335
11:05 Zeno` do you know how to bisect?
11:06 kaeza Fritigern, it means mods are polluting the global namespace for no reason
11:07 Zeno` They're just warnings though (as far as I can see)
11:07 kaeza which may lead to hideous bugs
11:08 Fritigern Soooo... Now i can;t even log on to that server
11:09 Fritigern Even worse, my machine is going nuts, something (dunno what) iseating all of my RAM and i can not even open a terminal to check top
11:09 Fritigern I think it may be the MT client, but i have no actual proof
11:09 Fritigern Valgrind, here i come!
11:10 Fritigern Well, as soon as i can move again
11:11 Fritigern Okay, as soon as i managed to open a terminal and kill minetest, my PC started to behave again. Scary!
11:13 Fritigern (btw, i know what valgrind is supposed to do, but i have never used it....)
11:14 kaeza ShadowBot, that is not possible without some heavy hackery making things less clear
11:14 ShadowBot kaeza: O.K.
11:14 kaeza ...
11:14 kaeza ShadowNinja, ^
11:15 Fritigern Wait...... Perhaps the memory issue is caused by the texture pack HDX-512 *slaps forehead*
11:15 chchjesus__ joined #minetest-dev
11:16 kaeza or probably can, at the expense of adding Lua function call overhead for every non-existant field lookup
11:17 kaeza that's because meta.__index is not recursive when using a table
11:19 kaeza i.e. if you `setmetatable(t, {__index=mt})`, then `t[k]` is the same as `rawget(mt, k)`, NOT `mt[k]`
11:19 kaeza (for fields not existing in `t`)
11:20 DFeniks joined #minetest-dev
11:20 kaeza hope that makes sense...
11:20 Fritigern Oh my goodness. Valgrind is slows down MT so flipping much!
11:20 Fritigern *is slowing
11:21 Zeno` I'm not sure valgrind will provide much that is useful in this case anyway heh
11:21 Zeno` but let it finish
11:22 Fritigern If there is a memory leak, then Valgrind will prolly find it, which is why i started it. for a while i had a feeling that MT is not 100% free of leakage.....
11:22 Zeno` nah it won't find it if it's cleaned up properly on exit
11:22 ImQ009 joined #minetest-dev
11:22 Fritigern Then again, if there is a leak, then there is no guarantee that my setup will meet the conditions for this leak
11:23 Zeno` which is the main reason I can't track down what I think is a leak in the client
11:23 Zeno` not using valgrind anyway*
11:23 Fritigern Wouldn;t it be a hoot if i just stumble upon it? :-))
11:23 Zeno` it would
11:24 Fritigern It now gives me the blach blah about default_fence.png not found, and using a dummy image. This is normal, and my client does that all the time
11:25 Fritigern Well, "normal" is a relative term of course
11:25 zat joined #minetest-dev
11:31 Fritigern So, in Lua terms. Is a global a variable that is accessible by other scripts as well? Or a variable that is defined for the entire script, as opposed a variable that is defined per function (for lack of a better word)?
11:33 Fritigern BTW, after logging in, i get a ton of spam in the console about "03:32:58: WARNING: Undeclared global variable "spawn_plants" accessed at ...orlds/Pacata/worldmods/plan​tlife/plants_lib/init.lua:502"
11:34 Fritigern This started when i logged into my server, and stopped after i logged out
11:35 Fritigern The valgrind log, for whoever knows how to read it ;-)   http://pastebin.com/0h3tm6g5
11:36 ImQ009 joined #minetest-dev
11:40 kaeza Fritigern, in Lua, every variable is global unless you *explicitly* mark it local, contrary to e.g. Python where defining a variable inside a function keeps it local unless marked global (or at least, kept in the module)
11:41 kaeza globals in Lua leak to everything that is using the same interpreter, which can inadvertently overwrite other important stuff (this already happened around here)
11:42 Fritigern So, if i understand correctly, the errors, or most of them, on the startup of my server could be prevented by simply declaring the global?
11:43 kaeza some variables may be indeed meant as global, while others local
11:44 kaeza "declaring" as global is as easy as doing `foo = bar` at the top level of the script (i.e. what in Python would be called "module level")
11:44 Fritigern Of course, it takes common sense and proper judgement there. But assuming that they were supposed to be globals, would "global varname" near the top of the script fix it?
11:44 Fritigern Ah, i see
11:45 Fritigern So in the case of the spawn_plants spam that i see in my console, the fix could be to set "spawn_plants = 1" near the top of the script?
11:46 Fritigern (of course, i would have to go and see what type of var the script expects, but that's a DUH!"
11:46 kaeza indeed
11:47 Fritigern Okay, off i go. On to a new global adventure! :-))
11:49 Zeno` Fritigern, that valgrind output... what does it relate to? A single player game (where a server is launched) or a connection to an existing server?
11:49 Fritigern And this is how i discovered that spawn_plants is only used in that one line that is being complained about
11:49 Fritigern Zeno`: That was my client connecting to my server
11:50 Zeno` so just a normal client connecting to a remote host run?
11:50 Fritigern Well, the server and the client both ran on the same PC, but they were two separate instances
11:50 Zeno` yep, cool. thanks
11:51 Fritigern Anything i can do to help make this game better :-)
11:51 Zeno` Anyway it all seems fine to me
11:52 Zeno` well as fine as it can get ignoring irrlicht or opengl issues
11:53 * Fritigern has OpenGL 4.4, i will not be responsible for any OpenGL errors. Nyaaa!
11:53 Zeno` :)
11:53 Fritigern :-)
11:53 proller joined #minetest-dev
11:58 Fritigern I may have messed up plants_lib, but i'll find out :-)
12:02 Fritigern OMG, no console spam. Could it be that i have fixed an actual bug? Line 502 uses the variable spawn_plants, but when i searched the file for spawn_plant, i keep seeing "biome.spawn_plants" so i changed the only two instances of spawn_plants to that. So far so good....
12:06 Zeno` Where is sapier?
12:06 Fritigern Well, plants_lib no longer complains. Which doesn;t mean that i fixed it, it merely means that i changed something so that it no longer complains. For all i know, it could be quietly destroying my world.
12:07 Zeno` Kind of need him to review #1826
12:07 ShadowBot https://github.com/minetest/minetest/issues/1826 -- Fix for various Android build errors. Enable landscape rotation. by KodexKy
12:07 GrimKriegor joined #minetest-dev
12:07 Zeno` unless someone else is good with Android
12:08 Zeno` I'm going to get an Android but I can't test this yet although it looks good and it needs to be merged before 0.4.11 is released
12:10 Zeno` The only thing I am unsure about is: android:screenOrientation="sensorLandscape"
12:10 Zeno` the rest is fine
12:11 Fritigern VanessaE: In case you wouldn;t, please read the backlog and what i did to plants_lib. I don;t know if i did something right, or wrong.
12:27 NakedFury joined #minetest-dev
12:29 proller joined #minetest-dev
12:34 Wayward_One Zeno`, need someone to test it on an Android?
12:35 Zeno` Wayward_One, yes and also confirm that android:screenOrientation="sensorLandscape"  is the correct setting
12:35 Zeno` from what I have googled it seems right
12:35 Zeno` Wayward_One, you can compile for Android?
12:36 Wayward_One oh, no i can't :/
12:36 Wayward_One i can try though
12:36 Zeno` you're braver than me
12:37 Zeno` I've just ordered a Samsung Galaxy thing so I can test
12:37 Zeno` but I guess it will take a few days to arrive
12:38 Zeno` there goes next weeks food :D
12:38 Wayward_One lol
12:40 SudoAptGetPlay joined #minetest-dev
13:07 PenguinDad joined #minetest-dev
13:08 SudoAptGetPlay left #minetest-dev
13:36 ImQ009 joined #minetest-dev
13:42 sol_invictus joined #minetest-dev
14:03 ImQ009 joined #minetest-dev
14:13 shadowzone joined #minetest-dev
14:16 NakedFury joined #minetest-dev
14:30 SudoAptGetPlay joined #minetest-dev
14:31 SudoAptGetPlay left #minetest-dev
14:45 proller joined #minetest-dev
15:05 shadowzone joined #minetest-dev
15:12 twoelk joined #minetest-dev
15:16 luizrpgluiz joined #minetest-dev
15:17 luizrpgluiz hi
15:19 luizrpgluiz would be possible to put in an implementation minetest as skins in multiplayer as it has in minecraft? eg in multiplayer can put your skin and look the other player custom skin instead of the default skin in the game
15:20 shadowzone joined #minetest-dev
15:24 shadowzone joined #minetest-dev
15:25 PenguinDad There are still some variable problems http://pastie.org/9732523
15:25 proller joined #minetest-dev
15:32 luizrpgluiz left #minetest-dev
15:43 hmmmm joined #minetest-dev
15:43 proller joined #minetest-dev
15:43 Amaz joined #minetest-dev
15:49 shadowzone joined #minetest-dev
15:50 proller joined #minetest-dev
16:01 luizrpgluiz joined #minetest-dev
16:02 luizrpgluiz could some day create a similar system logins to put their own skin in minetest as it has in minecraft?
16:07 shadowzone joined #minetest-dev
16:17 ShadowNinja PenguinDad: "Assignment to undeclared global inside a function" is a very serious warning, in fact it used to be an error, because it's almost never intentional.
16:18 ShadowNinja I should probably add minetest.global_exists() to fix the majority of those warnings (accessing undeclared global)
16:19 PenguinDad ShadowNinja: I know that and that's why I did this https://github.com/minetest/minetest_game/pull/343
16:19 ShadowNinja I'll move the serious ones to errorstream too.
16:20 ShadowNinja PenguinDad: Looks good to me, but I won't touch it lest BlockMen gets annoyed at me again.
16:21 PenguinDad sfan5: do you agree with that pull?
16:24 ShadowNinja Comments on this?  http://sprunge.us/cIIL?diff
16:25 ShadowNinja It makes the most serious class of errors log to errorstream and adds minetest.global_exists().
16:26 ShadowNinja (checking for a global is the most cause of warnings)
16:28 luizrpgluiz left #minetest-dev
16:38 ShadowNinja sfan5, hmmmm: ^ Seems O.K. (+ doc) ?
16:40 Sokomine ShadowNinja: those times where i access global variables in order to check if something exists give me some trouble regarding the error messages. so your minetest.global_exists() would be very helpful. other than that, i'm very glad that there are warnings now
16:42 sfan5 lolwat
16:42 sfan5 do you want to replace builtin lua features by a special function just because finding mistakes in mods?
16:47 ShadowNinja sfan5: Lua's builtin behavior is messed up, it lets you do a lot of things that are often bugs.
16:48 sfan5 can we at least add a setting for this?
16:48 ShadowNinja global_exists just redirects to rawget for now.
16:48 ShadowNinja sfan5: For what?
16:48 sfan5 for the warning
16:48 sfan5 random users don't care about that
16:48 sfan5 and will get confused
16:49 n4x because warnings that can show where bugs happen are totally evil
16:49 ShadowNinja sfan5: Hmmm, the issue is that mod developers have to know about the setting.
16:50 sfan5 add it to docs
16:50 ShadowNinja sfan5: Oh, yes, because everyone reads the entire 478 line example conf.
16:50 rubenwardy joined #minetest-dev
16:51 ShadowNinja And the 2814 line lua_api.
16:51 sfan5 isn't there a page about common bugs in mods or something in the dev wiki
16:51 shadowzone joined #minetest-dev
16:52 ShadowNinja There's one on the user wiki for platform-specific Minetest core bugs.
16:52 Sokomine some advertisement for that new debugging option in the forum can't hurt either :-)
16:52 ShadowNinja (Troubleshooting)
16:53 ShadowNinja Sokomine: Yes, but it has to be obvious to everyone that starts to make mods after the announcement and doesn't read the whole news section.
16:53 Sokomine ShadowNinja: that's right. only people who are specificly looking for something (or by chance read the channel at the time the issue is discussed) will ever get to know about new features. articles in the forum could help a lot there. most mod developers read the forum, and it doesn't scroll away. a small topic "new features/changes" could help
16:54 ShadowNinja We should have an official "Guide to making a mod" that includes that.
16:54 ShadowNinja Sokomine: These warnings really shouldn't exist as soon as moders fix their mods though.
16:55 rubenwardy I started making a tutorial guide for Minetest modding. In the style of a book
16:55 ShadowNinja A setting's fine if it's on be default though.
16:57 rubenwardy https://www.dropbox.com/s/9j5l6w​vbn7o46rf/MinetestGuide.odt?dl=1
16:58 ShadowNinja I've found a real bug in WorldEdit with this.  It's accessing check_set to pass it to a function, which doesn't exist so it's assed as nil.
17:00 ShadowNinja It also greates a "safe_region" global function, another bug.
17:01 ShadowNinja This should be run with WARN_INIT to catch some of the more hidden bugs.
17:04 Sokomine hm. mt aims at making modding easy - even for people who have no clue at all about programming. at least those people usually don't create something complex. the most helpful way might be to have a short, comprehensible explanation of the existance of the option, of what it means, what local variables are regarding lua, and to have that explantion be the first hit on google when people search for the error message
17:04 Sokomine put the discussion to the forum by all means
17:07 ShadowNinja Ugh, the Android build uses hardcoded paths for the menu and tmp directory.
17:07 Hunterz joined #minetest-dev
17:10 Anchakor_ joined #minetest-dev
17:32 GrimKriegor joined #minetest-dev
17:43 Krock joined #minetest-dev
17:58 celeron55 format the warning similarly as some other project that uses a similar mechanism in lua
17:58 celeron55 that'll help random people who stumble upon it
17:58 celeron55 (i don't know who else uses it, though)
17:59 proller joined #minetest-dev
18:02 selat joined #minetest-dev
18:04 celeron55 also: in my opinion lua's standard behavior with globals is exactly correct; it makes every scope behave in a consistent way; the problem is that using a wrapper like this for globals is not commonly recommended and used where appropriate
18:05 celeron55 or, umm... well
18:05 celeron55 maybe it's still a bad idea for a default behavior 8)
18:32 Calinou joined #minetest-dev
18:33 proller joined #minetest-dev
18:58 kaeza ShadowNinja, https://github.com/kaeza/minetest/commit/​d9eacd2310de61e6504847444384bef59697e09d
18:58 Krock classic.
19:00 kaeza oops, forgot documenting `itemdef_default`
19:01 kaeza eh, the others aren't documented either...
19:03 kaeza if there are no more complaints, I think builtin/game/ is done
19:04 ShadowNinja kaeza: You said it wasn't recursive though, you'll have to use an __index function to make it recursive.
19:04 kaeza that's what I did in the last commit
19:04 ShadowNinja kaeza: You could just copy to the tables though, since it's not all that huge.
19:05 ShadowNinja That would be simpler.
19:05 kaeza so *def_default "inherits" from itemdef_default
19:05 ShadowNinja But it wouldn't work after init....
19:05 kaeza eh?
19:05 ShadowNinja kaeza: Nevermind.
19:05 kaeza alright
19:06 ShadowNinja kaeza: I noticed that there was some ugliness in __builtin:item where it used to_table() to just get_name(), did you get that?
19:06 kaeza FWIW, I overwrote a commit that copied the tables, but figured someone would want to do `core.itemdef_default.stack_max = 1337` and affect both nodes and craftitems
19:07 kaeza hmm
19:07 kaeza lemme look t that
19:10 kaeza oops, missed that one, fixed locally
19:10 MinetestForFun joined #minetest-dev
19:14 kaeza ShadowNinja, https://github.com/kaeza/minetest/commit/​c2f3e43f7a162d70fd04704e8a03004c8f49d950
19:15 ShadowNinja kaeza: Yes, that's exactly why I thought it was better as a metetable.
19:16 ShadowNinja kaeza: Um, itemstring isn't actually used -- right?  Otherwise you'll lose item wear and metadata.
19:19 rubenwardy Grrr, making me rebase, Kaeza
19:21 kaeza ShadowNinja, what do you think about removing self.itemstring entirely, store the itemstack directly into the instance, and serialize `stack:to_table()` in `get_staticdata`?
19:23 kaeza (of course, adding compat code for old items)
19:23 ShadowNinja kaeza: That sounds good.  Wear is somehow stored though, so I must be missing something.
19:24 kaeza yes, I noticed dropping an used tool and picking it up again keeps the wear
19:24 kaeza is :get_count() returning the same as :get_wear() somehow?
19:25 kaeza (or rather, the inverse of :set_wear()?)
19:25 ShadowNinja kaeza: Regular droping uses to_string (line 7)
19:25 kaeza can't tpye
19:25 Krock get_count() must return 1 on tools
19:26 Krock it doesn't have to do with wear
19:26 ShadowNinja kaeza: So wear, etc are only dropped if the count is more than stack_max.
19:26 ShadowNinja Items shouldn't limit that though.
19:27 ShadowNinja I'd like my stacks of 65535 to stay that size.
19:27 ShadowNinja The issue is adding that to an inventory...
19:27 kaeza hence, dropping itemstring and storing stack properly
19:28 ShadowNinja So I guess the limit is appropriate.  Just store the stack or the table in the defnition and avoid itemstrings.
19:28 ShadowNinja stack would be better.
19:28 ShadowNinja Make sure to keep compatability though.
19:29 ShadowNinja Nothing should use itemstring directly, and you can wrap set_item's argument in Itemstack() to make sure it's a stack.
19:29 kaeza is keeping dropped items "consistent" between versions a priority? (e.g. dropping something in 0.4.10 and picking it in 0.4.11) I always thought of dropped items to be "temporary" anyway
19:30 kaeza moreso with the recent addition of TTL
19:32 kaeza eh I don't think support code would be too much either
19:32 * kaeza codes
19:34 kaeza erm, wait... it is stored as a serialized table already..
19:49 * ShadowNinja is trying to fix the Android main menu loading.
19:51 kaeza other thing: the "merge nearby items" feature is run every damn step... is this really necessary?
19:51 Calinou should be run every second
19:51 kaeza would you mind if I run it every half a second?
19:51 kaeza or that
19:53 ShadowNinja kaeza: It should run as long as the item's falling.
20:00 ShadowNinja Some things I want to push:
20:00 ShadowNinja Simplify loading of Android version of menu
20:00 ShadowNinja Fix leaking global in texture pack menu
20:00 ShadowNinja Add minetest.global_exists()
20:01 ShadowNinja Comments please.
20:02 ShadowNinja Details on Android one: http://sprunge.us/CSZg?diff
20:09 FR^2 joined #minetest-dev
20:17 Miner_48er joined #minetest-dev
20:20 ShadowNinja hmmmm, celeron55, sfan5: ^  Are those O.K.
20:21 sfan5 what is 'those'?
20:21 ShadowNinja Note: I haven't actually build the Android version.
20:21 ShadowNinja sfan5: Look up.
20:21 sfan5 oh
20:21 monty joined #minetest-dev
20:21 sfan5 <ShadowNinja> Simplify loading of Android version of menu
20:21 sfan5 <ShadowNinja> Fix leaking global in texture pack menu
20:21 sfan5 yes
20:21 sfan5 <ShadowNinja> Add minetest.global_exists()
20:21 sfan5 no
20:22 ShadowNinja sfan5: Why no?
20:22 sfan5 because I disagree with replacing builtin lua features with function
20:22 sfan5 +s
20:23 ShadowNinja sfan5: That's just `rawset(_G, name) ~= nil`.
20:23 ShadowNinja Er, rawget.
20:23 ShadowNinja It doesn't remove rawget.
20:23 sfan5 but it makes checking for globals the way every lua programm would do it 'wrong'
20:23 ShadowNinja sfan5: ^ It doesn't replace it, it's just a clearer way to do something.
20:24 ShadowNinja sfan5: Because it is wrong, you should'nt check for globals like that.
20:24 sfan5 does it say that in the PIL?
20:25 ShadowNinja Either you use rawget, which is ugly, or I have to limit it even more.
20:25 ShadowNinja sfan5: Of course not, it's a general programing bad practive, not a Lua one.
20:25 ShadowNinja Lua is very lenient, but that makes certain classes of bugs really easy, like misspelling ones.
20:26 sfan5 checking for globals by just testing whether they exist is bad practice?
20:26 ShadowNinja And global collision ones.
20:26 hmmmm looks good to me
20:27 ShadowNinja sfan5: Checking for globals by checking their value is bad.
20:27 proller joined #minetest-dev
20:28 ShadowNinja hmmmm: For all commits?
20:28 hmmmm i was referring to the last one you pasted, the android lua menu one
20:28 sfan5 ShadowNinja: why is that bad?
20:28 hmmmm really wish there was like a template that could be used instead
20:29 hmmmm sfan5, i'd imagine it has pretty horrible performance ramnficaitions
20:29 sfan5 mod loading being too slow is currently not a problem
20:30 hmmmm could also be another reason.  i'm not a lua expert
20:30 hmmmm was just guessing
20:30 sfan5 thats why I'm asking
20:30 sfan5 I'm not a lua expert either
20:30 ShadowNinja sfan5: Because it's indistinguishable from using it.  So if you misspell something and access a non-existent global you should get an error.
20:31 sfan5 add a setting and I'm ok with it
20:31 sfan5 warnings only serve as confusion for users
20:32 ShadowNinja You can't tell the difference between `if intllib then...` and `minetest.after(0, intllib.Getter, minetest.get_current_modname())`
20:33 ShadowNinja sfan5: I can't remove the warnings, as I already discussed.  We'll just have to wait a few days for modders to fix their mods.
20:34 sfan5 wait a few days
20:34 sfan5 pff
20:34 sfan5 as if
20:34 sfan5 modders won't fix their mods that fast
20:34 ShadowNinja I'll probably get yelled at a lot, but I've already fixed some real bugs.
20:35 sfan5 please provide a tl;dr why you can't remove the warning
20:35 ShadowNinja sfan5: Anyone using latest will.  By a week after the next release anything that's maintained at all should be fixed.
20:35 hmmmm heh
20:35 hmmmm javascript solved this by distinguishing between null and undefined
20:35 ShadowNinja sfan5: Because no moders will see it and nothing will be fixed!
20:37 sfan5 annoying the users with warnings and making them get on the modders nerves is not a good solution
20:37 celeron55 what does javascript's null vs. undefined solve? i have so far seen nothing it is useful for, only downsides
20:38 ShadowNinja sfan5: On the contrary, it is, because it will get bugs fixed.
20:38 monty joined #minetest-dev
20:42 ShadowNinja Here's the issue: mods have global detectors such as `if intllib then`.  These now (rightly) cause warnings if the global doesn't exist.  The only solution right now is something like `if rawget(_G, "intllib") then` since it bypasses the strict metatable.  global_exists just makes this a little cleaner and more readable.
20:43 ShadowNinja Another option is get_global_or_nil or something like that, that just wouldn't print warnings.
20:49 Sokomine another way to circumvent the potential non-existance of global variables might be to check if the mod which is known to define it exists. that global_exists would be a more practical approach than that
20:49 Sokomine you really ought to discuss this on the forum
20:50 kaeza "self.object:get_luaentity().itemstack"
20:50 kaeza ·_·
20:54 ShadowNinja kaeza: Oh, yes.  I've seen things like that a few times before.
20:55 kaeza it's basically saying "x = (1 + 1) - 1"
20:58 Amaz joined #minetest-dev
20:58 celeron55 i agree with discussing this on the forum
20:59 celeron55 people won't be so much against it if they hear the reasonings beforehand and can ask questions before it's taken into use
20:59 CraigyDavi_ joined #minetest-dev
21:02 kaeza Lua distinguishes between "no value" and "nil", but such functionality is only available from C :/
21:03 kaeza if (lua_type(L, index) == LUAT_NONE) ...
21:04 kaeza or was it LUA_TNONE? can't remember now
21:06 shadowzone joined #minetest-dev
21:06 asl joined #minetest-dev
21:06 monty joined #minetest-dev
21:08 Megaf [20:38:12] <ShadowNinja> sfan5: On the contrary, it is, because it will get bugs fixed.
21:08 Megaf Agree, we had actual bugs fixed on plantlife and homedecor because of these warnings
21:08 Megaf I like them
21:08 VanessaE ShadowNinja: maybe what's needed is that any of those "undeclared" warnings be made less...  "the sky is falling" worrisome if they occur during init?
21:09 VanessaE Megaf: one actual bug, in plants_lib.
21:10 Megaf VanessaE: only one?
21:10 Megaf anyway, we we found one bug and fixed it is already a fantastic thing
21:10 VanessaE (the advent of an if_exists() function would help, but I wonder if ^^^ that would be easier and perhaps more transparent)
21:12 VanessaE frankly I'm hesitant to update to current HEAD now.  I shudder to see how many of these kinds of warnings Dreambuilder will generate.
21:12 marioxcc joined #minetest-dev
21:13 marioxcc Hello. What's the recommended way to do log rotation of minetest?
21:13 VanessaE marioxcc: manually.
21:14 marioxcc VanessaE: why?
21:14 VanessaE well unless you have a preferred utility to do it, mv debug.txt debug.txt.old ; minetest(server)  is about as good as anything else
21:14 VanessaE unix logrotate(8) utility might help
21:15 marioxcc VanessaE: I took a look at logrotate. Also, moving the file doesn't works, the file descriptor will point to the new file.
21:16 marioxcc Does minetest have some level of awareness of log rotation?
21:16 VanessaE if minetest is running, sure.
21:16 VanessaE so shut your server down, flip the logs, restart.
21:17 marioxcc well, that's not a satisfactory method.
21:17 marioxcc for it requires to shut down minetest when rotating
21:17 VanessaE you should shut your server down daily for backups anyway
21:18 VanessaE do your log rotation then
21:26 proller joined #minetest-dev
21:31 kaeza https://mediacru.sh/n-syaWQzcTSJ :D
21:32 marioxcc left #minetest-dev
21:33 VanessaE kaeza: I said LOG rotation, not MESH rotation :P
21:34 shadowzone Lol
21:34 kaeza that is a dropped stack... maybe I should limit the size :P
21:35 VanessaE um.  yeah.
21:48 Megaf kaeza: it was a LOG, not a SAND rotation
21:50 Megaf This is a log, http://www.catalogclassics.com/gr​aphics/products/large/VN3252.jpg
21:50 Megaf In minetest we call them trees
21:50 Megaf lol
21:53 Megaf what would the lua line would be to create a new group of items?
21:53 Megaf like, we have the group wood planks, and group wires
21:53 Megaf neverming, I will read some code
21:54 Megaf and sorry, wrong channel
22:01 Megaf joined #minetest-dev
22:07 shadowzone joined #minetest-dev
22:11 shadowzone joined #minetest-dev
22:15 luizrpgluiz joined #minetest-dev
22:16 luizrpgluiz hi, what are the plans for minetest 0.4.11?
22:18 Wayward_One joined #minetest-dev
22:36 ShadowNinja luizrpgluiz: We plan to release it -- eventually.  :-P
22:37 ShadowNinja There's nothing specially planned for it.
22:37 kaeza ShadowNinja, https://github.com/kaeza/minetest/commit/​680a5edcb8962839916a90fe0ee4bcd3c859167b
22:39 kaeza left a debug stmt there, it's gone locally
22:40 diemartin joined #minetest-dev
22:40 ShadowNinja kaeza: Use ItemStack always, so you have a copy instead of a reference.
22:41 CraigyDavi joined #minetest-dev
22:41 diemartin where, exactly?
22:42 diemartin the only place I use the stack directly there it is intended (because I modify the count)
22:43 ShadowNinja kaeza: At the top of set_item.  You're also missing "self." before "itemstring = " in deserialization.
22:44 ShadowNinja er, itemstack =
22:44 ShadowNinja You should do "self.itemstack = ItemStack(static_data)"
22:45 ShadowNinja Er, NVM the first one.
22:45 kaeza ah derp
22:45 ShadowNinja But "self.itemstring = staticdata" should be "itemstack = ItemStack(static_data)"
22:46 kaeza already fixed locally
22:46 ShadowNinja (And staticdata -> static_data)
22:46 kaeza eh?
22:47 ShadowNinja Second statement wipes out effect of first: ent.itemstack:set_count(left); ent.itemstack = ent_stack
22:48 kaeza already fixed locally, too...
22:50 ShadowNinja kaeza: The Minetest API is inconsistent.  It has get_name and getpos, and mixes like get_worldpath.  everythingsmooshedtogetherwithoutdistinction style is ugly, so I decided that everything that wasn't a well-established compound word (such as filename) should be seperated with underscores and put it in the Lua style guide.
22:51 kaeza that's new
23:11 khonkhortisan joined #minetest-dev
23:24 luizrpgluiz left #minetest-dev
23:26 zat joined #minetest-dev
23:33 khonkhortisan joined #minetest-dev
23:36 paramat joined #minetest-dev

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