07:48 <+bridge> [ddnet] @nexus can you try the build in #2502? 07:48 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/2502 11:12 <+bridge> [ddnet] @heinrich5991 can we add to the tail of netobjects without breakage or do we need to add a new object and backwards compatibility code? 11:14 <+bridge> [ddnet] @Learath2 i never used this channel, where is #2502 11:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/2502 11:14 <+bridge> [ddnet] The bot even links it for you 😄 11:15 <+bridge> [ddnet] Go to the checks tab, there is artifacts towards top right, you can download from there 11:16 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/732163517607575602/Screenshot_2020-07-13_at_12.15.52.png 11:23 <+bridge> [ddnet] @Learath2 this is only for authorized users 11:28 <+bridge> [ddnet] sure? I thought they changed that 11:30 <+bridge> [ddnet] i dont see a difference either 11:30 <+bridge> [ddnet] oh 11:30 <+bridge> [ddnet] wel 11:31 <+bridge> [ddnet] neither one takes effect in my game 11:31 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/732167182565244938/unknown.png 11:31 <+bridge> [ddnet] i did download the file, do i have to do some sort of preparation first? maybe download a further build or something 11:32 <+bridge> [ddnet] i mean an earlier build 11:32 <+bridge> [ddnet] Nope, if that artifact doesn't change your dummy gameplay that's fine 12:18 <+bridge> [ddnet] > neither one takes effect in my game 12:18 <+bridge> [ddnet] @nexusrf here's what I meant by phantom hook: https://youtu.be/mxVT4pdyGnU. 12:19 <+bridge> [ddnet] xd, never did see it 12:32 <+bridge> [ddnet] @Learath2 not really, not without extra checks 12:32 <+bridge> [ddnet] the trouble is that the unpacking fails if the object is too small 12:35 <+bridge> [ddnet] @heinrich5991 so if I were to introduce a new field to `player@netobj.ddnet.tw` I'd need to instead add a new netobj called player2 AND keep the code for the old netobj too? 12:36 <+bridge> [ddnet] short of improving the general problem, yes 12:36 <+bridge> [ddnet] the only problematic combination is new client <-> old server 12:36 <+bridge> [ddnet] i.e. we can fix it 12:37 <+bridge> [ddnet] Uf, I hadn't noticed this rather problematic limitation of the protocol yet 12:40 <+bridge> [ddnet] @heinrich5991 could we even improve the general problem now? 12:40 <+bridge> [ddnet] yes 12:41 <+bridge> [ddnet] since the only problem is new client <-> old server: the new client expects the netobj to be longer 12:41 <+bridge> [ddnet] so we can make the new client add default values for short netobjs 12:42 <+bridge> [ddnet] something similar to your get or default thing on vanilla? 12:42 <+bridge> [ddnet] don't remember what you're referring to, possibly 12:42 <+bridge> [ddnet] You made it to fix the race record thing iirc 12:42 <+bridge> [ddnet] ah yea 12:43 <+bridge> [ddnet] something similar to that, just for netobjs 12:43 <+bridge> [ddnet] Problem is that netobjs aren't "unpacked" 12:46 <+bridge> [ddnet] hm yes 12:46 <+bridge> [ddnet] can add that ofc 12:46 <+bridge> [ddnet] Yeah, there is no good way to handle this problem 12:47 <+bridge> [ddnet] We only have a Size, no way to figure out how many fields are missing 12:47 <+bridge> [ddnet] honestly, just that cast even if it has the correct size is unsafe 12:47 <+bridge> [ddnet] yes @ unsafe 12:47 <+bridge> [ddnet] why not? we know the size, we should be good 12:48 <+bridge> [ddnet] Ah but everything is ints 12:48 <+bridge> [ddnet] and we already assume sizeof(int) == 4 12:49 <+bridge> [ddnet] maybe a "default" instance of each netobj that we can chop up and append to the end of the small one? 12:50 <+bridge> [ddnet] if you are talking about anything with 0.7: I will just break compability since there arent any ddnet7 servers anymore and i will just replace my player object with the current one 12:50 <+bridge> [ddnet] I'm more concerned about the new field we want to add causing some ugly compatibility code 12:51 <+bridge> [ddnet] you could make the snap code support not only invalidating objs but also replacing them 12:51 <+bridge> [ddnet] in a different buffer maybe 12:51 <+bridge> [ddnet] can you elaborate further? 12:54 <+bridge> [ddnet] in addition to the other functions like `SnapInvalidateItem(int SnapID, int Index)`, the client interface gets a new function `SnapReplaceItem(int SnapID, int Index, void *pItem, int ItemSize);`. in the snap sanity check loop, this function is called at the appropriate places when a old netobj is detected 12:55 <+bridge> [ddnet] this requires support code in `datasrc/{network,datatypes}.py` 12:56 <+bridge> [ddnet] That'd imply we need to keep all the older versions in the code still, no? 12:56 <+bridge> [ddnet] we only need to add a default value to new fields in `datasrc/network.py` 12:56 <+bridge> [ddnet] I'm not sure ItemSize > ObjSize is a good enough way to detect an old message though 12:57 <+bridge> [ddnet] why not? we theoretically have unique IDs? 12:57 <+bridge> [ddnet] why not? we theoretically have unique IDs 12:57 <+bridge> [ddnet] I guess it is as long as we only append at the tail 12:58 <+bridge> [ddnet] This sounds like a good plan 13:00 <+bridge> [ddnet] @heinrich5991 or maybe keep all this transparent to the client? 13:01 <+bridge> [ddnet] cannot do that 13:01 <+bridge> [ddnet] the old server is the problem 13:01 <+bridge> [ddnet] I meant as in CClient, I was thinking of fixing it while validating, but noticed that'd be quite ugly now that I checked how we store the snaps 13:02 <+bridge> [ddnet] so yeah, `SnapReplaceItem` sounds about right 13:04 <+bridge> [ddnet] @heim 13:04 <+bridge> [ddnet] @heinrich5991 doesn't look trivial to replace it either actually 13:04 <+bridge> [ddnet] yep, needs a side buffer 13:05 <+bridge> [ddnet] I guess the cache is efficient enough at shifting data over unless the snap is larger than the cache line 13:05 <+bridge> [ddnet] ehm what? 13:05 <+bridge> [ddnet] I wouldn't try to modify a snap in place 13:06 <+bridge> [ddnet] Rebuild it? 13:06 <+bridge> [ddnet] no, keep a side buffer with all the replaced objects 13:07 <+bridge> [ddnet] And when the client tries to reference them, redirect it? 13:07 <+bridge> [ddnet] yes 13:07 <+bridge> [ddnet] if we had actual data structures, this wouldn't pose such a problem.. :/ 13:07 <+bridge> [ddnet] which data structure would you use to solve this problem? 13:08 <+bridge> [ddnet] I would have the snap as a key-value mapping, probably a hashmap 13:08 <+bridge> [ddnet] they support modifying items 13:08 <+bridge> [ddnet] (in fact that's how I implemented it in libtw2) 13:09 <+bridge> [ddnet] Hashmaps have good theoretical performance, but I wonder how they'd compare to the array of ints approach right now? 13:09 <+bridge> [ddnet] Arrays have great cache behaviour and they play really well with prefetching 13:09 <+bridge> [ddnet] our array of ints approach has a linear search for ddnet and a binary search for teeworlds 0.7 13:10 <+bridge> [ddnet] Do we lookup enough for the O(1) lookup to be a good optimization? 13:10 <+bridge> [ddnet] dunno, typical snap size? 13:11 <+bridge> [ddnet] Don't we traverse snaps more often? 13:11 <+bridge> [ddnet] let's say 128 items 13:11 <+bridge> [ddnet] so finding the entry in the hash map must not be 64 times slower than the comparison we do for our linear search 13:12 <+bridge> [ddnet] in order for the hash map to be more effective 13:15 <+bridge> [ddnet] and we'd have to be doing the lookup often enough for it to be worth it, just traversing through an array has much better performance than traversing through a hashmap 13:17 <+bridge> [ddnet] Traversing a hashmap has the overhead of going through the empty buckets and worse cache performance 13:18 <+bridge> [ddnet] I think the unordered_map in c++ even uses linked lists, which are even worse 13:19 <+bridge> [ddnet] yes. rust hashmaps are fine 13:20 <+bridge> [ddnet] unordered_map has to have bad performance according to the standard 13:21 <+bridge> [ddnet] @heinrich5991 do they use open addressing? 13:21 <+bridge> [ddnet] it changed a couple of times 13:21 <+bridge> [ddnet] the algorithm used 13:22 <+bridge> [ddnet] Well even with open addressing, you have a layer of indirection and a prefetch unfriendly data structure 13:23 <+bridge> [ddnet] > The hash table implementation is a Rust port of Google's SwissTable. The original C++ version of SwissTable can be found here, and this CppCon talk gives an overview of how the algorithm works. 13:23 <+bridge> [ddnet] https://abseil.io/blog/20180927-swisstables 13:24 <+bridge> [ddnet] I've been watching a couple different talks on data structures and performance, I've been very surprised at some of the benchmarks I've seen 13:24 <+bridge> [ddnet] so no indirection if I see this blog post correctly 13:25 <+bridge> [ddnet] Well with a catch, if you don't have indirection, you can only store one type of thing (or a union) and the buckets then get rather large 13:26 <+bridge> [ddnet] > We generally recommend that you use `absl::flat_hash_map>` instead of `absl::node_hash_map`. 13:26 <+bridge> [ddnet] Ah, that's not saying what I thought it's saying 13:27 <+bridge> [ddnet] That's rather odd, I'd have thought the library would be smarter than the programmer at handling the indirection 13:27 <+bridge> [ddnet] we want fixed size buckets here, though 13:27 <+bridge> [ddnet] Do we? Items have varying size 13:27 <+bridge> [ddnet] pointer, len 13:27 <+bridge> [ddnet] (like we currently have with the array btw) 13:27 <+bridge> [ddnet] whats this hash map talk about? 13:28 <+bridge> [ddnet] related to ddnet 13:28 <+bridge> [ddnet] yes, kinda 13:28 <+bridge> [ddnet] Considering whether a hash map would be a good choice to store snaps as 13:28 <+bridge> [ddnet] I was lamenting the fact that we don't have data structures 13:28 <+bridge> [ddnet] instead of a large rather flat array of ints 13:28 <+bridge> [ddnet] do we iterate snaps a lot? 13:29 <+bridge> [ddnet] well i dont know much :) 13:29 <+bridge> [ddnet] Once every time we receive a snapshot 13:30 <+bridge> [ddnet] whats the advantage of the hash map then? 13:30 <+bridge> [ddnet] Then once more for the events 13:30 <+bridge> [ddnet] and in the game code as well 13:30 <+bridge> [ddnet] @Ryozuki we do linear lookups for specific times 13:30 <+bridge> [ddnet] s\/times/types/ 13:30 <+bridge> [ddnet] ah 13:31 <+bridge> [ddnet] maybe we can index by type or smth 13:31 <+bridge> [ddnet] if i got this right 13:31 <+bridge> [ddnet] We traverse it as many times as we do a linear lookup 13:33 <+bridge> [ddnet] Ah I see what you mean @heinrich5991 you want the snaps themselves to stay as is, but we reference into it using a hashmap? 13:33 <+bridge> [ddnet] I want the snap data to be stored in an array 13:33 <+bridge> [ddnet] but I want an index 13:34 <+bridge> [ddnet] so yes 13:34 <+bridge> [ddnet] That would probably have better performance 13:35 <+bridge> [ddnet] With a flat hashmap, the next item would probably fit into the cache rather nicely 13:35 <+bridge> [ddnet] by snap types u mean CNetObjs? 13:35 <+bridge> [ddnet] not very prefetch friendly but it happens 13:35 <+bridge> [ddnet] Well types of netobjs 13:39 <+bridge> [ddnet] anymore 13:39 <+bridge> [ddnet] they made discord not gamer 13:39 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/732199433369813022/unknown.png 13:39 <+bridge> [ddnet] :justatest: 15:50 <+bridge> [ddnet] What does "invite-only place" mean? I always see invites on public websites, like on DDNet.tw 15:57 <+bridge> [ddnet] that you get to decide who joins I guess 16:20 <+bridge> [ddnet] There are also communities that don't create permanent invites posted publicly - instead they create expiring ones or even one-use-only 16:20 <+bridge> [ddnet] let's say community of specific paid course 17:22 <+bridge> [ddnet] pls fix this no sound hook 17:22 <+bridge> [ddnet] some players have it, i will add an example in a bit 17:25 <+bridge> [ddnet] sound is on, everyone's hook is normal except for his. his hook has no sound 17:25 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/732256451606872074/Base_Profile_2020.07.13_-_17.23.24.04.DVR_Trim.mp4 17:26 <+bridge> [ddnet] was the double hook sound in 0.7 just fixed 17:26 <+bridge> [ddnet] and if he hits an unhookable tile you still hear the usual sound 17:33 <+bridge> [ddnet] @onby so you did make a 0.6 - 0.7 compatible server right? Can we make a window compile out of it? 17:34 <+bridge> [ddnet] i didnt make it, i applied the fixes timakro made to this server 17:35 <+bridge> [ddnet] but can i compile it to windows? since according to the instruction, not even git bash can recognize 2cmake" or "make" commands 17:35 <+bridge> [ddnet] but can i compile it to windows? since according to the instruction, not even git bash can recognize "cmake" or "make" commands 17:35 <+bridge> [ddnet] is it linux related? 17:36 <+bridge> [ddnet] that server should work on windows but i dont know / dont have windows to test it on 17:36 <+bridge> [ddnet] u probably have to install cmake 17:36 <+bridge> [ddnet] right 17:36 <+bridge> [ddnet] actually no 17:36 <+bridge> [ddnet] 17:36 <+bridge> [ddnet] use the instructions here 18:09 <+bridge> [ddnet] the fuck? 18:09 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/732267513764642867/unknown.png 18:10 <+bridge> [ddnet] im not sure if this is intended xd 18:14 <+bridge> [ddnet] maybe programming isn't for me :lol: 18:14 <+bridge> [ddnet] im always using cmake gui before start compiling huh 18:15 <+bridge> [ddnet] cmake gui generation cannot detect visual studio on my computer 18:15 <+bridge> [ddnet] so i tried visual studio itself :kekk 18:15 <+bridge> [ddnet] so i tried visual studio itself :kek: 18:17 <+bridge> [ddnet] :kek: 18:18 <+bridge> [ddnet] reinstall/check your VS Installer 19:54 <+bridge> [ddnet] @Learath2 sorry but i dont see any difference at all with that build and my current ddnet version 19:54 <+bridge> [ddnet] That's great 19:55 <+bridge> [ddnet] I was worried it'd break something like the dummy triple fly u do 19:56 <+bridge> [ddnet] u mean this thing? 19:56 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/732294385307353168/Base_Profile_2020.07.13_-_19.54.47.05.DVR_Trim.mp4 19:56 <+bridge> [ddnet] i didnt try playing with it yet 19:56 <+bridge> [ddnet] i will do some 3flies with dummy and see 20:02 <+bridge> [ddnet] i dont see any major difference @Learath2 my triplefly has not been cucked 20:03 <+bridge> [ddnet] Perfect 20:13 <+bridge> [ddnet] <ᶰ°Konͧsti> Cucked 20:30 <+bridge> [ddnet] does hook have a hitbox or is it just a straight line 20:46 <+bridge> [ddnet] Is it possible I can add the AntiBot in my own mod @Learath2 ? 20:46 <+bridge> [ddnet] Its a library, right? 20:46 <+bridge> [ddnet] not open source but free to use? 20:46 <+bridge> [ddnet] It's not my library to share 20:47 <+bridge> [ddnet] You should ask @noby he wrote it 20:47 <+bridge> [ddnet] DDNet has it, is it possible to have it for local testing? 20:47 <+bridge> [ddnet] Or isnt it public? 20:47 <+bridge> [ddnet] It isnt public 20:47 <+bridge> [ddnet] Oh, ok 20:48 <+bridge> [ddnet] If it was really public people can reverse engineer it 20:48 <+bridge> [ddnet] True 20:48 <+bridge> [ddnet] thanks 21:54 <+bridge> [ddnet] > sound is on, everyone's hook is normal except for his. his hook has no sound 21:54 <+bridge> [ddnet] @nexusrf I've encountered this too! I've created an issue (see above) 22:33 <+bridge> [ddnet] does ddnet not use cl_isddnet anymore? 22:33 <+bridge> [ddnet] instead NETMSG_CLIENTVER now? 22:40 <+bridge> [ddnet] oh, it is sending both 22:43 <+bridge> [ddnet] yes