00:02 <+bridge> [ddnet] Where is the donate button on ddnet website? 00:55 <+bridge> [ddnet] donations have covered the full year: https://ddnet.tw/funding/ 00:55 <+bridge> [ddnet] > At this moment we don't accept further donations since the server costs for 2019 are covered. 13:07 <+bridge> [ddnet] http://puu.sh/Emmh5/ac2061b8e9.png 13:07 <+bridge> [ddnet] xd 13:07 <+bridge> [ddnet] cover last years 13:15 <+bridge> [ddnet] https://gist.github.com/Learath2/59e510af2a3475b7863d9477f0296b25 13:16 <+bridge> [ddnet] I worked a little on getting a cleanly integrating plugin system for teeworlds, kinda hit a roadblock with not knowing how to translate the macro call before it runs through the actual compiler preprocessor 13:17 <+bridge> [ddnet] The script above takes in a source file, and generated the required hook variables and the required registering functions 13:17 <+bridge> [ddnet] s#generated#generates# 13:19 <+bridge> [ddnet] I did it like this so as to not limit developers to only c++, but I'm kinda regretting that decision and thinking of doing an abstract class based approach instead 13:22 <+bridge> [ddnet] even after that @Jupstar ✪'s words kinda make me feel like not doing a plugin system at all but to make a framework to let people modify the actual source itself, but that I have no good approach for 13:23 <+bridge> [ddnet] either way, libclang is fun to mess around with 13:23 <+bridge> [ddnet] xush had this funny approach of injecting code into the binary xD search the correct places and then it would also be version and even sourcecode independent 13:23 <+bridge> [ddnet] https://github.com/GutZuFusss/TW-CDXX 13:24 <+bridge> [ddnet] but not architecture independent 😛 13:24 <+bridge> [ddnet] tru 13:24 <+bridge> [ddnet] imagine doing all this work to write an aimbot injector... 13:24 <+bridge> [ddnet] xxD 13:24 <+bridge> [ddnet] :/ 13:24 <+bridge> [ddnet] he wanted to be able to bot instantly when he returns in a few years to 0.8 13:25 <+bridge> [ddnet] If any of you have opinions about how a plugin system should work or look like, please let me know 15:04 <+bridge> [ddnet] Can someone have a look into the DDNet file score system and debug it?! I really tried everything, but I cant find why it wouldnt save every rank... 15:04 <+bridge> [ddnet] Also I dont get error messages like failed for reading or something like that 16:50 <+bridge> [ddnet] Does not really explain why ranks are lost... but this line might cause horrible lags: 16:50 <+bridge> [ddnet] https://github.com/ddnet/ddnet7/blob/cb7a6cc1a0f4f1bcfaa5d260810c472916e3f156/src/game/server/score/file_score.cpp#L93 16:50 <+bridge> [ddnet] It's waiting 1 second instead of 1 millisecond (like in ddnet 0.6) 16:51 <+bridge> [ddnet] no 16:53 <+bridge> [ddnet] ah wait 16:53 <+bridge> [ddnet] In tw 0.7 this function uses milliseconds by default 16:53 <+bridge> [ddnet] yes 16:53 <+bridge> [ddnet] i thought the other way round rightn ow 16:53 <+bridge> [ddnet] but anyways, this is a problem in ddnet 0.6 too (the rank not saving always) 16:54 <+bridge> [ddnet] Okay. The whole file scoring should be rewritten 🤔 16:54 <+bridge> [ddnet] why? 16:56 <+bridge> [ddnet] The whole locking there is not optimal. When the score file gets too big and multiple people finish this can cause delays 16:56 <+bridge> [ddnet] And in general... Using a database would be better 16:58 <+bridge> [ddnet] of course it would be 16:58 <+bridge> [ddnet] But not everyone is able to do that 16:58 <+bridge> [ddnet] So a file system is good, also ddnet uses this on official servers if the databse connection fails, the scores are written in a file for now 16:58 <+bridge> [ddnet] until an admin then manually merges them 16:58 <+bridge> [ddnet] its not always stupid to have some "old" stuff in there 16:59 <+bridge> [ddnet] A few more tiny things 16:59 <+bridge> [ddnet] These lines leak memory: 16:59 <+bridge> [ddnet] https://github.com/ddnet/ddnet7/blob/cb7a6cc1a0f4f1bcfaa5d260810c472916e3f156/src/game/server/score/file_score.cpp#L138-L139 16:59 <+bridge> [ddnet] https://github.com/ddnet/ddnet7/blob/cb7a6cc1a0f4f1bcfaa5d260810c472916e3f156/src/game/server/score/file_score.cpp#L203 17:00 <+bridge> [ddnet] This looks useless: 17:00 <+bridge> [ddnet] https://github.com/ddnet/ddnet7/blob/cb7a6cc1a0f4f1bcfaa5d260810c472916e3f156/src/game/server/score/file_score.cpp#L217-L222 17:00 <+bridge> [ddnet] You dont have to tell me, better make an issue or pull requets at ddnet/ddnet 17:00 <+bridge> [ddnet] ddnet7 uses the same system as ddnet for file scores 17:01 <+bridge> [ddnet] and in ddnet6 its also broken 17:01 <+bridge> [ddnet] I guess on ddnet usually MySQL is used 17:02 <+bridge> [ddnet] And the fallback thing appends sql commands to a file and does not use the filescoring class 17:02 <+bridge> [ddnet] might be, but there are definitely servers running the ddnet mod using file score systems 17:02 <+bridge> [ddnet] basically every server except ddnet and maybe kog 17:02 <+bridge> [ddnet] all small servers use file score, because why would you use MySQL for example for a single server? 17:04 <+bridge> [ddnet] Well it does not have to be mysql... Sqlite would be perfect for something like this 17:04 <+bridge> [ddnet] But yeah... Something as simple as the file scoring is still useful 17:04 <+bridge> [ddnet] No config and easy to handle 17:04 <+bridge> [ddnet] Yea 17:04 <+Ryozuki> Learath2 i think minecraft forge is a rly good example 17:04 <+Ryozuki> idk how would u apply to c++ tho 17:05 <+Ryozuki> @Learath2 test 17:13 <+bridge> [ddnet] Wouldn't webassembly be a good choice for plugins? When you use native plugins you have to take care about all platforms 17:24 <+bridge> [ddnet] @redix I looked into web assembly, sadly no wasm vm has good linkage to c++ 17:24 <+bridge> [ddnet] Exposing host functions is a pain when there is no stable api 17:25 <+bridge> [ddnet] I also looked into having a native plugin api that allows you to also run something like a lua interpreter, but the overhead seems too much 17:26 <+bridge> [ddnet] Something like modlua and modperl in weechat 17:26 <+bridge> [ddnet] Well there is a proposed standard api. Not sure how stable it is though. Wasmtime implements it I think 17:27 <+bridge> [ddnet] https://github.com/WebAssembly/wasm-c-api 17:28 <+bridge> [ddnet] C api is workable but the c++ one seems to be pretty incapable 17:35 <+bridge> [ddnet] Any one on debian10? @jao ? And got a fix for the graphics bug when tabbing back into ddnet after latest debian update. Resolution gets worse and it tabs in and out 3 times. 21:43 <+bridge> [ddnet] @ChillerDragon have you tried debugging it? 😛