Time Nick Message 14:00 Selat Hello. Why don't you like C++-style types casting? https://github.com/minetest/minetest/pull/1140 14:00 Selat There is no reply more than 2 weeks. 14:04 sfan5 Selat: ''We can’t automatically merge this pull request.'' rebase first 14:50 Selat Now automerge should work. 15:38 Exio4 how is that "fixing" the casting? 15:44 Selat According to the C++ standard such C-style type casting is ill-formed. Also it doesn't perform runtime check. 15:45 Selat And in any way C-style type casting uses static_cast or reinterpret_cast. 15:46 Selat So there are no benifits in using such type casting. 15:47 Selat *benefits 15:50 sfan5 why do we want runtime checks? 15:50 sfan5 what is checked? 15:53 Exio4 runtime check, yeah 15:53 Exio4 what is wrong with not checking something at runtime and having it in a type-safe way? 15:53 sfan5 what is checked? 15:53 sfan5 if it only checks for NULL we can spare it 15:54 sfan5 if something is NULL it will crash or error after sometime anyway 15:55 Exio4 i don't actually remember, but if you do void* sometype1 and then cast to sometype2 that pointer, it'll return NULL instead of the "broken data" iirc 15:59 Selat It checks casting between derived classes. 16:02 Selat I'm not sure that it's good idea to refuse runtime checks to have few nanoseconds speed advantage and forget about real source of lags. 16:43 sfan5 proller: it was only a small bugfix, but you are supposed to at least notify #minetest-dev before pushing 16:55 Exio4 if(!str) return str; 16:55 Exio4 what will this do, if null, return null? 16:56 Exio4 or if "", return ""? 17:11 kahrl Exio4: both 17:12 Exio4 i see 17:13 celeron55_ commented on https://github.com/minetest/minetest/pull/1140 17:23 xyz I think it's safer than c-style cast because if you're doing something wrong it'll crash for sure 17:27 sfan5 Exio4: both 17:28 Exio4 [14:11:06] <+kahrl> Exio4: both 17:28 Exio4 [14:27:02] <+sfan5> Exio4: both :P 17:28 sfan5 oh 17:28 sfan5 oops 17:28 Exio4 the netsplit! 17:35 Exio4 hmm, looks like it is now 16USD 17:35 Exio4 if i could have 128 ARS irl i would be happy right now 17:41 sfan5 Exio4: wrong channel 17:43 Exio4 heh 18:10 Selat commented here https://github.com/minetest/minetest/pull/1140 18:11 sfan5 Selat: I know that your comment is meant ironic, but it still sounds a bit harsh 18:15 xyz wow you managed to piss him off 18:15 sfan5 who? me? 18:15 xyz no, not you 18:21 Selat Maybe I'm wrong, but spending more than half an hour on discussing such trifle is unusual. 18:22 xyz no, it's minetest 18:22 xyz you'll get used to it 18:22 ShadowNinja I agree with sfan. 18:45 ShadowNinja Comments? https://gist.github.com/ShadowNinja/9194308 18:46 ShadowNinja The prefix argument doesn't work, and I haven't been able to find out why. (although sometimes it does work...) 18:46 ShadowNinja And I still don't see why it should be added. 18:46 ShadowNinja sfan5: https://gist.github.com/ShadowNinja/9194308 18:48 sfan5 ShadowNinja: ??? 18:48 VanessaE wouldn't it be better to fix it than to remove the feature? O_o 18:50 VanessaE a lot of users confuse the "Server -!-" prefix for an actual username 18:51 VanessaE that is, they think someone named "Server" is speaking. 18:51 xyz there's no need to prepend anything 18:51 xyz so this patch just removes this option 18:51 VanessaE um, xyz: "prepend: optional, if it is set to false "Server -!- " will not be prepended to the message" 18:52 VanessaE so I think the point is to be able to *remove* the "Server" prefix... 18:52 VanessaE not add to it :P 18:52 xyz wat 18:52 VanessaE and this doesn't always work right. 18:52 xyz did you check out his patch? 18:52 VanessaE yes I did. 18:52 ShadowNinja VanessaE: I made a patch a while ago that added the option to remove it. It worked at the time but doesn't seem to work most of the time anymore, and I have no idea why. 18:53 xyz also wtf is the "prefix" argument? 18:53 VanessaE his patch removes that ability, which didn't work anyway 18:53 xyz I'm kinda out of loop 18:53 ShadowNinja VanessaE: And I figure if you NEED the prefix you can just add "Server-!- ".. to your code. 18:54 VanessaE ShadowNinja: that part I can agree with 18:54 ShadowNinja xyz: minetest.chat_send_player("singleplayer", "Test") --> Server -!- Test. 18:54 xyz ah 18:54 xyz so well 18:54 xyz anyway, I don't get VanessaE's problem here 18:56 ShadowNinja It would be great if someone figured out what's wrong with it, but I don't really like the prefix option at all. 18:58 xyz I agree 18:58 VanessaE ok so I guess patch it to remove the prepend misfeature then. I've never been too fond of code adding extra bits to messages either; I prefer to have full control over what gets printed (at least, to a point)