01:13 < bridge> [ddnet] @deen so what did u think about adding pvp tab with vanilla modes ctf tdm dm... 01:13 < bridge> [ddnet] Bcd new ddnet steam comers dont know that they exist 01:14 < bridge> [ddnet] @deen so what did u think about adding pvp tab with vanilla modes ctf tdm dm... And others 02:33 < bridge> [ddnet] i know that they exist 03:24 < bridge> [ddnet] pro 09:48 < bridge> [ddnet] no u dont 11:09 < bridge> [ddnet] ok, I know why my macos is compiling `external/pnglite/VERSION` now 11:10 < bridge> [ddnet] i'm using a case-insensitive apfs, macossdk tries to include then it just found `external/pnglite/version` 11:20 < bridge> [ddnet] adding a `BEFORE` in `target_include_directories` when using bundled libs fixed it. 11:22 < bridge> [ddnet] not sure if it is right way tho 11:45 < bridge> [ddnet] Hey Devs, i bought a raspberry pi 3b yesterday and wanted to install a nas-sys and run tw beside. Do you think that the raspi 3b is good enough to run both task at the same time ? 11:47 < bridge> [ddnet] i wanna run surely the native ver of ddnet client 11:57 < bridge> [ddnet] just test it out, it should run, but maybe not good 13:03 < bridge> [ddnet] Don't like it much, I'm not a big fan of pvp mods and think they are not so fun long-term. Also a tab makes no sense, since pvp is not a project 13:03 < bridge> [ddnet] like DDNet or KoG 13:04 < bridge> [ddnet] add community, put noby fng and kog there 13:05 < bridge> [ddnet] but everything thats hosted by ddnet can stay in ddnet 13:18 < bridge> [ddnet] Internet tab is plenty enough tbh 13:20 < bridge> [ddnet] not untrue, official server are highlighted anyway 😄 13:21 < bridge> [ddnet] with https master servers especially 😄 13:22 < bridge> [ddnet] but I should change my repo name I guess 13:22 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/844173106772049940/Screenshot_20210518-192133__01.jpg 13:22 < bridge> [ddnet] :kek: 13:29 < bridge> [ddnet] lets create PVPNet.tw 13:38 < bridge> [ddnet] why this shit tell me player.h does not exist when he exist :c 13:38 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/844177144580931584/unknown.png 13:38 < bridge> [ddnet] i try on local and that work, only in my vps 13:39 < bridge> [ddnet] i tried on local and that work, i have this shit only in my vps 13:40 < bridge> [ddnet] player entity. interesting 13:40 < bridge> [ddnet] did u clone with submodules 13:41 < bridge> [ddnet] yeah i tried to move it but that doesn't work 14:09 < bridge> [ddnet] Do random things until it works is my favourite approach to debugging aswell 14:23 < bridge> [ddnet] dont buy ur compiler on wish 14:28 < bridge> [ddnet] did you or why? 14:29 < bridge> [ddnet] no bcs he cant compile with his vps XD 14:30 < bridge> [ddnet] the joke behind it is, that things from wish are always low quality xD 15:53 < bridge> [ddnet] when i was moving in US, i hired some helpers, and one of them asked me if i can get them something on wish. 15:53 < bridge> [ddnet] didn't know what wish was at the time tho. 17:00 < bridge> [ddnet] @Nouaa is there a player.h in src/game/server/entities/? 17:01 < bridge> [ddnet] by default there's only one in src/game/server/ 17:01 < bridge> [ddnet] ye i know 17:02 < bridge> [ddnet] I just did shit because I hadn't slept 17:35 < bridge> [ddnet] someone can explain this shit? same code but on local and vps not the same result 17:35 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/844236663857348658/2021-05-18_17-33-21.mp4 17:35 < bridge> [ddnet] smells like undefined behaviour 17:35 < bridge> [ddnet] compiled with signed char? 17:35 < bridge> [ddnet] on arm char isnt signed 17:36 < bridge> [ddnet] -fsigned-char 17:37 < bridge> [ddnet] has anyone run ddnet server on arm yet? 17:37 < bridge> [ddnet] might find some bugs with it 17:38 < bridge> [ddnet] i ran it on android 17:38 < bridge> [ddnet] but worked fine and the toolchain also uses signed char there 17:38 < bridge> [ddnet] ah but only client 17:38 < bridge> [ddnet] thought he uses client anyway 😄 17:43 < bridge> [ddnet] but we still have alignment issues anyway, but i think they are mostly deadly for floats, and they were only in vote options 17:43 < bridge> [ddnet] so might not be too critical 17:43 < bridge> [ddnet] atleast on arm32 its deadly 17:44 < bridge> [ddnet] do we really have alignment issues left? thought we cleaned up ubsan 17:44 < bridge> [ddnet] in server i think so 17:44 < bridge> [ddnet] client should be fine 17:44 < bridge> [ddnet] there is still issues with destructors tho 17:45 < bridge> [ddnet] soon in 20 years when tsfreddie rewrote all prediction code it might be solved xd 17:47 < bridge> [ddnet] `SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/game/server/gamecontext.cpp:2785:12 in 17:47 < bridge> [ddnet] ../src/game/server/gamecontext.cpp:2785:12: runtime error: load of misaligned address 0x63100001488f for type 'CVoteOptionServer *', which requires 8 byte alignment 17:47 < bridge> [ddnet] 0x63100001488f: note: pointer points here` 17:47 < bridge> [ddnet] 17:47 < bridge> [ddnet] @Learath2 17:52 < bridge> [ddnet] I bet that's the weird memheap implementation we use to keep these allocations in a block 17:52 < bridge> [ddnet] I'll add alignment support to it tonight 17:52 < bridge> [ddnet] Hopefully, idk, I woke up way too late today 17:52 < bridge> [ddnet] alternatively just align it to 8 bytes 17:52 < bridge> [ddnet] instead of passing alignment everywhere 17:52 < bridge> [ddnet] to pointer size 17:53 < bridge> [ddnet] Could do that too, but why waste space? 17:53 < bridge> [ddnet] I guess byte lifes don't matter to you young folk 17:55 < bridge> [ddnet] I feel like this is applying the optimization at the wrong place 17:55 < bridge> [ddnet] just remove these heaps xD 17:55 < bridge> [ddnet] just use normal allocations 17:55 < bridge> [ddnet] Tbf with modern arena allocators this would work fairly well 17:56 < bridge> [ddnet] Actually no, it might end up in different bins. So we should probably put it in a vector instead 17:56 < bridge> [ddnet] We iterate thru it a lot 17:57 < bridge> [ddnet] Point was that not every type requires max alignment 17:57 < bridge> [ddnet] yes. malloc also always returns maximum alignment 17:59 < bridge> [ddnet] Because malloc needs to stay generic and support decades of C cruft. 17:59 < bridge> [ddnet] Modern allocators with an std::allocator interface correctly take and utilize alignment 17:59 < bridge> [ddnet] use whatever fits 18:00 < bridge> [ddnet] still better than own implementations that always make trouble xD 18:00 < bridge> [ddnet] @Learath2 I guess you could make it a template argument, then it's not harder to pass 18:00 < bridge> [ddnet] ah no, the usage doesn't line up with that 18:00 < bridge> [ddnet] That is what I was planning, but I didnt look at the code yet. Putting it in a vector might be much easier 18:01 < bridge> [ddnet] the usage is for structs that are larger than they actually are 18:01 < bridge> [ddnet] i.e. ones that have dynamic data at the end, usually strings 18:01 < bridge> [ddnet] I think consumers expect the pointers to remain stable 18:01 < bridge> [ddnet] We have flexible array members?? 18:01 < bridge> [ddnet] yes 18:02 < bridge> [ddnet] https://github.com/ddnet/ddnet/blob/c6c0c1dc2d9b0c4c6264959b5af55da238b8727e/src/engine/shared/network_conn.cpp#L137 18:02 < bridge> [ddnet] I love how matricks coded these 18:03 < bridge> [ddnet] we've only messed his nice memory layout out since we all started messing around with it 18:03 < bridge> [ddnet] s\/out/up 18:04 < bridge> [ddnet] anyway, I'll do it however you prefer I do it, I honestly don't have the energy to argue anything 18:05 < bridge> [ddnet] If you prefer I get rid of the flexible array member and shove it in a vector I'll do that 18:05 < bridge> [ddnet] If you prefer I align everything to max alignment I'm also fine with that 18:05 < bridge> [ddnet] do it how you like it, I don't htink there's much new usage of these classes 18:56 < bridge> [ddnet] @heinrich5991 sadly on windows dbg_curl doesnt seem to show the verbosity it does on linux 18:56 < bridge> [ddnet] person checked dbg_curl was 1 23:14 < bridge> [ddnet] @Learath2 i found something interesitng 23:14 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/844322082880094228/pcZs7.png 23:14 < bridge> [ddnet] https://stackoverflow.com/questions/34548762/c-isnt-that-hard-void-f 23:15 < bridge> [ddnet] its actually a thing http://c-faq.com/decl/spiral.anderson.html 23:16 < bridge> [ddnet] this is not flexible array member 23:16 < bridge> [ddnet] ```cpp 23:16 < bridge> [ddnet] class CNetChunkResend 23:16 < bridge> [ddnet] { 23:16 < bridge> [ddnet] public: 23:16 < bridge> [ddnet] int m_Flags; 23:16 < bridge> [ddnet] int m_DataSize; 23:16 < bridge> [ddnet] unsigned char *m_pData; 23:16 < bridge> [ddnet] 23:16 < bridge> [ddnet] int m_Sequence; 23:16 < bridge> [ddnet] int64 m_LastSendTime; 23:16 < bridge> [ddnet] int64 m_FirstSendTime; 23:16 < bridge> [ddnet] }; 23:16 < bridge> [ddnet] ``` 23:16 < bridge> [ddnet] this is flexible array member, but it's not supported in C++ 23:16 < bridge> [ddnet] ```cpp 23:16 < bridge> [ddnet] class CNetChunkResend 23:16 < bridge> [ddnet] { 23:16 < bridge> [ddnet] public: 23:16 < bridge> [ddnet] int m_Flags; 23:16 < bridge> [ddnet] int m_DataSize; 23:16 < bridge> [ddnet] 23:16 < bridge> [ddnet] int m_Sequence; 23:17 < bridge> [ddnet] int64 m_LastSendTime; 23:17 < bridge> [ddnet] int64 m_FirstSendTime; 23:17 < bridge> [ddnet] 23:17 < bridge> [ddnet] unsigned char m_data[]; 23:17 < bridge> [ddnet] }; 23:17 < bridge> [ddnet] ``` 23:17 < bridge> [ddnet] 🙂 23:19 < bridge> [ddnet] u can just malloc any type and run new over it tho 23:19 < bridge> [ddnet] so unsigned char* m_data; 23:19 < bridge> [ddnet] any size* 23:19 < bridge> [ddnet] and for simple structs ofc without constructing 23:20 < bridge> [ddnet] yes, but that fake flexible array member wastes 4/8 bytes on that unnecessary pointer 23:20 < bridge> [ddnet] well u can just use uint8_t 23:20 < bridge> [ddnet] i mean in the end its just binary work 23:21 < bridge> [ddnet] single byte pointer? 23:21 < bridge> [ddnet] you just want an address of the starting pointer 23:21 < bridge> [ddnet] rest doesnt really matter as you define how tall your struct is 23:22 < bridge> [ddnet] so &m_data 23:22 < bridge> [ddnet] what about 23:22 < bridge> [ddnet] ```cpp 23:22 < bridge> [ddnet] class CNetChunkResend 23:22 < bridge> [ddnet] { 23:22 < bridge> [ddnet] public: 23:22 < bridge> [ddnet] int m_Flags; 23:22 < bridge> [ddnet] int m_DataSize; 23:22 < bridge> [ddnet] 23:22 < bridge> [ddnet] int m_Sequence; 23:22 < bridge> [ddnet] int64 m_LastSendTime; 23:22 < bridge> [ddnet] int64 m_FirstSendTime; 23:22 < bridge> [ddnet] 23:22 < bridge> [ddnet] unsigned char m_data[1]; 23:22 < bridge> [ddnet] }; 23:22 < bridge> [ddnet] ``` 23:22 < bridge> [ddnet] emulating flexible array member in C++ 23:22 < bridge> [ddnet] yeah 23:22 < bridge> [ddnet] ah so you meant this 23:22 < bridge> [ddnet] pointers of arrays are still the beginning of pointers i c++ 23:22 < bridge> [ddnet] so yeah 23:23 < bridge> [ddnet] doesnt really matter how it looks like, u just need the start address 😄 23:23 < bridge> [ddnet] yes 23:23 < bridge> [ddnet] *beginning of array