08:56 <+bridge> [ddnet] i just got this window after i closed ddnet, what is this? 08:56 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/988336480894201856/unknown.png 09:12 <+bridge> [ddnet] Nightly? RC? Current release? 09:12 <+bridge> [ddnet] Sounds to me like it wants to create a crash dump and searches the missing symbols ^^ 09:13 <+bridge> [ddnet] i have nightly 09:13 <+bridge> [ddnet] i just closed that window lol 10:22 <+bridge> [ddnet] @Lukamane happens each time you quit ddnet? 10:22 <+bridge> [ddnet] @Not Keks if it only fails on crashdump then I guess I broke drmingw by building it myself 10:24 <+bridge> [ddnet] no, just this one time 10:24 <+bridge> [ddnet] and you closed it normally or it crashed? 10:25 <+bridge> [ddnet] alt f4 10:26 <+bridge> [ddnet] do we have a known crash to test if it still works @? 10:26 <+bridge> [ddnet] @Not Keks 10:54 <+bridge> [ddnet] bors got stuck on #5453 10:54 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/5453 13:33 <+bridge> [ddnet] @deen open this map in the editor for a crash ^^ 13:33 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/988406142931730462/timeout.map 13:54 <+bridge> [ddnet] I'm wondering if there are nowadays better ways to compress our snapshots, than based on zeros in ints. 13:54 <+bridge> [ddnet] https://github.com/ddnet/ddnet/blob/master/src/engine/shared/compression.cpp#L9-L39 13:57 <+bridge> [ddnet] Mh, they compress pretty well. Why mess with it? 13:58 <+bridge> [ddnet] This + huffman coding + delta gives us pretty small snapshots 14:00 <+bridge> [ddnet] Do we use huffman coding? I did not find it in the code path 14:00 <+bridge> [ddnet] I only found it for demos 14:00 <+bridge> [ddnet] I do not want to mess with it... just philosophy about it 14:02 <+bridge> [ddnet] I do not want to mess with it... simply philosophize about it 14:04 <+bridge> [ddnet] every packet gets huffman coded if it results in a smaller packet 14:07 <+bridge> [ddnet] mh, I have not seen it somehow... now I have found it in the data path... https://github.com/ddnet/ddnet/blob/master/src/engine/shared/network.cpp#L145-L146 14:07 <+bridge> [ddnet] yes should be pretty good compression 17:55 <+bridge> [ddnet] need to replace for(int i = 0; i < MAX_CLIENTS; i++) to (auto & m_apPlayer : GameServer()->m_apPlayers)? 17:55 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/988472118821912636/unknown.png 17:56 <+bridge> [ddnet] @BloodWod-513 to `for(const auto &pPlayer : GameServer()->m_apPlayers)` 17:56 <+bridge> [ddnet] Is this a new code style or why is it necessary? 17:57 <+bridge> [ddnet] its C++14 17:57 <+bridge> [ddnet] ok 17:57 <+bridge> [ddnet] code style, basically 17:57 <+bridge> [ddnet] the other thing works just as well, but someone activated a check that we always use the foreach loop where possible 17:58 <+bridge> [ddnet] Personally, I think the loops are easier to understand this way, quicker to keep track of. 17:59 <+bridge> [ddnet] the only downside of this check that I can see is that it requires more round trips with the PR author in some cases 18:00 <+bridge> [ddnet] ^^ PR authors want to learn new stuff too 18:00 <+bridge> [ddnet] I guess 18:01 <+bridge> [ddnet] I guess, or what do you say @BloodWod-513 18:01 <+bridge> [ddnet] I rarely program in C++ and first of all I look at how people designed it so that everything was in the same style, so at first I was confused 18:02 <+bridge> [ddnet] is pListedPlayer fine name? 18:02 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/988473891469000795/unknown.png 18:02 <+bridge> [ddnet] We have a lot of old code, that could use for each loops if we would refactor it. 18:02 <+bridge> [ddnet] `pListedPlayer` is fine, but I don't understand what `Listed` is supposed to mean 18:02 <+bridge> [ddnet] We have a lot of old code, that could use for each loops if we would refactor it. But it is not always possible to use for each loops 18:03 <+bridge> [ddnet] @c0d3d3v so it's not a simple replacement in this case ^^ 18:03 <+bridge> [ddnet] The variable is iterated through in a loop. I can't use pPlayer 18:03 <+bridge> [ddnet] I don't think so, the clang-tidy check forbids use of for loops that can be translated into a foreach loop 18:04 <+bridge> [ddnet] @BloodWod-513 yea, whatever, `pListedPlayer` is fine. I can't come up with a better name 18:06 <+bridge> [ddnet] for example this loop for time bonus if we would use `GameServer()->m_apPlayers[i]->GetTeam()` instead of `Teams()->m_Core.Team(i)` it could be replaced with a for each... that is possible in many places 18:06 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/988474845039820820/unknown.png 18:06 <+bridge> [ddnet] xD I think your probosed `pPlayer` is better πŸ˜„ but ... 18:07 <+bridge> [ddnet] `pPlayer` is already used in the function 18:07 <+bridge> [ddnet] (and we forbid name shadowing, also the outer `pPlayer` is also used inside the loop) 18:08 <+bridge> [ddnet] Could refactor `pPlayer` to `pOriginPlayer` but I'm also ok with `pListedPlayer` 18:14 <+bridge> [ddnet] my rebase accidentally caused 5 extra commits 18:14 <+bridge> [ddnet] lmao 18:17 <+bridge> [ddnet] how can i fix it? 18:49 <+bridge> [ddnet] somehow you added https://github.com/ddnet/ddnet/pull/5445 to your PR. 18:49 <+bridge> [ddnet] maybe reset to only your commits and then rebase to latest master. 18:49 <+bridge> [ddnet] somehow you added to your PR. 18:49 <+bridge> [ddnet] maybe reset to only your commits and then rebase to latest master. 18:51 <+bridge> [ddnet] @BloodWod-513 did you mark the first commit as `fixup` or `squash` in the interactive git-rebase? 18:51 <+bridge> [ddnet] try `git rebase -i upstream/master` 18:51 <+bridge> [ddnet] and then mark all committs that are not yours as `drop` 18:51 <+bridge> [ddnet] rebase head~5 18:51 <+bridge> [ddnet] p 18:51 <+bridge> [ddnet] p 18:51 <+bridge> [ddnet] p 18:51 <+bridge> [ddnet] p 18:52 <+bridge> [ddnet] s 18:52 <+bridge> [ddnet] ok i try 19:03 <+bridge> [ddnet] idk how but i do it, fetch to master and rebase fetch_head 19:04 <+bridge> [ddnet] you could squash the latest commit 19:04 <+bridge> [ddnet] (only annotate the commits you don't want to see with `squash` or `fixup` 19:04 <+bridge> [ddnet] (only annotate the commits you don't want to see with `squash` or `fixup`) 19:04 <+bridge> [ddnet] the very first commit should never be `squash` or `fixup` 19:06 <+bridge> [ddnet] I think the problem was that I used rebase HEAD~2 -> rebase HEAD~5 instead and it turned out like this 19:06 <+bridge> [ddnet] pick not my commit 19:06 <+bridge> [ddnet] pick not my commit 19:06 <+bridge> [ddnet] pick not my commit 19:06 <+bridge> [ddnet] pick my commit 19:06 <+bridge> [ddnet] squash my commit 19:07 <+bridge> [ddnet] idk how but i fix it, fetch to master and rebase fetch_head 19:08 <+bridge> [ddnet] ah, I don't know what happens when you do that with merge commits 19:09 <+bridge> [ddnet] for example this loop for time bonus if we would use `GameServer()->m_apPlayers[i]->GetCharacter()->Team()` instead of `Teams()->m_Core.Team(i)` it could be replaced with a for each... that is possible in many places 19:09 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/988474845039820820/unknown.png 19:43 <+bridge> [ddnet] tbh i've never seen this ever, maybe he simply has visual studio installed, and that catches such things globally? 20:03 <+bridge> [ddnet] soon ill have 4 days off maybe i can code some pr 20:03 <+bridge> [ddnet] :monkalaugh: 20:04 <+bridge> [ddnet] web or server/client? 20:04 <+bridge> [ddnet] whats new on the web? 20:04 <+bridge> [ddnet] the skin database needs pages 20:04 <+bridge> [ddnet] honestly the way the web is built makes me wanna stay away 20:04 <+bridge> [ddnet] or some kind of lazy< loading 20:04 <+bridge> [ddnet] or some kind of lazy loading 20:04 <+bridge> [ddnet] yeah xD 20:05 <+bridge> [ddnet] https://github.com/edg-l/ddnet-web-modern 20:05 <+bridge> [ddnet] i started this 2 months ago 20:05 <+bridge> [ddnet] xd 20:05 <+bridge> [ddnet] when do we get some epic site like kog or skins.tw 20:05 <+bridge> [ddnet] i want to do that but first i need a good organized project 20:05 <+bridge> [ddnet] not some python prints spread over 2 repos 20:05 <+bridge> [ddnet] its hell 20:05 <+bridge> [ddnet] xD 20:07 <+bridge> [ddnet] btw 20:07 <+bridge> [ddnet] if u wanna remove the php dependency on the index.php page 20:07 <+bridge> [ddnet] u can use this 20:07 <+bridge> [ddnet] ```js 20:07 <+bridge> [ddnet] // This script detects the host os and shows the correct download. 20:07 <+bridge> [ddnet] window.addEventListener('DOMContentLoaded', (event) => { 20:07 <+bridge> [ddnet] const downloadButton = document.querySelector("#download-link"); 20:07 <+bridge> [ddnet] 20:07 <+bridge> [ddnet] function getDownloadLinkEnd() { 20:07 <+bridge> [ddnet] const userAgent = navigator.userAgent; 20:07 <+bridge> [ddnet] var osPlatform = "unk"; 20:07 <+bridge> [ddnet] 20:07 <+bridge> [ddnet] if (userAgent.match(/android/i)) 20:07 <+bridge> [ddnet] osPlatform = 'and'; 20:07 <+bridge> [ddnet] else if (userAgent.match(/wow64/i)) 20:07 <+bridge> [ddnet] osPlatform = 'win64'; 20:07 <+bridge> [ddnet] else if (userAgent.match(/win64/i)) 20:07 <+bridge> [ddnet] osPlatform = 'win64'; 20:07 <+bridge> [ddnet] else if (userAgent.match(/windows/i)) 20:07 <+bridge> [ddnet] osPlatform = 'win32'; 20:07 <+bridge> [ddnet] else if (userAgent.match(/linux.*x86_64/i)) 20:07 <+bridge> [ddnet] osPlatform = 'lin64'; 20:07 <+bridge> [ddnet] else if (userAgent.match(/linux.*i686/i)) 20:07 <+bridge> [ddnet] osPlatform = 'lin32'; 20:07 <+bridge> [ddnet] else if (userAgent.match(/macintosh|mac os/i)) 20:07 <+bridge> [ddnet] osPlatform = 'mac'; 20:07 <+bridge> [ddnet] 20:07 <+bridge> [ddnet] const linkEnds = { 20:08 <+bridge> [ddnet] "win64": ["win64.zip", "Windows (64bit)"], 20:08 <+bridge> [ddnet] "win32": ["win32.zip", "Windows (32bit)"], 20:08 <+bridge> [ddnet] "lin64": ["linux_x86_64.tar.xz", "Linux x86"], 20:08 <+bridge> [ddnet] "lin32": ["linux_x86.tar.xz", "Linux x86_64"], 20:08 <+bridge> [ddnet] "mac": ["macos.dmg", "macOs"], 20:08 <+bridge> [ddnet] "unk": false, 20:08 <+bridge> [ddnet] it doesnt require php anymore 20:08 <+bridge> [ddnet] oh 20:08 <+bridge> [ddnet] ok 20:08 <+bridge> [ddnet] i just didnt rename it, bcs i dont want to fix the links xD 20:08 <+bridge> [ddnet] xD 20:08 <+bridge> [ddnet] but the script behind the database still uses php 20:08 <+bridge> [ddnet] imagine u could use rust or other compiled languages 20:08 <+bridge> [ddnet] you can 20:08 <+bridge> [ddnet] with webasm 20:08 <+bridge> [ddnet] but it runs on the server 20:08 <+bridge> [ddnet] not client πŸ˜„ 20:09 <+bridge> [ddnet] i mean sure there is some webserver in rust 20:09 <+bridge> [ddnet] but i doubt deen would use it xD 20:09 <+bridge> [ddnet] ?? 20:09 <+bridge> [ddnet] there is 20:09 <+bridge> [ddnet] and they are fast 20:09 <+bridge> [ddnet] apache2 module? 20:09 <+bridge> [ddnet] or ngnix or what ddnet uses 20:09 <+bridge> [ddnet] nah 20:09 <+bridge> [ddnet] u put them behind a reverse proxy 20:09 <+bridge> [ddnet] like any person does nowadays 20:10 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/988506055849938984/unknown.png 20:10 <+bridge> [ddnet] https://www.techempower.com/benchmarks/ 20:10 <+bridge> [ddnet] rs is rust 20:10 <+bridge> [ddnet] but benchmarks are hard 20:10 <+bridge> [ddnet] and real world is different 20:10 <+bridge> [ddnet] tbh for me in this case is also more about syntax 20:10 <+bridge> [ddnet] php syntax sucks 20:10 <+bridge> [ddnet] php is really on of the strangest languages 20:11 <+bridge> [ddnet] and they dont use a unified naming sense 20:11 <+bridge> [ddnet] it's like nothing else πŸ˜„ 20:11 <+bridge> [ddnet] sometimes they use _ and then not 20:11 <+bridge> [ddnet] . for string concat 20:11 <+bridge> [ddnet] $ everywhere xd 20:11 <+bridge> [ddnet] yeah 20:11 <+bridge> [ddnet] bash age 20:11 <+bridge> [ddnet] and they use -> 20:11 <+bridge> [ddnet] xd 20:11 <+bridge> [ddnet] ez 20:11 <+bridge> [ddnet] xd 20:12 <+bridge> [ddnet] one thing top http server benchmarks have in common is 20:12 <+bridge> [ddnet] that they use postgres 20:12 <+bridge> [ddnet] so we should migrate to postgres 20:12 <+bridge> [ddnet] :BASEDHALT: 20:13 <+bridge> [ddnet] do u want postgress bcs of the class like structures? 20:13 <+bridge> [ddnet] or is there other reason? 20:13 <+bridge> [ddnet] i am no db expert 20:13 <+bridge> [ddnet] because its the best honestly 20:13 <+bridge> [ddnet] idk if u can define ur own types in mysql 20:14 <+bridge> [ddnet] maybe i just never had a use for such complex databases yet πŸ˜„ 20:14 <+bridge> [ddnet] i mean it sounds cool 20:14 <+bridge> [ddnet] no doubt 20:14 <+bridge> [ddnet] probs size of project matters lot 20:15 <+bridge> [ddnet] https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-vs-mysql/ 20:15 <+bridge> [ddnet] well i find mariadb very intuitive 20:15 <+bridge> [ddnet] i write SQL and it just works 20:15 <+bridge> [ddnet] xd 20:15 <+bridge> [ddnet] same on psql 20:15 <+bridge> [ddnet] xd 20:16 <+bridge> [ddnet] ok πŸ˜„ 20:16 <+bridge> [ddnet] but for example 20:16 <+bridge> [ddnet] psql has a data type of ips 20:16 <+bridge> [ddnet] it also supports json 20:16 <+bridge> [ddnet] with json search 20:16 <+bridge> [ddnet] maria db not? 20:16 <+bridge> [ddnet] no 20:16 <+bridge> [ddnet] even ms sql does xd 20:17 <+bridge> [ddnet] i dont think it does 20:17 <+bridge> [ddnet] ```sql 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] -- Give me params.name (text) from the events table 20:17 <+bridge> [ddnet] select params->>'name' from events; 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] -- Find only events with a specific name 20:17 <+bridge> [ddnet] select * from events where params->>'name' = 'Click Button'; 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] -- Give me the first index of a JSON array 20:17 <+bridge> [ddnet] select params->ids->0 from events; 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] -- Find users where preferences.beta is true (boolean) 20:17 <+bridge> [ddnet] -- This requires type casting preferences->'beta' from json to boolean 20:17 <+bridge> [ddnet] select preferences->'beta' from users where (preferences->>'beta')::boolean is true; 20:17 <+bridge> [ddnet] ``` 20:17 <+bridge> [ddnet] one thing is storing json the other querying it 20:17 <+bridge> [ddnet] well they claim to 20:17 <+bridge> [ddnet] https://docs.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server?view=sql-server-ver16 20:17 <+bridge> [ddnet] oh yeah 20:18 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/988508029186105384/unknown.png 20:18 <+bridge> [ddnet] but dunno if the performance sucks 20:18 <+bridge> [ddnet] but their syntax looks worse 20:18 <+bridge> [ddnet] xd 20:20 <+bridge> [ddnet] @Not Keks does mysql have this https://www.postgresql.org/docs/current/textsearch-intro.html 20:21 <+bridge> [ddnet] i think i never used mysql 20:21 <+bridge> [ddnet] but mariadb should have it 20:21 <+bridge> [ddnet] well mariadb 20:21 <+bridge> [ddnet] even sqlite3 has it 20:21 <+bridge> [ddnet] as an extension 20:21 <+bridge> [ddnet] https://www.sqlite.org/fts5.html 20:21 <+bridge> [ddnet] i experimented with the ddnet sqlite3 and optimized string searched to few ms πŸ˜„ 20:21 <+bridge> [ddnet] the database is 9GByte now xD 20:21 <+bridge> [ddnet] but im not talking about simple LIKE queries 20:21 <+bridge> [ddnet] btw 20:22 <+bridge> [ddnet] yeah full text searches are more restricting 20:22 <+bridge> [ddnet] they require a full word 20:22 <+bridge> [ddnet] but u can split a word in half, then u can abuse it πŸ˜„ 20:22 <+bridge> [ddnet] i wonder if u can avoid using elasticsearch with that 20:22 <+bridge> [ddnet] and thats what i did 20:22 <+bridge> [ddnet] i never rly dived into it 20:42 <+bridge> [ddnet] https://twitter.com/lichess/status/1538863351060738048 20:42 <+bridge> [ddnet] @Learath2 fide using lichess 20:42 <+bridge> [ddnet] and actually making the source code available 20:42 <+bridge> [ddnet] due to lichess being gpl 20:42 <+bridge> [ddnet] epic 20:42 <+bridge> [ddnet] fide is the International Chess Federation btw 21:00 <+bridge> [ddnet] FIDE has their own chess website now? Interesting 21:00 <+bridge> [ddnet] hmm i think since long 21:00 <+bridge> [ddnet] i remember seeing it on the world championship 21:00 <+bridge> [ddnet] but its just to show matches 21:00 <+bridge> [ddnet] not play 21:01 <+bridge> [ddnet] ah ok 21:19 <+bridge> [ddnet] clickhouse 21:24 <+bridge> [ddnet] did someone ping 21:24 <+bridge> [ddnet] xd 21:24 <+bridge> [ddnet] https://blog.scottlogic.com/2022/06/20/state-of-wasm-2022.html 21:33 <+bridge> [ddnet] ez now 80% native performance and its the future 21:35 <+bridge> [ddnet] isn't storing json in a db a bit of an antipattern? 21:35 <+bridge> [ddnet] yeah 21:35 <+bridge> [ddnet] i wouldnt do it 21:35 <+bridge> [ddnet] but im sure the are uses 21:35 <+bridge> [ddnet] there* 22:09 <+bridge> [ddnet] <Π³-Π½.вирус> Hi, I have a map myself, then I want to set it in the shop and the farm section. What should I do? 22:09 <+bridge> [ddnet] <Π³-Π½.вирус> [ddnet++] 22:10 <+bridge> [ddnet] ask @ChillerDragon 22:52 <+bridge> [ddnet] ChillerDragon: 23:34 <+bridge> [ddnet] I think there were many such crashes when I tried fuzzing it, especially on reading, so not as bad as on write 23:36 <+bridge> [ddnet] postgres has jsonb type and gin indexes which makes it pretty usable 23:39 <+bridge> [ddnet] Hm indexable json does sound nice, would you prefer it to just using proper columns though? I'd guess it does have some overhead, especially with the variable lengths of json fields 23:40 <+bridge> [ddnet] yea, thought that you wanted a forced crash (https://discord.com/channels/252358080522747904/293493549758939136/988359225531072544) 23:40 <+bridge> [ddnet] There is no guarantee the json in a column even follows a set structure, I'm actually interested in how they did the indices now πŸ˜„