09:05 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879259931298123786/IMG_20210823_094825_973.jpg 11:29 <+bridge> [ddnet] @deen do you compile SDL yourself? 11:29 <+bridge> [ddnet] for ddnet-libs 11:29 <+bridge> [ddnet] yes 11:29 <+bridge> [ddnet] Should I update it to 2.0.16? 11:30 <+bridge> [ddnet] ok, not yet, but i made a pr on sdl 11:30 <+bridge> [ddnet] I heard some people had problems 11:30 <+bridge> [ddnet] if that goes in we can give it a try 11:30 <+bridge> [ddnet] yeah, I can add your PR 11:30 <+bridge> [ddnet] yeah but i'd prefer the SDL devs atleast give a small feedback, who knows if that works on every OS XD 11:30 <+bridge> [ddnet] only tested it on windows and linux 11:31 <+bridge> [ddnet] @nori all SDL problems solved under wayland? 11:40 <+bridge> [ddnet] for me it's works on sway 11:41 <+bridge> [ddnet] i don't know how it is for gnome/kde 11:42 <+bridge> [ddnet] ok i'll try it too in a few minutes, and check if glews pr works to convince the glew guy to merge 11:42 <+bridge> [ddnet] https://github.com/nigels-com/glew/pull/216 11:42 <+bridge> [ddnet] 11:42 <+bridge> [ddnet] Then we also wouldn't need EGL hacks probably 12:22 <+bridge> [ddnet] can someone merge/review? #4103 😀 12:22 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/4103 12:29 <+bridge> [ddnet] unsupport macos when xd 12:49 <+bridge> [ddnet] i cant run macos builds from github :c 12:53 <+bridge> [ddnet] the problem is, you cannot really test every case, it will be a trial and error again anyway 12:53 <+bridge> [ddnet] the switch bug was already not really visible 12:54 <+bridge> [ddnet] idk 12:54 <+bridge> [ddnet] but this fixes a known issue 12:55 <+bridge> [ddnet] just sayan 12:55 <+bridge> [ddnet] saiyan 12:55 <+bridge> [ddnet] super sayan 12:55 <+bridge> [ddnet] <- 12:56 <+bridge> [ddnet] xD 13:15 <+bridge> [ddnet] ^ this is why we need c++20 xd 13:15 <+bridge> [ddnet] u8"path" 13:15 <+bridge> [ddnet] finished 13:16 <+bridge> [ddnet] I love that Robyt is contributing to ddnet too 13:16 <+bridge> [ddnet] He is great at refactors, would be great to have him around 13:16 <+bridge> [ddnet] who is robyt? 13:16 <+bridge> [ddnet] thats for sure 13:16 <+bridge> [ddnet] is he someone famous 13:17 <+bridge> [ddnet] he's the last man standing vanilla contributor xd 13:17 <+bridge> [ddnet] xd 13:17 <+bridge> [ddnet] he has been doing some great work on 0.7 very clean commits, not clinging to staying merge-safe like others 13:17 <+bridge> [ddnet] Downstream client authors haven't been very happy with it but teeworlds is a mess in need of cleaning 13:18 <+bridge> [ddnet] ye 13:18 <+bridge> [ddnet] but i dont see his prs merged 13:19 <+bridge> [ddnet] now comes the oy drama 13:19 <+bridge> [ddnet] ah well some are 13:19 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879324004987572224/unknown.png 13:19 <+bridge> [ddnet] :monkalaugh: 13:20 <+bridge> [ddnet] Nah, oy has been very receptive to his stuff. I honestly expected most to never get merged from how extensive the diffs were 13:20 <+bridge> [ddnet] i guess aslong as they aren't changing physics or opengl or cpu architecture he is fine xD 13:20 <+bridge> [ddnet] or c++1 13:20 <+bridge> [ddnet] 1 13:20 <+bridge> [ddnet] or stl 13:21 <+bridge> [ddnet] so basiucally stay at 1999 13:22 <+bridge> [ddnet] robyt3 should overtake teeworlds vanilla, and just program as he wants 13:22 <+bridge> [ddnet] then you get a nice teeworlds after 1-2 years 13:22 <+bridge> [ddnet] Seeing as I'm having trouble focusing on math maybe I should finally get rid of `base/tl` 13:23 <+bridge> [ddnet] 😄 13:23 <+bridge> [ddnet] c++20 lets go 13:23 <+bridge> [ddnet] I think we are doing 14 in ddnet for now, right? 13:23 <+bridge> [ddnet] 11 13:23 <+bridge> [ddnet] 17 would add filesystem support 13:23 <+bridge> [ddnet] c++20 adds char8_t 13:24 <+bridge> [ddnet] then the pr above would be 20 lines 13:24 <+bridge> [ddnet] instead of so many 13:24 <+bridge> [ddnet] just saiyan 13:24 <+bridge> [ddnet] Maybe we can get to 17 now so I can finally get rid of the ugly `void_t` mess in https://github.com/ddnet/ddnet/blob/master/datasrc/seven/compile.py#L121-L134 13:25 <+bridge> [ddnet] wtf 13:25 <+bridge> [ddnet] never noticed it yet 13:26 <+bridge> [ddnet] only instance of template magic in ddnet I guess 😛 13:26 <+bridge> [ddnet] ```c++ 13:26 <+bridge> [ddnet] template::value, int>::type = 0> 13:27 <+bridge> [ddnet] inline int SendPackMsg(T *pMsg, int Flags, int ClientID)``` 13:27 <+bridge> [ddnet] Allows this mess 13:28 <+bridge> [ddnet] char8_t? 13:28 <+bridge> [ddnet] char8_t - type for UTF-8 character representation, required to be large enough to represent any UTF-8 code unit (8 bits). It has the same size, signedness, and alignment as unsigned char (and therefore, the same size and alignment as char and signed char), but is a distinct type. 13:28 <+bridge> [ddnet] https://en.cppreference.com/w/cpp/language/types#char8_t 13:29 <+bridge> [ddnet] omaigat 13:29 <+bridge> [ddnet] unsigned char, char, signed char, char8_t 13:29 <+bridge> [ddnet] but its nice bcs std::is_same can be used with constrains to differ between math and characters 13:32 <+bridge> [ddnet] why are "string" literals in c char and not unsigned char? 13:32 <+bridge> [ddnet] good question 13:32 <+bridge> [ddnet] next question xd 13:32 <+bridge> [ddnet] in rust u have strings they are made up of u8 13:32 <+bridge> [ddnet] iirc 13:32 <+bridge> [ddnet] xd 13:33 <+bridge> [ddnet] and char type 13:33 <+bridge> [ddnet] > The char type represents a single character. More specifically, since ‘character’ isn’t a well-defined concept in Unicode, char is a ‘Unicode scalar value’, which is similar to, but not the same as, a ‘Unicode code point’. 13:33 <+bridge> [ddnet] fancy 13:33 <+bridge> [ddnet] thats the benefit of rust, clean designe 13:33 <+bridge> [ddnet] thats the benefit of rust, clean designed 13:33 <+bridge> [ddnet] ye 13:34 <+bridge> [ddnet] i always feel weird casting a char* to unsigned char* 13:36 <+bridge> [ddnet] To allow implementation flexibility I guess 13:36 <+bridge> [ddnet] whathever that means 13:36 <+bridge> [ddnet] wathever 13:36 <+bridge> [ddnet] idk how to write 13:36 <+bridge> [ddnet] char is unsigned under arm xd 13:37 <+bridge> [ddnet] e.g. afaik older ARM machines didn't have signed support, so you get to avoid a sign extend if your chars are unsigned there 13:37 <+bridge> [ddnet] i just recently discovered that the ddnet github wiki even mentions how to build for arm32 13:37 <+bridge> [ddnet] https://github.com/ddnet/ddnet/wiki/armv6h-server 13:41 <+bridge> [ddnet] Working with unicode strings is absolute pain in C and C++ 13:42 <+bridge> [ddnet] You get used to it but after using modern languages with stdlibs designed in this decade it's always a bit of a bummer when I need to iterate through utf8 code points by hand 13:43 <+bridge> [ddnet] honestly i generally dont like working with utf8 13:43 <+bridge> [ddnet] if you dont program a text editor you can also just use an decoded utf8 string, so directly work in utf32 or whatever that is and dont care about the few extra bytes lost in your RAM 13:43 <+bridge> [ddnet] EW 13:43 <+bridge> [ddnet] therefore you have direct access in your memory array 13:43 <+bridge> [ddnet] the offsets are all equal 13:43 <+bridge> [ddnet] and only encode to utf8 when needed 13:43 <+bridge> [ddnet] e.g. networking etc. 13:43 <+bridge> [ddnet] the absolute wastefulness 13:43 <+bridge> [ddnet] as said 13:43 <+bridge> [ddnet] if you dont work on text editor 13:43 <+bridge> [ddnet] it doesnt matter 13:43 <+bridge> [ddnet] You are quadrupling memory use 😄 13:44 <+bridge> [ddnet] wchar_t is 32bit under linux 13:44 <+bridge> [ddnet] ok 13:44 <+bridge> [ddnet] Which is why you wouldn't find any wchars in any code I write 😛 13:45 <+bridge> [ddnet] max ddnet chat message = 256 chars, maybe 10 total 13:45 <+bridge> [ddnet] 2560 bytes * 4 = 10 240 13:45 <+bridge> [ddnet] its nothing 13:45 <+bridge> [ddnet] 10kb and you have no disadvantes of utf8 13:45 <+bridge> [ddnet] decoding utf8 on fly wastes cpu performance 13:45 <+bridge> [ddnet] and freetype only takes decoded anyway 13:46 <+bridge> [ddnet] I bet prefetch and using the cache line more efficiently more than makes up for it 13:46 <+bridge> [ddnet] so you decode every code point every time 13:46 <+bridge> [ddnet] i doubt at that small numbers 13:47 <+bridge> [ddnet] make a 256byte unicode string and get a random offset 13:47 <+bridge> [ddnet] and see the performance 13:48 <+bridge> [ddnet] utf8 vs 32 13:48 <+bridge> [ddnet] then we'll know 13:49 <+bridge> [ddnet] It's absolutely trivial to craft a testcase that would make either look worse 13:49 <+bridge> [ddnet] then make on that makes utf32 look worse 13:49 <+bridge> [ddnet] but in a realistic ddnet task 13:50 <+bridge> [ddnet] bcs that was my condition 13:52 <+bridge> [ddnet] Sure, since you didn't mention a metric it is trivial. 1) Receive any message that is just ascii (most of our messages) 2) Notice that your 256 character message is now taking 1k of memory 3) Notice memory does not grow on trees 13:52 <+bridge> [ddnet] most players are chinese arent they 13:52 <+bridge> [ddnet] Sure, for them notice your 512b message is now taking 1k, similar 13:52 <+bridge> [ddnet] so you probs often have 4byte utf8 13:53 <+bridge> [ddnet] yes 13:53 <+bridge> [ddnet] not going to deny there are disadvantes 13:53 <+bridge> [ddnet] not going to deny there are disadvantages 13:53 <+bridge> [ddnet] if you proof me wrong, i accept it 13:53 <+bridge> [ddnet] The disregard with which you treat memory usage actually makes me so annoyed 13:53 <+bridge> [ddnet] This attitude is how we ended up with browsers that use the entire system memory 13:54 <+bridge> [ddnet] i dunno 13:54 <+bridge> [ddnet] i think its unrelated 13:54 <+bridge> [ddnet] browers use utf8 probably 13:54 <+bridge> [ddnet] No not utf32, the attitude of "it's just a few bytes" is what I take issue with 13:54 <+bridge> [ddnet] but its true 13:55 <+bridge> [ddnet] do you always shrink your std::vector? 13:55 <+bridge> [ddnet] probably no 13:55 <+bridge> [ddnet] so that wastes memory too 13:55 <+bridge> [ddnet] I extensively use linked lists in my code so it's usually not an issue for me 13:55 <+bridge> [ddnet] well i prefer performance over ram, there is a sweetspot sure 13:56 <+bridge> [ddnet] but lists in many cases have too many disadvantages bcs of the heap allocations 13:56 <+bridge> [ddnet] Modern arena based allocators are extremely good at putting linked list nodes in the same bucket for me 13:57 <+bridge> [ddnet] But if I'm using a vector I do try to reserve if at all possible and if I'm doing bulk insertions I do shrink it afterwards 13:57 <+bridge> [ddnet] it depends on the usecase anyway, but i want a 2d game as use case 13:58 <+bridge> [ddnet] and there the hotpath should stay away from as much allocations or decoding etc as possible 13:58 <+bridge> [ddnet] but if you want to write a test case and proof me wrong, i'd be glad bcs its better to learn from such things than not 😄 13:59 <+bridge> [ddnet] I mean you constrained me to cases where utf32 is strictly better, so I guess you win. There is no way in hell O(n) indexing is better than O(1) indexing in a 256b string 14:00 <+bridge> [ddnet] Try the same in a 4Mb string and you won't be very glad with your now 16Mb string with now O(n) indexing because it can't fit in even L3 cache 14:01 <+bridge> [ddnet] possible, i dunno honestly 14:01 <+bridge> [ddnet] depends of if the processor even loads it into l3 cache at all 14:04 <+bridge> [ddnet] Besides indexing is an operation hardly used at all in string manipulation, atleast not without first scanning through the string anyway 14:05 <+bridge> [ddnet] yeah and ddnet too 14:05 <+bridge> [ddnet] every tw project xd 14:34 <+bridge> [ddnet] what's the point of using char8_t instead of char? 14:34 <+bridge> [ddnet] i'm reading its papers and can't find anything 14:34 <+bridge> [ddnet] https://en.cppreference.com/w/cpp/string/char_traits/cmp 14:34 <+bridge> [ddnet] > For the char specialization, eq and lt are defined identically to the built-in operators == and < for type unsigned char (not char). 14:36 <+bridge> [ddnet] :giftee_green: 14:38 <+bridge> [ddnet] mathematically speaking there probably isnt any 14:38 <+bridge> [ddnet] You could code your codebase to distinct between utf8 and ansii 14:38 <+bridge> [ddnet] 14:38 <+bridge> [ddnet] template 14:38 <+bridge> [ddnet] concept IsUtf = std::is_same_v || std::is_same_v; //.... 14:38 <+bridge> [ddnet] 14:38 <+bridge> [ddnet] template 14:38 <+bridge> [ddnet] void do_smth(T ...) requires IsUtf 14:38 <+bridge> [ddnet] { 14:38 <+bridge> [ddnet] .. do smth for utf 14:38 <+bridge> [ddnet] } 14:38 <+bridge> [ddnet] 14:38 <+bridge> [ddnet] 14:38 <+bridge> [ddnet] template 14:38 <+bridge> [ddnet] void do_smth(T ...) requires !IsUtf 14:38 <+bridge> [ddnet] { 14:38 <+bridge> [ddnet] .. do smth for other types 14:38 <+bridge> [ddnet] } 14:38 <+bridge> [ddnet] mathematically speaking there probably isnt any 14:39 <+bridge> [ddnet] You could code your codebase to distinct between utf8 and ansii 14:39 <+bridge> [ddnet] 14:39 <+bridge> [ddnet] ``` 14:39 <+bridge> [ddnet] template 14:39 <+bridge> [ddnet] concept IsUtf = std::is_same_v || std::is_same_v; //.... 14:39 <+bridge> [ddnet] 14:39 <+bridge> [ddnet] template 14:39 <+bridge> [ddnet] void do_smth(T ...) requires IsUtf 14:39 <+bridge> [ddnet] { 14:39 <+bridge> [ddnet] .. do smth for utf 14:39 <+bridge> [ddnet] } 14:39 <+bridge> [ddnet] 14:39 <+bridge> [ddnet] 14:39 <+bridge> [ddnet] template 14:39 <+bridge> [ddnet] void do_smth(T ...) requires !IsUtf 14:39 <+bridge> [ddnet] { 14:39 <+bridge> [ddnet] .. do smth for other types 14:39 <+bridge> [ddnet] } 14:39 <+bridge> [ddnet] ``` 14:39 <+bridge> [ddnet] 🧐 14:39 <+bridge> [ddnet] isn't handling everything as UTF-8 the correct way? 14:40 <+bridge> [ddnet] i doubt 14:40 <+bridge> [ddnet] does utf8 even exist in c 14:40 <+bridge> [ddnet] it exist in c++ <20 but only pretty annoying, and they removed it iirc in c++20 14:41 <+bridge> [ddnet] https://en.cppreference.com/w/cpp/locale/codecvt_utf8 14:41 <+bridge> [ddnet] ok not removed 14:41 <+bridge> [ddnet] deprecated in c++17 14:43 <+bridge> [ddnet] i guess they remove it as soon as there are better utf8 string functions 14:43 <+bridge> [ddnet] however, for the api in the std it might already be useful now 14:45 <+bridge> [ddnet] i guess someone under windows could try what happens if you use a utf8 path with std::filesystem 14:45 <+bridge> [ddnet] std::filesystem::path uses std::wstring on Windows 14:46 <+bridge> [ddnet] so yes, some conversion is needed 14:47 <+bridge> [ddnet] but i still don't see any reason why every char string shouldn't be considered as UTF-8 string 😄 14:47 <+bridge> [ddnet] yeah but apparently windows doesnt 14:47 <+bridge> [ddnet] have u seen the pr on ddnet? 14:47 <+bridge> [ddnet] which one? 14:48 <+bridge> [ddnet] #4111 14:48 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/4111 14:49 <+bridge> [ddnet] try that pr with char8_t xd 14:49 <+bridge> [ddnet] i dont know, but i could imagine msvc added support for it 14:50 <+bridge> [ddnet] bcs devs are annoyed by these legacy things 14:51 <+bridge> [ddnet] it looks fine 14:53 <+bridge> [ddnet] i don't think char8_t can fix WinAPI awfulness in any way 14:53 <+bridge> [ddnet] well u8"my_pathüöäÜÖÄ.txt" is easier 14:53 <+bridge> [ddnet] than converting 14:54 <+bridge> [ddnet] what msvc does under the hood doesnt matter for the dev then 14:54 <+bridge> [ddnet] "my_pathüöäÜÖÄ.txt" => convert it to UTF-16 => pass it to some `W` WinAPI function 14:54 <+bridge> [ddnet] it's always like that with or without char8_t 14:55 <+bridge> [ddnet] yeah but since its a distinct type windows can handle it internally 14:55 <+bridge> [ddnet] it knows it expects an utf8 string now 14:56 <+bridge> [ddnet] WinAPI heavily relies on UTF-16 and it cannot be changed for sure 🤔 14:56 <+bridge> [ddnet] yes 14:56 <+bridge> [ddnet] not winapi must change 14:56 <+bridge> [ddnet] filesystem can implement everything 14:56 <+bridge> [ddnet] under the hood 14:57 <+bridge> [ddnet] imagine it like this 14:57 <+bridge> [ddnet] 14:57 <+bridge> [ddnet] u8"ÜÖÄÜÖÄ.txt" works on every system 14:57 <+bridge> [ddnet] standard 14:58 <+bridge> [ddnet] ah so the point is that it's guaranteed to be UTF-8 string, so std::filesystem stuff is forced to do valid UTF-8 => UTF-16 conversion always? 14:58 <+bridge> [ddnet] i dunno if that stands like that in the standard 14:58 <+bridge> [ddnet] but i guess thats the idea yes 15:00 <+bridge> [ddnet] what if `std::filesystem::path file = "ÜÖÄÜÖÄ.txt"` already works as expected? 15:01 <+bridge> [ddnet] what if `std::filesystem::path file = "ÜÖÄÜÖÄ.txt";` already works as expected? 15:01 <+bridge> [ddnet] uff, thats also possible yeah, really dunno 15:01 <+bridge> [ddnet] and if not, it's definitely a bug 15:01 <+bridge> [ddnet] i could imagine c++ prepares for string functions that automatically convert such stuff to other types 15:01 <+bridge> [ddnet] and makes it a requirement for alot of the API 15:02 <+bridge> [ddnet] and char just doesnt have this requirement 15:02 <+bridge> [ddnet] bcs c didnt gave it it 15:03 <+bridge> [ddnet] so everyone should now pollute their code with `char8_t` and `u8""` junk? 15:03 <+bridge> [ddnet] that's bad 15:03 <+bridge> [ddnet] depends, how often do you use unicode? 15:03 <+bridge> [ddnet] but if you use, i'd do it yes 15:04 <+bridge> [ddnet] i mean you can probs just use char* and put (char8_t*) before it xd 15:04 <+bridge> [ddnet] for IO stuff 15:04 <+bridge> [ddnet] what you use internally is your choice anyway 15:05 <+bridge> [ddnet] you know, even `#pragma once` is not standardized, but it just works correctly everywhere 15:05 <+bridge> [ddnet] and code should be readable! 15:05 <+bridge> [ddnet] yes 15:05 <+bridge> [ddnet] i use pragma once always 15:05 <+bridge> [ddnet] the same applies to `char` 15:06 <+bridge> [ddnet] but thats different still 15:06 <+bridge> [ddnet] pragma once is an addition 15:06 <+bridge> [ddnet] not a new way 15:06 <+bridge> [ddnet] its more like you say header guards should work differently than they are designed 15:06 <+bridge> [ddnet] char just isnt designed for it 15:08 <+bridge> [ddnet] hmmmm maybe storing arbitrary byte sequence in `char` array actually violates some standards, but again, it just works 😄 15:08 <+bridge> [ddnet] its not like i dont understand your point 15:08 <+bridge> [ddnet] but thats the disadvantage of an old language probably 15:08 <+bridge> [ddnet] not designed for the future 😄 15:08 <+bridge> [ddnet] yes 15:09 <+bridge> [ddnet] it seems that sometimes people who design C++ and people who actually use it don't understand each other 15:47 <+bridge> [ddnet] ```cpp 15:47 <+bridge> [ddnet] #include 15:47 <+bridge> [ddnet] 15:47 <+bridge> [ddnet] #ifdef _WIN32 15:47 <+bridge> [ddnet] #include 15:47 <+bridge> [ddnet] #endif 15:47 <+bridge> [ddnet] 15:47 <+bridge> [ddnet] int main() 15:47 <+bridge> [ddnet] { 15:47 <+bridge> [ddnet] #ifdef _WIN32 15:47 <+bridge> [ddnet] setlocale(LC_ALL, ".UTF-8"); 15:47 <+bridge> [ddnet] #endif 15:47 <+bridge> [ddnet] 15:47 <+bridge> [ddnet] const bool success = std::filesystem::create_directory("ÜÖÄÜÖÄ"); 15:47 <+bridge> [ddnet] 15:47 <+bridge> [ddnet] return (success) ? 0 : 1; 15:47 <+bridge> [ddnet] } 15:47 <+bridge> [ddnet] ``` 15:47 <+bridge> [ddnet] this works as expected on both Linux and Windows @Jupstar ✪ 15:47 <+bridge> [ddnet] setlocale is needed on Windows 15:48 <+bridge> [ddnet] and it doesn't work with MinGW for some reason 15:48 <+bridge> [ddnet] MSVC is needed 15:48 <+bridge> [ddnet] mhh 15:48 <+bridge> [ddnet] if that has no side effects.. locale always changes so much stuff 15:48 <+bridge> [ddnet] printf and stuff like that 15:49 <+bridge> [ddnet] but good to know anyway 15:49 <+bridge> [ddnet] but no stupid char8_t 😄 15:50 <+bridge> [ddnet] but does it work with char8_t? 15:50 <+bridge> [ddnet] @Comrade 15:50 <+bridge> [ddnet] i am curious about that xxd 15:50 <+bridge> [ddnet] it does probably 15:50 <+bridge> [ddnet] let's try 15:50 <+bridge> [ddnet] `u8"ÜÖÄÜÖÄ"` is so ugly 😄 15:50 <+bridge> [ddnet] xD 15:51 <+bridge> [ddnet] at some point i got used to suffix and prefix of strings and numbers, so idc anymore xD 15:51 <+bridge> [ddnet] 6llu * 3llu xd 15:51 <+bridge> [ddnet] just to silence warnings 15:54 <+bridge> [ddnet] it still works well on Linux, but it doesn't work on Windows 😄 15:54 <+bridge> [ddnet] even setlocale doesn't help 15:54 <+bridge> [ddnet] ui, thats unexpected 15:55 <+bridge> [ddnet] well thats really sad, guess i need to wait for c++26 then xDD 15:55 <+bridge> [ddnet] or just use good old `char` 😄 15:56 <+bridge> [ddnet] my MSVC installation is few months old so maybe that's why it doesn't work 15:56 <+bridge> [ddnet] i dunno, could also be that they dont care yet 15:56 <+bridge> [ddnet] aslong its no requirement 15:57 <+bridge> [ddnet] and MinGW still doesn't work 15:57 <+bridge> [ddnet] tested both Wine and native Windows 15:57 <+bridge> [ddnet] what gcc does ur mingw use? 15:58 <+bridge> [ddnet] last time i tested c++20 features alot of stuff was still missing 15:58 <+bridge> [ddnet] `x86_64-w64-mingw32-g++ (GCC) 10-win32 20210110` 15:58 <+bridge> [ddnet] looks quite old 15:58 <+bridge> [ddnet] yeah, but probs still newer than mine xd 15:58 <+bridge> [ddnet] but it doesn't complain about `-std=c++20` at least 15:59 <+bridge> [ddnet] https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B20_features 15:59 <+bridge> [ddnet] msvc is actually really good 15:59 <+bridge> [ddnet] implemented most stuff 16:01 <+bridge> [ddnet] yes, and STL source code is available finally 16:01 <+bridge> [ddnet] https://github.com/microsoft/STL/blob/472161105d596192194d4715ccad307c6c163b4a/stl/src/filesystem.cpp#L266 16:01 <+bridge> [ddnet] ah nice 16:17 <+bridge> [ddnet] im now fully vaccinated 2/2 16:17 <+bridge> [ddnet] :monkalaugh: 16:17 <+bridge> [ddnet] :greenthing: 16:20 <+bridge> [ddnet] in rust a string has to be valid utf8 16:20 <+bridge> [ddnet] but c doesnt have strings anyway 16:20 <+bridge> [ddnet] just buffers of data that end with a \\0 16:20 <+bridge> [ddnet] :feelsbadman: 16:21 <+bridge> [ddnet] nice, that's how it should be 16:21 <+bridge> [ddnet] thats also why the api for the filesystem doesnt use strings in rust iirc, since strings have to be valid utf8 buth unix paths dont 16:21 <+bridge> [ddnet] xd 16:22 <+bridge> [ddnet] I am here to be the cranky old man, what are we talking about this time? 16:22 <+bridge> [ddnet] that i can sense 5g waves 16:22 <+bridge> [ddnet] and that everythiung should be utf8 16:22 <+bridge> [ddnet] 14 days passed after your 2nd vaccine? 16:23 <+bridge> [ddnet] no i got it today 16:23 <+bridge> [ddnet] im developing my senses 16:23 <+bridge> [ddnet] :greenthing: 16:23 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879370339174453318/unknown.png 16:23 <+bridge> [ddnet] imagine having a modern std 16:25 <+bridge> [ddnet] isnt out there some more modernish libc or something 16:25 <+bridge> [ddnet] hmmmm PathBuf and Path 🤔 16:26 <+bridge> [ddnet] Facebook, google and boost all have moderner implementations of std stuff 16:27 <+bridge> [ddnet] What don't you like about std anyway? It is getting fairly modern nowadays, albeit very slowly 16:27 <+bridge> [ddnet] iirc the C std doesnt have filesystem stuff 16:27 <+bridge> [ddnet] c++20 does 16:28 <+bridge> [ddnet] Ah, C, yeah C pretty much requires companion libraries 16:28 <+bridge> [ddnet] C is so "simple" but thats why it requires either too make the wheel or use libs, and managing libs is a pain 16:28 <+bridge> [ddnet] xd 16:29 <+bridge> [ddnet] did u figure out the cdoor collision stuff?= 16:29 <+bridge> [ddnet] I know how it works now 16:29 <+bridge> [ddnet] :o 16:30 <+bridge> [ddnet] It creates some weird pseudo layer, it's extremely odd how it's implemented 16:49 <+bridge> [ddnet] oddly i always name the files lol when testing stuff 16:49 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879376850835611718/unknown.png 16:49 <+bridge> [ddnet] just noticed lol 16:50 <+bridge> [ddnet] are you that one guy hosting a server with "sv_hostname lol"? lol 16:50 <+bridge> [ddnet] not hosting a sv rn lol xd 16:51 <+bridge> [ddnet] ``` 16:51 <+bridge> [ddnet] maintest.cpp mh.cpp moduletest.o test.c test.cpp test.txt 16:51 <+bridge> [ddnet] a.out2 compile.sh main.cpp mh2.cpp moduletest.cppm moduletest.pcm test.c.obj test.exe tmp 16:51 <+bridge> [ddnet] ``` 16:51 <+bridge> [ddnet] seems like i like mh or *test 16:51 <+bridge> [ddnet] I always have a `~/test` 😛 16:51 <+bridge> [ddnet] @Learath2 16:51 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879377307960229928/unknown.png 16:52 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879377457692676246/Screenshot_2021-08-23_at_17.51.51.png 16:52 <+bridge> [ddnet] @Jupstar ✪ moduletest 16:52 <+bridge> [ddnet] where u testing c++20 modules? 16:52 <+bridge> [ddnet] yeah 16:52 <+bridge> [ddnet] with clang 16:52 <+bridge> [ddnet] i think they look nice 16:52 <+bridge> [ddnet] but thats like 1 year old xd 16:52 <+bridge> [ddnet] xd 16:53 <+bridge> [ddnet] welcome to ddnet discord! 😄 16:53 <+bridge> [ddnet] hey! 16:53 <+bridge> [ddnet] oh he joined 16:53 <+bridge> [ddnet] thats him 16:53 <+bridge> [ddnet] or her 16:54 <+bridge> [ddnet] I'm usually just lurking around 16:54 <+bridge> [ddnet] :bluekitty: 16:55 <+bridge> [ddnet] is this zoomed or u rly have big font 16:59 <+bridge> [ddnet] L"rb" :monkalaugh: 16:59 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879379228406186034/unknown.png 16:59 <+bridge> [ddnet] windows :monkalaugh: 16:59 <+bridge> [ddnet] maybe we'll add a mode L"fröüß" later lol 17:00 <+bridge> [ddnet] retina display, so hidpi 17:00 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879379645269671986/unknown.png 17:00 <+bridge> [ddnet] i actually dislike hiding the pointer stuff behind typedefs 17:00 <+bridge> [ddnet] its so confusing 17:01 <+bridge> [ddnet] winapi should really just get a reset 17:01 <+bridge> [ddnet] this is also a problem with auto iirc 17:01 <+bridge> [ddnet] sometimes it's okay not to support 16bit executables anymore 17:01 <+bridge> [ddnet] xd 17:02 <+bridge> [ddnet] I've sent this a few times, but https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/ this blogpost really illustrates how insane winapi can get 17:02 <+bridge> [ddnet] @Robyt3 btw ur filesystem io pr doesnt conform with our naming conventions :monkaS: 17:03 <+bridge> [ddnet] you mean outside of system.c? 17:03 <+bridge> [ddnet] typedef has one advantage @Ryozuki 17:03 <+bridge> [ddnet] char_ptr a,b; 17:03 <+bridge> [ddnet] are both pointers 17:03 <+bridge> [ddnet] I though system.c was not following the naming conventions anyway 17:03 <+bridge> [ddnet] char* a,b; 17:03 <+bridge> [ddnet] not 17:03 <+bridge> [ddnet] iirc we dont have system.c 17:03 <+bridge> [ddnet] we are modern 17:03 <+bridge> [ddnet] we got system.cpp 17:03 <+bridge> [ddnet] "modern" 😄 17:03 <+bridge> [ddnet] and i think new code should conform 17:03 <+bridge> [ddnet] yes, this caused me great pain during rebase 17:04 <+bridge> [ddnet] lol 17:04 <+bridge> [ddnet] idk what others think 17:04 <+bridge> [ddnet] c++23 lets go 17:04 <+bridge> [ddnet] this should be illegal in both C and C++ 17:04 <+bridge> [ddnet] i agree 17:04 <+bridge> [ddnet] i dislike it too 17:05 <+bridge> [ddnet] xD 17:05 <+bridge> [ddnet] Hm, this is a good question, I actually didn't think about what to do in system.cpp 17:05 <+bridge> [ddnet] imho new code should conform 17:05 <+bridge> [ddnet] i am also for correcting stuff 17:05 <+bridge> [ddnet] It is completely sane syntax if you learn C/C++ properly 17:05 <+bridge> [ddnet] but makes it harder to read 17:05 <+bridge> [ddnet] I wanted to have ddnet and upstream somewhat stay in sync, so I didn't update the style on upstream 17:05 <+bridge> [ddnet] char *a, *b; this is valid? 17:06 <+bridge> [ddnet] yes 17:06 <+bridge> [ddnet] but I agree that new style would be better to have everywhere 17:06 <+bridge> [ddnet] i would always put it in 2 lines anyway 17:06 <+bridge> [ddnet] yes 17:06 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879381158100607117/unknown.png 17:06 <+bridge> [ddnet] what is this magic number? xd 17:06 <+bridge> [ddnet] I will say I never have any trouble with it, you will give me no evidence at all about your claim, you will go on with your day, I'll be pissed for the entire night, so let's agree to disagree 17:07 <+bridge> [ddnet] wtf xD 17:07 <+bridge> [ddnet] Windows epoch is before unix epoch 17:07 <+bridge> [ddnet] 1 January 1601 17:07 <+bridge> [ddnet] lel 17:07 <+bridge> [ddnet] according to wikipedia 17:07 <+bridge> [ddnet] windows wants to be special always 17:08 <+bridge> [ddnet] Btw I don't remember if we clamped that, what happens if the time is before unix epoch? 17:08 <+bridge> [ddnet] :monkaS: 17:08 <+bridge> [ddnet] Ah I do, `t == li.QuadPart` 17:09 <+bridge> [ddnet] if it underflows this will fail 17:11 <+bridge> [ddnet] and `time_t` is still 32-bit on some platforms even today 😐 17:11 <+bridge> [ddnet] ah yeah, the mingw trouble 17:11 <+bridge> [ddnet] and signed for some reason 17:12 <+bridge> [ddnet] @Robyt3 I think your pr looks fine, I'll give it a more thorough eye over tonight 17:12 <+bridge> [ddnet] @Learath2 can you also review #4103 17:12 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/4103 17:13 <+bridge> [ddnet] @Ryozuki btw sv_swap's default value must also be changed then 17:14 <+bridge> [ddnet] aye 17:14 <+bridge> [ddnet] should i do it? 17:14 <+bridge> [ddnet] i dunno 17:14 <+bridge> [ddnet] oooof, 4103 looks scary, I'll take a look 17:14 <+bridge> [ddnet] ask deen and learath if they are ready for potential trouble xD 17:14 <+bridge> [ddnet] :monkaS: 17:14 <+bridge> [ddnet] i tested it with switches and teams 17:15 <+bridge> [ddnet] Changing defaults shouldn't break anything 17:15 <+bridge> [ddnet] test it with team of 2 and 2+ 17:15 <+bridge> [ddnet] when i tested it, i found the same function as cause 17:15 <+bridge> [ddnet] if you changed the meaning of a value feel free to update the default 17:15 <+bridge> [ddnet] so yeah, it probably is the right patch 17:15 <+bridge> [ddnet] but who knows, just look at the "new" startline skip xD 17:15 <+bridge> [ddnet] the players always find weird stuff xD 17:16 <+bridge> [ddnet] xD 17:16 <+bridge> [ddnet] `SetForceCharacterTeam` 17:16 <+bridge> [ddnet] this was the problem wasnt it 17:16 <+bridge> [ddnet] ye its the cause 17:16 <+bridge> [ddnet] maybe the if doesnt need to wrap the other 2 functions 17:16 <+bridge> [ddnet] yeah also dunno xd 17:16 <+bridge> [ddnet] @Ryozuki about your switchstate netobj, do you think maybe we should send it per team instead? With 64p and delta compression it's not that important and allows more flexibility. fokkonaut seemed a bit concerned 17:18 <+bridge> [ddnet] i dont understand 17:18 <+bridge> [ddnet] `int Status = (int)GameServer()->Collision()->m_pSwitchers[i].m_Status[Team()];` 17:18 <+bridge> [ddnet] isnt it alreayd per team? more or less 17:18 <+bridge> [ddnet] xd 17:18 <+bridge> [ddnet] Yes, but you send a snap object per character 17:19 <+bridge> [ddnet] ah 17:19 <+bridge> [ddnet] feel free to make the pr 17:19 <+bridge> [ddnet] And you send all players switch states to all players 17:19 <+bridge> [ddnet] :monkaS: 17:20 <+bridge> [ddnet] Mh, not sure if I want to make the change, I feel it's good as is. Do you see any reason? 17:20 <+bridge> [ddnet] i dont know 17:20 <+bridge> [ddnet] maybe fokkonaut should explain himself 17:20 <+bridge> [ddnet] lately his comments are "not like this" 17:20 <+bridge> [ddnet] without any explanation xd 17:21 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879384775104802826/unknown.png 17:21 <+bridge> [ddnet] it triggers me so much xdd 17:21 <+bridge> [ddnet] Yeah, hm 17:21 <+bridge> [ddnet] @fokkonaut what was your concern with the switch state object? 17:47 <+bridge> [ddnet] because you do not have an macos? do you want me to test something? 17:47 <+bridge> [ddnet] (@Jupstar ✪) 17:47 <+bridge> [ddnet] a friend of a friend has a friend who has macos on an emulator which is totally not me 17:48 <+bridge> [ddnet] but nice reply 17:48 <+bridge> [ddnet] better than the one from discord xd 17:48 <+bridge> [ddnet] but yeah, actually you can try smth chiller 17:49 <+bridge> [ddnet] https://github.com/Jupeyy/ddnet/runs/3399295343 17:50 <+bridge> [ddnet] if you compile yourself, you need to use bundled libs, i tried the glew pr, which we also need 17:51 <+bridge> [ddnet] and if your mac supports it, especially try opengl 2.1 as this loads the most extensions 17:51 <+bridge> [ddnet] thats nice \:) 17:51 <+bridge> [ddnet] (@Robyt3) 17:52 <+bridge> [ddnet] if it starts it is already enough, tahts all i need 17:52 <+bridge> [ddnet] is mac even supported at all? I can not get any builds working. 17:52 <+bridge> [ddnet] you mean, if ddnet supports mac? 17:53 <+bridge> [ddnet] ya well ok to be fair only tested teeworlds 17:53 <+bridge> [ddnet] i wouldn't know that macos isnt supported 17:53 <+bridge> [ddnet] but i hope with new SDL it gets less buggy 17:53 <+bridge> [ddnet] bcs the version we have is buggier than the one tsfreddie is testing on 17:55 <+ChillerDragon> I am not sure if its me not using mac at all anymore but I feel like apple gets more and more trash. 17:56 <+bridge> [ddnet] just bcs they spy you and hide it under child porn as excuse? 17:56 <+bridge> [ddnet] no but i cannot judge 17:56 <+ChillerDragon> Got so many bugs with the new macbooks at work. And omagawd im not sure who? maybe zsh or the terminal someone hijacks my alt presses so i can not change irc buffers anymore aaa 17:56 <+bridge> [ddnet] on the emulator it ran normally 17:56 <+bridge> [ddnet] just the github builds dont work 17:56 <+bridge> [ddnet] only from ddnet.tw 17:56 <+ChillerDragon> can you compile on the emulator? 17:56 <+bridge> [ddnet] no 17:56 <+ChillerDragon> lemme try to compile ddnet real quick 17:57 <+bridge> [ddnet] and i also dont want that trouble 17:57 <+bridge> [ddnet] its enough is see learath struggle once per month 17:57 <+ChillerDragon> hrhrhr learath the macos guy 17:58 <+ChillerDragon> its more than just the spying its usability and availibility that feels worse than i remembered it. I feel like those two things are the main reason one uses mac. 17:58 <+ChillerDragon> "it just works" 17:59 <+bridge> [ddnet] its like with android, users like it, bcs its easy 17:59 <+bridge> [ddnet] but devs hate it 17:59 <+bridge> [ddnet] bcs its annoying 17:59 <+ChillerDragon> ouu android i feel like i will never try it 17:59 <+ChillerDragon> im planning to replace my iphone by a pinephone in the near future 18:00 <+ChillerDragon> only good thing about mac terminals is that cmd+c and cmd+v works :D 18:00 <+ChillerDragon> not like ctrl+shift+c like in linux 18:00 <+ChillerDragon> yea ddnet does not build on my machine latest macos 18:01 <@deen> ChillerDragon: you see PMs? 18:01 <+ChillerDragon> i see that i got one 18:02 <+ChillerDragon> but i need my archlinux desktop to open it :D 18:02 <+ChillerDragon> https://paste.zillyhuhn.com/0z 18:02 <+ChillerDragon> fakin mac 18:02 <+ChillerDragon> i use arch btw 18:04 <+bridge> [ddnet] i use arch btw 18:05 <+bridge> [ddnet] hi, im jupstar 18:05 <+bridge> [ddnet] i have an iphone btw xd 18:05 <+ChillerDragon> how can github even build 18:05 <+ChillerDragon> also im vegan 18:05 <+bridge> [ddnet] nice 18:05 <+ChillerDragon> im not :D 18:05 <+ChillerDragon> i just like saying it 18:06 <+bridge> [ddnet] i am most of the time xd 18:06 <+ChillerDragon> good meme 18:06 <+bridge> [ddnet] even github macos build fails like 10% of the time randomly 18:06 <+bridge> [ddnet] except when i go with friends 18:07 <+ChillerDragon> running ddnet/teeworlds on macOS is cursed anyways isnt it? 18:07 <+ChillerDragon> i dont even know what the current ddnet state on my mac is 18:07 <+ChillerDragon> https://paste.zillyhuhn.com/0z 18:07 <+bridge> [ddnet] i dunno, cant be that hard 18:07 <+ChillerDragon> oops wrong paste 18:07 <+bridge> [ddnet] if it comes hard on hard static link everything 18:07 <+ChillerDragon> oh no it launches 18:08 <+ChillerDragon> but i mean the actual expirience 18:08 <+bridge> [ddnet] oh, i assume it shouldnt be bad 18:08 <+bridge> [ddnet] except that the hardware maybe is 18:08 <+ChillerDragon> tabbing in and out didnt work iirc fonts not being rendered resolution being wrong or zoomed 18:08 <+bridge> [ddnet] Isnt it self explaining? The layer is always switch for switchstates. 18:08 <+bridge> [ddnet] didnt we fix all this stuff xd 18:08 <+bridge> [ddnet] but tabbing in out sound like SDL bug 18:08 <+bridge> [ddnet] that might be fixed with newer sdl versions 18:09 <+bridge> [ddnet] doesn't switch layer change it's state like everytime you interact with it 18:09 <+bridge> [ddnet] ima\_25f8ed5.jpeg 18:09 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879397004780924978/ima_25f8ed5.jpeg 18:09 <+bridge> [ddnet] best 18:09 <+bridge> [ddnet] XD 18:09 <+bridge> [ddnet] wtf is that 18:09 <+bridge> [ddnet] is HiDPI on chiller? 18:10 <+bridge> [ddnet] chiller when new vid showing u traveling with a laptop with tw 18:10 <+bridge> [ddnet] today 18:10 <+bridge> [ddnet] Yes 18:10 <+bridge> [ddnet] ^^ 18:10 <+bridge> [ddnet] wow weird 18:10 <+bridge> [ddnet] On 18:10 <+bridge> [ddnet] https://www.youtube.com/watch?v=wKV18A1DluU 18:10 <+bridge> [ddnet] must be the old SDL version too 18:10 <+bridge> [ddnet] i think TSfreddie had no problems 18:10 <+bridge> [ddnet] he tested HiDPI and non 18:11 <+bridge> [ddnet] or broken opengl drivers xD 18:11 <+bridge> [ddnet] ima\_4e7a1a3.jpeg 18:11 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879397338450366564/ima_4e7a1a3.jpeg 18:11 <+bridge> [ddnet] Time to get sdlvm 18:11 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/4084#issuecomment-903225761 18:11 <+bridge> [ddnet] 18:11 <+bridge> [ddnet] It is not required to predict players from other teams anyways, so it makes sense to only send one set of switch states per character 18:11 <+bridge> [ddnet] @Learath2 18:11 <+bridge> [ddnet] Lemme try latest official release to compare 18:11 <+bridge> [ddnet] I love how drivers just mess everything up anyway 18:11 <+bridge> [ddnet] like NVIDIA somehow makes it impossible to actually disable anti-aliasing 18:12 <+bridge> [ddnet] are you in windows @Robyt3 ? 18:12 <+bridge> [ddnet] OpenGL + windows = true love 18:12 <+bridge> [ddnet] yes, window 18:12 <+bridge> [ddnet] yes, windows 18:12 <+bridge> [ddnet] https://gist.github.com/Jupeyy/ca2ac80fb9765a9c4370bb9a6b88fb32 18:13 <+bridge> [ddnet] you can try this, it works on intel, nvidia and amd i think 18:13 <+bridge> [ddnet] they latest version is nice, but you only have like 60% of the native performance 18:13 <+bridge> [ddnet] im actually not planning a new one was always meant as a duology 18:13 <+bridge> [ddnet] (@Ryozuki) 18:13 <+bridge> [ddnet] the latest version is nice, but you only have like 60% of the native performance 18:15 <+bridge> [ddnet] i also feel like every mac is different \:D 18:15 <+bridge> [ddnet] @Jupstar ✪\: ok latest ddnet release looks pretty similar 18:16 <+bridge> [ddnet] what differences am i searching for? 18:16 <+bridge> [ddnet] what did you try to fix? 18:16 <+bridge> [ddnet] i just want to know if it starts 18:16 <+bridge> [ddnet] ye it starts 18:16 <+bridge> [ddnet] \:D 18:16 <+bridge> [ddnet] so the glew mantainer knows it works, bcs he asked ppl to test his pr 18:17 <+bridge> [ddnet] owo 18:17 <+bridge> [ddnet] can i comment on the pr? 18:17 <+bridge> [ddnet] https://github.com/nigels-com/glew/pull/216 18:17 <+bridge> [ddnet] if you have something to add xD 18:17 <+bridge> [ddnet] spam his emails so he merges it xD 18:17 <+bridge> [ddnet] can i write "developing graphic drivers" on my CV now? 18:17 <+bridge> [ddnet] glew has no compile time version, thats annoying 18:17 <+bridge> [ddnet] i liked ur comment 18:18 <+bridge> [ddnet] that should work 18:18 <+bridge> [ddnet] ez 18:18 <+bridge> [ddnet] Anyone know how I can fix this? 18:18 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879399254077100042/49928c982126b87f99af55b8114650a4.png 18:18 <+bridge> [ddnet] i love how i keep getting python crash reports randomly on my mac 18:19 <+bridge> [ddnet] someone trys to run python i dont even know who \:D 18:19 <+bridge> [ddnet] maybe vim? idk 18:19 <+bridge> [ddnet] ah yes its vim \:D 18:20 <+bridge> [ddnet] I'm finally removing `base/tl`, Q: How do you think I should handle `sorted_array`? 18:21 <+bridge> [ddnet] In cases where inserts happen bulk, it's much more efficient to just insert everything and then sort, which is what I did 18:21 <+bridge> [ddnet] seems fine 18:21 <+bridge> [ddnet] but for `CUuidManager` inserts can always happen but currently they happen in bulk 18:22 <+bridge> [ddnet] How should I handle that case? Just bite the bullet and do insertion sort? 18:27 <+bridge> [ddnet] @Jupstar ✪\: btw ddnet 13.1 works fullscreen 18:27 <+bridge> [ddnet] nice, then its not the driver 18:27 <+bridge> [ddnet] maybe turn hidpi off xd 18:27 <+bridge> [ddnet] xxd 18:28 <+bridge> [ddnet] i love how i get 3 blackscreens 18:28 <+bridge> [ddnet] then a red 18:28 <+bridge> [ddnet] \:D 18:29 <+bridge> [ddnet] 4 windows or what? 18:29 <+bridge> [ddnet] now it blinks \:D 18:29 <+bridge> [ddnet] no\* 18:29 <+bridge> [ddnet] Would anyone kindly help me fix the "Windows headers require the default packing option. Changing this can lead to memory corruption. This diagnostic can be disabled by building with WINDOWS_IGNORE_PACKING_MISMATCH defined." issue? I'm not familiar with VS so I'm unsure how to change the build variables 18:29 <+bridge> [ddnet] define WINDOWS_IGNORE_PACKING_MISMATCH 18:29 <+bridge> [ddnet] xD 18:30 <+bridge> [ddnet] You'd think I just said I didn't know how 18:30 <+bridge> [ddnet] where did you even change the packaging option 18:30 <+bridge> [ddnet] did you use pragma pack? 18:30 <+bridge> [ddnet] I just did what it said on the git, nothing more, nothing less 18:30 <+bridge> [ddnet] oh its on ddnet git? 18:30 <+bridge> [ddnet] Yes 18:31 <+bridge> [ddnet] Did we forget to pragma pop somewhere? 18:31 <+bridge> [ddnet] i doubt we use it 18:31 <+bridge> [ddnet] heinrich killed it, when i used it once xxD 18:32 <+bridge> [ddnet] just use std::lower_bound or smth 18:32 <+bridge> [ddnet] but yeah 18:32 <+bridge> [ddnet] Is there a stable I can use instead? 18:32 <+bridge> [ddnet] its still insertion sort 18:33 <+bridge> [ddnet] update msvc 18:33 <+bridge> [ddnet] i don't see why this should happening 18:34 <+bridge> [ddnet] Updating the build tools should suffice? 18:37 <+bridge> [ddnet] update everything, delete cmake cache 18:37 <+bridge> [ddnet] the classic 18:37 <+bridge> [ddnet] "The classic" first time working with cmake, I'm used to Bam 18:39 <+bridge> [ddnet] bam master race 18:39 <+bridge> [ddnet] I use bam btw 18:39 <+bridge> [ddnet] does bam even support clang? 18:39 <+bridge> [ddnet] Is it still possible to build with bam? 18:39 <+bridge> [ddnet] no 18:39 <+bridge> [ddnet] ddnet no 18:39 <+bridge> [ddnet] and pls dont add it back 18:39 <+bridge> [ddnet] Sadge 18:39 <+bridge> [ddnet] :troll: 18:39 <+bridge> [ddnet] petition to add back bam 18:40 <+bridge> [ddnet] I'm all for it 18:40 <+bridge> [ddnet] and ./configure autgen 18:40 <+bridge> [ddnet] and ./configure autogen 18:40 <+bridge> [ddnet] pls 18:40 <+bridge> [ddnet] It was clunky and weird, but it worked 18:40 <+bridge> [ddnet] cmake works too 18:40 <+bridge> [ddnet] our CI works with MSVC 18:41 <+bridge> [ddnet] i dunno, just use cmake-gui 18:41 <+bridge> [ddnet] I am 18:41 <+bridge> [ddnet] does the configure work? 18:41 <+bridge> [ddnet] no errors 18:41 <+bridge> [ddnet] Yeah 18:41 <+bridge> [ddnet] Worked flawlessly, just compiling threw that one error 18:41 <+bridge> [ddnet] well then its a MSVC problem i guess, we don't change packaging i think 18:41 <+bridge> [ddnet] does it name a file? 18:42 <+bridge> [ddnet] where the microsoft header is included from 18:42 <+bridge> [ddnet] I'm updating msvc right now, hopefully it fixes itselfd 18:42 <+bridge> [ddnet] anything that includes windows.h would trigger this warning 18:42 <+bridge> [ddnet] I'm updating msvc right now, hopefully it fixes itself 18:42 <+bridge> [ddnet] What Roby said 18:47 <+bridge> [ddnet] Everything updated, same error. Seems to come from winnt.h 18:47 <+bridge> [ddnet] Line 2482 18:48 <+bridge> [ddnet] mhh, also updated the windows sdk? 18:48 <+bridge> [ddnet] Windows sdk? 18:48 <+bridge> [ddnet] its probably an option in the MSVC updater 18:48 <+bridge> [ddnet] what even is your MSVC version? 18:49 <+bridge> [ddnet] 15.9.38 18:49 <+bridge> [ddnet] "As 1201ProgramAlarm mentioned above, the solution was disabling the /Zp (structure packing) compiler option. 18:49 <+bridge> [ddnet] 18:49 <+bridge> [ddnet] " 18:49 <+bridge> [ddnet] https://stackoverflow.com/questions/56570681/static-assertion-failed-with-windows-headers-require-the-default-packing-option 18:49 <+bridge> [ddnet] right click ddnet and search that option 18:52 <+bridge> [ddnet] Assuming you mean in CMake, I don't see any Zp option 18:52 <+bridge> [ddnet] in msvc 18:52 <+bridge> [ddnet] do you click on ALL_BUILD? 18:53 <+bridge> [ddnet] No, I build only DDNet 18:53 <+bridge> [ddnet] kekw 18:53 <+bridge> [ddnet] strange thing 18:54 <+bridge> [ddnet] why dont u use visual studio 2019 btw 18:55 <+bridge> [ddnet] 2022 incoming xd 18:55 <+bridge> [ddnet] why dont u use visual studio 2022 btw 18:57 <+bridge> [ddnet] https://i.gyazo.com/861268549a906eeb5ce2d00d9e3318ef.png 18:57 <+bridge> [ddnet] I have no clue what I'm doing wrong 18:57 <+bridge> [ddnet] disable 18:57 <+bridge> [ddnet] maybe default is on 18:58 <+bridge> [ddnet] I can't, I can only choose a value or "default" 18:58 <+bridge> [ddnet] https://i.gyazo.com/db1e3e9d7b1603429e1df6e348104ada.png 18:58 <+bridge> [ddnet] mh i dunno then 18:58 <+bridge> [ddnet] google your problem or use a modern version 18:59 <+bridge> [ddnet] Okay, what kind of crackhead at the standards committee decided that `std::binary_search` should return a boolean? 18:59 <+bridge> [ddnet] It takes a dimwit of monumental stupidness to not return an index or at the very least a damn iterator 19:00 <+bridge> [ddnet] The person who got it in should just quit programming, taking along the people that voted yes to it 19:03 <+bridge> [ddnet] Aight, weird. Using VS2019 worked 19:05 <+bridge> [ddnet] I have seriously seen smarter toasters than this person... I'll have to litter the code with `lower_bound` which is far less descriptive now 19:22 <+bridge> [ddnet] ``` 19:22 <+bridge> [ddnet] Return value 19:22 <+bridge> [ddnet] true if an element equal to value is found, false otherwise. 19:22 <+bridge> [ddnet] ``` 19:22 <+bridge> [ddnet] does that not sound reasonable? 19:30 <+bridge> [ddnet] It is correct, I have no problem with that, but it's also useless except for checking if something is already in a vector 19:31 <+bridge> [ddnet] A sane implementation would return an iterator to the found value, and the end iterator if not found 19:31 <+bridge> [ddnet] ah yeah 19:31 <+bridge> [ddnet] you are right xxd 19:32 <+bridge> [ddnet] didnt even notice xxD 19:32 <+bridge> [ddnet] Q: I'm wrapping `std::vector` to get a sorted vector of our own. Should I inherit and delete the methods that can lead to the vector getting unsorted or should I keep the vector as a private member and only expose methods of my own? 19:35 <+bridge> [ddnet] second i think 19:35 <+bridge> [ddnet] yep, composition > inheritance 19:37 <+bridge> [ddnet] inheritance best xd 19:40 <+bridge> [ddnet] why don't you use boost headers @Learath2 ? 19:40 <+bridge> [ddnet] most of these template stuff can be used in header only mode 19:42 <+bridge> [ddnet] replace /base with boost xdd 19:44 <+bridge> [ddnet] could probably xD, boost has everything 19:44 <+bridge> [ddnet] but header only are safer, bcs they work everywhere 19:46 <+bridge> [ddnet] don't we include boost for mysql support? 19:53 <+bridge> [ddnet] looking at the server code, it doesn't look like m_Layer in entity.h is used for much except to check if an entity is in switch. would be ok to remove/refactor out m_Layer, and just use m_Number == 0 when it's not in switch? 20:08 <+bridge> [ddnet] make an issue or pr 20:08 <+bridge> [ddnet] this chat is fast af xd 20:09 <+bridge> [ddnet] yes looks safe to me 20:09 <+bridge> [ddnet] yeah 😛 20:10 <+bridge> [ddnet] the only thing is that reserving Number == 0 is very clean (but not sure if using something like -1 would be better?) 20:10 <+bridge> [ddnet] not very clean* 20:11 <+bridge> [ddnet] is it even so bad to send the layer? 20:11 <+bridge> [ddnet] or if its always a switch layer just set it when the packet comes in? 20:12 <+bridge> [ddnet] I don't think so, since this won't be sent often 20:13 <+bridge> [ddnet] but if we are certain that m_Layer will never be used for anything else in the future (and can always be inferred from m_Number) it's perhaps not needed 20:13 <+bridge> [ddnet] you can never be certain xd 20:14 <+bridge> [ddnet] if somebody ever creates a new switch layer or smth 20:14 <+bridge> [ddnet] yeah, thats my thought:P 20:16 <+bridge> [ddnet] then argument like this in the pr, and its fine, either the ppl comment on that give better explaination or it doesn't help xD 20:17 <+bridge> [ddnet] yes, will comment 20:36 <+bridge> [ddnet] Hm, if only we were up to C++20 this would be so much prettier 20:55 <+bridge> [ddnet] @Jupstar ✪ https://github.com/ddnet/ddnet/commit/0e71a4770 why did you use a sorted array here? You only insert unsorted into it and you never sort it 20:56 <+bridge> [ddnet] xd 20:56 <+bridge> [ddnet] doesnt it automatically sort? 20:56 <+bridge> [ddnet] Not if you insert unsorted 😛 20:57 <+bridge> [ddnet] shitty library then xd 20:57 <+bridge> [ddnet] u 20:58 <+bridge> [ddnet] Ehe? You find a function literally called `add_unsorted` and you expect it to sort somehow? How? by magic? 😄 20:58 <+bridge> [ddnet] :monkalaugh: 20:58 <+bridge> [ddnet] XDD 20:58 <+bridge> [ddnet] but where is that even called 20:58 <+bridge> [ddnet] Um, since no one ever noticed that these arrays are unsorted I guess they can be replaced by vectors 20:59 <+bridge> [ddnet] im not so sure 20:59 <+bridge> [ddnet] `menus_settings_assets.cpp:L386` e.g. 20:59 <+bridge> [ddnet] i insert unsorted FROM a sorted array 20:59 <+bridge> [ddnet] So I can replace it with a simple vector 21:00 <+bridge> [ddnet] yes if they dont have any call to add then yes 21:01 <+bridge> [ddnet] and you can also remove static while u at it xdd 21:01 <+bridge> [ddnet] ok no 21:01 <+bridge> [ddnet] the temlates to lambdas is too much work 21:01 <+bridge> [ddnet] I think you are by far the biggest used of sorted_array in the entire source 😄 21:01 <+bridge> [ddnet] its not unuseful xd 21:01 <+bridge> [ddnet] if std would have flat_set 21:02 <+bridge> [ddnet] i wouldnt use it xD 21:31 <+bridge> [ddnet] I have a diff so large it hurts my head 21:39 <+bridge> [ddnet] Storing all the indexes as int was a rather large mistake on our part :/ 21:41 <+bridge> [ddnet] instead of size_t or instead of what 21:42 <+bridge> [ddnet] instead of size_t 21:43 <+bridge> [ddnet] I hope everything still works 21:44 <+bridge> [ddnet] It does, wtf 21:44 <+bridge> [ddnet] oh nvm, no such luck `failed to open file. filename='assets/entities/comfort/blockworlds.png'` 21:45 <+bridge> [ddnet] its ok 21:45 <+bridge> [ddnet] that is not a bug 21:45 <+bridge> [ddnet] that just means that comfort asset pack still misses other mods 22:07 <+bridge> [ddnet] No, its also for Layer_game and layer_front 22:08 <+bridge> [ddnet] we dont need anything to determine this, number 0 is always on and also used for game and front layer 22:08 <+bridge> [ddnet] Thats why its num_switchers + 1, because 0 is reserved as always on, for game, front and also switch layer 22:09 <+bridge> [ddnet] you only need to send which switches are active for your current team, no need to know about others' switch states, as other teams shouldnt be predicted anyways (using /showothers) 22:09 <+bridge> [ddnet] and when you are spectating or in pause, no tees are predicted anyways 22:10 <+bridge> [ddnet] So the client also does not need to know any numswitchers, as it always receives every switch state (0-255) anyways 22:10 <+bridge> [ddnet] huh 22:10 <+bridge> [ddnet] and the layer doesnt need to be sent because it doesnt matter, gane and front layer switches are determined by switch number 0, which is always on when sent 22:11 <+bridge> [ddnet] (if m_Status[0] is not set to true, it has to be done, thats a server issue then because i think loops start at 1) 22:12 <+bridge> [ddnet] I worked a lot with this code in my mod, i think i know it good 22:12 <+bridge> [ddnet] switches should be refactored... after teams core refactor 22:13 <+bridge> [ddnet] Yes, they should, but current system also works fine. 22:13 <+bridge> [ddnet] And makes sense to me, after understanding ut 22:13 <+bridge> [ddnet] it* 22:13 <+bridge> [ddnet] its literally spaghetti code 22:14 <+bridge> [ddnet] yeah its understandable but bruh you should check every line that works with switches 22:15 <+bridge> [ddnet] about the first, entities are currently only added to layer_switch or layer_game (layer_front would currently have no special effect for entities anyway), but this is basically the same as what you say in the next message 22:16 <+bridge> [ddnet] I commented about this on the pr too btw 22:16 <+bridge> [ddnet] (entities as in actual objects in the gameworld, not the tiles) 22:18 <+bridge> [ddnet] stupid Q: can we get std::bad_alloc while adding all teleouts? 22:19 <+bridge> [ddnet] I will make a pr soon, fixing the switchstate server message and i will also look at the client 22:20 <+bridge> [ddnet] Dont release a new version with the just added switchstates, new messages should always be checked carefully and well thought, according to heinrich 22:20 <+bridge> [ddnet] We dont need more of compability code 22:20 <+bridge> [ddnet] Especially in such a case 22:21 <+bridge> [ddnet] Q: how many bytes does server send about one player with character? 22:21 <+bridge> [ddnet] to another player 22:26 <+bridge> [ddnet] just use vanilla as fallback 22:26 <+bridge> [ddnet] that may reduce the network traffic in some cases (when there are many switches). on maps with few switches it might increase it though, especially if switching to dummy or speccing often. (and you'd also want to send this while speccing to allow adding more features on top of it) 22:26 <+bridge> [ddnet] outdated ddnet = vanilla 22:26 <+bridge> [ddnet] simple as that xd 22:30 <+bridge> [ddnet] besides to only send it for the characters own team you dont need to change the pr, just add a couple of lines in the server to skip the message unless character_id == snapping_id 22:31 <+bridge> [ddnet] fits better to gamecontroller::snap 22:31 <+bridge> [ddnet] Hey guys. Ive just started uni and if i translate it to english it would be Computer Engineer. In reality its more of a mix between CE and CS. Since i love this game, i thought id ask if there could be any possibility of me maybe helping out a bit in the future when ive studied a bit more? dont need to be anything huge, but if the opportunity arises i would gladly help a bit. Would give me some RL experience as well 🙂 22:32 <+bridge> [ddnet] Yeah okay, sending numswitchers might actually be cool, but i dont think sending all teams is neccessary 22:32 <+bridge> [ddnet] just read the code + issues 22:33 <+bridge> [ddnet] there is a lot of code:P 22:33 <+bridge> [ddnet] accounts 22:33 <+bridge> [ddnet] jk but someone wanted animated skins a while ago 22:33 <+bridge> [ddnet] skip everything unless src/game ahah 22:34 <+bridge> [ddnet] Ah, yeah that would be a good idea xD Just wanted to know if you guys would be okay with someone helping out a bit. 22:34 <+bridge> [ddnet] especially src/game/server 22:34 <+bridge> [ddnet] maybe ask Learath or TsFreddie if there's any small stuff they want to fix but don't have time for 22:35 <+bridge> [ddnet] as heinrich said to you 22:35 <+bridge> [ddnet] "good first issue" 22:35 <+bridge> [ddnet] i forgot it zd 22:35 <+bridge> [ddnet] Thanks, i will do that as soon as i feel i have a bit more knowledge... Still too newb at the moment to be of any help 😛 22:36 <+bridge> [ddnet] just try to do some shit with ddnet code to introduce another features you want to see in a game 22:36 <+bridge> [ddnet] good train, rly xd 22:37 <+bridge> [ddnet] I will give it a go 😄 22:38 <+bridge> [ddnet] true, starting is the hardest 😄 22:39 <+bridge> [ddnet] ptsd 22:39 <+bridge> [ddnet] i think #4104 also fixed picking too huge resolutions 22:39 <+bridge> [ddnet] i looked in the SDL code and it always checks the resolution requested first 22:39 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/4104 22:39 <+bridge> [ddnet] i dont know cpp dont talk to me 22:39 <+bridge> [ddnet] bcs u don't "just" start 😄 22:40 <+bridge> [ddnet] xd 22:40 <+bridge> [ddnet] c/c++ da best 22:40 <+bridge> [ddnet] you can do anything you want 22:40 <+bridge> [ddnet] i will in 5 years 22:40 <+bridge> [ddnet] irl has been too fucked up 22:40 <+bridge> [ddnet] yeah you can even hack yourself ez 22:40 <+bridge> [ddnet] asshack ez 22:41 <+bridge> [ddnet] or hackass 22:41 <+bridge> [ddnet] nvm 22:47 <+bridge> [ddnet] @Pak dont wait for uni to learn programming 22:47 <+bridge> [ddnet] ofc any contribution is welcome 22:47 <+bridge> [ddnet] ah i misread u already started 22:49 <+bridge> [ddnet] would be funny if he already had an pr up 22:55 <+bridge> [ddnet] Yeah, started today 🙂 I have some basic knowledge in Java from before, but nothing fancy 23:02 <+bridge> [ddnet] ddnet and being able to read discord 23:02 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879470573997133914/unknown.png 23:02 <+bridge> [ddnet] single monitor real life hacks 23:02 <+bridge> [ddnet] kekw 23:03 <+bridge> [ddnet] ontopreplica? 23:04 <+bridge> [ddnet] no 23:04 <+bridge> [ddnet] linux just allows it xD 23:04 <+bridge> [ddnet] to set the window half transparent 23:04 <+bridge> [ddnet] SDL_SetWindowOpacity 23:20 <+bridge> [ddnet] @nuborn @Ryozuki 23:33 <+bridge> [ddnet] also, i dont fully understand what https://github.com/ddnet/ddnet/pull/4108 is for 23:35 <+bridge> [ddnet] it's to associate entities with switches 23:36 <+bridge> [ddnet] And how does the client know where its connected to? 23:37 <+bridge> [ddnet] The id field within the netobj, the same way it's done with character netobjs 23:37 <+bridge> [ddnet] I have a pr ready for pickups and projectiles based on this, but it requires this netobj or something similar (also one for laser walls, but will test it a little first) 23:37 <+bridge> [ddnet] ah, yea 23:38 <+bridge> [ddnet] ty 23:50 <+bridge> [ddnet] hmm, 2 line diff waiting for 2 years ? :d 23:52 <+bridge> [ddnet] @fokkonaut sending per team seems ok to me. btw I'd replace the block with the "delete"/"new" stuff with just "continue" 23:53 <+bridge> [ddnet] no, thats inacceptable :D 23:53 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/879483448857882654/unknown.png 23:53 <+bridge> [ddnet] xd 23:53 <+bridge> [ddnet] I think it makes sense to do it like this 23:53 <+bridge> [ddnet] Really 23:53 <+bridge> [ddnet] otherwise 1. mod makers wonder why their stuff isnt working 23:54 <+bridge> [ddnet] and 2. it is just a good way, i think, because otherwise memory that is not allocated could be accessed 23:54 <+bridge> [ddnet] see how SSwitchers is built in collision.cpp 23:54 <+bridge> [ddnet] if it would be a 256 array, it would not be an issue anyways 23:54 <+bridge> [ddnet] But like this, i think this is a good way 23:56 <+bridge> [ddnet] xD 23:56 <+bridge> [ddnet] i think #4108 is actually okay like it is 23:56 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/4108