Minetest logo

IRC log for #minetest-dev, 2015-02-17

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

All times shown according to UTC.

Time Nick Message
00:08 luizrpgluiz joined #minetest-dev
00:33 est31 ShadowNinja, you there?
00:33 est31 joined #minetest-dev
00:33 ShadowNinja est31: Yep.
00:34 est31 ok, nrzkt has posted a PR that will break network protocol. Now server list displays every server that logs in
00:35 est31 my idea would be (to also catch future protocol breaks) 1. make a new list as the new default, and 2. there, the server sends min_proto and max_proto integers, and the client compares them to their own
00:36 est31 what are your ideas on this
00:37 ShadowNinja est31: The server doesn't really have a max proto, just a current proto.  I don't know what you mean about a seperate list, but sending proto versions sounds good.
00:38 est31 1. is for the transition, new clients will ignore sent version
00:38 est31 2. would be sth like this https://github.com/est31/minetest/commit/49b7d1c4cab2640bbc344ccaeee8aa30bf3371cd
00:43 ShadowNinja est31: You mean switch to servers2.minetest.net or something like that?  I don't agree with that, it's just too ugly.
00:43 est31 sorry meant 1. is for the transition, *old* clients will ignore sent version
00:44 luizrpgluiz would be possible to fix bad alloc
00:44 est31 other idea: add a new param to the sent json value. all old servers get in "list" all new in "servers"
00:44 est31 "list" value in this one --> http://servers.minetest.net/list
00:48 est31 master server then checks whether the server sends max and min value, and then puts them into the according list
00:48 est31 ShadowNinja ^
00:51 ShadowNinja luizrpgluiz: Yes.  You just add more memory sticks to your computer.  :-)
00:52 ShadowNinja est31: That's just as ugly and confusing.
00:52 ShadowNinja est31: Old clients will work if we add a new field, it's sent as JSON.
00:53 ShadowNinja We can release a patch release that handles the proto version field if needed.
00:54 est31 ShadowNinja, they will work, but players will try to connect to servers they dont support then
00:55 est31 oh patch release
00:55 est31 also an option
00:56 est31 but then both servers and clients need to switch
00:58 est31 can you add the proto version fields to master server? it needs an entry so that it gets checked for being the right type
00:58 est31 & can you test my patch
00:58 est31 dont want to set up test master server just for that
00:59 est31 ShadowNinja ^
01:00 luizrpgluiz ShadowNinja: no use to do this, it would be great if there was a command that is limited or almenta up memory for the game as in minecraft
01:00 ShadowNinja est31: `echo 'HOST="127.0.0.1";PORT=5000' > config.py && ./server.py`
01:00 ShadowNinja That's just about all it takes to start a master server.
01:00 est31 ok
01:01 ShadowNinja As long as you have flask installed and the JS template rendered.
01:01 ShadowNinja The README explains it all.
01:01 ShadowNinja luizrpgluiz: Huh?
01:02 ShadowNinja You can't just write a command to use less memory.
01:02 VanessaE ShadowNinja: I think he means some kind of "swap everything out on demand" function... which would be pointless since the OS is supposed to do that anyway
01:02 ShadowNinja Java has GC, so that command probably just runs the GC to clen up old stuff, Minetest removes things as soon as they're unused.
01:03 VanessaE he may be experiencing a memory leak or the heavy usage behavior of the mesh cache
01:03 n4x you can still leak memory and/or resources while using a garbage collector
01:04 ShadowNinja luizrpgluiz: How much memory do you have?  Are you using an HD texture pack, a big sobgame, or a lot of mods?
01:04 ShadowNinja subgame*
01:08 luizrpgluiz ShadowNinja:because my friend installed and recreated some mods of monsters and he has 8 gb of ram
01:09 ShadowNinja luizrpgluiz: That isn't an answer to my questions.
01:09 est31 ^
01:10 luizrpgluiz ShadowNinja: sorry,well, I'm not using any mod, and also no texture, I have 4gb of ram
01:11 ShadowNinja luizrpgluiz: Are you using a big subgame like dreambuilder?
01:12 est31 VanessaE, there was some pregeneration issue that needed tons of ram wasnt there?
01:12 luizrpgluiz ShadowNinja: I do not use any subgame, the problem is that my friend has a server with 20 mods
01:13 VanessaE I don't remember
01:13 est31 ShadowNinja,  "pip3 install APSchedule flask" sais Could not find any downloads that satisfy the requirement APSchedule
01:14 est31 Could not fetch URL https://pypi.python.org/simple/APSchedule/: 404 Client Error: Not Found
01:15 ShadowNinja est31: Well, it's on pypi: https://pypi.python.org/pypi/APScheduler/3.0.1
01:15 est31 ah its apschedule*r*
01:16 est31 I'll add a commit that fixes this
01:23 shadowzone joined #minetest-dev
01:37 luizrpgluiz left #minetest-dev
02:14 Ritchie joined #minetest-dev
02:33 Ritchie joined #minetest-dev
02:35 est31 ShadowNinja, PRs are out, one for minetest, and one for the central server. can you review them?
02:36 est31 master-server/#5
02:36 est31 master-server#5
02:36 est31 #2334
02:36 ShadowBot https://github.com/minetest/minetest/issues/2334 -- Add protocol version logic to master server by est31
02:36 est31 https://github.com/minetest/master-server/pull/5
02:57 everamzah joined #minetest-dev
02:59 compunerd joined #minetest-dev
04:16 Zeno` joined #minetest-dev
04:28 est31 ShadowNinja, we can discuss #2334 options in irc too if you want.
04:28 ShadowBot https://github.com/minetest/minetest/issues/2334 -- Add protocol version logic to master server by est31
04:46 Hunterz joined #minetest-dev
04:54 est31 Zeno`, your comments on #2334?
04:54 ShadowBot https://github.com/minetest/minetest/issues/2334 -- Add protocol version logic to master server by est31
05:01 Zeno` Personally I don't like inverted logic (I'd prefer e.g. http://dpaste.com/3M9C3B0) but... *shrug*
05:01 Zeno` looking at rest of PR shortly
05:03 Zeno` does this take into account "strict protocol checking" (or is that even relevant here?)
05:04 Zeno` ShadowNinja, is the serverslist expert :)
05:04 Zeno` - ,
05:11 est31 no strict protocol checking is not taken into account, however its still done on connection.
05:11 Zeno` but will it show the server in the resulting list?
05:12 * Zeno` reads the comments on 2234 now
05:12 est31 yes
05:12 est31 also strict protocol checking is server-side only
05:13 Zeno` yeah just wondered how it worked in the serverlist (i've never looked at that part of the code before)
05:13 est31 to support that, we'd need an additional field...
05:13 Zeno` Anyway, lgtm
05:14 Zeno` apart from the inverted logic. I suppose the compiler would optimise that anyway but it's more of a (subjective) readability issue.
05:14 Zeno` Why do you suggest it goes into 0.4.12?
05:15 est31 so that clients which are 0.4.12 can hide new servers
05:15 Zeno` Oh, I think I see...
05:15 Zeno` yeah
05:15 Zeno` ok, well if SN wants to merge it I'm fine with it. Code looks fine
05:18 Zeno` ahh ok. Now I've re-read 2327 it all makes sense. I was confused for a bit there heheh
05:18 Zeno` (well, now that you've amended your comment)
05:18 est31 if you remove your comment, I'll remove mine :)
05:19 Zeno` ohhh... kinky
05:19 Zeno` ok, removed
05:19 VanessaE lol
05:19 Zeno` oh damn
05:19 Zeno` removed the wrong comment :/
05:19 est31 yea seen it
05:19 Zeno` I know I didn't... pressed cancel by mistake I think
05:19 Zeno` or did I?
05:20 Zeno` see? you got me all flustered
05:20 Zeno` I'm blushing like a flamingo
05:20 est31 as long as you dont do rm -r / home/zeno/minetest/debug.txt
05:20 est31 :D
05:21 Zeno` I don't have a minetest/ directory
05:21 Zeno` oh
05:21 Zeno` I see what you did there
05:21 Zeno` evil
05:30 VanessaE he takes after STEAM programmers :P
06:08 est31 ShadowNinja, the server-side filtering will however require some work
06:08 est31 either we accept that requests to the url execute some lookups
06:09 est31 or we put a squid instance between server and users
06:09 est31 because, problem is, list.json is cached
06:09 est31 all the master server does is generating this file, and sending it upon request
06:10 est31 so, in order to send it basing on minetest version, we have to iterate the list, and filter the servers
06:11 est31 (from own experience) I admit that loading the master list can take a second or two on a 64 kbps connection
06:11 est31 but most ppl have better internet
06:13 est31 or we write our own cache instead of squid
06:15 ShadowNinja est31: The server will have to accept a post request with the protocol version.  You can set up caching with X-MT-Proto: <num>; and Vary: X-MT-Proto; or so.
06:15 ShadowNinja The server list isn't currently cached though.
06:15 est31 there is a static subfolder
06:16 est31 and the /list request is served by return send_from_directory(app.static_folder, app.config["FILENAME"],
06:16 est31 cache_timeout=0)
06:16 ShadowNinja est31: Yes, that doesn't have to be used anymore though.
06:17 est31 ?
06:17 ShadowNinja est31: Eventually it should be backed by something like Postgres so it remembers servers when they go down.
06:17 ShadowNinja The fact that it uses static/list.json is an implementation detail that doesn't matter.
06:18 est31 also, I'm for url params, not custom headers
06:18 ShadowNinja Someday when I get some time I'll have to make the master server much smarter.
06:19 est31 what would be the use case for remembering servers?
06:19 ShadowNinja est31: Oh, yes, you could use get params too.  That might be better,
06:19 est31 measuring % of uptime
06:19 ShadowNinja ^
06:20 ShadowNinja And validation, and some extra statistics usefull for sorting.
06:20 est31 like?
06:21 ShadowNinja And being able to say things like "There have been 123 unique servers since 2015-99-99"
06:21 est31 yeah
06:21 ShadowNinja est31: Like how often a server goes down and for how long.
06:22 est31 but for that (unique servers since xxxx) we need to be abled to uniquely identify servers
06:22 est31 only possible with some auth method
06:22 est31 passwords or better public key auth
06:23 ShadowNinja This would be done with flask-sqlalchemy and flask-migrate and flask-script and... (you can build a django-like out of all of the flask modules there are)
06:23 est31 then we can also leverage that key for logging into servers
06:24 ShadowNinja est31: Yes, IP:Port works well in most cases, but not if the server moves or something.  Each server would have to automatically generate a 64+-bit key and save it.
06:25 ShadowNinja 32-bit might be enough, but better safe.
06:25 ShadowNinja There's sooo much to do, but it will take a while to implement.
06:25 est31 ed25519 works with 32 byte keys
06:26 est31 public & private both same length
06:26 ShadowNinja And SRP leaves you with a shared secret that's 32 bytes IIRC.
06:30 est31 with shared secrets you can do HMAC - based signing without needing any encryption. can be used for "authenticated" actions like password changing or so.
06:30 est31 when we dont want encryption
06:33 DFeniks joined #minetest-dev
06:43 Hunterz joined #minetest-dev
06:43 est31 ShadowNinja, name the get params min, max to be concise or sth fancier?
06:50 ShadowNinja est31: Huh?
06:51 ShadowNinja est31: prot_min Vs. protcol_version_min kind of thing?
06:51 est31 you want to read /list?min_proto_version=13&max_proto_version=24 or /list?min=13&max=24 in the logs?
06:51 ShadowNinja est31: I'd chose the longer one.
06:52 est31 ok, doing that
06:52 ShadowNinja Short, but not to the point where it loses clarity or becomes confusing (minimum what?).
06:54 est31 to answer your github comment, I think its better to retain the min, max names, and not name it version, and min, just because its always the same. it can change in future versions, and *all* code touching versions has min and max
06:54 est31 and to be really tight with server.cpp behaviour, servers with strict version will send LATEST_PROTOCOL_VERSION as min and max
07:05 Zeno` Can some check the test case in #2328 please?
07:05 ShadowBot https://github.com/minetest/minetest/issues/2328 -- wrapDegrees_0_360() returns incorrect values for values close to -360
07:05 Zeno` someone*
07:05 Zeno` just to make sure I haven't gone insane again
07:07 Zeno` well, more insane
07:08 est31 http://codepad.org/EuDGqQgw
07:08 est31 ^ Zeno`
07:08 Zeno` Yes, so .. "testing    -359.250000... Patch: -359.250000 !=  Orig: 0.750000"
07:09 Zeno` That's weird... why didn't it compile on codepad for me?
07:09 est31 because I've added two (int)
07:09 Zeno` ok
07:09 Zeno` I wasn't as determined heh
07:09 est31 lol
07:10 Zeno` C doesn't require that cast... codepad is being a silly billy
07:10 Zeno` anyway I'm more interested in the results
07:10 est31 -Werr
07:11 Zeno` compile with -Wall -Wextra (no warnings... as expected by the C standard)
07:11 est31 lol
07:12 Zeno` I can find the section in the standard that mentions it if you like
07:12 Zeno` heh
07:12 Zeno` but I'm more interested in the results not codepad bugs or not bugs lol
07:13 Zeno` clang -O3 -Wall -Wextra -Wpedantic wrap.c -lm  gives even fewer warnings than gcc pedantic
07:13 Zeno` probably different default standard
07:16 est31 second lang that has an ugly ternary: python
07:16 est31 first is lua
07:17 Zeno` C only has one ternary operator unfortunately
07:17 Zeno` wait a sec... why are we talking about ternary operators now?
07:18 est31 because I'm changing the master server and searched for ternary operators as im inexperienced w/ python
07:19 est31 and why only one?
07:19 est31 has python more than one?
07:19 Zeno` *sigh*. lol.   Do you agree that wrapDegrees(-359.25) should not return 0.75? :p
07:19 Zeno` No, but C could have more than 1
07:19 Zeno` it might be refreshing
07:20 nore joined #minetest-dev
07:20 DFeniks joined #minetest-dev
07:20 Zeno` I suspect you're deliberately trying to send me insane
07:21 Zeno` nore is a mathematics expert, I'll ask him :p
07:21 est31 you werent supposed to find out my evil master plan
07:21 * est31 wonders what to do now
07:21 Zeno` nore,  Do you agree that wrapDegrees(-359.25) should *not* return 0.75?
07:21 est31 perhaps make an even evlier one?
07:22 Zeno` I am trying to establish my sanity est31 and you keep throwing in strange comments. I think I'm insane now :(
07:22 nore ehm... it should return the only number that is of the form x + 360k with k an integer, in the range [0, 360)
07:22 nore so -359.25->0.75
07:22 nore sorry ;)
07:22 Zeno` yes but... hmm
07:23 Zeno` the function returns [-360, 360]
07:23 nore well, that's not what its name says
07:23 Zeno` so IMO -359.25 should stay... -359.25
07:23 Zeno` I know, but I didn't write the function hehe
07:24 Zeno` nore #2328
07:24 ShadowBot https://github.com/minetest/minetest/issues/2328 -- wrapDegrees() returns incorrect values for values close to -360
07:25 Zeno` I just realised there may be two bugs... I've been looking at wrap degrees when my original report was in respect to wrapDegrees_0_360()
07:25 nore yeah, that's the usual thing with C modulo...
07:25 est31 NOTE: Wrapping to 0...360 is not used because pitch needs negative values.
07:26 nore one quick way that is often used is (x%360 + 360)%360
07:26 nore but it can be a bit slower :(
07:27 nore but anyway, ifs are quite slow too
07:27 est31 there is no if
07:27 est31 where is one
07:27 est31 ah
07:27 nore there would be one for another way to fix this
07:27 est31 wrapDegrees_0_360
07:28 Zeno` I don't think using fmod() is going to be very efficient
07:28 Zeno` maybe it is, dunno
07:28 Zeno` anyway correctness before efficiency
07:29 Zeno` doesn't matter if it's 50000x faster but returns incorrect results
07:30 Zeno` For reference, here is the implementation in-situ: https://github.com/minetest/minetest/blob/master/src/util/numeric.h#L187
07:30 Zeno` and IMO that function should return -359.25 for -359.25
07:31 Zeno` But I'm still in the establishing my sanity phase
07:31 nore then its name should be changed
07:31 Zeno` for -350 it returns -350
07:32 Zeno` which is as per the function description is correct (disregarding the misleading function name)
07:33 Zeno` The question is therefore: is -359.25 within the range [-360, 360]? If so then according to the comment description it should return the value unchanged
07:34 nore it is
07:34 Zeno` Ok, I think I am sane
07:34 Zeno` good
07:34 nore but then you need to change the name...
07:34 Zeno` I dunno why we use degrees anyway... maybe it's an irrlicht thing
07:34 nore btw, what is this function used for?
07:34 Zeno` yeah I'll change the name after it returns correct values
07:35 Zeno` handleCommand_PlayerPos()
07:35 nore yeah, but what for?
07:36 Zeno` adding :3
07:36 Zeno` I dunno actually
07:37 Zeno` I can't remember why I even started looking at the function. Was related to a PR
07:37 * Zeno` will see if it's used anywhere meaningful
07:37 nrzkt joined #minetest-dev
07:38 Zeno` if it's not used in a meaningful way then it should probably be deleted
07:38 Zeno` So I have 3 tasks now
07:39 est31 joined #minetest-dev
07:41 Zeno` anyway, now that it's established as a minor bug I will: a) check if wrapDegrees() is used meaningfully and if not delete it; and b) check  wrapDegrees_0_360(); c) rename one of both (depending on outcome of a) so they are named in a way that's expected in a normal situation
07:42 Zeno` one or both*
07:43 Zeno` it's only used in handleCommand_PlayerPos() so surely it can be gotten rid of
07:43 Zeno` then again maybe not
07:46 nrzkt hi
07:46 nore hi
07:50 est31 ShadowNinja, should I really entirely remove the cache?
07:50 est31 its just loaded & saved
07:50 ShadowNinja est31: What cache?
07:51 ShadowNinja est31: I'm not sure about the server-side filtering though, BTW.
07:52 est31 because the problem is that when you restart the masterserver, the cache in static/list.json is read, so that servers dont have to re-announce
07:52 leat1 joined #minetest-dev
07:52 est31 when you remove this read, the master list will be empty at restart
07:52 est31 which is ofc bad
07:52 est31 yea nrzkt's comment is quite good
07:53 est31 because then ppl know and dont complain "I want to connect to this and that server, why is it down?"
07:53 est31 theyll still complain but only the super dumb ones
07:54 ShadowNinja est31: Oh, cache isn't really the right word, it's more of a mini-database.
07:54 est31 yea, after I saw this load-save stuff I also feel that its more like that
07:54 est31 so, what to do?
07:54 nrzkt thanks est31 :)
07:55 ShadowNinja est31: Eh, leave it for now.
07:56 ShadowNinja We can use gzip transfer encoding for slow connections.
07:56 est31 isnt it used already
07:56 est31 at least my firefox uses it
07:56 est31 dunno bout MT
07:56 est31 gonna check with wireshark
07:57 nrzkt ShadowNinja #1845 is a great thing, i looked at the code, only sqlite is migrated, right ?
07:57 ShadowBot https://github.com/minetest/minetest/issues/1845 -- Split block position into separate fields in SQLite3 database by ShadowNinja
07:59 est31 this low level db stuff needs realm support
08:00 ShadowNinja nrzkt: Yes.
08:00 ShadowNinja est31: It needs a call to curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
08:01 ShadowNinja ("" == all builtin supported encodings)
08:01 nrzkt ShadowNinja, if i understand your commit, user doesn't have to do anything to migrate its schema version ?
08:01 est31 simple hashes could have been used in a backwards compatible way: just multiply the realm number with a certain large number, and then add it. with that mechanism realm 0 were already the default map. with split up entries, its a bit more complicated
08:01 ShadowNinja nrzkt: Yes, just load the world and wait for the migration to complete.
08:01 est31 but yes, splitting up is better
08:02 ShadowNinja est31: ...or add a realm id column.
08:02 est31 yes
08:02 est31 that would be the new way
08:03 nrzkt then it's good for me. I don't want to keep old map formats, having an automated migration is good
08:03 ShadowNinja That allows SQLite to do some ordering optimizations.
08:04 est31 ShadowNinja, master server list is hosted by you isnt it
08:05 ShadowNinja est31: Nope, sfan hosts it ATM.
08:07 nrzkt ShadowNinja, then it's perfect , please rebase #1845, i'll test it and if ok it could be merged
08:07 ShadowBot https://github.com/minetest/minetest/issues/1845 -- Split block position into separate fields in SQLite3 database by ShadowNinja
08:07 est31 nrzkt, what should be behaviour if the server has unsupported protocol? just show an appropriate error when trying to connect or sth else?
08:08 nrzkt if the entry could be grayed
08:08 est31 does formspec support this...
08:08 nrzkt i think the entry must be grayed and we get a tooltip when mouseover to show what's the problem
08:09 ShadowNinja nrzkt: Can't rebase it ATM.  I'll do it tomorrow if I remember.  You might be able to do it yourself though.
08:09 est31 tooltips are against least supprise
08:10 nrzkt no problem ShadowNinja, but i haven't time to refactor a so huge pr :p
08:10 ShadowNinja Gotta go sleep now.  o/
08:10 nrzkt i'm working on network and study the server performance bottlenecks
08:10 nrzkt good night :) (it's 9AM here :p)
08:10 est31 bye
08:10 ShadowNinja nrzkt: Huge?  You haven't seen many of my PRs...
08:11 nrzkt maybe, i like huge useful pr
08:11 nrzkt mod_security must be there too
08:11 ShadowNinja Oh, and someone update the topic.
08:12 est31 freeze not in effect anymore
08:12 est31 ~topic
08:12 ShadowBot est31: FEATURE FREEZE FOR 0.4.12 IN EFFECT.  Release date: soonâ„¢ | Minetest core development and maintenance. Chit-chat goes to #minetest. Consider this instead of /msg celeron55. http://irc.minetest.ru/minetest-dev/ http://dev.minetest.net/
08:13 nrzkt freeze is in effect
08:13 nrzkt we have the branch. Master is not the freeze :)
08:16 nrzkt we must work on master. Objective is to integrate useful functions and have less than 85 PR at the end of the month
08:24 nrzkt https://github.com/minetest/minetest/commits/freeze-0.4.12
08:25 jin_xi joined #minetest-dev
08:34 guest365 joined #minetest-dev
08:41 kilbith joined #minetest-dev
08:52 FR^2 joined #minetest-dev
08:56 Zeno` joined #minetest-dev
08:59 nrzkt joined #minetest-dev
09:03 kahrl joined #minetest-dev
09:06 ImQ009 joined #minetest-dev
09:41 leat joined #minetest-dev
09:42 nrzkt #2327, as requested i added compression mode byteFlag to _INIT packet
09:42 ShadowBot https://github.com/minetest/minetest/issues/2327 -- [Patch 3/4] Network rework: Packet fixes & cleanups by nerzhul
09:47 kahrl nrzkt: regarding the last commit to master, have you made sure that all those SAO classes are actually unused? I don't think they are
09:47 nrzkt they are
09:47 est31 greying out is still in the works...
09:47 nrzkt the code is never called anywhere
09:47 nrzkt a simple grep show it
09:47 kahrl nrzkt: what about ServerActiveObject::create
09:48 est31 lol and it compiles?
09:48 kahrl that one won't show up in grep
09:48 nrzkt it's a virtual class
09:48 kahrl est31: yeah because the SAO factories are added dynamically as the classes are registered
09:49 kahrl what is a virtual class?
09:49 nrzkt a class which many virtuality ? :p
09:49 nrzkt this code isn't called, i'm sure.
09:49 kahrl have you tried loading a map made in 0.3 with item objects?
09:50 nrzkt 0.3 is not the point here
09:50 kahrl (or mobs, which the DummyLoadSAO was made for)
09:50 nrzkt i discussed with mods maintainer and they doesn't use this
09:50 kahrl huh? 0.3 compatibility was exactly the point of the code you removed
09:50 nrzkt the only class is the LuaEntitySAO, classed from lua APIs
09:51 nrzkt called* sorry
09:52 kahrl of course mods won't use those classes, they can't be used from mods
09:54 nrzkt yes
09:55 kahrl when I load liquid_test_world, a world made on 2011-11-08, I get a lot of these: https://gist.github.com/kahrl/13c359de7547107373fb
09:56 nrzkt ...
09:57 nrzkt we must have a migration engine, 0.3 maps mustn't exist in the future.
09:57 nrzkt 4 years old map without compat improvements
09:58 kahrl why remove the code at all? it didn't hurt anyone
09:58 nrzkt we must have a convergent model.
09:58 nrzkt i thought it wasn't used, nobody on IRC disagree in 12 hours of PR and discussion :)
09:58 kahrl DummyLoadSAO and ItemSAO were the "migration engine"
09:59 nrzkt and LUA modders tell me that the ItemSAO wasn't used anymore, this is right because it's never called in the code
09:59 nrzkt the ItemSAO code was commented
09:59 kahrl yeah I agree, the code could certainly use better comments
10:00 kahrl and perhaps instead of keeping ItemSAO, they should be converted to modern item entities
10:00 nrzkt maybe we could convert this item, no ?
10:01 nrzkt a convergent model is required in minetest, it's better to have an automated migration process instead of a compat and unmaintainable code
10:03 nore do we *really* need 0.3 compatibility?
10:03 nrzkt do you think we can convert type 3 entity to LUA entity easily ?
10:03 nore it is at least 3 or 4 years old
10:03 nore it shouldn't be too difficult
10:03 nrzkt 0.5+ will not, bug we must find a way to migrate old entities, and in 1 or 2 year we remove the old migration process
10:03 nore just use the code that was next to the one in add_item
10:04 kahrl nore: we do, people have worlds that were started in 0.3 and may contain blocks that were never loaded in 0.4 yet
10:05 nore hm.. ok, then perhaps keep it some time more
10:06 kahrl there isn't really a point in time where that won't be the case anymore
10:06 nore perhaps the best would be to do a world converter then
10:07 nore and drop all the deprecated stuff
10:07 kahrl I think that is what nrzkt suggests
10:07 Zeno` I asked about 0.3 compatibility a few weeks ago and the answer was that it's needed. I wish I could remember why it was brought up
10:07 nore that would avoid keeping some old code
10:07 roniz joined #minetest-dev
10:07 kahrl I'm not convinced that it will be easier to maintain the world converted than to keep around a few bits of compat code in the engine
10:07 kahrl converter*
10:08 nore what I mean: a converter from old versions to the one written at the same time as the converter
10:08 nrzkt hmmm... we could have a convert layer into the engine, in a dedicated source to do those things, then the convert layer will be centralized and would be maintainable
10:08 nore and then, keep compat code, but only for things more recent than the converter
10:08 nore and when the converter is too old, make another one
10:09 nrzkt that make sense,
10:11 nrzkt then, how can i convert kahrl types into LuaEntitySAO ?
10:13 kahrl heh, kahrl types
10:15 Zeno` :D
10:15 est31 lol
10:17 nrzkt kahrl have you got an idea, how can we convert your rats into LuaEntitySAO ?
10:18 kahrl not really, I haven't touched this code in years
10:18 nrzkt nobody can maintain this piece of code, really ? :(
10:18 nore problem with rats is that you moreover need to mod to add them
10:19 nrzkt for Dummy in fact the problem is simple to resolve
10:19 nore while items are easier to convert
10:19 nrzkt there can do anything, the class is empty
10:19 proller joined #minetest-dev
10:19 nrzkt they can do nothing (sorry...)
10:19 nore wouldn't it be best just to remove all unknown entities?
10:21 nrzkt for dummy, we could remove them, no ? they are totally useless
10:21 nrzkt for Item we must convert them
10:22 nore well, it would be quite a lot of compatibility code
10:22 nore including some lua api calls
10:22 nore so the question is: do we *really* want to convert the items or is just deleting them enough?
10:22 nrzkt no API calls where removed in my commit, then the compat code could be easy ?
10:23 nrzkt kahrl, Zeno` suggestions ?
10:25 kahrl nore: it could also be implemented by working more directly with the serialized object
10:26 kahrl nore: i.e. setting the type to ACTIVEOBJECT_TYPE_LUAENTITY and updating the static data
10:28 nrzkt i think we must work here: ClientActiveObject* ClientActiveObject::create
10:29 kahrl why client?
10:29 nrzkt client and server have both the problem, no ?
10:30 kahrl not if the server converts the objects before sending them to the client
10:30 nore kahrl, yes, but then some mod that would change builtin_item serialization format would break it
10:31 kahrl nore: such a change would have to be compatible with the old serialization format anyway, to be compatible with older 0.4 maps
10:31 nore ok, you're right
10:31 nore but what about rats or other mobs?
10:31 nrzkt and we need also, in the future, a migration code also for that
10:31 kahrl nrzkt: client might have to know about them if connecting to older servers, but we are breaking the protocol soon anyway so no problem
10:32 nore change them to entities of a mod that adds them, or remove them?
10:32 kahrl nore: not sure, they are kind of ignored right now so it might be best to delete them
10:32 nore and what happens currently with ItemSAOs?
10:33 kahrl we don't want to make the engine dependent on any mob mod that isn't even in minetest_game
10:33 kahrl nore: they are kept (not converted to lua entities)
10:33 nrzkt yes, we are breaking protocol, and i think we must remove all the compat layer and move to migration layers, it permit to have a unified code and not spaghettis
10:33 nore yes, but can they be seen? clicked?
10:33 kahrl nore: yes
10:34 nore hm, ok then
10:34 kahrl nore: well, before HEAD removed ItemSAO anyway
10:34 nore about spaghetti code: there are a few things that would benefit from polymorphism or macros
10:35 nrzkt of course, but not there ?
10:35 nore in the object code somewhere
10:35 nore but CAO iirc
10:36 nore anyway, we can look at that later
10:37 nrzkt i think you are right, heritage and polymorphism aren't used, but it's not our case here :)
10:37 nore *cough*
10:37 * nore just looked at item serialization
10:37 nore and it's awful
10:38 nore there are tow different accepted formats (compat code again...)
10:38 nore the old one would be much easier to convert old items to
10:38 nore but it is deprecated
10:38 nrzkt a compat layer there could permits to migrate serialization blocks too , we could work on it
10:39 kahrl nore: a ItemSAO -> LuaEntitySAO converter shouldn't need to worry about updating the itemstring
10:39 nrzkt I re-added old types (and convert some functions types to ActiveObjecType) https://github.com/minetest/minetest/commit/c58d49977da5aab88f5a9d5b540c6237ca5cdcb5, then we can work on migraiton layer
10:40 nore kahrl: so use the old version, because it is easier?
10:40 kahrl nore: yeah, the code for deserializing it exists anyway
10:40 nore oh, btw: items seem to have an age
10:40 nore but that age is only the time they spent while loaded
10:41 nore should we change that to time they existed?
10:41 est31_ joined #minetest-dev
10:44 nrzkt est31: you mean we should use byteflags for protocol version too ?
10:44 kahrl nrzkt: I still get https://gist.github.com/kahrl/13c359de7547107373fb on current HEAD
10:44 est31 what you mean with that?
10:44 est31 enum?
10:44 kahrl nrzkt: because ItemSAO and DummyLoadSAO don't exist
10:45 puhfa hm, speaking of item serialization...
10:45 puhfa whats the reason behind disconnecting immediately whenever theres a serializatino error?
10:45 kahrl well, not exactly that gist, since it prints the type as an integer and not as a char now
10:45 nrzkt i only restore the types for preparing the migration code :)
10:45 nore kahrl, wasn't type=3 rat?
10:46 nrzkt https://github.com/minetest/minetest/blob/c58d49977da5aab88f5a9d5b540c6237ca5cdcb5/src/activeobject.h#L31
10:46 nrzkt yes
10:46 est31 nrzkt, yes to my question?
10:46 nrzkt no, to nore
10:48 nrzkt est31: i talked about your comment on protocol, you talked about LATEST_PROTOCOL_VERSION, and my byteFlag option for compression
10:50 est31 nrzkt, ah ok, The comment wasnt about byteflags, it just asked to update the #define value here: https://github.com/nerzhul/minetest/blob/708567a85db894ca012207189117f63b40d8b941/src/network/networkprotocol.h#L113
10:50 est31 and I wasn't sure what current practice is
10:51 est31 whether the protocol version gets updated at every break or at every release
10:51 nrzkt oh i see, you are right, but not now, the protocol isn't defined yet, and maybe the protocol version handling could be modified :p
10:51 est31 what are your ideas for version handling ?
10:52 nrzkt at this time, i haven't ideas, but you are right SERVER_PROTOCOL_VERSION_MIN and CLIENT must be updated, i'll do this now
10:53 kahrl I guess it would actually be fine to simply delete ItemSAOs, since we can say that they despawn after such a long time :)
10:53 est31 lol
10:53 nrzkt what is ItemSAO exactly ?
10:54 nrzkt is this the dirt i throw from my inventory ?
10:54 kahrl nrzkt: yes, if you threw it in a 0.3 version
10:54 kahrl or early 0.4
10:55 nrzkt then we could say that all of those SAO can be safely removed from MT
10:55 kahrl if the errors in my gist are silenced, yes
10:56 nrzkt ok
11:04 * Zeno` is sorry he hasn't kept up with this conversation; I'll have to read the logs
11:05 * est31 read the conversation, but didnt get stuff done
11:05 Zeno` I got heaps done. Cooked and ate heaps of food :D
11:06 Zeno` Oh, you mean coding... I didn't get any of that done
11:07 Zeno` kahrl, regarding #2328 ... I'm sort of surprised at the results. Is fmodf() not x87 intrinsic?
11:07 ShadowBot https://github.com/minetest/minetest/issues/2328 -- wrapDegrees() returns incorrect values for values close to -360
11:08 est31 nrzkt, have you checked that stuff builds?
11:08 est31 guess PASSWORD_SIZE is used
11:08 Zeno` obviously I'm not going to make a patch that is almost twice as slow just because the size of the code is shorter
11:09 crazyR joined #minetest-dev
11:09 Zeno` maybe a glibc thing... /me looks
11:09 nrzkt no est31
11:09 nrzkt i purged the static password size, using std::string.
11:10 est31 ah ok
11:10 nrzkt i don't want to see static size for strings, we will unify all to std::string
11:10 est31 then its fine :)
11:10 nrzkt or char* if you want :p
11:12 est31 commit msg should be fixed though its not PLAYERNAME_SIZE ... :D
11:12 Zeno` wait... no max size for strings?
11:13 Zeno` in the protocol?
11:13 nrzkt in fact files are passed as strings...
11:13 nore pushing that in 15 minutes if no-one complains: https://gist.github.com/Novatux/96c101940500dde6520e
11:14 nrzkt nore, this will stop the loading for those types, but entities stays registered into DB, no ?
11:14 Zeno` so... playername length is not limited any more?
11:14 nrzkt we must cleanup DB too
11:14 nore hm.. need to check that
11:14 nrzkt playername is limited
11:14 Zeno` phew
11:14 nore does anyone has a world old enough to test?
11:15 nore nrzkt, where is it limited then?
11:15 nrzkt it's only the size of the CHAR[28]
11:15 nrzkt oh... i see
11:16 nrzkt you are right, there is no test with this version, we must test it :)
11:17 Zeno` it has to be limited to 27 characters otherwise there is a) an overflow exploit; and b) the potential for DoS (e.g. a ~0 - 1 length playername)
11:17 nrzkt it's not PLAYERNAMESIZE, it's PASSWORDSIZE macro :p
11:17 nrzkt but both must be tested, in fact there is a missing test
11:17 kahrl Zeno`, no idea, would be interesting to see what fmodf compiles to
11:17 kahrl there are FPREM and FPREM1 instructions but they might be slow
11:18 kahrl also they are "partial" which means you need to execute these instructions in a loop until some flag is unset
11:18 Zeno` kahrl, compiles to glibc call as expected. I will look at glibc source code soon(ish)
11:19 Zeno` there might be a better way anyway
11:21 Zeno` I have a vague feeling this is one of the functions I optimised heavily during my project Euclid experiments (unfortunately I can't find all my source code! :3)
11:21 Zeno` I did it for radians but...
11:22 est31 git blame
11:22 Zeno` will look at it tomorrow I think. Very tired again
11:22 Zeno` est31, nah I never had my solutions on git :(
11:22 est31 oh you didnt commit them
11:22 nrzkt ok, i fixed the size check : https://github.com/nerzhul/minetest/commit/d6a8fa55b1c60bff000fe3556a2001926deb526d
11:24 Zeno` should be >= PASSWORD_SIZE  or  > PASSWORD_SIZE -1
11:24 Zeno` I think... /me looks at whole file
11:27 nrzkt why -1 ?
11:27 Zeno` NUL character has to be somewhere
11:27 Zeno` still looking at whole file
11:28 nrzkt and not >= because 28 is the size
11:28 Zeno` yeah of course, lol
11:28 Zeno` err
11:28 Zeno` no
11:28 nrzkt and -1 ? if i add PASSWORD_SIZE > -1 every password will be refused :p
11:28 Zeno` I didn't paste the whole expression :p
11:29 nrzkt lol
11:29 nrzkt and the string could not be null
11:29 nrzkt NetworkPacket* never return NULL while reading packet
11:29 Zeno` if (playerName.size() > PLAYERNAME_SIZE)  should be one of the two I pasted above (after playername.size())
11:29 Zeno` i.e. https://github.com/nerzhul/minetest/commit/d6a8fa55b1c60bff000fe3556a2001926deb526d#diff-f51fe3ca5b0c9edcb3069ed502ba6067R207
11:29 Zeno` this line
11:30 nrzkt yes i know
11:31 Zeno` if playerName.size() == PLAYERNAME_SIZE then it seems to be too long for the protocol
11:31 nrzkt what are you saying ?
11:31 nrzkt the sender send a std::string serialized
11:31 nrzkt the packet has changed :)
11:32 Zeno` hmm ok
11:32 Zeno` still looking at whole file
11:32 Zeno` :)
11:33 nrzkt it's a network protocol, you must look both client and server :p
11:33 Zeno` i know... I was just about to say "meh, I also have to look at..."
11:33 Zeno` too much work
11:34 Zeno` how many characters in length can a password be?
11:34 nrzkt it's a sha1 at this time, then 28
11:34 nrzkt but the auth will be changed, as ShadowNinja requested, then don't focus on this code ^^
11:35 Zeno` so the network protocol doesn't include the terminating \0 character?
11:35 nrzkt for strings ?
11:35 Zeno` yeah
11:35 nrzkt look at NetworkPacket operator<<(std::string
11:36 nrzkt https://github.com/nerzhul/minetest/blob/protocol-fix/src/network/networkpacket.cpp#L72
11:37 nrzkt then we can say \0 wasn't here
11:37 Zeno` ok, that's all I really wanted to know :)
11:41 Zeno` bbiab. Must clean up the mess I made in the kitchen heh
11:44 nrzkt kahrl ? if a SAO isn't loaded, it will not be removed from DB ?
11:44 est31 ow
11:46 nrzkt i talked about previous old entities to remove
11:49 est31 i know
11:57 est31 did github just redirect me to https://github.myshopify.com/
11:57 est31 man, I really liked github
11:57 est31 until now
11:59 est31 may have been an accident
12:04 kahrl nrzkt, it should
12:05 kahrl I guess it depends on how your changes interact with the statification code
12:13 crazyR joined #minetest-dev
12:14 kahrl actually no
12:14 kahrl ServerEnvironment only removes a static object if the corresponding active object has m_removed == true
12:14 kahrl so, it won't remove a static object if there is no corresponding active object
12:15 kahrl if you look at DummyLoadSAO, what it did was provide a dummy corresponding active object with m_removed == true
12:16 kahrl in order to remove unused old object types
12:22 selat joined #minetest-dev
12:26 PilzAdam joined #minetest-dev
12:27 nore kahrl, so we should add DummyLoadSAO back?
12:27 kahrl yeah
12:41 est31 nrzkt,can you review #2334 again?
12:41 ShadowBot https://github.com/minetest/minetest/issues/2334 -- Add protocol version logic to master server by est31
12:41 est31 gone eating
12:41 est31 pls reply in github while im off
12:47 Amaz joined #minetest-dev
12:56 nrzkt kahrl, erf, no other way ?
12:57 kahrl nrzkt: probably not, other than redesigning the static object system
12:57 nrzkt we could not call directly the removal ? it's anoying, it may be useful
12:57 sfan5 who highlighted me?
12:58 kahrl nrzkt: where would you do that?
12:58 sfan5 oh
12:59 sfan5 ~tell est31 yes, i run servers.minetest.net
12:59 ShadowBot sfan5: O.K.
13:00 nrzkt hmmm let me look at the code
13:00 kahrl nrzkt: I guess ServerEnvironment::activateObjects would be a place to do it
13:00 kahrl nrzkt: but...
13:01 kahrl nrzkt: objects are intentionally not deleted if deserialization fails
13:01 kahrl nrzkt: because the failure might be due to a bug, and not deleting the objects avoids data loss in this case
13:02 nrzkt yes. you are right
13:04 nrzkt oh... clearobject uses massive lists, is there any reason ? Vectors could be better there
13:06 kahrl it would probably be better, yes
13:07 nrzkt i'll look at this after resolve our case
13:07 kahrl something like this? https://gist.github.com/kahrl/046fe79cb014b26bc6db
13:08 kahrl where isObsoleteType would be a new static method of ServerActiveObject
13:08 nrzkt seems go to prevent unloading, but we keep old datas into database
13:09 nrzkt but anyway, i think it's better to prevent loading instead of trying to destroy it
13:13 nrzkt ok for you fix. I'll fix some std::list to std::vector too
13:14 nrzkt void listAllLoadableBlocks(std::list<v3s16> &dst); , why passing a reference instead of a returning the list ?
13:15 kahrl there is no reason
13:15 nrzkt ok, i remove it
13:15 nrzkt i will clear those referenced and push
13:17 kahrl well, the return value version has a downside
13:18 kahrl Map::listAllLoadableBlocks will have to copy the list
13:18 kahrl since there are no move constructors
13:19 nrzkt okay, then this improve the performance ?
13:19 kahrl changing it?
13:19 nrzkt to keep it :)
13:19 kahrl probably so, yes
13:20 kahrl but compiler optimizations are weird so I can't say for certain
13:20 nrzkt ok, i keep it, but change std::list to std::vector
13:32 nrzkt it seems the change from std::list to std::vector speeds up the server
13:32 nore how significant is the change?
13:33 nore I mean, the speedup
13:33 nrzkt i have no measures but my mind for that and it seems that the server starting is a little bit faster (migrate database use this modified function)
13:35 nrzkt for the ingame speedup: nothing because only clearAllObjects function use it, but this will speed up it
13:36 kahrl database migration only happens with the --migrate option
13:36 nrzkt oh, sorry then :)
13:37 nrzkt i try the clearobjects command on my own loaded server to see how many times is spent
13:37 nrzkt kahrl, you'll propose your patch soon ?
13:38 nrzkt or nore, maybe
13:38 kahrl which one?
13:38 nore I still have the ignore-old-objects patch
13:38 nore but not one that will remove them
13:39 nrzkt we could keep them for now, i think
13:40 nore so, should I merge my patch?
13:41 SudoAptGetPlay joined #minetest-dev
13:41 nrzkt could you link it another time ?
13:41 nore yep
13:42 nore https://gist.github.com/Novatux/96c101940500dde6520e
13:43 nrzkt maybe we must keep the old ID names to prevent strange things, and use it in your test
13:43 nrzkt i think this is better
13:43 fz72 joined #minetest-dev
13:45 est31 joined #minetest-dev
13:45 nrzkt hmmmm there are list at other places
13:46 nrzkt this commit is good i look at other lists to remove
13:47 est31 anybody has knowledge of mapgen? I want to know: is cavegen or mud reflow (whatever its real name is) restricted to some area around newly created blocks?
13:49 nore est31: 1 mapblock in each direction
13:49 nore and blocks are always created as 5x5x5 mapblocks
13:50 nore so that makes 7x7x7 blocks
13:50 est31 sorry, meant newly created mapblocks*
13:50 est31 to understand minetest.delete_area
13:52 nore nrzkt, better? https://gist.github.com/Novatux/bc9fc6fde97f387f851a
13:55 nrzkt also replace 2 and 6 in the test pelase :)
13:55 nrzkt please*
13:56 nore so, a lot of ||?
13:57 nrzkt non
13:57 nrzkt no*, just replace 2 and 6 into your test by the corresponding enum value :)
13:58 est31 nore, which minimum Chebyshev distance (in same unit as xyz coordinates pls) from p must a node n have in order to be not affected anyhow by deletion of mapblock containing node p?
13:59 kahrl est31: there is no such number
14:00 nore mods can have effect
14:00 est31 disregarding mods
14:01 nore so you mean, not being erased by map regeneration?
14:01 est31 map regeneration, cavegen, mud reflow whatever mapgen related effect there is in core
14:02 nore then if they are at (chunk_size + 1) * mapblock_size for each coordinate, it should be ok
14:03 est31 ok thx
14:03 kahrl what if p is at the top of the world and n at the bottom and deleting p causes sunlight to shine upon n
14:03 nore nrzkt: https://gist.github.com/Novatux/bc9fc6fde97f387f851a
14:03 est31 yea ok disregarding that
14:04 nore kahrl: anyway, there are problems with sunlight currently, depending on the height of structures
14:04 nore some structures high enough in the sky don't cast shadows on the ground
14:05 nore even 80 nodes can be enough
14:05 kahrl I think it aborts when it hits an unloaded block
14:05 nore yeah, there is something like that
14:06 nrzkt perfect
14:06 nrzkt nore: agree for commit
14:07 nore ok, pushed
14:07 est31 nrzkt, dont review my PR yet, I'll have to fix an issue with it first
14:08 nrzkt no proble est31
14:09 nrzkt kahrl, there are many std::lists instead of std::vectory and we are doing many sequential reads, then the vectors are very very more optimized than lists, i looked at the code to replace it
14:14 kahrl nrzkt: have you checked that the iterator usage is still valid after that change
14:14 kahrl nrzkt: especially in client.cpp where it says "This loop is intentionally iterated the way it is"
14:15 nrzkt the iteration is same
14:15 nrzkt i'm not changing loop reading, only the memory container
14:15 kahrl no but vector iterators and list iterators have different invalidation rules
14:15 msantana joined #minetest-dev
14:16 nrzkt you are right but their usage is very simple there, a simple push and after a sequential read
14:16 kahrl if you delete an item from a vector, all iterators are invalidated, not so for lists
14:16 fz72 hey there, map seed is still broken, when i create a new world with seed 44, the world has a random seed, next i create a world with seed 34, now the world has seed 44
14:16 kahrl I wouldn't call clearing a list while iterating it simple
14:17 kahrl I don't even understand how this is valid to begin with
14:18 kilbith fz72: i can reproduce, report an issue on git
14:18 kilbith this has been broken by hmmmm
14:19 nrzkt kahrl: i recheck vector calls, and all is sequencial, we don't remove specific elements from mentioned vectors
14:20 kahrl nrzkt: oh, nevermind, I got confused by sendlist vs. deleted_blocks
14:23 SopaXorzTaker joined #minetest-dev
14:23 kahrl I think this loop should be simplified at some point (should be easier to do with std::vector)
14:23 nrzkt i also think we have many things to simplify in map loops, there are many loops everywhere, i think we can do simpler things if the use our brain a little :)
14:24 shadowzone joined #minetest-dev
14:24 fz72 kilbith: i created an issue #2341
14:24 ShadowBot https://github.com/minetest/minetest/issues/2341 -- map seed is still broken
14:24 nrzkt this is bug isn't solved ? 0.4.12 was frozen because of that, no ?
14:26 nrzkt ok i'll do the same optimisation for ClientMap::updateDrawList, Map::timerUpdate and ServerMap::save()
14:36 Ritchie joined #minetest-dev
14:37 Zeno` joined #minetest-dev
14:37 Zeno` merging #2337
14:37 ShadowBot https://github.com/minetest/minetest/issues/2337 -- Grab GUIChatConsole::m_font, fixes segfault when changing font_size by kahrl
14:38 nrzkt Zeno` enter into the chat, Zeno` merged a PR, Zeno` disappears.
14:39 shadowzone o.O
14:39 Zeno` :)
14:39 fz72 it think this bug can be fixed if g_settings is used instead of settings in emerge.cpp on line 364
14:39 fz72 *I
14:40 Zeno` add to 0.4.12 as well?
14:40 * Zeno` thinks so
14:43 Zeno` emerge.cpp?
14:43 nrzkt we tested the current commits on my running server with kilbith with plantlife and using some mese TNT: 100% cpu but no lag
14:43 kilbith yep
14:43 nrzkt it seems better than before, we got lagged at each tnt :s
14:44 Zeno` oh wow... loadParamsFromSettings() is a bit strange
14:44 fz72 src/emerge.cpp
14:45 fz72 why is there g_settings and settings?
14:45 Zeno` no idea
14:45 Zeno` doesn't make sense
14:46 nrzkt i think for 0.5+ we need to unify settings reading into a unique class
14:47 Zeno` it had better not use a std::map or one of the other containers that are not O(1)
14:47 nrzkt wtf
14:48 fz72 loadParamsFromSettings() is called with g_settings but it seems in the function g_settings is diffrent to settings O.o
14:48 Zeno` reading and setting settings is currently as slow as ... slower than a snail
14:48 nrzkt sfan5 serer 504
14:49 nrzkt server HTTPD 504: https://travis-ci.org/minetest/minetest/jobs/51081581
14:49 Zeno` I have some ideas for settings
14:49 nrzkt ?
14:50 fz72 how should i fix the seed bug, should i always use g_settings?
14:50 Zeno` I've even implemented a few. This current settings are *way* too slow
14:51 nrzkt using a class with cache is the minimum. The settings must be loaded at server start. Some settings must be read-only and other read-write
14:51 nrzkt (example bind address
14:51 Zeno` std::map is not a cache
14:51 Zeno` fz72, see map.cpp line 3153
14:52 Ritchie joined #minetest-dev
14:52 Zeno` fz72, I dunno what that does but I could look (or you can)
14:52 Zeno` nrzkt, I'll look after settings :)
14:53 est31 crafting is also slow as snail
14:53 Megal joined #minetest-dev
14:53 est31 try to craft a stack of wood into planks
14:53 nrzkt Inventory is a pain, it's very very slow
14:53 est31 you *will* wait at the server
14:53 Zeno` you guys should have tried 0.4.9 and earlier
14:54 Zeno` then you would know slow heh
14:54 est31 lol
14:54 est31 dont even know which the first MT version was I played on
14:54 est31 meh history
15:00 fz72 Zeno`: i don't understand what it does
15:01 * est31 found out favorite is correct spelling after all
15:02 sfan5 nrzkt: if the build errors because of failed downloads just restart it; notify me if it happens often
15:02 sfan5 est31: got the ~tell i sent you?
15:02 est31 thought this were a typo in mainmenu lua
15:02 est31 sfan5, yes
15:02 est31 I was just interested about who hosts that server
15:03 est31 sfan5, seen the PR
15:03 est31 https://github.com/minetest/master-server/pull/5
15:03 sfan5 est31: which PR?
15:03 sfan5 oh
15:03 sfan5 looking at it now
15:07 fz72 g_settings is used for new worlds and settings is used for already existing worlds
15:12 fz72 Zeno`: I know this #2211 is closed for some reason but I think this is the right fix for this problem
15:12 ShadowBot https://github.com/minetest/minetest/issues/2211 -- Fix map_meta.txt error when loading a new world (last try) by ngosang
15:13 Zeno` I can't reopen it
15:13 Zeno` the branch has been deleted
15:19 nrzkt why use a std::set in ActiveBlockList::update ? :o
15:22 kilbith fz72, the reason is here : http://irc.minetest.ru/minetest-dev/2015-01-18#i_4118130
15:25 Zeno` lol
15:25 Zeno` yeah, I remember that
15:28 fz72 why is there fixed_map_seed and seed
15:28 fz72 ?
15:29 est31 awwww why does fgettext escape formspec
15:29 est31 there should be a way to disable it
15:30 est31 just for one call
15:34 proller joined #minetest-dev
15:34 Zeno` http://irc.minetest.ru/minetest-dev/2015-01-18#i_4118910
15:34 Zeno` heheh that's funny
15:34 Zeno` I like reading back on logs
15:37 fz72 loadParamsFromSettings() is called twice first with g_settings and second from map.cpp
15:37 nrzkt sfan5: is the patch applied on masterserver ?
15:37 sfan5 nrzkt: yes
15:37 nrzkt i mean: production master server, not sources :p
15:38 Zeno` where *is* hmmmm, btw? I kinda miss him :3
15:39 est31 hes in #mt
15:39 sfan5 nrzkt: yes
15:39 sfan5 i merged the patch, pushed, pulled on the vps and restarted uwsgi
15:39 nrzkt perfect, thanks
15:40 sfan5 the patch doesn't do critical things?
15:40 sfan5 what do you need it for?
15:40 sfan5 or did you just want to make sure proto_{min,max} works?
15:40 nrzkt no not critical, because unused by all servers
15:41 est31 not yet
15:41 nrzkt but 0.5+ servers will use it to declare their version
15:41 sfan5 you mean 0.4.12
15:41 est31 and 0.4.12 should have that too
15:41 est31 to be abled to say "hey, this is too recent for me"
15:42 nrzkt i'm working on 0.5+, 0.4.12 protocol is same a 0.4.11
15:42 nrzkt 0.4 series = old versions which could stay with proto 24  by default
15:43 nrzkt and yes, you are right, 0.4.12 needs to distiguish to recent, sorry ^^
15:43 nrzkt too many std::lists in my head :p
15:43 est31 do a git pull, and compile :)
15:44 est31 sb removed them today I heard
15:46 est31 anybody knowing lua well on here
15:47 guest365 joined #minetest-dev
15:47 est31 I have a function that gets variable number of params, it should call second function with the same params
15:47 est31 so function fgettext(text, ...) return core.formspec_escape(fgettext_ne(text, ...)) end will that work?
15:48 nore I think it does
15:50 nore btw: I saw your client mod, but what about adding general mainmenu mod support?
15:51 fz72 I fixed map seed #2342
15:51 ShadowBot https://github.com/minetest/minetest/issues/2342 -- Fix map_seed by fz72
15:52 nrzkt please remove printf :)
15:52 nrzkt someone can test ?
15:52 est31 nore, you mean to enable more mainmenu modding? I dont know a good model how to achieve this
15:53 fz72 sorry forgot xD
15:53 nore I don't know either, but we should perhaps think a bit more about it
15:54 est31 also find use cases, then finding models is easier
15:55 nore we have at least one use case
15:55 est31 I can generalize my use case as far as I can
15:56 est31 I can also add some way to add gui support in the future
15:56 est31 then ppl dont have to mess with internal files anymore
15:57 est31 like mainmenu/init.lua
15:58 est31 ok the func works with one param
15:58 est31 then I hope it works with others too
15:58 est31 s/others/more/
16:16 SopaXorzTaker joined #minetest-dev
16:25 neoascetic joined #minetest-dev
16:25 est31 ok, #2334 is ready...
16:26 ShadowBot https://github.com/minetest/minetest/issues/2334 -- Add protocol version logic to master server by est31
16:26 est31 nrzkt ^
16:27 Calinou joined #minetest-dev
16:34 ImQ009 joined #minetest-dev
16:44 Selah joined #minetest-dev
17:09 shadowzone joined #minetest-dev
17:35 shadowzone joined #minetest-dev
17:36 Hunterz joined #minetest-dev
17:40 nrzkt joined #minetest-dev
17:47 proller joined #minetest-dev
17:48 Robert_Zenz joined #minetest-dev
17:48 ElectronLibre joined #minetest-dev
17:53 shadowzone joined #minetest-dev
17:58 nrzkt can someone look at #2342
17:58 ShadowBot https://github.com/minetest/minetest/issues/2342 -- Fix map_seed by fz72
18:06 nrzkt ok je vois que dans le TNT déjà il appelle un vieux truc :p
18:08 nrzkt sfan5: is there any github for nuke ? you use deprecated calls
18:12 nrzkt hmm.... option enable_rollback_recording isn't used anywhere
18:28 celeron55 of course it is used
18:28 celeron55 your grep skills clearly suck 8-)
18:29 Krock joined #minetest-dev
18:30 nrzkt where did you see it celeron55 ? because my grep --color -Rn doesn't show something good
18:31 nrzkt in fact Server::rollback() call always return an object, then every rollback action is used. I tried it on my own server with TNT, rollback.sqlite increase from 4096 to 222000 o :)
18:31 celeron55 actually...
18:31 nrzkt you are right option is set to a variable, but variable isn't used
18:31 celeron55 yes
18:31 nrzkt and variable is set at search server::asyncrunstep too...
18:32 celeron55 well that's clearly a regression then
18:32 nrzkt s/search/each/
18:32 est31 joined #minetest-dev
18:32 nrzkt i'm fixing it by testing the setting at Server constructor. I don't think we should hot disable rollback and hot enable it
18:33 celeron55 nrzkt: there seem to be concerns about the pace of things happening right now; i think i'll have to remind you that if you do larger file or code reorganizations or compatibility-breaking changes, make sure to give them plenty of time and real-world testing before they end up in upstream
18:34 nrzkt celeron55: no problem, every huge change is in PR
18:34 celeron55 you actually have the chance of making very many people very angry if you fail to do it
18:35 nrzkt well, you are right, i don't commit to master directly if it's not a little fix which doesn't impact the core
18:36 nrzkt like the unit test fix (which affect my production machine but not my testing machine), or the std::list replacement to std::vector, checking every algorithm to see if it's rentable
18:36 nrzkt other changes passes PR
18:37 celeron55 also you'll probably have to hilight people in here to get the needed eyeballs for such changes so don't be afraid to do it in this case
18:37 nrzkt i talked about those changes on IRC, kahrl was here, please look at IRC logs this afternoon (GMT+1)
18:37 celeron55 i guess the non-hyperactive developers will come out from their holes when there's something big to argue about... at least hopefully
18:38 nrzkt and also Zeno` and nore :)
18:39 celeron55 Zeno doesn't really have the full trust of the core team yet as he's so new (it's probably one part of why people are concerned)
18:40 nrzkt okay :)
18:40 celeron55 this is actually a bit nasty from my standpoint, interestingly enough
18:40 celeron55 it seems some people would be happier if nothing happened so that they wouldn't have to worry about things...
18:41 nrzkt in fact, there are two devel model, the devops model which is agile, and the old school model which would say: it works don't touch this
18:42 celeron55 the best way is never any of the extremes
18:42 nrzkt and some old coders may be from the old school, have code which works, and they are right, devops like code which works too, but modify it to optimize if necessary
18:42 nrzkt ofc
18:45 Hiradur joined #minetest-dev
18:52 celeron55 what exactly is the state of the release right now?
18:52 nrzkt Zeno` has backported some little fixes, but maybe some other fixes can be backported too
18:52 nrzkt https://github.com/minetest/minetest/commit/81b9c023c4f96d2db06706496e0578fdd1b6377b for example
18:52 celeron55 hmm i think zeno did say the code is in good state as far as he can tell some days back
18:53 celeron55 did someone make an RC build and did anyone test it?
18:53 celeron55 for windows
18:53 kahrl https://forum.minetest.net/viewtopic.php?f=18&amp;t=11227
18:53 nrzkt a RC build was in the road by BlockMen,
18:53 nrzkt s/in/on/
18:55 celeron55 the comments indicate that it works similarly as the previous release so it's fine; we can request a final build from BlockMen once everything is in place otherwise
18:55 nrzkt kilbith have you tested #2342 for #2341 blocker ?
18:55 ShadowBot https://github.com/minetest/minetest/issues/2342 -- Fix map_seed by fz72
18:55 ShadowBot https://github.com/minetest/minetest/issues/2341 -- map seed is still broken
18:56 est31 get #2334 in there too? or make master server itself more smarter and filter for old clients?
18:56 ShadowBot https://github.com/minetest/minetest/issues/2334 -- Add protocol version logic to master server by est31
18:56 nrzkt because master server is updated, i agree. It's necessary for networking layer transition
18:57 nrzkt let me test it another time before, and if you could factorize the code i mentioned
18:57 nrzkt oh you answers est31, sorry :)
18:57 est31 np
18:57 nrzkt ok if the factorization is too huge, maybe factorize later, in master.
18:57 est31 ok
18:58 nrzkt celeron55, after which delay would you like to get 0.4.12 out ?
19:02 celeron55 it looks like we can add a version bump commit to freeze-0.4.12, merge the thing into stable-0.4 and tag it now
19:02 nrzkt now ?
19:03 nrzkt there is a blocked in the PR
19:03 nrzkt map seed regression
19:03 celeron55 did map seed work in 0.4.11?
19:03 nrzkt in fact map seed works, but if you don't leave client and change the seed this doesn't work
19:04 nrzkt this keep the old seed
19:04 nrzkt we also have a blocker on font-size and #2037 too
19:04 ShadowBot https://github.com/minetest/minetest/issues/2037 -- World mod configuring is broken
19:05 celeron55 okay i think these really do deserve the blocker tag
19:06 nrzkt okay, you're the boss
19:06 nrzkt but est31 #2334 commit must be added before merge
19:06 ShadowBot https://github.com/minetest/minetest/issues/2334 -- Add protocol version logic to master server by est31
19:06 nrzkt s/merge/release/
19:07 nrzkt it's important for the networking transition, to get a future release transition with a better protocol handling in masterserver
19:07 nrzkt not really handling but announce
19:08 celeron55 #2327 isn't marked as a blocker
19:08 ShadowBot https://github.com/minetest/minetest/issues/2327 -- [Patch 3/4] Network rework: Packet fixes & cleanups by nerzhul
19:09 celeron55 but it can't go in anymore as it changes the protocol, it's for next release
19:10 nrzkt 2327 isn't a blocker
19:10 nrzkt he doesn't needs to be merged into 0.4.12
19:11 est31 2327 is for 0.5, but 2334 is neccessary so that 0.4.12 clients give a nice error message when they try to connect to a 0.5 server
19:12 nrzkt the 2334 option permit to 0.4.12 server to send their supported protocol version to master server and then block the future 0.5 incompatible server connections, and more :)
19:12 celeron55 the main focus should be fixing those 0.4.12 blockers
19:12 celeron55 because otherwise it can never be released
19:12 nrzkt map seed blocker has a PR we should test
19:13 nrzkt kilbith, i'll try the bug for map seed, can we talk in whisp ?
19:13 kilbith yes
19:14 est31 I can try to do a fix for #2037
19:14 ShadowBot https://github.com/minetest/minetest/issues/2037 -- World mod configuring is broken
19:14 celeron55 i have to go do other things now but i will be available to make sure the branch juggling and release numbers go correctly once it's the time for that; just hilight then
19:14 celeron55 (i expect those blockers to still take a day though)
19:15 nrzkt celeron55:
19:15 nrzkt i propose to do a point in 18-24hours, i will focus with core-dev and community to this
19:23 est31 nrzkt, I know its slightly off-topic but there is a regression
19:23 est31 I'm bisecting right now...
19:23 est31 regression in master, not freeze branch
19:25 nrzkt which regression ?
19:25 est31 when server is running, you cant start client.
19:26 est31 terminate called after throwing an instance of 'con::ConnectionBindFailed'
19:26 est31 thats the error
19:26 nrzkt well, this will not be fixed now, because the networking layer will be redone
19:26 nrzkt then we will look at this after PR 4/4 merge
19:28 est31 PR 2/4 is the first bad commit
19:28 est31 should I file an issue so that this doesnt get forgotten?
19:29 nrzkt PR 2/4 introduce this problem ? it's not normal because it only works on packet themselves, not net layer
19:30 sfan5 nrzkt: no, there isn't a git repo for that
19:31 nrzkt sfan5: okay !
19:33 CraigyDavi joined #minetest-dev
19:36 est31 nrzkt, #2344
19:36 ShadowBot https://github.com/minetest/minetest/issues/2344 -- in master, you cant open both server and client the same time
19:36 nrzkt oh a german error !
19:36 est31 and now, I'll fix 2037
19:37 est31 yea computer locale is german :)
19:37 nrzkt oh, i know why
19:37 nrzkt unit tests ?
19:37 roniz joined #minetest-dev
19:37 est31 should I add unit tests?
19:37 nrzkt no, for the bug you mentionned.
19:39 est31 two commands: minetest --server --port 30000 &
19:39 est31 and then: minetest
19:39 est31 nothing more
19:41 nrzkt if you let a delay between the commands it works, right ? it's only at the same time ?
19:42 est31 no do a delay as you wish
19:42 est31 still problem
19:42 nrzkt strange, i'm using master version with client and server and i don't have any problem
19:42 nrzkt but i use minetestserver not minetest --server
19:43 nrzkt i don't have this problem
19:44 nrzkt but if i launch the two together right i have a bind failed
19:44 est31 does the minetest server really start or does it give an error
19:44 nrzkt it start
19:46 nrzkt but client crashes with bind failed :)
19:46 nrzkt âžœ  minetest git:(master) ✗ ./bin/minetest --server --port 30000 --worldname ttttt& ; ./bin/minetest
19:46 nrzkt [1] 14400
19:46 nrzkt 4: Bind failed: Adresse déjà utilisée
19:46 nrzkt terminate called after throwing an instance of 'SocketException'
19:46 nrzkt what():  Failed to bind socket
19:46 nrzkt [2]    14401 abort (core dumped)  ./bin/minetest
19:46 nrzkt âžœ  minetest git:(master) ✗ Using world specified by --worldname on the command line
19:46 nrzkt [Plants Lib] Loaded
19:47 est31 and when you add sleep 4; between?
19:48 nrzkt same, because unittests haven't finished, i must wait 6 sec (unit tests have some sleep...)
19:49 est31 unittests run by? server
19:49 nrzkt server
19:49 est31 ok
19:49 nrzkt in unittests server tests the network , then it starts
19:50 nrzkt if client starts at this time, he does the same unit tests
19:53 est31 ok now I cant reproduce it too
19:55 proller joined #minetest-dev
19:56 est31 ah ok perhaps unit tests are executed by default
19:56 est31 might cause longer server startup
19:57 est31 which results in client complaining
19:57 est31 whatever, closing the issue.
19:58 est31 back to 2037
20:07 Miner_48er joined #minetest-dev
20:10 crazyR joined #minetest-dev
20:12 est31 ok now I know where the issue lies
20:12 est31 the issue they complain'bout
20:24 nrzkt ShadowNinja, kahrl, nore, can you review #2343 please ?
20:24 ShadowBot https://github.com/minetest/minetest/issues/2343 -- Fix unused (and so, broken) enable_rollback_recording. by nerzhul
20:31 crazyR joined #minetest-dev
20:37 nore nrzkt, disabling it and doing /rollback_check crashed the server
20:37 nore or the client, I don't know
20:37 nore anyway, I got a segfault
20:38 nrzkt ok, maybe a pointer i didn't see
20:41 nrzkt ok i see
20:42 kahrl https://github.com/minetest/minetest/commit/b1965ac20922e3722392114bd63a22b403dcbe98#diff-ad60d65b34e16a3319296bb5d683acd6L4918
20:42 kahrl ^ that method, before it was removed, was how it was supposed to work
20:43 kahrl so if enable_rollback_recording = false, the rollback manager still exists (and is used by the chat commands) but the report sink is NULL
20:43 kahrl for some reason the above commit removed that
20:43 kahrl ShadowNinja: why?
20:43 nrzkt i see
20:44 nrzkt erf, fixing the pointer crash trigger an exception into LUA...
20:45 nrzkt throw ServerError(async_err); L493...
20:46 nrzkt :q
20:46 shadowzone joined #minetest-dev
20:46 kahrl sounds fun ;)
21:00 crazyR joined #minetest-dev
21:03 holti|22 joined #minetest-dev
21:04 nrzkt ok nore, kahrl, this is now fixed :)
21:06 FR^2 joined #minetest-dev
21:13 Kray joined #minetest-dev
21:15 holti|22 joined #minetest-dev
21:22 johnnyjoy joined #minetest-dev
21:31 proller joined #minetest-dev
21:33 est31 nrzkt, check #2345
21:33 ShadowBot https://github.com/minetest/minetest/issues/2345 -- Add modname convention checking by est31
21:54 nrzkt please tell me tomorrow
21:54 nrzkt i go to bed :)
21:56 crazyR joined #minetest-dev
21:56 crazyR joined #minetest-dev
22:04 ElectronLibre left #minetest-dev
22:34 proller joined #minetest-dev
22:38 est31 joined #minetest-dev
22:46 shadowzone joined #minetest-dev
23:12 werwerwer joined #minetest-dev
23:14 roniz joined #minetest-dev
23:33 Miner_48er joined #minetest-dev
23:36 jin_xi joined #minetest-dev

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