Minetest logo

IRC log for #minetest-dev, 2015-11-01

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

All times shown according to UTC.

Time Nick Message
00:05 luizrpgluiz joined #minetest-dev
00:08 luizrpgluiz left #minetest-dev
00:15 hmmmm est31:  did you check out my patch?
00:45 hmmmm or anybody really
00:47 JohnnyComeL8ly Sorry, I'm a little behind.
01:13 luizrpgluiz joined #minetest-dev
01:19 luizrpgluiz someone has tested the modification of EST31?
01:19 JohnnyComeL8ly Where do I get it?
01:42 luizrpgluiz left #minetest-dev
01:45 luizrpgluiz joined #minetest-dev
01:46 luizrpgluiz left #minetest-dev
02:32 hmmmm bleh
02:33 hmmmm somebody on the mtgame side should've added a jack-o-lantern block for tonight :-)
02:33 hmmmm we never do these easter egg things, really ought to though
02:33 JohnnyComeL8ly Oh, boy... spooky.
02:33 hmmmm ermm... are you a developer?
02:34 JohnnyComeL8ly hmmmm, no.
02:34 JohnnyComeL8ly Doesn't stop me from being here, so I though.
02:34 JohnnyComeL8ly I don't interupt everybody else's thoughts.
02:34 hmmmm you seem to be a very active in discussion here
02:35 hmmmm very active participant*
03:08 Puka joined #minetest-dev
03:10 paramat joined #minetest-dev
03:12 paramat nore what's your opinion on game#665 ? just needs another -1 to close it
03:12 ShadowBot https://github.com/minetes​t/minetest_game/issues/665 -- Add many wooden fences made out of the 4 kinds of woods by LeMagnesium
03:14 paramat hmmmm i have an idea to add very simple optional lakes to flat mapgen, to provide water. just a single 2D noise, maybe even flat-bottom lakes too
03:14 hmmmm I don't know, at first glance I didn't like the idea of adding all these different kinds of wooden fences, that's totally mod material
03:15 hmmmm but then again I agree about having different kinds of wood with no use to them
03:16 hmmmm I can't help but feel like this is more of a minetest core issue, because this is a more fundamental problem where we have a group of nodes we'd like to make each with their own separate 'materials'
03:17 hmmmm paramat, isn't that the point of a "large cave"?
03:17 paramat ah yes
03:19 paramat it might be popular to have lakes though
03:20 paramat .. flat continents and islands for building
03:21 hmmmm well okay if you want it
03:21 paramat perhaps i'll experiment and see what people think
03:22 paramat 541 issues, amazing how they hang around in limbo
03:23 paramat i always feel like clearing most of them out
03:23 hmmmm so do i
03:23 hmmmm the fundamental problem is that they come faster than we can solve them
03:23 hmmmm i do like the satisfaction of solving an issue though
03:24 hmmmm paramat, did you look at the script lock fix??  i'm looking for somebody to review it
03:25 paramat ah i looked, i could test it but don't understand it
03:25 hmmmm it's okay i guess
03:25 hmmmm anyway I tried out nerzhul's clang 3.8 mapgen bug
03:25 hmmmm it's a problem with some kind of floating point optimization in -O2, i think it's a compile rbug
03:26 hmmmm i was flying across the map when all of a sudden my X and Z coordinates turned into "NaN", the map disappeared, and I started getting spammed with updateListener: invalid value in the console
03:26 paramat NyaN!
03:27 hmmmm this is going to be a treat to debug...
03:38 rubenwardy joined #minetest-dev
04:21 paramat #3324
04:21 ShadowBot https://github.com/minetest/minetest/issues/3324 -- Mapgen: Add watershed mapgen in hidden development form by paramat
04:26 paramat left #minetest-dev
05:24 hmmmm alright i narrowed down the main problem with the clang 3.7 bug
05:25 hmmmm basically clang decides that ANDing the result of an operand with 0x7FFFFFFF inside of noise2d() is optional
05:26 hmmmm interestingly I can't replicate the bug if I exclude everything except the expression
05:46 hmmmm alright I know the problem
05:47 hmmmm because of the " & 0x7fffffff" on the line where n is initially calculated, clang assumes that the value n will never go above 0x7fffffff, which is just flat out wrong
05:48 hmmmm if the first & 0x7fffffff is removed it doesn't change the calculation but now clang places the instruction where it's supposed to be, producing the correct result
05:51 hmmmm because integer *underflow* is undefined behavior in C
05:51 hmmmm so what does that mean, to clang developers?  "let's fuck up as much existing code as possible"
06:06 Supertanker2 joined #minetest-dev
06:21 Hunterz joined #minetest-dev
08:20 celeron55 i have an idea for a game, but i am not sure whether to build it on minetest or whether to build it separately
08:22 Krock joined #minetest-dev
08:22 celeron55 i think minetest should allow for making this (this is none of that space RTS bullshit), but this still might require too many changes to be feasible to make in time before i lose all motivation due to it taking too long
08:23 celeron55 this is a problem but i'm not sure if it can be solved
08:28 neoascetic joined #minetest-dev
08:29 neoascetic hi everyone. isn't armor groups for each entity stored until server restart?
08:39 Krock2 joined #minetest-dev
08:40 hmmmm celeron, do you feel like reviewing any of my commits?
08:40 hmmmm i really want to get some of this stuff in, i hate having too many unmerged branches
08:41 gregorycu joined #minetest-dev
08:41 hmmmm alright I'm convinced gregorycu and zeno are the same person
08:41 gregorycu ?
08:41 gregorycu Hello
08:41 hmmmm they both go inactive and become active again at the same time
08:42 gregorycu But we were fighting
08:42 hmmmm :)
08:42 gregorycu were/are whatever
08:42 gregorycu What's happening?
08:42 hmmmm not much
08:42 hmmmm do you feel up to reviewing a commit or two or three?
08:43 hmmmm or how about four?  even more?
08:43 gregorycu Haven't touched the code in like... 6 months...
08:43 hmmmm ahhh this is 2spooky4me
08:43 hmmmm you came back from the dead
08:43 gregorycu I thought you guys may be missing me too much, so I decided to come back
08:44 hmmmm happy halloween I guess
08:45 gregorycu Thanks, same to you
08:46 gregorycu Anything exciting been happening in the minetest world?
08:47 hmmmm we did nothing but fix bugs for almost an entire release cycle
08:50 gregorycu I was thinking of forking minetest, and adding python API bindings
08:50 gregorycu Just to see what they would be like
09:05 gregorycu_ joined #minetest-dev
09:19 jin_xi joined #minetest-dev
09:21 CraigyDavi joined #minetest-dev
09:22 CraigyDavi joined #minetest-dev
09:45 Calinou joined #minetest-dev
09:49 Gael-de-Sailly joined #minetest-dev
10:12 PilzAdam joined #minetest-dev
10:59 gregorycu Does 64 bit builds of minetest work?
10:59 gregorycu Or is that currently unsupported
11:04 Calinou gregorycu, they work? I use them on my laptop
11:04 gregorycu Sweet, thanks
11:04 gregorycu Trying to get minetest building again for me, struggling a bit
11:05 gregorycu Wanted to make sure it worked first :)
11:08 turtleman_ joined #minetest-dev
11:21 gregorycu What's the deal with SQLLite
11:22 gregorycu Is that meant to be build from within minetest, or are we meant to have an external lib that we link in
11:23 gregorycu There is a sqlite folder in src. But it appears files within that folder are not getting built
11:30 gregorycu I just copied the folder elsewhere and built it
11:33 gregorycu_ joined #minetest-dev
11:36 gregorycu Anyway, yeah crash
11:36 gregorycu Not a good first impression
11:41 gregorycu I bet nobody develops of Visual Studio
11:41 Calinou only BlockMen and PilzAdam really do IIRC
11:42 PilzAdam what?!
11:42 PilzAdam I am deeply offended that you think I would use windows
11:43 Calinou I thought you were on Windows
11:43 gregorycu Anyway, some technically un-defined behaviour code is flagged on Visual studio
11:44 gregorycu But it's harmless
11:47 H-H-H joined #minetest-dev
11:50 gregorycu Further to this, Visual Studio
11:50 gregorycu VS's implementation of std::vector<bool> is very very slow in debug
12:03 Darcidride joined #minetest-dev
12:10 Megaf joined #minetest-dev
12:12 gregorycu_ joined #minetest-dev
12:25 DFeniks joined #minetest-dev
12:34 ElectronLibre joined #minetest-dev
12:36 Megaf folks, is it possible to build the client without sqlite? I think that could be an option since I will be using the client only for online gaming
12:43 rom1504 online gaming doesn't use sqlite ?
12:53 Megaf I don't know, I don't think so, why would it?
12:53 Megaf sqlite is using to store map and rolback
12:54 Guest99666 joined #minetest-dev
12:54 rom1504 link?
12:56 Megaf my head?
13:03 ElectronLibre Megaf: SQLite is used if the client has enabled local map saving (using sqlite3 backend). I don't know if it's used for anything else by the client but you should keep it.
13:05 gregorycu Why do you want to build without it?
13:05 Megaf_ joined #minetest-dev
13:06 gregorycu Why do you want to build without it?
13:08 Megaf gregorycu: just to have a smaller binary and less compilation time
13:08 gregorycu Damn, you must have a pretty shitty computer if you can notice the difference in compile time
13:09 gregorycu (No offense)
13:09 Megaf shitty no, slow yes
13:09 Megaf Celeron M ULV at 900 MHz at the moment, 630 MHz most of the time
13:09 Megaf single core, 32 bit
13:09 Megaf single thread
13:12 gregorycu Yeah, took a look at the code
13:12 gregorycu Doesn't look like there is a way out
13:13 Megaf I could just quicly edit the src and remove sqlite stuff from there, and local map saving
13:13 gregorycu I mean, you could write your own sqlite which is noop
13:13 Megaf but I don't know if it's worht it
13:13 Megaf worth *
13:13 gregorycu Only one way to tell
13:14 gregorycu But it's like... what
13:14 gregorycu 6 functions or something
13:14 gregorycu Shouldn't really influence linking time much
13:14 gregorycu (Especially if you turn off linker code-gen)
13:20 luizrpgluiz joined #minetest-dev
13:25 Lunatrius joined #minetest-dev
13:32 Lunatrius joined #minetest-dev
13:40 Lunatrius joined #minetest-dev
13:43 zupoman joined #minetest-dev
13:48 Darcidride joined #minetest-dev
13:50 Darcidride joined #minetest-dev
14:33 Gael-de-Sailly joined #minetest-dev
14:35 rubenwardy joined #minetest-dev
14:39 technics joined #minetest-dev
15:02 celeron55 i think a reasonable way to enable wiki registrations could be to use a similar thing as what the forum is using, like https://www.mediawiki.org/w​iki/Extension:StopForumSpam
15:02 celeron55 but i think i'm going to be lazy for the time being and not do that
15:10 nrzkt joined #minetest-dev
15:37 Soni joined #minetest-dev
15:37 luizrpgluiz left #minetest-dev
15:43 hmmmm joined #minetest-dev
15:54 ElectronLibre joined #minetest-dev
15:55 Darcidride joined #minetest-dev
15:59 sloantothebone joined #minetest-dev
16:05 celeron55 what the...
16:06 celeron55 i am getting a crash that looks dumb
16:07 gregorycu Not one of those smart crashes?
16:07 celeron55 this clearly is not smart
16:07 celeron55 https://gist.githubusercontent.com/celeron​55/07146c806a344f0998df/raw/059463a2b73adf​a972640770db3b22bc06f89665/gistfile1.txt
16:08 celeron55 it's overflowing the serializable range of values and the whole thing just aborts
16:09 celeron55 ...due to a position that could just be capped or reset or anything without any issue
16:11 gregorycu It's all beyond me, I'm going to go back to profiling
16:11 celeron55 of all the things imaginable, this is crashing due to an absolute velocity being higher than 200,000 nodes per second
16:11 nrzkt hmmmm, thanks for finding the bug with clang. Did you fixed it ?
16:11 celeron55 or, well, 2147483
16:11 celeron55 or, well, 214748.3
16:12 hmmmm yes, I'm just waiting for reviews
16:13 VanessaE why isn't velocity being capped at some reasonable value? (like mach 1 or something -- 340.3 m/s)
16:13 gregorycu I think c would be better
16:13 gregorycu More realistic
16:13 sloantothebone joined #minetest-dev
16:13 VanessaE heh
16:13 VanessaE that would require 300,000 km/s
16:14 hmmmm celeron55:  maybe you should fix the code trying to serialize a NaN
16:14 celeron55 well we can't serialize values over about a thousandth of light speed
16:14 celeron55 wait, is it a NaN
16:14 hmmmm it says "i=-NaN"
16:14 hmmmm if that assert hadn't been there, you would've never known
16:17 gregorycu By the way, you know what is slow. Using a vector as a queue
16:17 hmmmm who's doing that?
16:17 gregorycu ProfilerGraphs
16:18 hmmmm ahh
16:18 hmmmm no idea who might've made that mistake
16:18 celeron55 lol, quality code by the almighty celeron55
16:18 gregorycu lol
16:19 celeron55 it's fine; ship it
16:20 gregorycu It's 10x faster as a deque
16:20 celeron55 it's a pretty cold code path though
16:21 gregorycu It was still 8% of my debug build
16:21 celeron55 one realloc per frame is nothing
16:21 gregorycu (I'm profiling release now)
16:21 gregorycu It's not a realloc
16:21 gregorycu It's a realloc and a shuffle
16:21 celeron55 ...oh, except it's C++ and that means it's something ridiculous
16:21 gregorycu A shuffle of maps
16:26 gregorycu http://s23.postimg.org/7qrpmopaj/profile.gif
16:26 gregorycu Not really much in release, still more than it needs to be
16:27 hmmmm https://github.com/kwolekr/minetest/commits/master  PTAL
16:28 sfan5 looks good
16:28 hmmmm ok pushing
16:28 gregorycu "Fix C++11 compatibility"
16:29 hmmmm wrong commit
16:29 gregorycu So, is minetest going to C++11, or is it just a supported config
16:29 hmmmm it's just a supported config for now
16:29 hmmmm none of us actually use C++11
16:29 gregorycu ahh ok
16:32 Krock Thanks god no-one uses C++11 yet :D
16:32 hmmmm https://github.com/kwolekr/minetest/commit​/52e5b513ed9dc143c967c733423fe751e1b663d1  PTAL
16:33 Taoki joined #minetest-dev
16:33 hmmmm Krock:  It's okay, it works fine
16:33 hmmmm freeminer does iirc
16:33 Krock hmmmm, the thing is more like I'd need to lean how to use MinGW on windows cuz VC 2012 doesn't support Win 5.1
16:33 Krock *learn
16:34 hmmmm 5.1 as in Windows XP?
16:34 Krock Yes
16:34 hmmmm it does...
16:34 hmmmm you just need to add a manifest file
16:34 gregorycu I use C++11 at work. Works fine.
16:34 hmmmm or, not even, there's a certain compile option you need I forget
16:34 hmmmm let me check my VS install
16:36 hmmmm Krock:  go to the minetest Property pages, Configuraiton Properties -> General -> Platform Toolset
16:36 hmmmm change it to "Visual Studio 2012 - Windows XP (v120_xp)"
16:36 Puka joined #minetest-dev
16:37 celeron55 https://gist.githubusercontent.com/celeron​55/a91cbbe7fec054962f2b/raw/eb0cbcd9bd3c59​56038eac0d5e634291e0a80af5/gistfile1.txt
16:37 celeron55 WTF?
16:38 hmmmm you should be using -O0
16:38 celeron55 maybe -nan(0x400000) isn't a valid value also, but is there no error if it isn't?
16:39 hmmmm pretty sure there's no error
16:39 est31 joined #minetest-dev
16:39 hmmmm FWIW i've seen the player's coordinates to jump to nan when compiled under clang 3.7
16:40 Krock hmmmm, but for this I'd need VS2012, which doesn't have Win XP on its stupported list
16:40 Krock *supported
16:40 hmmmm Krock:  You sure??
16:40 Krock screenshot coming in 30s
16:40 hmmmm Krock:  I'm just saying I compile things for windows XP on vs2012
16:40 est31 Microsoft hasn't Win XP on its supported list anymore at all.
16:41 Krock hmmmm, yes. Ironically this works, but not on WinXP itself
16:41 hmmmm ohhh
16:41 hmmmm i didn't understand what you meant
16:41 hmmmm why would you use windows XP as a build host?
16:41 Darcidride joined #minetest-dev
16:41 Krock Cuz it's the system I got here :)
16:42 hmmmm I would suggest you stick with a recent version of VS to compile, otherwise you're giving up many great bugfixes and optimizations
16:42 hmmmm est31:  https://github.com/kwolekr/minetest/commit​/52e5b513ed9dc143c967c733423fe751e1b663d1  did you look at this yet?
16:43 est31 hmmmm, what exactly is the problem here
16:44 hmmmm it says in the commit message
16:44 est31 second, what are recursiv mutexes for you
16:44 est31 bc what I googled wasn't consistent with how you used them
16:44 hmmmm recursive mutexes are simply mutexes you're allowed to re-enter within the same thread
16:45 est31 aha
16:45 hmmmm did you see this?  https://github.com/kwolekr/minetest/commit​/52e5b513ed9dc143c967c733423fe751e1b663d1#​diff-5962b617a85e4277ae7c8e57e8b6d38aL56
16:45 est31 well that would make sesne
16:45 est31 sense*
16:46 est31 to fix a deadlock I mean
16:46 hmmmm if you fix that one line alone, then scriptlock will start working, but then you have a deadlock issue because you can't control the re-entry of scriptapi functions
16:46 kaeza joined #minetest-dev
16:46 est31 why is giving it a name making it work?
16:47 hmmmm because Foobar(blah) is a temporary object
16:47 hmmmm it is destroyed before the next semicolon
16:47 est31 oh ok
16:47 hmmmm Foobar foo(blah) is a scoped, local object
16:47 gregorycu Wow
16:47 hmmmm it is destroyed when execution reaches the end of the current scope
16:47 gregorycu That is some very horrible code you fixed
16:47 hmmmm ty
16:47 Krock <irrelevant> http://i.imgur.com/8xAdkWB.png </irrelevant>
16:48 hmmmm so basically ever since sapier did the lua api refactoring, the script has been running with effectively zero synchronization
16:48 gregorycu lol
16:48 celeron55 looks like what is happening in here is that NaN is directly set as the velocity of the object by some crappy Lua code
16:48 hmmmm since the lock is acquired and released on the same line
16:48 gregorycu It's _almost_ a no-op
16:48 hmmmm it just so happens by coincidence that envlock was always held where it needed to be too, so we didn't see a bug
16:48 celeron55 i don't think this should be left to be catched by the serialization code 8)
16:49 gregorycu Just introduces a memory barrier
16:49 est31 yea there is no real layer between lua code and serialisation code
16:49 est31 unfortunately
16:49 est31 we really need such a layer though, e.g. when physics is calculated already due to the F1000 limits
16:49 celeron55 i mean i need to add a check for this to the lua-to-c++ interface
16:49 est31 so e.g. we should cut the objects position on the world border
16:51 celeron55 hmm
16:51 est31 a check there would be ok as well
16:51 celeron55 maybe this should be checked in the common check_v3f() function
16:51 celeron55 for NaN, that is
16:51 gregorycu Krock: The v120_xp target is because with v120, MS dropped support for XP
16:51 celeron55 because i don't think we ever want NaN anywhere
16:51 est31 yea I cant think of an usecase that needs NaN
16:51 gregorycu Then they added it back, under a different target
16:52 gregorycu Those toolsets under 120 should already support XP
16:52 est31 also, make it check for F1000 limits
16:53 est31 then at least lua can't "poison" us directly
16:54 est31 but the problem with that ofc is, what happens on check_v3f?
16:54 est31 it gives a LuaError right?
16:55 est31 so basically no other way for lua code that wants to be on the safe side than to replicate the checking code before calling the method, no?
16:55 est31 e.g. have user enter sth
16:55 est31 the old bug was /area_pos1 999999999999, 0,0
16:55 est31 or so
16:56 est31 was above F1000 limit, so would lead to direct crash
16:56 est31 then I fixed it by checking the position in the code to spawn entities
16:56 est31 if the entity is outside the world border it doesnt get added
16:56 est31 but no error with a stacktrace
16:57 crazyR joined #minetest-dev
16:57 est31 this way lua can nicely say "sorry but the minetest engine didn't like the coordinates you entered"
16:58 est31 instead of crashing
16:58 est31 it still has to check the returned object pointer for nil
16:59 hmmmm soo any word on 52e5b51?
17:00 est31 added a pointless comment
17:00 hmmmm oh I'm going to change the name of that variable in an upcoming commit
17:01 hmmmm not because it "needs underscores" but because it's misleading
17:01 hmmmm that's a mutex on the lua state, there are multiple lua stacks associated with a single state
17:01 hmmmm so calling it a stack mutex is simply wrong and misleading... in fact it's confused people before
17:02 est31 ah you don't add it in the commit
17:02 est31 yea and the second thing is that it is called mutex but its aa bool
17:02 celeron55 est31: i don't think checking f1000 limits universally in check_v3f is wise
17:03 celeron55 they don't apply to everything, and even if they do, some of them apply with *BS and some with *1 8)
17:03 celeron55 this is a mess for sure but...
17:05 Lunatrius joined #minetest-dev
17:05 est31 well, then no check
17:05 est31 only for NaN
17:06 celeron55 at least we know it's a mess
17:06 est31 but still, if we check in check_v3f then we change the float type
17:06 est31 and changing types is big business
17:07 est31 basically we say what is allowed to be called float
17:07 est31 and what not
17:07 celeron55 yes; but a known fact is that NaN will mess things up pretty hard almost always and is not part of the API in any other way than implicitly due to the languages used
17:18 celeron55 why am i not getting a backtrace when i throw a LuaError?
17:18 est31 because you have builtin lua
17:18 est31 dunno why it has no backtrace
17:18 est31 luajit has backtrace
17:18 CraigyDavi joined #minetest-dev
17:18 hmmmm because script_execution_wrapper() is unavailable on vanilla lua
17:19 celeron55 this is dumb
17:19 celeron55 there was a backtrace previously
17:19 celeron55 how can anyone pretend this regression is okay
17:20 est31 how did it work back then
17:20 est31 dunno who introduced the regression
17:20 celeron55 how can i remember but it generally did work; now where's the commit that breaks this?
17:21 est31 bisect :)
17:21 celeron55 this is stupid; i should not need to fix stuff like this
17:21 est31 but my guess is it didn't break in 2015
17:22 celeron55 my guess is this broke in the past few months
17:22 hmmmm ehh, no, it was broken for quite a long time
17:23 celeron55 it *is* broken
17:23 celeron55 i sure hope the backtrace-printing function is still somewhere to be found so that i can just call it
17:24 hmmmm well, okay
17:24 hmmmm script_error_handler is the global lua error handling function
17:24 hmmmm lua_pcall encounters a runtime error, executes this function, which grabs a backtrace from debug.traceback and leaves it as the top element of the lua stack
17:25 hmmmm lua_pcall returns non-zero, so therefore ScriptApiBase::scriptError() is called
17:25 hmmmm if the top element is convertible to a string, that's used as the exception description
17:26 hmmmm so the conclusion is that for some reason, lua is either not calling the error handling function or debug.traceback isn't producing a string ..?
17:38 celeron55 is this due to the different handling of C++ exceptions between Lua and Luajit?
17:38 celeron55 somebody made backtraces only work in luajit?
17:38 celeron55 i repeat: this is dumb; why do i have to be doing this
17:40 hmmmm because you're practically the only person not using luajit
17:40 celeron55 lua is a fine piece of software for general debugging
17:41 celeron55 for one, valgrind can run it
17:41 est31 the only time I use normal lua is when I do valgrind stuff
17:41 est31 when Im done I rebuild with luaJIT
17:41 celeron55 from now on: do not touch Lua error handling without testing with lua and luajit
17:42 PilzAdam I use normal Lua, to check if everything still works reasonable with it
17:42 celeron55 both are supported
17:42 est31 we had an "error in error handling" bug, it was there for ages
17:43 est31 then ka hrl found the reason and fixed it
17:48 hmmmm i still don't quite understand how it was fixed
17:48 hmmmm the one instance where the error in error handling was after a regular runtime error, but the second where there was no associated runtime error was more interesting
17:49 est31 #1423
17:49 ShadowBot https://github.com/minetest/minetest/issues/1423 -- ServerError: error in error handling
17:49 est31 writeup there https://github.com/minetest/minetest​/issues/1423#issuecomment-134472243
17:50 luizrpgluiz joined #minetest-dev
17:51 hmmmm so you're saying it's caused by an assert failing inside of the nested runtime error handler
17:52 est31 no
17:52 est31 the assert was only to confirm the theory
17:53 hmmmm but that theory doesn't explain the second interesting case
17:53 celeron55 i will have a few commits ready after some minutes
17:58 celeron55 https://github.com/celeron55/minetest/commi​t/1fcea9112b7f5fef520434ec2ae5269ea8864242
17:58 celeron55 https://github.com/celeron55/minetest/commi​t/deda3a9e4479abb96dbcd9afa32d78bc9b45c38f
17:58 celeron55 lua and luajit behaved exactly the same in this case
17:58 est31 ?
17:59 celeron55 i.e. minetest didn't print a backtrace with either
17:59 celeron55 now it does with both
18:00 est31 it did print a backtrace for a LuaError
18:00 est31 at least on luajit
18:00 est31 how did you test
18:00 celeron55 well try the first commit and see
18:00 hmmmm yeah, the second commit doesn't actually solve the problem...
18:00 hmmmm I'm sort of disappointed
18:00 celeron55 my test case is just a misbehaving game that for some unknown reason passes NaNs to ObjectRef::setvelocity()
18:01 Darcidride joined #minetest-dev
18:01 celeron55 solve what problem? if you have a problem, why do you expect it to be the same problem that i have
18:03 Soni joined #minetest-dev
18:04 celeron55 what i wanted to see is if this system is able to print any backtraces anymore and with that little code, it is; and it seems that the LuaError thrown by my added checks is being directly handled by that exception handler in ServerThread::run() so that's where i needed the backtrace
18:04 est31 LuaErrors do print a stacktrace for me
18:05 est31 I just confirmed
18:05 hmmmm sure, it fixes the immediate problem you have, but it's a hacky solution to be honest
18:05 celeron55 i'm not pushing this upstream if you happen expect that
18:05 celeron55 +to
18:05 celeron55 est31: where did you invoke one?
18:05 hmmmm of course not.  I didn't really expect you to, it's just that somebody else here might do it without asking
18:05 est31 Add print("The object is: " .. dump(minetest.get_mapgen_object("voxelmanip"))) to init.lua
18:06 celeron55 there are many c++-to-lua interfaces in this thing and for some reason they are different
18:06 est31 should throw a LuaError if the commit d69ef6acd386ccfd5ff456002591b97b92a26956 is included
18:06 celeron55 for example script/cpp_api/s_entity.cpp and script/cpp_api/s_env.cpp handle errors differently
18:07 celeron55 this error that i added is thrown when ScriptApiEntity::luaentity_Step is being executed
18:09 celeron55 est31: that error comes through a different path
18:09 celeron55 it doesn't even touch the LuaError handler in ServerThread::run() where I had to add this
18:10 celeron55 same thing if you add that line in the global step callback
18:11 est31 okay, it should run inside a chatcommand, shouldnt it
18:12 est31 bc in theory, the chat command bases on an incoming chat packet
18:12 est31 which is handled by m_server-Receive();
18:13 celeron55 wait, actually
18:13 * est31 testing
18:13 celeron55 luajit does print a backtrace for LuaErrors in ScriptApiEntity::luaentity_Step
18:13 celeron55 but lua does not
18:14 celeron55 yes, that's the issue here; i just confirmed
18:14 est31 okay what about surrounding it with if USE_LUAJIT
18:15 est31 or USE_LUA_JIT
18:15 est31 dunno, perhaps ShadowNinja has changed it
18:16 celeron55 oh so the way LuaJIT handles exceptions is that it calls this
18:16 celeron55 script_exception_wrapper
18:16 celeron55 well regular lua handles exceptions like you had called regular C++ code
18:17 celeron55 the lua stuff just rewinds out of the way like any code would
18:17 celeron55 which the JITted stuff is unable to do i guess then
18:18 est31 I think it is able to do it
18:19 celeron55 i think it was long our problem that we didn't print out backtraces for exceptions when luajit was used
18:19 celeron55 which i guess was because nobody had found that script_exception_wrapper thing for luajit
18:20 est31 http://luajit.org/extensions.html scroll down there you find, its platform dependent support
18:21 est31 perhaps a few years ago there was no support
18:21 luizrpgluiz left #minetest-dev
18:21 est31 now there is partial support
18:21 celeron55 why is script_exception_wrapper then used?
18:22 celeron55 well i guess for x86 support
18:22 est31 to work on the platforms luajit doesn'T support? just a wild guess though
18:24 celeron55 the thing is, there is no way to integrate this neatly; exceptions have to be catched where exceptions occur and there is no way around it
18:25 celeron55 i.e. in every thread there must be a catch(LuaError) with a call to augment it with a backtrace if lua is being used
18:26 celeron55 well, every thread that runs lua, that is
18:26 est31 makes sense
18:26 celeron55 luajit errors are also converted to LuaErrors and need the same handler
18:27 est31 but there we get the stack trace from the handler func, so we don't need to generate it again
18:27 celeron55 but they already include the backtrace because... i guess luajit calls the regular error handling mechanisms before that
18:31 Puka_ joined #minetest-dev
18:44 paramat joined #minetest-dev
18:45 paramat hi nore what's your opinion on game#665 ?
18:45 ShadowBot https://github.com/minetes​t/minetest_game/issues/665 -- Add many wooden fences made out of the 4 kinds of woods by LeMagnesium
18:47 celeron55 i'll try to come up with a reasonable way to do this
18:48 paramat hmmmm #3324 is ready for review
18:48 ShadowBot https://github.com/minetest/minetest/issues/3324 -- Mapgen: Add watershed mapgen in hidden development form by paramat
18:48 hmmmm ok, i'll have to take a look
18:49 hmmmm in any case...
18:49 hmmmm committing https://github.com/kwolekr/minetest/commit​/52e5b513ed9dc143c967c733423fe751e1b663d1 in 30 minutes unless anybody has an objection
18:49 est31 okay for me but isnt this too large for the 30 mins thing
18:49 hmmmm :|
18:49 hmmmm I'm really getting tired of waiting around
18:49 est31 (okay for me as in +1)
18:49 paramat we don't have pumpkins but could have cact-o-lanterns =}
18:50 hmmmm speaking of waiting around
18:50 hmmmm est31, why are you still waiting on the ncurses console PR?
18:50 hmmmm what is the holdup precisely
18:50 est31 approval missing
18:50 hmmmm oh my god
18:50 est31 or has kahrl +1ed
18:50 hmmmm we had 3 or 4 separate people look at it
18:50 hmmmm why does it have only 1 +1
18:50 hmmmm maybe kahrl did +1
18:54 hmmmm anyway I want to commit https://github.com/celeron55/minetest/commi​t/1fcea9112b7f5fef520434ec2ae5269ea8864242 but there are a couple issues holding it back imho
18:55 hmmmm celeron said he doesn't intend for this to be committed upstream, so I'm assuming this implies he's not willing to do any additional work/changes
18:55 hmmmm does somebody want to make a new PR with the functional changes or modify this commit?
18:57 celeron55 oh that one
18:58 celeron55 i think that commit is pretty much fine unless someone wants to tweak the style first
18:58 hmmmm first off, if there's already a function provided by the standard to do something, you need to use that instead of redefining it
18:58 hmmmm so util_isnan -> isnan
18:58 celeron55 i've had issues trying to use isnan in the past
18:58 hmmmm second, there's a lot of repetition
18:59 hmmmm if there is a problem with isnan, then make a comment about it
18:59 hmmmm / Here I defined my own util_isnan() because there are the following problems with the standard library's isnan() on platforms X Y Z: ...
18:59 hmmmm //*
19:00 celeron55 bleh; just edit it however you see fit; i don't even remember what the issues were anymore nor on which platforms i was trying to run code back then
19:00 celeron55 so i'm just as good as you
19:00 hmmmm well now you have me worried
19:00 celeron55 i'll be wrestling with this other issue now, i'll come back to that later
19:02 celeron55 one sure-fire way to find out is to just commit it using isnan or std::isnan and see what happens 8)
19:03 hmmmm oh god:  https://github.com/opal/opal/issues/941
19:03 hmmmm remind me to lock and perma-delete any issues like this that pops up on our github
19:04 celeron55 don't worry, i'll lock and perma-delete them myself if i see them
19:04 celeron55 those people are utterly crazy, why would they even attempt to discuss that
19:05 hmmmm they try to be the bigger person and discuss things on their merit.  i don't think they realized it's like playing chess with pidgeons
19:06 luizrpgluiz joined #minetest-dev
19:09 celeron55 when discussing on the internet, it's very important to realize when you are playing chess with pidgeons
19:14 luizrpgluiz left #minetest-dev
19:15 srakitnican joined #minetest-dev
19:16 celeron55 somebody needs to do a grep 'MutexAutoLock(' on the whole codebase and fix all those mess-ups
19:17 hmmmm oh fuck
19:17 celeron55 that's always a bug unless it's prefixed with "new"
19:17 hmmmm great job est, you did the same thing with getTimeOfDay
19:18 ElectronLibre joined #minetest-dev
19:18 celeron55 maybe we should have a static checker that would check trivialities like this
19:18 hmmmm it's a time investment
19:19 celeron55 it would make sense if there were like more than five things to check
19:19 celeron55 CI likes such things
19:20 est31 isnt new a leak?
19:20 celeron55 a leak? well it's a heap allocation
19:20 celeron55 it's not how you fix those
19:20 hmmmm in fact I don't recall reviewing the timeOfDay patch
19:21 hmmmm who exactly signed off on ca8e56c
19:23 celeron55 looks like nobody
19:23 celeron55 https://github.com/minetest/minetest/pull/3297
19:23 hmmmm so est looks like he further propogated the error
19:23 hmmmm and same with nerzhul here https://github.com/minetest/minetest/commi​t/7f8f9785d7e9e120a6708d2f51e32dfef3e50c19
19:23 est31 I've just renamed
19:23 hmmmm no, I see you added some
19:24 est31 well its wrog fine should i fix it
19:24 hmmmm who is this first one to introduce this horrifying mistake
19:25 hmmmm https://github.com/minetest/minetest/commi​t/f6fc39e69a0a621480bec9ceafd154ec83cf0100
19:25 hmmmm fuckin sapier dude
19:25 hmmmm he sure "fixed" that race condition
19:25 hmmmm do you see why we need review
19:25 hmmmm competence also helps a lot
19:26 celeron55 looks like it's our lovely friend sapier
19:26 celeron55 in f6fc39e6
19:26 celeron55 "fix race condition" lol
19:26 rubenwardy capped under c, not at. physical bodies can't move at c
19:26 celeron55 i have learned to love commits that start with "Fix"
19:26 rubenwardy oops
19:26 celeron55 it generally means it's more like a regression than a fix
19:26 rubenwardy that was ages ago, my log was scrolled up
19:28 hmmmm look I get that we're not writing flight control software here but it doesn't hurt to make sure things work
19:31 semirocket joined #minetest-dev
19:33 semirocket left #minetest-dev
19:34 hmmmm I think the fix for this should replace the locking with atomics, since, you know, we have that now
19:35 nrzkt hmmmm, tested in a branch std::atomic is working well
19:39 est31 I still think atomics wont work for tim
19:39 est31 time
19:39 est31 bc the calculations are too complex
19:39 est31 its not just simple get -> add -> put back
19:39 est31 there are multiple variables
19:40 est31 and e.g. setting time + step could confuse
19:40 est31 but I dont really care if it gives wrong time then so be it, its just time
19:40 est31 nothing important
19:40 est31 as long as it doesnt crash or so
19:40 celeron55 https://github.com/celeron55/minetest/commi​t/54af0cbc96a308a6eb5400bdddda71e66bb082f8
19:42 est31 looks good
19:42 celeron55 if somebody would care to test this, that would be nice
19:42 est31 havent given it a too close look though
19:43 celeron55 (which is, find a case where without this there was not a backtrace with regular Lua and see what happens when this is applied)
19:44 celeron55 i'm doing some testing myself but it's never the same to test something yourself as it is for someone else to test it
19:46 Player2 joined #minetest-dev
19:55 Miner_48er joined #minetest-dev
20:11 johnnyjoy joined #minetest-dev
20:11 ElectronLibre joined #minetest-dev
20:12 johnnyjoy joined #minetest-dev
20:16 johnnyjoy joined #minetest-dev
20:20 paramat left #minetest-dev
21:02 Darcidride joined #minetest-dev
21:12 H-H-H joined #minetest-dev
21:23 hmmmm hmm
21:24 hmmmm clang 3.8 does something with floating point numbers in collisionMoveSimple that makes the player freeze up
21:30 rubenwardy joined #minetest-dev
21:39 hmmmm seems to happen when one of the parameters becomes -0.0
21:44 celeron55 what happens if you toggle some math-related flags of the compiler
21:44 hmmmm no idea, i'm trying to find the source of the problem firstg
21:51 hmmmm this is infuriating
21:51 hmmmm i need to be able to debug more than ever but i can't debug at all because it needs to be optimized
21:51 celeron55 uh wtf
21:52 celeron55 why does the command line interface of minetest have timestamps and thread information prepended on each line?
21:52 celeron55 this is bad style and useless
21:52 JohnnyComeL8ly joined #minetest-dev
21:52 hmmmm because shadowninja thought it was cleaner that way
21:52 celeron55 well what the fuck; i explicitly made it NOT this way because this is crap
21:53 celeron55 sigh
21:53 hmmmm fwiw i fought back against it and ended up losing
21:53 hmmmm :|
21:53 celeron55 why am i letting ShadowNinja change this
21:53 celeron55 i should just make everyone have their own fork of minetest again
21:54 hmmmm any time there's a commit that starts with the word "Cleanup" you can rest assured it's going to have tons of unpopular changes as riders
21:59 celeron55 i guess my hobby has become reversing stupid changes in minetest
21:59 celeron55 reverting*
22:00 celeron55 (i'm also good at writing slightly incorrect english)
22:00 hmmmm since when is a typo incorrect english?
22:01 celeron55 that's not a typo
22:03 paramat joined #minetest-dev
22:03 celeron55 it seems that the only thing in minetest that gives direct responses to command line arguments is --help
22:04 celeron55 so it's the only thing that has to be printed to std::cout and nothing else
22:04 celeron55 oh, no; "--world list" also
22:05 celeron55 ...aand --version
22:06 celeron55 and --gameid list
22:07 hmmmm STFU and fix it then :-)
22:07 hmmmm better yet; complain to ShadowNinja
22:07 celeron55 i think that's all; i already changed them locally, now i only need to commit this
22:07 hmmmm he's the one making all the "Cleanup" commits
22:07 hmmmm 3000 lines changed, 71 files
22:08 hmmmm okay bbl
22:08 celeron55 i think i'll be an asshole and just push this to upstream
22:13 est31 I guess it'll conflict my ncurses branch but i'll just rebase
22:15 est31 and 5 bugs introduced
22:16 celeron55 http://stackoverflow.com/questions/2249110/h​ow-do-i-make-a-portable-isnan-isinf-function
22:16 celeron55 this is the thing that i was concerned about in using isnan()
22:16 est31 lets use boost
22:17 celeron55 lol
22:17 est31 gregorycu will like it
22:17 celeron55 std::isnan is what i have been personally using in other projects
22:17 celeron55 it seems to be the best bet but i think it's officially c++11?!
22:18 celeron55 overally even bothering to think about this is stupid; that's why i just made a macro
22:19 celeron55 i guess i'll add a comment noting this issue and then somebody can handle it some day if it really matters
22:21 celeron55 (it doesn't; but whatever)
22:29 PilzAdam celeron55, can also revert the behavior that debug.txt is created in the current directory, rather then in bin?
22:29 PilzAdam (for RUN_IN_PLACE)
22:29 PilzAdam basically every folder on my machine contains a debug.txt now since I start minetest from random places
22:31 celeron55 eh
22:31 celeron55 why was that done?
22:32 PilzAdam because "cleanup" by ShadowNinja
22:32 PilzAdam apparently "cleanup" means change lots of functionality, I guess?
22:32 celeron55 well fuck cleanup by shadowninja, why is that even a thing
22:33 celeron55 why aren't you opposing these things
22:34 celeron55 i have to say though that so far i haven't had any issues with this debug.txt positioning; but i didn't have any issues with the previous way either
22:34 PilzAdam well, 80% of it is good refactoring
22:34 est31 70%
22:34 PilzAdam but nobody can test all stuff and see if it changes functionality
22:34 est31 there is bad refactoring too
22:35 celeron55 why don't you change them back then when you find them
22:35 est31 usually thats done
22:35 PilzAdam nobody care enough, I guess
22:35 celeron55 i'm going to leave that to PilzAdam; i don't personally care about this one
22:37 PilzAdam I think the problem is that ShadowNinja writes these huge changes completely alone without notifying people beforehand
22:38 celeron55 i'm guessing the refactoring is mostly good but people have to be attentive about these things
22:38 est31 and some of his cleanups really are questionable
22:38 PilzAdam they are hard to review, but also hard to change since ShadowNinja already invested a lot of work
22:38 est31 e.g. he removes an id management function
22:38 est31 because i guess its "too complicated"
22:38 celeron55 what
22:38 est31 the replacement however doesnt even handle overflows
22:39 est31 but fortunately he fixed it
22:39 kahrl celeron55: I think you missed --videomodes
22:39 PilzAdam maybe we should create some rules that refactoring commits should only do refactoring
22:39 est31 #3309
22:39 ShadowBot https://github.com/minetest/minetest/issues/3309 -- AreaStore cleanup by ShadowNinja
22:39 celeron55 PilzAdam: maybe, just maybe that rule is common sense?
22:39 est31 The PR title is a bit misleading, its not just cleanup, it also changes features
22:39 celeron55 can all of us agree that refactoring being only refactoring is common sense?
22:44 celeron55 i think this area stuff isn't as bad as est31 makes it sound like
22:45 celeron55 altough, that's no reason to not continue reviewing it
22:47 Darcidride joined #minetest-dev
22:47 celeron55 kahrl: i'm not going to touch it because it's implemented in such a weird place
22:48 celeron55 for no good reason, too
22:50 kahrl true
22:51 kahrl it causes a separator to be added to debug.txt when you list videomodes
22:51 kahrl (even when you change dstream to std::cout)
22:56 kahrl ugh
22:56 kahrl print_video_modes uses stuff from g_settings, which is initialized during init_common which also initializes logging
22:56 kahrl so what I said is basically unavoidable
23:01 kahrl I'd just do https://gist.github.com/kahrl/6686521d7decf1f43ac0  and call it done
23:01 kahrl will merge ^ in an hour
23:02 celeron55 oh whatever, it's not like this is worth our time at all to begin with
23:02 est31 btw kahrl have you tested my console yet
23:02 kahrl est31: nah, didn't have time yet
23:06 JohnnyComeL8ly est31: I tried to try your ncurses console... but I got these errors.
23:06 JohnnyComeL8ly http://pastie.org/10521270
23:06 JohnnyComeL8ly http://pastie.org/10523110
23:07 JohnnyComeL8ly If you need a whole output of the thing, I could definitely do that too.
23:07 est31 yes I need the whole output
23:07 est31 the first thing is unrelated
23:09 JohnnyComeL8ly est31: Oh, ok, well here it is. http://pastie.org/10523120
23:13 kahrl JohnnyComeL8ly: what's the linker command line? You can see it with: make VERBOSE=1
23:13 kahrl (below the line "Linking CXX executable ../bin/minetestserver")
23:14 est31 JohnnyComeL8ly, which distro are you on
23:14 JohnnyComeL8ly est31: I'm using Xubuntu 15.10.
23:17 JohnnyComeL8ly http://pastie.org/10523133
23:18 JohnnyComeL8ly kahrl: est31: ^^
23:18 est31 It should link to libncursesw instead of libncurses
23:19 est31 JohnnyComeL8ly, can you fork again and recompile?
23:19 JohnnyComeL8ly So, I need to install that?
23:19 JohnnyComeL8ly "fork" ?
23:19 est31 no, ncursesw comes with ncurses these days
23:19 est31 ermm clone
23:19 JohnnyComeL8ly I don't know where to clone from... and I don't know how to just get branches.
23:20 est31 well, delete the minetest directory and get the source code again
23:20 est31 have you tried that
23:20 JohnnyComeL8ly (I tried yesterday... ended up getting the archive from github.)
23:20 JohnnyComeL8ly I'll use the same archive.
23:24 kahrl JohnnyComeL8ly: what's the output of 'ncurses5-config --libs'?
23:24 kahrl JohnnyComeL8ly: and 'ncursesw5-config --libs'?
23:25 JohnnyComeL8ly Just a sec.
23:27 JohnnyComeL8ly -lncurses -ltinfo   and   -lncursesw -ltinfo   respectively.
23:27 kahrl ah ok
23:27 kahrl I think it would work if the cmake module FindCurses.cmake (which comes with cmake) was used
23:30 JohnnyComeL8ly I'm going to try without telling them where they are.
23:31 kahrl ah no, FindCurses.cmake doesn't do ncursesw
23:31 kahrl est31: would it be possible to use ncurses instead of ncursesw?
23:32 JohnnyComeL8ly So, I need to do what?
23:32 * est31 is german, no way to not let me write äüöß
23:32 kahrl est31: utf-8?
23:32 est31 insert not
23:32 JohnnyComeL8ly I just finished installing libncursesw5-dev if that helps.
23:33 kahrl JohnnyComeL8ly: your system is fine, minetest's CMakeLists.txt is broken
23:33 JohnnyComeL8ly How do I fix it?
23:33 kahrl not sure yet
23:36 JohnnyComeL8ly Hehey! installing libncursesw5-dev made the trip!  I didn't have to specify the location of ncursesw.
23:38 kahrl hrmm, that's weird
23:38 kahrl build is always weird
23:39 proller joined #minetest-dev
23:40 JohnnyComeL8ly That is something to take note of... that way nobody else has to figure out (by chance) that libncursesw5-dev is necessary.
23:42 kahrl that's not the solution; the solution is to fix CMakeLists.txt
23:42 JohnnyComeL8ly Ah, yes;  you are right.
23:43 kahrl at the moment it's broken. The correct thing that it should is: either (a) determine that ncurses can't be used, or (b) determine that it can be used, in which case the linking command must not fail
23:43 kahrl that it should do
23:43 est31 agreed
23:44 JohnnyComeL8ly So, something like line 58 of the CMakeLists.txt should be in place to check for libncursesw5-dev ?
23:45 JohnnyComeL8ly "find_package(Irrlicht)"
23:47 kahrl yes, but
23:47 kahrl you can do find_package(Curses), but it will only find libncurses.so, not libncursesw.so
23:48 kahrl see: https://cmake.org/Bug/view.php?id=10347
23:48 JohnnyComeL8ly There were only two find_package instances in the CMakeLists.txt .
23:49 kahrl hmm? I see tons of them
23:49 JohnnyComeL8ly Well, the one I got in est31's fork is this way. :-)
23:49 kahrl oh, look at src/CMakeLists.txt, not CMakeLists.txt
23:50 JohnnyComeL8ly I see....
23:52 JohnnyComeL8ly Btw, it compiled all the way.

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