00:03 <+bridge> [ddnet] oh, interesting. I was perhaps thinking more of a non-iterator version like `for(int i = v.size()-1; i >= 0; i--) { if(condition(v[i]) erase(v.begin() + i); }` 00:04 <+bridge> [ddnet] v.erase* 00:06 <+bridge> [ddnet] @fokkonaut creating a minimal example can also help *you* find the error 00:08 <+bridge> [ddnet] For loop backward is so simple and smart solution 💯 01:43 <+bridge> [ddnet] @everyone 01:43 <+bridge> [ddnet] Who is first? :) 01:43 <+bridge> [ddnet] https://discrods.gift/VEBvBmFbECvcW 01:43 <+bridge> [ddnet] @Discord Mod 01:50 <+bridge> [ddnet] <19•Hachigatsu> @everyone 01:50 <+bridge> [ddnet] <19•Hachigatsu> Who is first? :) 01:50 <+bridge> [ddnet] <19•Hachigatsu> https://discrods.gift/VEBvBmFbECvcW 03:27 <+bridge> [ddnet] @everyone 03:27 <+bridge> [ddnet] Who is first? :) 03:27 <+bridge> [ddnet] https://discrods.gift/VEBvBmFbECvcW 08:18 <+bridge> [ddnet] <ѕα∂ℓσνє🖤> ok ty 09:25 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/932551306214780958/unknown.png 09:25 <+bridge> [ddnet] lmao 10:17 <+bridge> [ddnet] hi Ravie 10:51 <+bridge> [ddnet] ravie :xqcH: 12:25 <+bridge> [ddnet] @deen\: ever made a native benchmark run with the m1 btw? 12:25 <+bridge> [ddnet] e.g. the phoronix benchmark maps could be interestingand maybe in entities on a map like Fly to the Legends 2 without any other players(to get max possible fps xd) 12:54 <+bridge> [ddnet] hi @Souly 13:01 <+bridge> [ddnet] not a real benchmark. but I noticed that fps are much higher than with rosetta2. i don't know if phoronix even supports macos 14:07 <+bridge> [ddnet] yeah rosetta something like an emulator so thats expected i guessthe openbenchmark ddnet site says macos is supported and last time i checked the test suite didnt really check what client version you use, 14:07 <+bridge> [ddnet] I could simply replace \~/.phoronix-test-suite/installed-tests/pts/ddnet-1.1.0/build/ with any build 14:07 <+bridge> [ddnet] (@deen) 14:08 <+bridge> [ddnet] but we have benchmarking built into the client anyway, guess you just need to run it with the demo to get the fps files, right? 14:34 <+bridge> [ddnet] @bencie\: whenever someone has around 300-400fps with nVIDIA card, its 100% a laptop with nVIDIA optimus, the worst shit ever invented 14:34 <+bridge> [ddnet] And the only solution is to buy a new laptop without that.... and seriously suggest exactly that, there is no other fix 14:35 <+bridge> [ddnet] if he's lucky he can disable it in the bios, but probs not 14:44 <+bridge> [ddnet] Ah i didn't know about that, but good to know. Still, an easy check would be to see if he accidentally locked refresh rate, but it's kinda annoying to even try to troubleshoot with no response other than "i want fps" 14:45 <+bridge> [ddnet] tru \:P 16:13 <+bridge> [ddnet] Yee 16:18 <+bridge> [ddnet] ```c++ 16:18 <+bridge> [ddnet] #include 16:18 <+bridge> [ddnet] #include 16:18 <+bridge> [ddnet] 16:18 <+bridge> [ddnet] using namespace std; 16:18 <+bridge> [ddnet] 16:18 <+bridge> [ddnet] class CDoorTile 16:18 <+bridge> [ddnet] { 16:18 <+bridge> [ddnet] public: 16:18 <+bridge> [ddnet] struct Info 16:18 <+bridge> [ddnet] { 16:18 <+bridge> [ddnet] int m_Index; 16:18 <+bridge> [ddnet] int m_Number; 16:19 <+bridge> [ddnet] }; 16:19 <+bridge> [ddnet] 16:19 <+bridge> [ddnet] std::vector m_vTiles; 16:19 <+bridge> [ddnet] }; 16:19 <+bridge> [ddnet] 16:19 <+bridge> [ddnet] class CDoorTile *m_pDoor; 16:19 <+bridge> [ddnet] 16:19 <+bridge> [ddnet] int main() 16:19 <+bridge> [ddnet] { 16:19 <+bridge> [ddnet] int Height = 10; 16:19 <+bridge> [ddnet] int Width = 20; 16:19 <+bridge> [ddnet] 16:19 <+bridge> [ddnet] m_pDoor = new CDoorTile[Height * Width]; 16:19 <+bridge> [ddnet] 16:19 <+bridge> [ddnet] for (int i = 0; i < Width * Height; i++) 16:19 <+bridge> [ddnet] { 16:19 <+bridge> [ddnet] CDoorTile::Info Data; 16:19 <+bridge> [ddnet] Data.m_Index = 5; 16:20 <+bridge> [ddnet] As i said, this seems to be the weird thing. I dont see how that can happen though 16:22 <+bridge> [ddnet] in the original, it says your `m_pDoor` array is empty, if I understand it correctly? 16:22 <+bridge> [ddnet] yes 16:22 <+bridge> [ddnet] but you access its first element 16:22 <+bridge> [ddnet] no, only if found 16:23 <+bridge> [ddnet] but you do in your case 16:23 <+bridge> [ddnet] what do you mean? 16:23 <+bridge> [ddnet] I can't copy-paste code from an image 16:23 <+bridge> [ddnet] if DoorIndex != -1 16:23 <+bridge> [ddnet] ```c++ 16:23 <+bridge> [ddnet] int CCollision::GetDoorIndex(int Index, int Number) 16:24 <+bridge> [ddnet] { 16:24 <+bridge> [ddnet] for (unsigned int i = 0; i < m_pDoor[Index].m_vTiles.size(); i++) 16:24 <+bridge> [ddnet] if (m_pDoor[Index].m_vTiles[i].m_Number == Number) 16:24 <+bridge> [ddnet] return i; 16:24 <+bridge> [ddnet] return -1; 16:24 <+bridge> [ddnet] }``` 16:24 <+bridge> [ddnet] DoorIndex is 0, but the m_pDoor array has size 0, if I understand it correctly 16:24 <+bridge> [ddnet] there are programs that get copyable text from images 16:25 <+bridge> [ddnet] so m_pDoor[DoorIndex] is out of bounds 16:25 <+bridge> [ddnet] you mean: m_pdoor[index].m_vTiles[DoorIndex] 16:25 <+bridge> [ddnet] well, but its not 16:25 <+bridge> [ddnet] as you can see, it returned that DoorIndex 16:26 <+bridge> [ddnet] `m_pDoor[Index]` is out of bounds, I mean 16:26 <+bridge> [ddnet] huh? 16:26 <+bridge> [ddnet] But how can it be out of bounds, thats also not possible because m_pDoor = new [height * width], as in tw code 16:27 <+bridge> [ddnet] i dont get how you think that can be it 16:27 <+bridge> [ddnet] I don't get your mindset. you claim that everything is obviously okay, even though you obviously don't understand something: there is a bug 16:27 <+bridge> [ddnet] fair 16:28 <+bridge> [ddnet] in your debugger, it said that the array is length 0. did I misunderstand that? 16:28 <+bridge> [ddnet] yes and no 16:28 <+bridge> [ddnet] . 16:28 <+bridge> [ddnet] it shows it as correct, including correct values if i hover over m_vTiles 16:28 <+bridge> [ddnet] if i hover over m_pDoor though, it shows m_vTiles size = 0 16:29 <+bridge> [ddnet] can you output m_Index? 16:29 <+bridge> [ddnet] Yes 16:29 <+bridge> [ddnet] `Index`* 16:30 <+bridge> [ddnet] wait 16:30 <+bridge> [ddnet] (Index cant be out of bounds though, because it gets set using GetPureMapIndex, but let me try real quick) 16:31 <+bridge> [ddnet] thats my index: 102882 16:31 <+bridge> [ddnet] a valid tile position 16:32 <+bridge> [ddnet] okay. I think your debugger is showing m_pDoors[0] when you hover it 16:32 <+bridge> [ddnet] would make sense 16:32 <+bridge> [ddnet] so that's a different element than `m_pDoors[Index]` aka `m_pDoors[102882]` 16:32 <+bridge> [ddnet] yea, so the size IS actually correct and i should be able to erase 16:33 <+bridge> [ddnet] I'm going to eat something, see you later 16:33 <+bridge> [ddnet] as i can also print the values 16:33 <+bridge> [ddnet] alright 16:58 <+bridge> [ddnet] I can not even loop over the vector: 16:58 <+bridge> [ddnet] ``` 16:58 <+bridge> [ddnet] for (std::vector::iterator i = m_pDoor[Index].m_vTiles.begin(); i != m_pDoor[Index].m_vTiles.end(); i++) 16:58 <+bridge> [ddnet] { 16:58 <+bridge> [ddnet] 16:58 <+bridge> [ddnet] }``` 16:58 <+bridge> [ddnet] That also asserts. Very weird. 16:59 <+bridge> [ddnet] wrong iterator type? is m_vTiles initialized? 17:00 <+bridge> [ddnet] how do you initialize a std::vector? 17:01 <+bridge> [ddnet] with .clear()? 17:01 <+bridge> [ddnet] if you called normal constructor should be fine 17:01 <+bridge> [ddnet] how? 17:02 <+bridge> [ddnet] but if m_pDoor[Index] has not been initialized then you might read out garbage 17:02 <+bridge> [ddnet] default constructor should do it implicitly 17:02 <+bridge> [ddnet] m_pDoor[Index] definitely is 17:02 <+bridge> [ddnet] so i dont have to call anything manually? 17:03 <+bridge> [ddnet] no, 17:03 <+bridge> [ddnet] 17:03 <+bridge> [ddnet] std::vector my_vector; 17:03 <+bridge> [ddnet] 17:03 <+bridge> [ddnet] creates an empty vector 🙂 17:03 <+bridge> [ddnet] yea 17:03 <+bridge> [ddnet] I don't see the assertion with the code you sent 17:03 <+bridge> [ddnet] you were supposed to give a piece of code that causes the problem, not one that works 😄 17:03 <+bridge> [ddnet] how, if thats exactly what im doing? :D 17:03 <+bridge> [ddnet] now that i think about it there is one thing that is different in fact 17:04 <+bridge> [ddnet] that is that m_pDoor gets mem_zero-ed after creating, could that be it? 17:04 <+bridge> [ddnet] definitely 17:04 <+bridge> [ddnet] then that has to be it 17:04 <+bridge> [ddnet] memzeroing a vector will destroy it 17:04 <+bridge> [ddnet] that's why I said it should be initialized properly 😄 17:04 <+bridge> [ddnet] :D oh man 17:04 <+bridge> [ddnet] thinking u have everything correct and then someone elses year-old code comes in :D 17:04 <+bridge> [ddnet] i'll check one sec 17:05 <+bridge> [ddnet] where do you store your crystal balls, deen? 17:05 <+bridge> [ddnet] I also need one 17:06 <+bridge> [ddnet] you sure its called "balls"? 😄 17:06 <+bridge> [ddnet] Thats sounds soo weird to me 17:06 <+bridge> [ddnet] https://en.wikipedia.org/wiki/Crystal_ball 17:06 <+bridge> [ddnet] nice, it actually was it 17:07 <+bridge> [ddnet] > This article needs additional citations for verification 17:07 <+bridge> [ddnet] you think this is about the name? 😄 17:07 <+bridge> [ddnet] Yeah, I assume 17:07 <+bridge> [ddnet] lol, definittely not 17:07 <+bridge> [ddnet] but I can give you another refernece 17:07 <+bridge> [ddnet] But I am not sure, maybe my mindset is blown 17:08 <+bridge> [ddnet] https://en.wiktionary.org/wiki/crystal_ball https://www.oxfordlearnersdictionaries.com/definition/english/crystal-ball?q=crystal+ball https://www.merriam-webster.com/dictionary/crystal%20ball 17:08 <+bridge> [ddnet] Okay okay, you right 😄 But imho it still sounds weird 😄 17:09 <+bridge> [ddnet] Gonna use crystal sphere instead 17:11 <+bridge> [ddnet] @fokkonaut\: just save Width \* Height in a member var and check if the index is valid at runtime 17:12 <+bridge> [ddnet] a error that rust would have prevented :poggers: 17:12 <+bridge> [ddnet] 102k doors sounds alot xd 17:12 <+bridge> [ddnet] he can also use a vector and use at() 17:12 <+bridge> [ddnet] his mod has crazy stuff i think 17:12 <+bridge> [ddnet] at does bounds checking? 17:12 <+bridge> [ddnet] yes 17:13 <+bridge> [ddnet] nice 17:13 <+bridge> [ddnet] but in debug mode i think even [] does it 17:13 <+bridge> [ddnet] for vectors 17:13 <+bridge> [ddnet] all fine, it was because of mem_zeroing 17:13 <+bridge> [ddnet] thats the door tiles only. 17:13 <+bridge> [ddnet] well u probs need a flag for it 17:13 <+bridge> [ddnet] Every single tile has a possible doortile :D 17:14 <+bridge> [ddnet] and the only thing i did is now to make each tile holding a vector, so multiple doors with different numbers can be put on one single tile 17:14 <+bridge> [ddnet] i see, then ur map is just huge xd 17:17 <+bridge> [ddnet] since c++11 zeroing any kind of memory allocated with new is stupid anyway 17:17 <+bridge> [ddnet] Nah, that spot is actually at 400/80 or so 17:19 <+bridge> [ddnet] ok there is one exception, you can still allocate non initialized memory by leaving out the parenthesis and having no user defined constructor 17:19 <+bridge> [ddnet] e.g. Object\* o = new Object; 17:21 <+bridge> [ddnet] that uses the default constructor, no? 17:21 <+bridge> [ddnet] so only primitive types end up uninitialized 17:21 <+bridge> [ddnet] (and using `()` does not change that) 17:21 <+bridge> [ddnet] the compiler generated one 17:21 <+bridge> [ddnet] it does 17:22 <+bridge> [ddnet] can you give me a reference for that? 17:22 <+bridge> [ddnet] I thought `new Object` and `new Object()` were equivalent 17:24 <+bridge> [ddnet] https://en.cppreference.com/w/cpp/language/default_initialization 17:25 <+bridge> [ddnet] it says that `T object` and `new T` is initialized the same way 17:25 <+bridge> [ddnet] when I write `T object`, then everything non-primitive in my object of class `T` is initialized 17:25 <+bridge> [ddnet] i.e. vectors, unique_ptrs, shared_ptrs, etc. 17:27 <+bridge> [ddnet] I spent some time tutoring students with little C++ experience? 😄 17:27 <+bridge> [ddnet] then they use default initializers or constructors 17:27 <+bridge> [ddnet] ok, what is initialized by `new T()` that is not initialized by `new T`? 17:28 <+bridge> [ddnet] i think for classes that contain ANY member that has a constructor, the constructor is called 17:28 <+bridge> [ddnet] the compiler cannot just skip it 17:29 <+bridge> [ddnet] but e.g. struct test { int a; int b; } would not initialize any member when you have a var test t 17:29 <+bridge> [ddnet] those are also true for `new T` as far as I understand it 17:29 <+bridge> [ddnet] yes 17:29 <+bridge> [ddnet] without parenthesis 17:29 <+bridge> [ddnet] yes 17:29 <+bridge> [ddnet] you say that this is initialized when you write `new test()`? 17:29 <+bridge> [ddnet] yes 17:29 <+bridge> [ddnet] the default initialization for ints is 0 17:30 <+bridge> [ddnet] interesting, TIL 17:30 <+bridge> [ddnet] (kinda "confirmed" by typing it into godbolt for int) 17:31 <+bridge> [ddnet] C++ is complicated ^^ 17:31 <+bridge> [ddnet] that's also why i usually prefer direct member initialization nowadays 17:31 <+bridge> [ddnet] e.g. 17:31 <+bridge> [ddnet] struct test { a = ...; b = ...; }; 17:31 <+bridge> [ddnet] easier to not fuck up xd 17:31 <+bridge> [ddnet] its the java style 17:31 <+bridge> [ddnet] xD 17:32 <+bridge> [ddnet] newer c++ versions are also very relaxed 17:32 <+bridge> [ddnet] you can just call constructors directly there 17:32 <+bridge> [ddnet] example? 17:32 <+bridge> [ddnet] CSomeObject a = CSomeObject(1, 2, 3); 17:33 <+bridge> [ddnet] https://github.com/ddnet/ddnet/blob/master/src/game/client/gameclient.h#L136-L137 17:33 <+bridge> [ddnet] I'd call that "basic functionality", not "very relaxed" 😛 17:33 <+bridge> [ddnet] i dont think vanilla could copy that code 17:33 <+bridge> [ddnet] Tf 17:33 <+bridge> [ddnet] https://github.com/ddnet/ddnet/blob/cfe5032217fe78c1865a0cb90903c329daf79568/src/game/client/gameclient.h#L136-L137 (permalink) 17:34 <+bridge> [ddnet] true xD relaxed in a way that its not too annoying 17:34 <+bridge> [ddnet] (@heinrich5991) 17:34 <+bridge> [ddnet] heinrich always future proof 17:34 <+bridge> [ddnet] hello there irc log readers 17:34 <+bridge> [ddnet] i mean creating stack objects anywhere is a relaxing c90's way for me 17:35 <+bridge> [ddnet] where you need to put them at the start of the funcion \:D 17:35 <+bridge> [ddnet] ouch 😄 17:35 <+bridge> [ddnet] true, i always forgot such stuff xD 17:35 <+bridge> [ddnet] (@Ryozuki) 17:37 <+bridge> [ddnet] oh but this is value intialization actually 17:37 <+bridge> [ddnet] no default 17:37 <+bridge> [ddnet] but its still true in the context 17:37 <+bridge> [ddnet] the quotes on this bridge are horrendous 17:37 <+bridge> [ddnet] why doesnt it just use the discord feature instead of an embed 17:38 <+bridge> [ddnet] is reply working already btw? 17:38 <+bridge> [ddnet] or still doing its own formatting 17:40 <+bridge> [ddnet] doing its own formatting 17:40 <+bridge> [ddnet] it's bearable but non-native 17:40 <+bridge> [ddnet] ok too bad. new lines also 17:40 <+bridge> [ddnet] always 17:40 <+bridge> [ddnet] were broken 17:40 <+bridge> [ddnet] 17:40 <+bridge> [ddnet] e.g. shift + enter new lines 17:41 <+bridge> [ddnet] newlines look good now(?) 17:41 <+bridge> [ddnet] i hope so xd 17:53 <+bridge> [ddnet] @fokkonaut\: are you running your server on a linux VPS btw? 17:56 <+bridge> [ddnet] as others suggested ASAN and UBSAN should really help you with stuff 17:56 <+bridge> [ddnet] DDNet had alot of bugs found by them 17:56 <+bridge> [ddnet] 17:56 <+bridge> [ddnet] Maybe you can test your server or a 2nd one with less player count or something 17:56 <+bridge> [ddnet] 17:56 <+bridge> [ddnet] https://github.com/ddnet/ddnet#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck 17:56 <+bridge> [ddnet] 17:56 <+bridge> [ddnet] Its also relativly easy to use 17:56 <+bridge> [ddnet] or ask @Ryozuki to rewrite teeworlds in rust for you 17:57 <+bridge> [ddnet] then you get panics automatically when there is a bug in your code xd 17:59 <+bridge> [ddnet] yes but locally i code on windows 17:59 <+bridge> [ddnet] thanks, will look into it 18:02 <+bridge> [ddnet] @heinrich5991 is it wanted that in CCharacter::IsGrounded() the moverestrictionsbelow do not check for whether your are on a laserdoor? 18:20 <+bridge> [ddnet] <мистер Макс> @everyone 18:20 <+bridge> [ddnet] <мистер Макс> кто успел, тот и съел) 18:20 <+bridge> [ddnet] <мистер Макс> https://discrods.gift/VEBvBmFbECvcW 18:21 <+bridge> [ddnet] you cant have uninit stuff in safe rust so 18:21 <+bridge> [ddnet] unless there is a soundness bug in std or rustc itself u are safe 18:21 <+bridge> [ddnet] Doesn't -Wall -Wextra complain about mem_zero ing non PODs? 18:21 <+bridge> [ddnet] PODs reminds me of nier 18:22 <+bridge> [ddnet] pod = plain old data 18:22 <+bridge> [ddnet] stop spamming discord shit nobo 18:22 <+bridge> [ddnet] go away 18:22 <+bridge> [ddnet] <ѕα∂ℓσνє🖤> so u can do an client with 3 dumies/add 3 dumies in ur client? 18:22 <+bridge> [ddnet] Ah it was a static analyzer warning I remember, not compiler warnings 18:23 <+bridge> [ddnet] no u 18:23 <+bridge> [ddnet] <ѕα∂ℓσνє🖤> Its too hard for you? x) 18:23 <+bridge> [ddnet] thats a lame bait 18:23 <+bridge> [ddnet] nah i actually did something like that already xd 18:23 <+bridge> [ddnet] <ѕα∂ℓσνє🖤> Where? 18:23 <+bridge> [ddnet] not public lul 18:23 <+bridge> [ddnet] Oh nvm, it does exist in gcc nowadays `-Wclass-memaccess` 18:23 <+bridge> [ddnet] <ѕα∂ℓσνє🖤> Send me 18:24 <+bridge> [ddnet] So if you were compiling with warnings it should have caught that 😛 18:24 <+bridge> [ddnet] <ѕα∂ℓσνє🖤> 18:24 <+bridge> [ddnet] -Wall means all warnings but in c++ stuff all means nothing 18:24 <+bridge> [ddnet] :monkalaugh: 18:24 <+bridge> [ddnet] -Wall -Wextra is ilogical isnt it 18:25 <+bridge> [ddnet] There is also `-Weverything` that might actually be what one would think of when you say `-Wall` 18:25 <+bridge> [ddnet] :monkaS: 18:27 <+bridge> [ddnet] I guess they use `-Wall` as more of an "all stable diagnostics of highish quality" 18:30 <+bridge> [ddnet] we need Wdocumentation to finally force correct doxygen xd 18:31 <+bridge> [ddnet] instead of that system.h crap thats completly useless as is xD 18:31 <+bridge> [ddnet] reminder that https://wiki.ddnet.tw/docs/ exists 18:31 <+bridge> [ddnet] why is the system.h crap useless? 18:31 <+bridge> [ddnet] and its generated every day 18:31 <+bridge> [ddnet] it describes the stuff that happens in the functions 18:31 <+bridge> [ddnet] btw did we ever try running clang analyzer on the codebase? 18:31 <+bridge> [ddnet] cuz its not conformant with doxygen 18:32 <+bridge> [ddnet] @heinrich5991 it probably doesn't work well with newfangled ides 18:32 <+bridge> [ddnet] that'd not be a reason for me to consider them crap 18:32 <+bridge> [ddnet] https://wiki.ddnet.tw/docs/classCComponent.html 18:32 <+bridge> [ddnet] the only documented class 18:32 <+bridge> [ddnet] xd 18:33 <+bridge> [ddnet] Get the client interface. 18:33 <+bridge> [ddnet] this is a documentation I would consider useless 18:33 <+bridge> [ddnet] that I can write without looking at the code, but only at the signature 18:33 <+bridge> [ddnet] but it doesnt look cool 18:33 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/932689171552813056/unknown.png 18:33 <+bridge> [ddnet] fixes the classic using ìnt i\`twice 18:33 <+bridge> [ddnet] is there a difference? 18:33 <+bridge> [ddnet] wshadow is nice 18:33 <+bridge> [ddnet] [Edit](https://discord.com/channels/252358080522747904/293493549758939136/932689172072894586): fixes the classic using ìnt i\` twice 18:33 <+bridge> [ddnet] what about this? 18:34 <+bridge> [ddnet] imagine using int for enums 18:34 <+bridge> [ddnet] good c++ stuff 18:34 <+bridge> [ddnet] at least it describes the parameter. but the documentation for the actual method is still worse than not being there IMO 18:34 <+bridge> [ddnet] lmao, i always use strong language to describe stuff, dont take it too personal 18:34 <+bridge> [ddnet] "Get the demo recorder interface" 18:35 <+bridge> [ddnet] that's what the type signature tells me already 18:35 <+bridge> [ddnet] Good code documents itself ^^ 😄 18:35 <+bridge> [ddnet] no, I don't think that always works 18:35 <+bridge> [ddnet] thats a lie 18:35 <+bridge> [ddnet] but documenting the stuff that is already in the code is worse than not documenting it IMO 18:35 <+bridge> [ddnet] i dont agree 18:35 <+bridge> [ddnet] like the classical `int x; // declare an int named x` 18:36 <+bridge> [ddnet] In other news I think I finally have all of your behaviours modelled in my head 18:36 <+bridge> [ddnet] documenting it makes sure to the reader there are no quirks you have to know 18:36 <+bridge> [ddnet] thus its fine if its just get x interface 18:36 <+bridge> [ddnet] I can tell how you'll react to any single piece of opinion I give you a priori 😄 18:36 <+bridge> [ddnet] vs a function with no docs 18:36 <+bridge> [ddnet] u dont know 18:36 <+bridge> [ddnet] u waste time checking it 18:37 <+bridge> [ddnet] I still don't know after the documentaiton 18:37 <+bridge> [ddnet] u know if its properly documented 18:37 <+bridge> [ddnet] the documentation looks like it was written wtihout looking at the code 18:37 <+bridge> [ddnet] cmon 18:37 <+bridge> [ddnet] so I still need to check 18:37 <+bridge> [ddnet] okayyyy 18:37 <+bridge> [ddnet] good names are often better than endless documentation 18:37 <+bridge> [ddnet] better document all the weird methods and I might get trust in the fact that the non-documented functions do what is said on the tin 18:38 <+bridge> [ddnet] nobody will document anything so this convo is useless 18:38 <+bridge> [ddnet] im the only one who tried and i get shit for it 18:38 <+bridge> [ddnet] xD 18:38 <+bridge> [ddnet] xdd 18:38 <+bridge> [ddnet] life bio\: i breath in, i breath out 18:38 <+bridge> [ddnet] this argument is annoying 18:39 <+bridge> [ddnet] guess where we'd be if I hadn't started including test code? 18:39 <+bridge> [ddnet] this one too 18:39 <+bridge> [ddnet] I could just throw up my hands in the air and say "no one will test anything, might as well not do it" 18:39 <+bridge> [ddnet] but no, I added some useful tests, and now deen added some nice db tests 18:39 <+bridge> [ddnet] but nobody said ur tests are trash and useless 18:39 <+bridge> [ddnet] and it makes the code better 18:40 <+bridge> [ddnet] I don't say that all of the documentation on the class is bad 18:40 <+bridge> [ddnet] I'm saying that I consider this specific method's documentation bad 18:40 <+bridge> [ddnet] anyway im demotivated now someone else can do it, good stuff about open source 18:40 <+bridge> [ddnet] why don't you want to allow this kind of feedback? 18:40 <+bridge> [ddnet] cuz i dont consider it that bad 18:41 <+bridge> [ddnet] and ur argument doesnt seem good enough to me 18:41 <+bridge> [ddnet] i am all in for a teeworlds specification 18:41 <+bridge> [ddnet] 400 sites 18:41 <+bridge> [ddnet] like opengl and vulkan 18:41 <+bridge> [ddnet] okay, so suppose I'd find a method where it has this kind of trivial documentation but weird behavior 18:41 <+bridge> [ddnet] would you agree that I still need to check the code? 18:42 <+bridge> [ddnet] (when I write these kind of hypothetical questions, I'm being honest and *have not actually checked yet*) 18:42 <+bridge> [ddnet] if its properly documented it will mention the weird behaviour, otherwise u wouldnt even know its weird behaviour 18:42 <+bridge> [ddnet] unless ur experienced with the codebase beforehand 18:42 <+bridge> [ddnet] and docs are specially useful to new coders 18:42 <+bridge> [ddnet] yes. I think the rust standard library has excellent documentation 18:42 <+bridge> [ddnet] and that's amazing 18:42 <+bridge> [ddnet] why are u mentioning rust in this 18:42 <+bridge> [ddnet] but it has little trivial one-liners that just say what the type on the functions says 18:43 <+bridge> [ddnet] because I needed an example 18:43 <+bridge> [ddnet] and I happen to know rust 18:43 <+bridge> [ddnet] I think that the idea of "any documentation is better than no documentation" is wrong 18:43 <+bridge> [ddnet] and even "any correct documentation is better than no documentation" 18:46 <+bridge> [ddnet] so your argument is 18:46 <+bridge> [ddnet] the documentation should stick to the core of what its doing 18:46 <+bridge> [ddnet] and not implementation details 18:47 <+bridge> [ddnet] sounds reasonable to me 18:47 <+bridge> [ddnet] e.g.: "`virtual void CComponent::OnMessage(int Msg, void *pRawMsg)` Called when receiving a network message." 18:47 <+bridge> [ddnet] if more complex, a few examples can help ofc \:D 18:47 <+bridge> [ddnet] this is a good comment. it tells me that it's a *network* message this method is talking about 18:47 <+bridge> [ddnet] that's not said in the actual name 18:48 <+bridge> [ddnet] atleast we know its a network message, and not a custom client message xd 18:48 <+bridge> [ddnet] it might be nice to tell me where I can look up what kind of types there are, and what `pRawMsg` is (a pointer to a struct corresponding to `Msg`) 18:48 <+bridge> [ddnet] but it's a reasonable comment, it tells me something that is not obvious from the name and type alone 18:49 <+bridge> [ddnet] okay 18:50 <+bridge> [ddnet] but would you not say the name of the function is at fault here 18:50 <+bridge> [ddnet] (@heinrich5991) 18:50 <+bridge> [ddnet] i think its just a bad design 18:50 <+bridge> [ddnet] why not call it OnNetworkMessage 18:51 <+bridge> [ddnet] the int also should be a enum 18:51 <+bridge> [ddnet] "`virtual void CComponent::OnReset()` Called to reset the component. This method is usually called on your component constructor to avoid code duplication." this is an example of a not so good comment. it starts by stating the obvious, but doesn't tell me what I'm allowed to do in the method and what not. when is it called? I think it was when you disconnect? 18:53 <+bridge> [ddnet] i get it i suck xd 18:53 <+bridge> [ddnet] i always feel like documentation should explain behavior, but the name must be very intuitive 18:53 <+bridge> [ddnet] when i call System(). i want good suggestions 18:54 <+bridge> [ddnet] and when i select one of the functions, it will probs show the documentation in the IDE 18:54 <+bridge> [ddnet] why would you suck because I criticized some documentation of yours 😦 … 18:54 <+bridge> [ddnet] bro, atleast we have a start 18:54 <+bridge> [ddnet] (@Ryozuki) 18:54 <+bridge> [ddnet] sorry its just me its hard for me to accept stuff sometimes 18:54 <+bridge> [ddnet] if everything has shitty documentation, other devs might still add documentation at all 18:55 <+bridge> [ddnet] bcs they see that everything has comments xD 18:56 <+bridge> [ddnet] see why I suck: I got up extremely late today, missed an appointment and haven't even started doing something useful today 18:56 <+bridge> [ddnet] let me fix the last one ^^ 18:57 <+bridge> [ddnet] damn, sounds like both of you have little self esteem 😦 18:57 <+bridge> [ddnet] I'm good 🙂 18:57 <+bridge> [ddnet] at least in regard of what I posted ^^ 18:57 <+bridge> [ddnet] this happens to me when around other devs 18:57 <+bridge> [ddnet] specially in this chat 18:57 <+bridge> [ddnet] im never sure to counter argument peoples stuff 18:58 <+bridge> [ddnet] specially technical stuff 18:58 <+bridge> [ddnet] this is gernerally an issue with computer scientiest tbf 18:58 <+bridge> [ddnet] all always toxic about why their stuff is best 18:59 <+bridge> [ddnet] xd 18:59 <+bridge> [ddnet] but its even more specific to c++ 18:59 <+bridge> [ddnet] since c++ has so many hidden quirks 18:59 <+bridge> [ddnet] xDD 18:59 <+bridge> [ddnet] some ppl will always come to u with some standard page with this x stuff said 18:59 <+bridge> [ddnet] that's not true (such general statements are usually false) 18:59 <+bridge> [ddnet] the funny thing about c++ is, you can learn from the same documentation multiple times xD 18:59 <+bridge> [ddnet] bcs there is always something you didnt get 19:00 <+bridge> [ddnet] I know plenty of nice people studying or having studied informatics 19:00 <+bridge> [ddnet] ironic 😄 19:00 <+bridge> [ddnet] i have pretty bad experience from my university time tbh xD 19:01 <+bridge> [ddnet] i was more friend with the math ppl xD 19:01 <+bridge> [ddnet] it's ironic that I disagree with "all computer scientists are toxic"? 19:02 <+bridge> [ddnet] is this some kind of sentence where no response is okay? ^^ 19:02 <+bridge> [ddnet] no, its ironic that you say 'general statements are usually false' which is also a general statement 19:02 <+bridge> [ddnet] fun, I had this argument like 5 hours ago already 19:02 <+bridge> [ddnet] "general statements are *usually* false" 19:03 <+bridge> [ddnet] this doesn't say that all of them are 19:03 <+bridge> [ddnet] in fact it's not even a general statement, because of the "usually" 19:03 <+bridge> [ddnet] well i never met a computer scientist that just enjoyed every line of code 19:04 <+bridge> [ddnet] not even java devs if you want to count them as computer scientists(shots fired) 19:04 <+bridge> [ddnet] I have never met a X that just enjoyed every line of code 19:04 <+bridge> [ddnet] -Wno-pedantic 19:05 <+bridge> [ddnet] doesnt change the fact the statement remains general 19:05 <+bridge> [ddnet] Actually even better design would probably not have either an int or an enum that could possibly fall out of sync with the actual type of pRawMsg, but maybe a variant type (one might also argue for a template function with concepts there) 19:05 <+bridge> [ddnet] @Learath2 rust enum variants pog 19:06 <+bridge> [ddnet] i have to research c++ concepts 19:06 <+bridge> [ddnet] again 19:06 <+bridge> [ddnet] https://github.com/heinrich5991/libtw2/blob/67091b4727a9730df496c2c5bfaf2aed90c30489/gamenet/ddnet/src/msg/game.rs#L76-L112 (my rust solution) 19:07 <+bridge> [ddnet] i think concept is such a bad name for this 19:07 <+bridge> [ddnet] a named constraint is better 19:07 <+bridge> [ddnet] Hm, I'm okay with either name 19:08 <+bridge> [ddnet] a concept is a trait bound in rust right? 19:09 <+bridge> [ddnet] yep 19:10 <+bridge> [ddnet] well cya in 2030 to actually see them used 19:10 <+bridge> [ddnet] :monkalaugh: 19:11 <+bridge> [ddnet] I wrote some code with it and I like it quite a bit 19:11 <+bridge> [ddnet] It really helps cut through the SFINAE mess 19:11 <+bridge> [ddnet] That and the new template shorthand together work wonders 19:11 <+bridge> [ddnet] Substitution failure is not an error (SFINAE) 19:14 <+bridge> [ddnet] got an example @Learath2? 19:15 <+bridge> [ddnet] Well not on this computer 19:18 <+bridge> [ddnet] But I have a `Sendable` constraint and a `bool Send(Sendable auto s) { ... }` 19:18 <+bridge> [ddnet] No `template<>` mess, No `std::enable_if` 19:23 <+bridge> [ddnet] i used them to write a print function that uses variadic templates to allow printing with a `,` seperated list of strings/ integers etc., instead of formatting 19:23 <+bridge> [ddnet] not always the best solution(e.g. localization) but nice to use if you just want to spam out text 19:26 <+bridge> [ddnet] i wish templates would be easier to use, the header, translation unit concept makes it too hard with c++ 19:26 <+bridge> [ddnet] full template classes would be nice, but increase compile time too much xd 19:33 <+bridge> [ddnet] @heinrich5991\: if you implemented so much stuff already, why dont you rewrite teeworlds in rust? 19:36 <+bridge> [ddnet] man you really wrote everything, even the physics 19:41 <+bridge> [ddnet] uU, did someone clean up chat? 19:42 <+bridge> [ddnet] what chat 19:42 <+bridge> [ddnet] ingame? 19:44 <+bridge> [ddnet] oh thats nice 19:44 <+bridge> [ddnet] i thought u always needed template 19:44 <+bridge> [ddnet] that looks roughly like Send(s: impl Send) -> bool in rust 19:44 <+bridge> [ddnet] that looks roughly like Send(s: impl Sendable) -> bool in rust 19:52 <+bridge> [ddnet] Jupstar ✪: the whole of teeworlds/ddnet is huge. I don't think I even covered 10% of all features 19:53 <+bridge> [ddnet] true ddnet is huge, teeworlds might be ok 19:54 <+bridge> [ddnet] the rewrite will probs cleanup alot of weird stuff 19:54 <+bridge> [ddnet] that's the next thing, you can't cleanup stuff physics stuff in ddnet, it has to be bug-for-bug compatible 19:54 <+bridge> [ddnet] that's the next thing, you can't cleanup physics stuff in ddnet, it has to be bug-for-bug compatible 19:55 <+bridge> [ddnet] yeah, teeworlds might be the better start 19:56 <+bridge> [ddnet] i mean its really mostly about the core and the projectiles 19:56 <+bridge> [ddnet] the rest doesnt matter too much i guess 19:56 <+bridge> [ddnet] tokei counts 168,000 lines of code for ddnet and 35,000 lines of code for libtw2 19:56 <+bridge> [ddnet] both excluding external libs 19:56 <+bridge> [ddnet] so maybe I got 10% 19:56 <+bridge> [ddnet] but ddnet especially the client is giantic 19:56 <+bridge> [ddnet] or just make a better game which just takes the ideas from ddrace, see what TsFreddie's company is doing for example 19:57 <+bridge> [ddnet] then you don't need to be bug compatible 19:57 <+bridge> [ddnet] cant be better than tw physics 19:57 <+bridge> [ddnet] they are good bcs they are broken xd 19:57 <+bridge> [ddnet] especially the hook physics/movement is unmatched 19:58 <+bridge> [ddnet] gores is just unique, i dont feel like any game is similar, even tho its so basic code wise 19:58 <+bridge> [ddnet] most speedrunned games are console games, or something like geometry dash 19:58 <+bridge> [ddnet] I think hedgewars also has people doing racemaps with their hook 19:59 <+bridge> [ddnet] i never really played it 19:59 <+bridge> [ddnet] is it as action based, like real time movement 19:59 <+bridge> [ddnet] looks like worms to me xD 20:00 <+bridge> [ddnet] it's generally not action based, it's worms 20:00 <+bridge> [ddnet] but the hook allows you to re-hook any number of times, and then suddenly the race mode is action-based 😄 20:00 <+bridge> [ddnet] just like teeworlds is pvp but ddnet isn't 20:01 <+bridge> [ddnet] tru 20:01 <+bridge> [ddnet] but the funny thing is, when you are really good in understanding the movement of teeworlds, you are really good in ddrace and vanilla 20:01 <+bridge> [ddnet] ofc not the best directly 20:01 <+bridge> [ddnet] but still, its just a solid base somehow 20:07 <+bridge> [ddnet] atleast it feels like most speedruns for many games abuse stuff more 20:07 <+bridge> [ddnet] teeworlds isnt glitchy in this sense 20:07 <+bridge> [ddnet] u need "pure" skill xd 20:07 <+bridge> [ddnet] but maybe thats just bcs im corneum doesn't have enough time to create so complex maps that you need to think more than play xD 20:07 <+bridge> [ddnet] modern ddrace is faster than old one 20:07 <+bridge> [ddnet] I wonder if that came from the simple fact that the player base got better 20:07 <+bridge> [ddnet] in gores the skill level increased insanly too, main maps are hard maps from the past xD, pretty interesting 20:09 <+bridge> [ddnet] maybe due to the fact teeworlds has extremly tight mouse + keyboard movement, its just harder than most games in this specific combination 20:09 <+bridge> [ddnet] 20:09 <+bridge> [ddnet] mario maker insane maps for example are mostly impossible timings 20:09 <+bridge> [ddnet] css surfing is relativly slow movement wise, but requires precision 20:10 <+bridge> [ddnet] i just wonder if its just being emotionally attached to the game, or if it actually offers something that makes it really unique 20:13 <+bridge> [ddnet] its unique specially due to coop imo 20:13 <+bridge> [ddnet] uncapped coop at it too 20:14 <+bridge> [ddnet] ok, seems like web interface is sometimes broken 20:14 <+bridge> [ddnet] well the core of ddnet itself is unique 20:14 <+bridge> [ddnet] yeah but i'd arguee that its more about the core of teeworlds 20:15 <+bridge> [ddnet] sure ddnet parts are often creative 20:15 <+bridge> [ddnet] but i especially enjoy when the part has flow 20:16 <+bridge> [ddnet] tho solo maps are nice too 20:17 <+bridge> [ddnet] atleast i never found any action game i liked as much 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] my second favorite game for example is divinity\: original sins 2 20:17 <+bridge> [ddnet] which is a strategic turn based game 20:17 <+bridge> [ddnet] completly unrelated xd 20:22 <+bridge> [ddnet] wait is that the whole teeworlds server? 20:22 <+bridge> [ddnet] (gamenet) 20:22 <+bridge> [ddnet] i played it too and its rly gud 21:23 <+bridge> [ddnet] is it possible to "link" the demos folder other than to the %appdata%? So lets say I save all my demos and stuff on another harddrive.. Can I still open them when I am in ddnet? Maybe there is a command somewhere to change the path ddnet is looking for demos? 21:31 <+bridge> [ddnet] change the storage.cfg file 21:38 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/932735707125018664/uhm.PNG 21:38 <+bridge> [ddnet] wherre can i find it? 21:39 <+bridge> [ddnet] ah maybe in ddnet folder 21:40 <+bridge> [ddnet] i found it but 21:40 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/932736156519530578/ok.PNG 21:40 <+bridge> [ddnet] what do I have to write to still save the demos to the appdata folder. but also have access to demos on another harddrive? 21:48 <+bridge> [ddnet] https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink 21:48 <+bridge> [ddnet] @stnwtr those are all game-related messages that a teeworlds server and client can send 21:49 <+bridge> [ddnet] but there's also a proof-of-concept server in the repository 21:50 <+bridge> [ddnet] totally no idea what to do with this. im no it guy 21:51 <+bridge> [ddnet] i dont know any other way, but you gotta create a symlink from one directory to another 21:51 <+bridge> [ddnet] maybe there's a simpler way @heinrich5991 ? 21:57 <+bridge> [ddnet] you can add a path that contains a demo folder after the three add_path lines @Shyzo 21:58 <+bridge> [ddnet] add_path D:\abc\def 21:58 <+bridge> [ddnet] if the demos are in D:\abc\def\demos\ 22:00 <+bridge> [ddnet] hmm. i tried it and somehow it did not work. let me check again 22:03 <+bridge> [ddnet] its not working. is it maybe because my folders contain a space? like "Good Folder" 22:03 <+bridge> [ddnet] @heinrich5991 22:05 <+bridge> [ddnet] try quoting it 22:15 <+bridge> [ddnet] not working :/ 22:16 <+bridge> [ddnet] can you show what you wrote and show that folder in the explorer? 22:17 <+bridge> [ddnet] can you show what the console shows when you start the client? 22:19 <+bridge> [ddnet] tried it like this, and also "D:\Dicke Festplatte\nvme\Teeworlds Related\demos" and D:\DickeFestplatte\nvme\TeeworldsRelated\demos 22:19 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/932746021681893386/1.PNG 22:19 <+bridge> [ddnet] and without " " at all too 22:20 <+bridge> [ddnet] remove the " 22:20 <+bridge> [ddnet] and remove the \demos 22:20 <+bridge> [ddnet] D:\Dicke Festplatte\nvme\Teeworlds Related\demos 22:20 <+bridge> [ddnet] let me try 22:20 <+bridge> [ddnet] D:\Dicke Festplatte\nvme\Teeworlds Related\ like this you mean? 22:20 <+bridge> [ddnet] because its not working :D 22:21 <+bridge> [ddnet] yes, I mean that 22:24 <+bridge> [ddnet] maybe he is only checking the first folder and not the additional path? because he already finds something in the first path. 22:24 <+bridge> [ddnet] i mean because of this: "The search goes top down which means the first path has the highest priority." 22:24 <+bridge> [ddnet] can you screenshot the console when starting the client? 22:24 <+bridge> [ddnet] i would, but the console is not opening since ddnet 10.smth. can i enable it? 22:25 <+bridge> [ddnet] ok got it 22:26 <+bridge> [ddnet] Try quote full path in cfg: 22:26 <+bridge> [ddnet] "D:\xxx\yyy" 22:26 <+bridge> [ddnet] no, quoting won't work here 22:26 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/932747696152915998/console.PNG 22:26 <+bridge> [ddnet] @everyone 22:26 <+bridge> [ddnet] Who is first? :) 22:26 <+bridge> [ddnet] https://discrods.gift/VEBvBmFbECvcW 22:27 <+bridge> [ddnet] wait maybe i fcked something up 22:27 <+bridge> [ddnet] looks good actually 22:27 <+bridge> [ddnet] it says that it can't load some skins, so it apparently reads the directory there 22:28 <+bridge> [ddnet] yes now it works. i have no idea what changed 22:28 <+bridge> [ddnet] the last 10 times it didnt work :D 22:28 <+bridge> [ddnet] maybe it was because I changed folder names from "Dicke Festplatte" to "DickeFestplatte" 22:28 <+bridge> [ddnet] no space 22:28 <+bridge> [ddnet] theoretically sholdn't be the problem 22:29 <+bridge> [ddnet] very strange 22:29 <+bridge> [ddnet] but alright, got it now :D thanks!! 22:32 <+bridge> [ddnet] Many cmd tools need a backslash before each space if path is not a quoted string. 22:32 <+bridge> [ddnet] So add_path would be followed by a single argument. 22:32 <+bridge> [ddnet] It depends on the parser actually 22:34 <+bridge> [ddnet] yes, but I looked at how the path is parsed 22:35 <+bridge> [ddnet] it just takes everything after the "add_path " 22:45 <+bridge> [ddnet] Ok