Time Nick Message 02:00 est31 About seeding our PRNG 02:01 est31 this is how csrp-gmp does it https://github.com/est31/csrp-gmp/blob/master/srp.c#L424 02:02 est31 without any PRNG at all 02:02 est31 I guess having our own will be faster than relying on OS based PRNGs 02:02 est31 we can re-seed it with OS based PRNGs then 02:02 est31 problem is: for unix, this comes without any cost 02:03 est31 but windows needs to link against some system library 02:03 est31 #include 02:04 est31 author claims this is Advapi32.lib https://github.com/cocagne/csrp/blob/master/srp.h#L38 02:04 hmmmm fyi you could use rand_s() and get the same result. 02:05 est31 interesting 02:05 hmmmm also that code will fail on oses like solaris 8 that don't have /dev/random 02:06 est31 that would have been my next point 02:07 hmmmm generally though it's wrong to assume 'if it's not windows, it's posix' 02:07 hmmmm defaulting to /dev/random would break compatibility with openvms 02:08 est31 yes, I've noted that in the readme 02:08 est31 rand_s() isn't standard C is it? 02:08 hmmmm neither is CryptGenRandom() 02:08 est31 I've only found windows docs about it 02:10 est31 rand_s() has the issue that it "only" returns a single value 02:10 est31 so we would have to call it in a loop 02:20 paramat http://i.imgur.com/sYTDLyA.png just now got the fractal mapgen working 02:21 hmmmm wow :) that looks awesome 02:29 est31 hmmmm, how can I seed that PcgRandom? call seed with one param, or with two? 02:29 hmmmm split the seed between initial state and sequence 02:29 hmmmm so that's 16 bytes 02:37 est31 btw: 02:38 est31 do class-variables that are public need an m_ prefix in the name too? 02:38 est31 (style question) 02:40 hmmmm no! 02:41 hmmmm that would be horrible 02:41 hmmmm v3s16 foo; foo.m_X 03:22 est31 hmmmm, what do you propose to use for solaris? 03:23 hmmmm some arbitrary process memory 03:23 est31 same for openvms? 03:23 hmmmm xored with pid 03:23 hmmmm hrmm 03:24 hmmmm this doesn't need to be too crazy, it's just a seed 03:26 est31 if it can be predicted, people may be abled to log in as arbitrary users 03:26 hmmmm time(NULL) ^ printf ^ this_function ^ *(unsigned long *)((char *)&function_argument - 16) ?? 03:27 est31 sounds good 03:27 est31 its not our fault when sb uses openvms 03:27 est31 :p 03:27 hmmmm maybe it's safer to use a variable allocated inside that function 03:28 est31 ? 03:28 hmmmm well i just googled, OpenVMS has a secure random device 03:28 hmmmm DEV$V_RND 03:28 hmmmm who cares though :p 03:29 hmmmm the point is that it's extremely difficult to source sufficient randomness in a truly platform independent way 03:29 est31 yes 03:29 hmmmm I think time(NULL) should be okay if if fopen("/dev/urandom", "rb") == NULL 03:29 est31 whats b again? 03:29 hmmmm binary 03:30 est31 thats because of \0? or EOF? 03:30 * est31 reads doc himself 03:31 hmmmm ?? 03:31 hmmmm what no this is just the standard file mode string 03:58 * cheapie gets yet another serialization error 03:58 cheapie *This* is why UDP is a bad idea. 03:59 est31 we are doing tcp ourselves 03:59 est31 or at least the features of tcp we need 03:59 cheapie est31: I sure hope MT gets TCP soon (or at least some kind of error detection). 03:59 est31 nrzkt is the person for that task. 04:00 cheapie Or, at the *very least*, restore the old behavior of more or less ignoring errors instead of basically crashing. 04:00 cheapie It even says "The server is probably running a different version of Minetest." 04:00 cheapie "Probably"!? 04:00 cheapie There's no way for it to figure that out? 04:00 * cheapie grumbles 04:03 est31 I thought there were error detection methods 04:05 cheapie est31: Well, yes, but exiting to the menu and giving a rather vague error message is not the proper action when one is detected. 04:06 est31 right 04:06 est31 so the problem is that one bit flipped somewhere, and its now garbage? 04:07 cheapie Yes. 04:07 est31 That should have been detected on a lower layer 04:07 est31 is crc really that expensive? 04:07 cheapie Depending on data going across even a local network 100% error-free is a Bad Idea™, across the Internet is just plain stupid. 04:07 cheapie est31: According to the devs I talked to last time, yes. 04:08 cheapie The computer behind me, 120 MHz CPU and all, has no problem whatsoever handling TCP, so I'd think a modern computer should be fine too... 04:10 cheapie From the Wikipedia article on UDP: "...and thus exposes any unreliability of the underlying network protocol to the user's program..." 04:10 cheapie I think it's sort of implied that the "user's program" should be able to handle this. 04:11 est31 agreed 04:11 cheapie Yes, it says "The lack of retransmission delays makes it suitable for [...] online games", but for $DEITY's sake, use *some* kind of checksum and resend it if it's bad. 04:12 est31 As you, I hope that nrz resolves this. 04:13 est31 like* 04:18 hmmmm cheapie, UDP has a checksum. 04:18 cheapie hmmmm: It must not be working right. 04:18 hmmmm it sounds like there's a different problem 04:19 cheapie "If no checksum is generated by the transmitter, the field uses the value all-zeros." 04:19 cheapie Is MT using it? 04:19 hmmmm you shouldn't be blaming the underlying network protocol on a problem you are personally experiencing 04:19 cheapie hmmmm: OK, what should I blame then? 04:19 hmmmm nothing 04:19 hmmmm you don't know what the cause of it is and neither do i 04:19 hmmmm more research and less blaming helps 04:20 cheapie Well, since this only ever seems to happen over a network... 04:21 cheapie Still, "UDP checksum computation is optional for IPv4." I'd like to know if MT is using it. 04:21 hmmmm it probably isn't, seeing as how IP itself has a checksum 04:21 hmmmm UDP checksumming would be wasteful 04:22 hmmmm but this isn't a minetest question, it's a platform question. are you running windows? does *windows* enable udp checksum computation? 04:23 cheapie I'm on Linux. 04:23 cheapie Dunno if it does. 04:23 hmmmm probably not 04:23 cheapie I only see a *header* checksum in IPv4. 04:23 cheapie "An IP packet has no data checksum or any other footer after the data section." 04:24 hmmmm could be one of the options 04:25 * cheapie decides to install Wireshark and take a look at some of the data 04:25 hmmmm this is way too low-level. the problem you're experiencing has a 99.5% chance of being a configuration error of some sort. 04:26 hmmmm `man udp` 04:26 hmmmm some more useful questions to answer might be: 04:27 hmmmm - how often are you getting the serialization errors? 04:27 hmmmm - what servers are you connecting to with them? 04:27 hmmmm - what mods do these servers run? 04:27 hmmmm - what ARE the serialization errors for, specifically? 04:27 hmmmm - what versions are the servers 04:27 hmmmm - what version of minetest are YOU running 04:28 hmmmm i mean you're free to do whatever you'd like, i'm just saying it's extremely likely to be a waste of time. 04:28 cheapie How often: depends on network load, usually every 30 seconds to 5 minutes 04:28 cheapie Servers: Any non-local server 04:28 cheapie Mods: Varies, the more mods the more errors 04:29 cheapie What they're for: Lots of different things 04:29 hmmmm "lots of things" 04:29 cheapie Client/Server version: It's been happening as far back as I remember 04:29 hmmmm see, that's not useful 04:29 hmmmm a pastebin with some errors would be useful 04:30 cheapie Hold on, let me see what the next one ends up being. 04:30 hmmmm i've played on remote servers plenty of times and i've never seen a single serialization error 04:30 hmmmm if this is as widespread of an issue as you're claiming, we'd see waaay too many complaints 04:31 cheapie deSerializeLongString: size not read 04:32 est31 I thought cheapie has experienced #2541 04:32 ShadowBot https://github.com/minetest/minetest/issues/2541 -- Singleplayer World Crashes - Malformed Packet Read, Server Running Different Version of Minetest. 04:32 cheapie est31: I've gotten that one too. 04:32 cheapie Back when MT used to show the contents of the bad packet, I did see things like the "0=hdf_65.png:���q�d3/�\�DL�������q�d4/�\�DL���0���q�d5/�\�k 04:32 cheapie \�������q�d6/�\�k\��� ���q�d7/�\�k\���0���q�d8/�P�DL���d9/� 04:32 cheapie �������+@���q�d:/� �������y`���q�d;/� �����+@���q�d somehow the detection doesnt work for debian based distros 05:30 est31 now it works 05:30 est31 highly weird 05:31 est31 whatever 05:33 est31 about password changing in the new protocol 05:34 est31 it isn't so simple anymore, just sending the old password doesn't work 05:34 est31 shouldn't be done I mean 05:34 est31 so either we drop the requirement to pass the old password to the server 05:34 est31 or we introduce additional complexity 05:36 hmmmm send the new verifier along with the old password's proof 05:37 est31 how do you mean that? I'm talking about the password change which is done while the game is running. 05:37 est31 not at login 05:37 hmmmm you could initialize another pseudo-login 05:38 hmmmm but then there's the issue of asking a player to re-enter their password in game 05:38 hmmmm I don't think that's too much of a deal though 05:39 est31 It is accessed via mainmenu 05:39 est31 so yes ppl can confuse it 05:39 hmmmm btw are we using the keys generated during SRP logon as the session crypto keys? 05:39 est31 but you can distinguish 05:39 est31 we dont have any crypto 05:39 hmmmm I know but i mean do you plan on it 05:40 est31 I'd suggest using them yes 05:40 est31 idk whether I'll do that change though 05:40 hmmmm yeah not yet 05:41 hmmmm anyway even though changing the password would change the asymmetric keys, it shouldn't change the symmetric key 05:41 hmmmm so there's no need to switch over in theory 05:41 est31 yes, thats to be figured out then 05:43 est31 we only require password re-entry because one could give the session to another person to play, and one doesnt want to enable them to change the password, right? 05:48 est31 perhaps the pseudo login sounds good 05:49 est31 It is possible 05:49 est31 but there is no real requirement to do it now 05:49 est31 because its later protocol 05:49 est31 not affecting init packets. 06:12 paramat will push #2626 when checks are done 06:12 ShadowBot https://github.com/minetest/minetest/issues/2626 -- Mgv5/mgv6: Add missing data types to recently added constants by paramat 06:12 hmmmm wait why 06:13 hmmmm does it give some kind of warning otherwise? 06:14 hmmmm if you're looking for a type-safe constant, you could either use the very idiomatic-C++ "static const type FOO_BAR = 5.f;" or the C-idiomatic "#define FOO_BAR ((type)5.f)" 06:24 paramat i don't get warnings, it seems good practice though, otherwise how is the data type defined for a constant '#define'd in a header.. 06:25 hmmmm you shouldn't use casts unless you need to 06:25 hmmmm if you want a type-safe macro, however, you should include the cast in the macro definition 06:26 paramat the constants are used in arithmetic so it seemed to me they should have a data type matching other terms in the arithmetic? 06:27 hmmmm types within an expression of varying types get upcasted if necessary 06:28 paramat okay. i saw c55's code '(float)AVERAGE_MUD_AMOUNT' and learnt from that. okay so i won't push this 06:29 hmmmm it may or may not be necessary depending on the context 06:29 hmmmm it probably isn't 06:31 paramat the constants i want seen as floats are #defined with decimal points, so i guess that ensures they remain floats 06:38 paramat okay cool, less work for me, closing PR 06:40 hmmmm well actually number literals with decimal points not prefixed with f are doubles, not floats 06:40 hmmmm 5.0 is a double, 5.0f or 5.f are floats 06:40 hmmmm 5 is an int, 5u is an unsigned int 06:40 Krock (u32)5 is hacked unsigned int 06:41 hmmmm or a u32... if the system integer is larger than 32 bits, that would cause silent value truncation 06:42 paramat i see 06:45 Krock hmmmm, would you agree with pull 2618? 06:47 hmmmm #2618 06:47 ShadowBot https://github.com/minetest/minetest/issues/2618 -- 20s timeout when connecting to server by SmallJoker 06:47 hmmmm yea 06:48 Krock paramat, would you agree for that one too? 06:49 * paramat looks 06:52 paramat well erm .. is there a need for this? the arguments against it have simplicity on their side =) 06:53 Krock my best argument is the "fix" in Game::limitFps. 06:54 paramat ah, the bit i don't understand 06:54 Krock Well, if it's new initialized, it would cause a huge busy_time 06:56 Krock without that fix, it would require useless codes for the timeout part 06:57 paramat if the timeout itself does some good in that way then the PR seems okay to me, i don't feel qualified to judge, i'll trust what hmmmmm says =) 06:59 Krock uhm. okay. 06:59 hmmmm i already looked at it 06:59 hmmmm it's fine 07:00 hmmmm it's a useful feature, it does what it's supposed to, it's simple, elegant, what more could you want? 07:01 Krock You said something about the threading a while back but I doupt it's a theme for that specified commit 07:12 est31 so, the protocol will look like this: http://pastebin.com/tjVriPP4 07:13 est31 (SudoMode name comes from github sudomode) 09:10 OldCoder Hello. Can player names be changed on the fly in Lua? 09:53 crazyR OldCoder. you could modify the auth_handler to do it. i used a similar method for being able to delete accounts on the fly 09:54 crazyR il the only issue is the user in question would have to be kicked if he/she was online when you changed there name 09:55 crazyR il work on something quicklu for you now. and send you a link 10:06 OldCoder crazyR, Thank you 10:06 OldCoder If they are kicked when they go AFK it defeats the purpose but this feature is still potentially useful 10:16 OldCoder crazyR, no rush; but if you work up something you'd like tested, email me and it goes into my worlds 10:17 OldCoder It's 3:17am here so I may not be awake much longer 10:17 OldCoder oldcoder@yahoo.com and oldcoder@mail.com 10:23 crazyR no worries OldCoder it will be on a git repo anyway, so il send you a link when its ready. 10:24 crazyR how does minetest.update_player_name(oldname,newname) sounds for the function? and chatcommand : /changeplayername 10:29 Krock why not player:set_player_name() ? 10:30 crazyR becaause its part of the auth handler. not built in. meaning from the auth hander i dont think i can add a function to the player object. 10:30 crazyR not as a mod anyway 10:31 OldCoder Reviewing 10:31 Krock crazyR, let him sleep :P 10:31 OldCoder No, it's fine 10:31 OldCoder Sounds good; the kick is automatic? 10:31 crazyR yes 10:31 OldCoder Very well 10:31 OldCoder I'll be pleased to test 10:32 OldCoder Same offer is made to others who need testing 14:40 luizrpgluiz I can promote my Portuguese in server minetest of servers in a forum? 14:43 luizrpgluiz because I was with this question and I may have thought that if I put in Portuguese can have my post removed 14:43 kilbith luizrpgluiz -> #minetest 14:43 kilbith for Nth time... 15:43 celeron55 https://github.com/minetest/forum.minetest.net_template1/issues/5 15:43 celeron55 a minor discussion started about forum spam in here 15:46 Calinou I guess using less popular forum systems make you less spammable 15:47 Calinou but we're not going to switch again :p 16:04 kilbith not necessarily a captcha though, maybe answering to a simple question 16:06 kilbith so that we can sort the idiots instead of the myopics 16:14 Krock questions like "one plus two" might be helpful 16:16 Krock ShadowNinja, would you agree with #2618? 16:16 ShadowBot https://github.com/minetest/minetest/issues/2618 -- 20s timeout when connecting to server by SmallJoker 16:25 celeron55 it's possible to set up a question with phpbb's configuration options, but that's probably even easier for spammers 16:26 celeron55 a custom captcha or a custom javascript checkbox could work much better 16:27 celeron55 then they couldn't use their pre-made phpbb spambots 16:27 kilbith or a Minetest-themed question(s) that the algorythms could deal 16:27 celeron55 that's hard because most forum users are idiots 16:27 kilbith *couln't, sorry 16:27 kilbith *couldn't 16:28 celeron55 and so far we have wanted the idiots too 16:28 sfan5 what about the people that have javascript disabled? 16:28 celeron55 they can whitelist it for the single time they register on the forum 16:28 celeron55 not a big deal 16:29 celeron55 well i mean, on punbb we previously had questions 16:30 celeron55 but then xyz installed an automatic thing that didn't ask anything from the users but still avoided spambots 16:30 celeron55 and then came phpbb and we have too much spam again 16:31 celeron55 that's the history 16:31 Krock More spam -> more moderators -> less spam -> less moderators -> more spam 16:31 Krock ^ definitely _not_ hlpful 16:34 kilbith or that : https://lut.im/n7P4ja6z/Tp3n4aM1 16:34 kilbith you must enter 3 letters preceding your email in the confirmation field 19:19 ShadowNinja #2628 19:19 ShadowBot https://github.com/minetest/minetest/issues/2628 -- Clean up logging by ShadowNinja 20:13 Krock ShadowNinja, Would you agree with pull #2618 ? 20:13 ShadowBot https://github.com/minetest/minetest/issues/2618 -- 20s timeout when connecting to server by SmallJoker 20:16 ShadowNinja Krock: I'd prefer if you used an IntervalLimiter (see util/numeric.h). 20:16 ShadowNinja And I think the extra conditional you added can just be " || time" on the existing line. 20:17 ShadowNinja I'd also word it "Connection timed out.", and wrap it in a gettext call. 20:18 ShadowNinja Krock: Well, actually an IntervalLimiter isn't really appropriate, leave that as is. 20:22 Krock okay 20:25 Krock ShadowNinja, what exactly do you mean with "can just be " || time" on the existing line." 20:26 Krock Did you mean the line when "u32 last_time" is defined? I didn't know that's an allowed operation 20:26 ShadowNinja Krock: u32 last_time = fps_timings->last_time || time; Will only work if C++'s or operator returns the first truthy value though, which I'm not sure of. 20:27 Krock Are there significant performance differences between those two ways? 20:29 Krock however, looking tomorrow at it. 22:35 wilkgr Hello! 22:35 wilkgr I had an idea for a new command and would like help implementing 22:35 wilkgr it 22:36 wilkgr The command is for multiplayer and change the players name to their name but with "(AFK)" behind it 22:36 wilkgr So mine would be wilkgr (AFK) 22:36 wilkgr Maybe use /afk to toggle on and off 22:37 wilkgr What do you think and how would this be implemented 22:39 hmmmm that sounds like it'd be a good mod 22:39 wilkgr Thanks 22:39 wilkgr OldCoder sent me to this channel 22:41 hmmmm the issue is that there's no obvious way to write a mod which does this 22:41 wilkgr On servers with PvP, it might disable damage as well as movement and that kind of thing 22:41 hmmmm at least, until hud drawing is handled by lua 22:41 wilkgr Maybe integrate it into Minetest 22:41 OldCoder Hi 22:41 wilkgr Or LuaController 22:41 wilkgr Oh hello OldCoder 22:41 OldCoder wilkgr, they are pretty busy here 22:42 wilkgr I'm patient 22:42 OldCoder The idea was for you to ask a few questions, listen, and learn 22:42 OldCoder More general discussion happens in #minetest 22:42 wilkgr I did ask a couple of questions 22:42 OldCoder Sounds good, enjoy 22:42 hmmmm it would be a good idea for you to make an issue as a feature request on the github issue tracker 22:42 hmmmm the problem with IRC is that it's very temporal; discussion about neat ideas like this would easily get lost 22:43 OldCoder wilkgr, we actually have the feature as of last night 22:43 OldCoder But the catch is that it kicks the player it is applied to 22:43 OldCoder Which defeats the purpose 22:44 wilkgr I'll try it 22:44 wilkgr But ok 22:44 OldCoder Somebody has suggested a different approach, which is to modify the health indicator 22:44 OldCoder If you wish the code, ask me later; I think it was emailed to me 22:44 hmmmm instead of changing the player name, what you're actually doing is appending a status tag to places where the player name is displayed 22:44 wilkgr -!- invalid command: afk 22:44 OldCoder wilkgr, it is not added to anything yet :-) 22:44 wilkgr I think I'd like the code 22:45 OldCoder Let me look for it... 22:45 wilkgr If you want to eamil it, I can send you my email 22:45 hmmmm there's a proper way to do this and a hacky way to do this 22:45 hmmmm what OldCoder is talking about is a hackjob 22:45 hmmmm the proper way doesn't exist and needs engine support 22:45 wilkgr I don't mind 22:45 OldCoder wilkgr, crazyR was working on that but has not sent it yet 22:46 OldCoder Patience is recommended; you can learn to work on both the server code and at the Lua level 22:46 wilkgr Sure 22:46 OldCoder You've done some phone hacking 22:46 OldCoder Do you know any scripting language similar to Lua? Or C or C++? 22:46 wilkgr Python, PHP? 22:47 OldCoder Good start for Lua 22:47 wilkgr Arduino is based on C or C++, not sure which 22:47 OldCoder Recommended you write simple mods, which you can test at home 22:47 wilkgr I do a bit of arduino 22:47 OldCoder This discussion should probably shift to #minetest 22:47 wilkgr Sure 22:47 crazyR Hey oldcoder. i have nearly completed it minus a couple of bugs. but then had to sort something out, im just about to go get some sleep il finish it off first thing tomorrow :) 22:48 OldCoder No rush! 22:48 OldCoder Take weeks 22:48 OldCoder Life is full of parallel threads 22:48 wilkgr So is a processors life 22:48 hmmmm this is not core development and belongs in #minetest 22:48 OldCoder Notified him above 22:48 hmmmm all of you 22:49 OldCoder hmmmm, thank you for speaking with him initially 22:50 OldCoder hmmmm, as a closing note, discussions of how certain types of mods would be done is core development. Questions related to APIs can be explored. 22:52 wilkgr Thanks a lot, though! 23:47 est31 hmmmm, do you know how to free a stack variable? 23:48 est31 https://github.com/est31/minetest/commit/e298bb88f528904dc542cc62be92d52188333daf#commitcomment-10745522 23:48 est31 he is right, there is an according malloc in srp_create_salted_verification_key 23:49 est31 (and the salt probably needs to be freed too) 23:50 est31 if you have an idea, write it here or on github 23:50 * est31 is off 23:50 est31 (again)