00:02 < bridge> r u gonna apply 00:12 < bridge> i think ryo is not so versed in cpp tho? 01:51 < bridge> what's their github username? 02:00 < bridge> srjc6 or smth 02:00 < bridge> i don’t remember 02:43 < bridge> @heinrich5991 02:43 < bridge> i was 1 letter off 03:09 < bridge> <0xdeen> There is actually a real, similar law in China about databases though. They have to support specific (Chinese) encryption schemes and have a minimum performance in a benchmark to be allowed to be sold in China 04:32 < ws-client> Any reason why `dbg_assert` does not have vargs for the string parameter? I want to print values in the assert to see what went wrong. But I do not want to call str_format every time. 04:45 < bridge> I don't think a mere license would magically stop anyone from distributing cheats. You'd have to fight in court and everyone knows that no one is gonna do. 04:45 < bridge> why haven't I heard of that 04:50 < bridge> maybe that's why I haven't heard of it, anyone knows are all dead 04:52 < bridge> maybe that's why I haven't heard of it, anyone who knows are all dead 04:52 < bridge> surely they meant prosecuted? 04:52 < bridge> that's probably just a meme 04:52 < bridge> that's surely a meme actually. cuz websites doesn't exists in china anymore 04:52 < bridge> what? 04:52 < bridge> only apps? 04:52 < bridge> it's all apps and miniapps now 04:52 < bridge> miniapps is so weird 04:53 < bridge> they reinvented a web browser 04:53 < bridge> ye 04:54 < bridge> it's all about limitations, regulations and selling their existing monopolized userbase of the entire nation to others 04:54 < bridge> if it is just a web browser it would be too open 04:54 < bridge> 04:55 < bridge> in wechat miniapps you have to apply for notifications and user have to agree to receive each notification once and only once. 04:55 < bridge> I guess it makes sense if you have an app with 500 million users to try to leverage your userbase for as much as possible 04:55 < bridge> replace the entire OS with your app xd 04:56 < bridge> honestly that's a pretty good idea to allow delivery notice but not notification spams 04:57 < bridge> but in practice, it is really annoying to keep tapping allow and reject everytime you order something, and you have to be careful what to allow cuz it is usually not that clear which notifications is for what 04:57 < bridge> do any of them have mini-miniapps? 04:57 < bridge> you probably can't do mini-miniapps 04:57 < bridge> thats what apple said about mini-apps the first time tho right? 04:58 < bridge> does apple have miniapps now? 04:58 < bridge> idk 04:58 < bridge> i think miniapps are kickstarted by android, but wechat just abused them to hell. no idea what it is like on iOS, but on android miniapps shows up individually besides wechat in taskmanager. 04:59 < bridge> oh weird 04:59 < bridge> well on android you can just download more apks 04:59 < bridge> it's not really that special? 04:59 < bridge> well for miniapps you install nothing 04:59 < bridge> ah 05:00 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237237477119492126/IMG_20240507_105946.jpg?ex=663aeab1&is=66399931&hm=8a3a11249f2f8cb2bc496ddcfa1922435f4891e256c2cefaf52971e4bb41dccd& 05:00 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237237489756930118/IMG_20240507_105946.jpg?ex=663aeab4&is=66399934&hm=0cb3041ee2b741cc7ddf559787cc9c0e195edcf1da80b90bf1955acd82f8862e& 05:00 < bridge> these are all wechat 05:00 < bridge> a starbucks app, a food ordering app and wechat itself. 05:00 < bridge> well most large enough websites are replaced by apps on mobile anyway, do people not use them on PC either? 05:01 < bridge> no one owns a PC now? 05:01 < bridge> lol ok 05:01 < bridge> "Do you guys have phones?" makes a lot of sense in this context 05:01 < bridge> "Don't you guys have phones?" makes a lot of sense in this context 05:02 < bridge> but surely people use PCs to write documents and do work atleast? but they don't own one at home? 05:02 < bridge> how else do they play ddnet xd 05:03 < bridge> they do 05:04 < bridge> i mean i definitely have a gaming laptop, but i don't think most do. 05:04 < bridge> gamers on steam sure 05:04 < bridge> but not even every students have their own computers i think 05:05 < bridge> my sister bought a macbook and never used it 05:05 < bridge> is there a PC gaming marketplace which is bigger than steam? or people still use steam? 05:05 < bridge> steam is still the biggest 05:06 < bridge> there is wegame (tencent one), steamchina (valve + perfectworld) and some others, but they don't really have a lot games, since you'd need to get a publishing certificate for each game which is insanely hard and slow to get 05:07 < bridge> steamcommunity.com is blocked but steampowered.com the store isn't so it is unofficially but deliberately allowed. 05:13 < bridge> well like international trades, not like skin trading but sure. 05:14 < bridge> ah 05:43 < bridge> Steam on the Top! 💪💪 06:43 < bridge> <0xdeen> how to play ddnet on android is one of the top google searches leading to ddnet.org. Anyone want to put in the work to make DDNet run on Android again? I think @jupeyy_keks already got us most of the way there? 07:37 < bridge> its not like im a noob, i would just need to use it more, also they probs care more about MLIR xo 07:37 < bridge> xp* 07:37 < bridge> but i prefer rust 08:50 < bridge> morning edlang 08:50 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237295434381393930/image.png?ex=663b20ab&is=6639cf2b&hm=19dace52a53021ef91feb11b404a0fdd2316837d19fd55a153e6d8d525fe62b7& 09:07 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237299790316834856/image.png?ex=663b24b9&is=6639d339&hm=04e63245a3b64992456daffff047adbef17effacbae648d4683e364bcaa09c9c& 09:07 < bridge> :poggers2: 09:18 < bridge> It looks kinda satisfying 09:22 < bridge> xD 09:34 < bridge> just noticed the type omg 09:34 < bridge> morning coding be like 11:46 < bridge> I'll try to build it, but it would require connecting mouse+keyboard to play because we don't have on-screen touch controls 11:50 < ws-client> There used to be on screen touch controls right? 11:51 < ws-client> That is the old client people still play with if i rember correctly 11:53 < bridge> got a huge load about gsm lte 3gpp and 5g 12:08 < bridge> I love to find older lines of code that I wrote, just to wonder wth was going through my head at the time 12:08 < bridge> today I found this masterpiece `if Some(true).is_some() {` 12:09 < bridge> I'm relatively sure that was meant as a placeholder, but a comment would've been appropriate ^^ 12:12 < bridge> a few days ago I found this in an unused function :nouis: 12:12 < bridge> `min_binding_size: Some(NonZeroU64::new(0).unwrap()),` 12:14 < bridge> https://gcc.gnu.org/gcc-14/ 12:33 < bridge> hmmmm 🤔 12:38 < bridge> isnt this a panic 12:45 < bridge> assigning 0 to a "NonZeroU64" and unwrapping it - wont this fail AND panic at the same time? :D 12:47 < bridge> yes, it's similar to calling `panic!()` directly 13:01 < ws-client> patiga drunk dev 13:01 < bridge> @robyt3 13:01 < bridge> 13:01 < bridge> i managed to crash the client by setting `cl_refresh_rate` and `gfx_refresh_rate` to `240` aswell as turning `vsync` on 13:01 < bridge> 13:01 < bridge> and then turning `cl_refresh_rate` and `gfx_refresh_rate` to `1000` and turning off Vsync 13:01 < bridge> 13:01 < bridge> i dont get a crashdump, and i cant even debug it for some reason, can you see if you can reproduce it somehow? - really weird. 13:01 < bridge> @robyt3 13:01 < bridge> 13:01 < bridge> i managed to crash the client by setting `cl_refresh_rate` and `gfx_refresh_rate` to `240` aswell as turning `Vsync` on 13:01 < bridge> 13:01 < bridge> and then turning `cl_refresh_rate` and `gfx_refresh_rate` to `1000` and turning `Vsync` off 13:01 < bridge> 13:01 < bridge> i dont get a crashdump, and i cant even debug it for some reason, can you see if you can reproduce it somehow? - really weird. 13:02 < bridge> @robyt3 13:02 < bridge> 13:02 < bridge> i managed to crash the client by setting `cl_refresh_rate` and `gfx_refresh_rate` to `240` aswell as turning `Vsync` on 13:02 < bridge> 13:02 < bridge> and then turning `cl_refresh_rate` and `gfx_refresh_rate` to `1000` and turning `Vsync` off 13:02 < bridge> 13:02 < bridge> i dont get a crashdump, and i cant even debug it for some reason, can you see if you can reproduce it somehow? - really weird. 13:02 < bridge> 13:02 < bridge> ``` 13:02 < bridge> 2024-05-07 12:58:03 I client: got pong from current server, latency=20ms 13:02 < bridge> 12:58:16: /home/melonarch/Projects/ddnet/build/Desktop-Debug/DDNet ist abgestürzt. 13:02 < bridge> ``` 13:02 < bridge> literally the only output i get lmao 13:03 < bridge> Does it happen again if you perform the same steps? I assume it's a random GPU driver bug 13:03 < bridge> tried it 3 times in a row 13:04 < bridge> if i have `cl_showfps` to 1, you can see it jump between 240-1000 repeatedly when setting the refresh rate on both cl and gfx 13:04 < bridge> 13:04 < bridge> and it crashes as soon as you turn off Vsync 13:05 < bridge> Please open an issue, not sure if we can do anything about it though 13:07 < bridge> i will play around with it a bit and see if i can tickle out a crashdump somehow lol - but i did get this: 13:07 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237360145760256081/image.png?ex=663b5cef&is=663a0b6f&hm=c6265db827cfe47f1dbd8e9743681bca2325575c515b5452cd544b652344cb1f& 13:08 < bridge> Did you try running with a debugger attached? 13:09 < bridge> I'll have to leave for 2 1/2 hours, i will Run gdb and Check 13:16 < bridge> you can also check if you get coredumps, or enable them if you don't 13:16 < bridge> the coredump contains the process at the segmentation fault time 13:16 < bridge> e.g. check `coredumpctl` 16:27 < bridge> ```rust 16:27 < bridge> 0x00005555556a04c0 in CCommandProcessorFragment_Vulkan::ClearFrameData (this=0x555555fb6660, FrameImageIndex=4) at /home/melonarch/Projects/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:2048 16:27 < bridge> 2048 if(BufferPair.m_pMappedData != nullptr) 16:27 < bridge> ``` 16:27 < bridge> ```rust 16:27 < bridge> 0x00005555556a04c0 in CCommandProcessorFragment_Vulkan::ClearFrameData (this=0x555555fb6660, FrameImageIndex=4) at /home/melonarch/Projects/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:2048 16:27 < bridge> 2048 if(BufferPair.m_pMappedData != nullptr) 16:27 < bridge> ``` 16:27 < bridge> dis what i got 16:28 < bridge> Any idea how to resolve these linking errors with rust symbols when compiling for android? (these are when compiling for `x86_64`) 16:28 < bridge> ``` 16:28 < bridge> ld.lld: error: undefined symbol: std::allocator::allocator() 16:28 < bridge> >>> referenced by cxx.cc:9 (src/cxx.cc:9) 16:28 < bridge> >>> cxx.o:(cxxbridge1$cxx_string$init) in archive debug/libddnet_engine_shared.a 16:28 < bridge> >>> referenced by cxx.cc:204 (src/cxx.cc:204) 16:28 < bridge> >>> cxx.o:(_ZNK4rust10cxxbridge16StringcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv) in archive debug/libddnet_engine_shared.a 16:28 < bridge> >>> referenced by cxx.cc:317 (src/cxx.cc:317) 16:28 < bridge> >>> cxx.o:(_ZNK4rust10cxxbridge13StrcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv) in archive debug/libddnet_engine_shared.a 16:28 < bridge> ``` 16:28 < bridge> See full log attached. Error messages when compiling for `x86`: `ld.lld: error: debug/libddnet_engine_shared.a(ddnet_engine_shared-fa6cb16cd6c82918.3zc566cpdlohmk2v.rcgu.o) is incompatible with elf_i386` 16:28 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237410618383011850/message.txt?ex=663b8bf1&is=663a3a71&hm=d9701a9075a688881f45ddc48ed1fcbfb03a2bbe4b6bff79fd2e4183a422e2ae& 16:28 < bridge> Seems like it could be an issue in our code, please open an issue 16:28 < bridge> will do 16:36 < bridge> What would happen if we promote DDNet on TikTok or Instagram? 😄 16:41 < bridge> stepfunn got a tiktok clip that got a few thousand views iirc :P 16:41 < bridge> lol nice 16:41 < bridge> https://www.tiktok.com/@stepfunn/video/7338119477168491808 16:48 < bridge> 😂🎺 17:16 < bridge> https://www.tiktok.com/@joni_2210?_t=8m9ceur7x4b&_r=1 has multiply clips with 300k views 17:35 < bridge> gm 17:50 < bridge> nice, try it 17:50 < bridge> 17:50 < bridge> and when u fame remember where you come from: teeworlds 😏 17:51 < bridge> if u need help ping me. 17:51 < bridge> 17:51 < bridge> What i can defs tell is: 17:51 < bridge> the libs would require pinned versions instead of just using master xD 18:01 < bridge> AFAICT the last puzzle piece is getting rust to link correctly (https://discord.com/channels/252358080522747904/293493549758939136/1237410618789728303) unless more errors appear after that. Otherwise it mostly worked by following the README. Needed to switch to SDL2 branch because SDL master is now SDL3. And we renamed the DDNet cmake target to game-client at some point. 18:03 < bridge> do you use latest ndk? 18:04 < bridge> no, I used the versions described in the readme. you think newer versions fixed rust support? 18:11 < bridge> My current changes: https://github.com/Robyt3/ddnet/tree/Android-Building-Fix 18:17 < bridge> i dunno if it's important that the rust toolchain doesn't go out of sync with the ndk compiler 18:17 < bridge> 18:17 < bridge> or how exactly the rust toolchain generally detects the compiler 18:18 < bridge> so could at least be worth a try, but dunno 18:19 < bridge> yeah, maybe my rustc is too recent for the rest of the toolchain that comes with NDK 23, I'll try with latest NDK later 18:42 < bridge> <0xdeen> Yeah, the onscreen touch controls are vital and hard to get right 18:43 < bridge> What do you guys use to write code in c++? I had to learn it to make physical simulations and mathematical models, but I use vi and gnuplot for that, is there an ide I should use? 18:46 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237445555408605204/movie_copy.gif?ex=663bac7b&is=663a5afb&hm=f36e989f1df1bad50d324bad8a887d0d64edd422a6f5b44231f659d0c56b8e30& 18:51 < bridge> if you're using gnuplot for visualization you can use literally anything, if you're used to vi, why not use nvim? 18:52 < bridge> you can use something like this: 18:52 < bridge> http://www.lazyvim.org/ 18:52 < bridge> 18:52 < bridge> which makes setting up a LSP and TS (for code autocompletion and suggestion) pretty easy 18:53 < bridge> you can use something like this: 18:53 < bridge> http://www.lazyvim.org/ 18:53 < bridge> 18:53 < bridge> which makes setting up a LSP (Language Server Protocol) and TS (Treesitter) (for code autocompletion and suggestion) pretty easy 18:53 < bridge> you can use something like this: 18:53 < bridge> http://www.lazyvim.org/ 18:53 < bridge> 18:53 < bridge> which makes setting up a LSP (Language Server Protocol) and TS (Treesitter) for code autocompletion and suggestion pretty easy 18:54 < bridge> oO gigachad 18:55 < bridge> Nowadays I'm using neovim. But I've also used vscode for years. Can't go wrong with either 18:55 < bridge> If you aren't very fluid with vim, I might even go as far as to say vscode might be better atleast in the mid-short term 18:57 < bridge> neovim my beloved 18:57 < bridge> you should first make your own OS then your desktop and then your editor, if u are feeling hardcore you can design ur own CPU architecture 18:57 < bridge> and compiler 18:57 < bridge> and language 18:57 < bridge> and go live in a cave 18:57 < bridge> anyone knows how to deal with this problem? 😅 18:57 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237448304179154984/image.png?ex=663baf0a&is=663a5d8a&hm=9ddf8872051a2e95f7ad6981ccaab6d32ae21bbca6199417c251142ef6d97d7b& 18:57 < bridge> It is known that you need to start from making a bootloader 18:58 < bridge> true 18:58 < bridge> Split it into a couple more manageable pieces? 18:58 < bridge> I have an issue with my neovim setup that I can't pinpoint. In large json files, it really craps out 18:59 < bridge> my neovim setup is 40 different files lol 18:59 < bridge> how many plugins do you have even 19:00 < bridge> Mine is 3 files right now. I might split it into one more later. I kinda keep all my plugins and plugin configs directly in init.lua for now 19:00 < bridge> 22 😏 19:00 < bridge> I once had a setup where I had one file per plugin. But then I got bored of it 😄 19:02 < bridge> IMO most important is: 19:02 < bridge> use clangd and clang-format 19:04 < bridge> My clangd once formatted entirety of ddnet's codebase to replace spaces with tabs 19:04 < bridge> And then it refused to do the same thing for another project in which I actually needed it 19:05 < bridge> clang-format* 19:05 < bridge> Actually, why do people even use spaces for indentation 19:07 < bridge> i dunno, but that's exactly why i'd always use clang-format... to not care about tabs vs spaces 19:12 < bridge> rustfmt best 19:12 < bridge> nobody discusses it 19:12 < bridge> 19:12 < bridge> it defs has better defaults than clang-format :lol: 19:13 < bridge> 😬 19:13 < bridge> clang-format default is some weird 1990 code base style 19:13 < bridge> it's more consistent as it does not rely on a special "tab" character 19:13 < bridge> I figured out how to render 0.6 skins, now 0.7 shouldn't be too hard 19:13 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237452261693718588/image.png?ex=663bb2b9&is=663a6139&hm=149142e8897c81b1983f9f473f0fd8f724f24bda3d7f347638e25c45ca8b16bf& 19:13 < bridge> tab allows everyone to define their tab width 19:13 < bridge> How is it more consistent if you can leave 3 or 5 spaces on accident 19:14 < bridge> tab width is just a fancy name for number of spaces 19:14 < bridge> It's like an old technology which no one dares to replace 19:14 < bridge> if you don't have a formatter then yeah 19:15 < bridge> I mean, by tabs have advantages on all sides againts spaces 19:15 < bridge> with spaces u cant customize tab width 19:15 < bridge> but i'm talking consistency when you go from one editor to another 19:15 < bridge> you can tell how many spaces you want your indentation 19:15 < bridge> you can tell how many spaces you want your indentation to be 19:15 < bridge> Any usable editor should support custom width I believe 19:15 < bridge> is that critique on rustfmt? 😬 19:15 < bridge> i think u dont get it 19:15 < bridge> thats just adding spaces 19:15 < bridge> with tab its always 1 tan 19:15 < bridge> tab 19:15 < bridge> i know that 19:16 < bridge> xd idk 19:16 < bridge> you can adjust how the code base looks without your formatter changing 65159 lines in 1206 files xd 19:16 < bridge> im just saying 19:16 < bridge> but visually if you say your tab is 4 width, then it will render as if it was 4 spaces 19:16 < bridge> Exactly 19:16 < bridge> yea thats the point xd 19:16 < bridge> And you have an option to change that, as opposed to spaces 19:16 < bridge> yes, but it will still use \t which can very from one text editor to another 19:16 < bridge> vim default is tab width of 8 19:16 < bridge> an issue that you don't have with spaces 19:17 < bridge> I heard that there are certain things you need an ide to do like if you are working on a bigger project it’s a lot more efficient 19:17 < bridge> iirc 19:17 < bridge> hence the consistency i'm talking about 19:17 < bridge> yes, but it will still use \t which can vary from one text editor to another 19:17 < bridge> neovim can be an ide 19:17 < bridge> what? 19:17 < bridge> Honestly, that's a config issue, I always set my tab size to 4 19:17 < bridge> you dont need IDE anymore in the world of LSP 19:17 < bridge> Oh I assumes it was a text editor 19:17 < bridge> LSP are portable Ides 19:17 < bridge> I’ll look into that 19:18 < bridge> what about text editors you don't have the control over ? like online code previews or idk 19:18 < bridge> neovim can be an *ide* 19:18 < bridge> I've been hearing these things for a decade now. Haven't needed one no matter the size of the project even back when I only had ctags to navigate with 19:18 < bridge> These people honestly must be talking about some insanely massive projects. Far bigger than anything I have access to 19:19 < bridge> Interesting 19:19 < bridge> I’ll get neovim then 19:19 < bridge> I want to try coding stuff for ddnet to practice c++ 19:19 < bridge> I mean, that's one of the problems with tabs, they are not adopted everywhere 19:20 < bridge> Maybe you might have trouble browsing around chromium? Idk which part they claim doesn't scale though. Clangd can do a lot including renames 19:20 < bridge> how old must your editor be to not support tabs? XD 19:20 < bridge> relying on one ide imo isn't great anyway. 19:20 < bridge> 19:20 < bridge> at work there is a old codebase that uses an old IDE and the IDE sucks so fuckig hard :lol: 19:20 < bridge> never heard of one 19:20 < bridge> https://twitter.com/Demilogic/status/1787883295507730618 19:20 < bridge> competition is good xd 19:20 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237454088527020033/image.png?ex=663bb46d&is=663a62ed&hm=3b16c3ef3dca5797ce6eb2bfa57f3a9d1629e588d8f91cad60ecee84b6bcfcc7& 19:21 < bridge> Terraria 2 confirmed??!?! 19:21 < bridge> I don't think it's an adoption issue, but more of a "what's the default tab size" issue which isn't the same everywhere which can make code look very large or very tight, which does not happen with spaces. That's the only reason why I think people use spaces instead of tabs 19:22 < bridge> i'd not call that diss. that was humiliation 19:22 < bridge> If you could set your own tab width everywhere, there would be no more issues tho 19:23 < bridge> Yeah, but that would required you to set it manually 19:23 < bridge> @funmanteddy I do however use an IDE for php and Java. The biggest thing I'm missing without them is boilerplate generators. Writing setters and getters by hand is just oh so boring 19:23 < bridge> Don't you also need to manually adjust space indent size? 19:23 < bridge> I know I can create snippets for them but it's just one more manual thing I need to think about 19:24 < bridge> I mean, setting tab width is a once-in-a-lifetime task, I did it and will never do again 19:24 < bridge> Only in your editor so it knows when you press tab how many spaces to add, but then the file will look the same everywhere 19:25 < bridge> What is your favourite tabwidth? 19:25 < bridge> 4 👍 19:26 < bridge> 2 19:26 < bridge> xd 19:26 < bridge> ok maybe 4 19:26 < bridge> 0 19:26 < bridge> For me, it's mostly the matter of how many junk characters I have to delete 19:26 < bridge> Btw google still hasn't fixed this https://issuetracker.google.com/issues/242221770 show me a better argument for abolishing capitalism 19:27 < bridge> OH 19:27 < bridge> imagine -2 tab width 19:27 < bridge> code indents inwards 19:27 < bridge> madmen 19:27 < bridge> arab code 19:27 < bridge> 3 indents = 12 spaces, and i'd have to do 12x to delete it all 19:27 < bridge> xDDDDDDDDDD 19:27 < bridge> You start at the middle and unindent as you nest 19:27 < bridge> XD 19:27 < bridge> would be super funny 19:27 < bridge> for a stream 19:27 < bridge> jesus christ 19:27 < bridge> heresy 19:28 < bridge> what if the code is already on the left side of the screen? 19:28 < bridge> Most editors have some magic to make this just 3 backspaces 19:28 < bridge> isnt it open source? 19:28 < bridge> You just shift everything right just to emphasize one line? 19:28 < bridge> You need to root your phone and patch the kernel to fix it. Can't use your bank app and many other things afterwards 19:28 < bridge> You shift everything right just to emphasize one line? 19:29 < bridge> so it already is patched or what 19:29 < bridge> They are literally not fixing it so you are forced to buy either their dongle or a bluetooth headphone 19:29 < bridge> just not deployed 19:30 < bridge> The guy who opened the issue put out a hacky patch. That's all that's available 19:31 < bridge> Tbf they support their own dongle using that exact same patch, so not sure if calling it hacky is fair. But the proper way to implement this starts with the kernel exposing the dac hardware volume control to userspace 19:31 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237456872454361099/GM9deCSWUAEcJ1g.png?ex=663bb705&is=663a6585&hm=0a5f145f3efd592cfc03e3c5879bf80465b07e1c2d80c386a3aec6a86313b991& 19:32 < bridge> 😬 19:32 < bridge> Is this a real C++ code? 19:32 < bridge> what? 19:32 < bridge> c++23 19:32 < bridge> i just have a second phone for my bank xddd 19:32 < bridge> 19:32 < bridge> i only use that phone for bank nothing else 19:32 < bridge> so my main phone can be free as a bird 19:32 < bridge> epyc 19:33 < bridge> I can not be assed honestly. Just spy on me in a walled garden. They probably already have 8 cameras in my house 19:33 < bridge> I wonder in how many editions we will get borrow checker in c++ 19:34 < bridge> But not the worst idea 😄 19:34 < bridge> As of now ig I’m not gonna be doing any other languages besides python but that shit is easy af 19:34 < bridge> i think there were talks about "profiles" that allow such stuff 19:35 < bridge> I wonder if one can write an external borrow checker for C++ 19:35 < bridge> isnt that tsan 19:35 < bridge> and ubsan 19:35 < bridge> well its not as powerful 19:35 < bridge> those are runtime checks 19:35 < bridge> oh 19:36 < bridge> tru 19:36 < bridge> weak 19:36 < bridge> rust strong 19:36 < bridge> monka 19:36 < bridge> https://tenor.com/view/cool-fun-white-cat-dance-cool-and-fun-times-gif-16435335956387921912 19:36 < bridge> c++ also needs a MIRI 19:36 < bridge> to add UB to rust they must have a check for it in MIRI 19:36 < bridge> otherwise they wont add it 19:36 < bridge> it's time for a new language 19:36 < bridge> ++c++ 19:37 < bridge> C-- when 19:37 < bridge> like C++ but without OOP 19:38 < bridge> Could have like a set of types that wrap raw objects that provide the borrow checking 19:39 < bridge> Compiled by clang they are just optimized out as they are nothing but empty tags. Compiled by c++borrowck you track allocations and references to objects wrapped in those types 19:40 < bridge> It might end up very annoying without real language support as very early rust was though 19:44 < bridge> you can render any res? 19:45 < bridge> its called c 19:45 < bridge> C? :thonk: 19:45 < bridge> with a few changes yea, but rn I'm rendering at 96x64 19:45 < bridge> pvs-studio thing? 19:45 < bridge> https://www.apple.com/newsroom/2024/05/apple-introduces-m4-chip/ 19:46 < bridge> >on ipad 19:46 < bridge> Also rendering 500-ish tees, with nodejs, is surprisingly fast 19:46 < bridge> fyi 19:46 < bridge> :kekw: 19:47 < bridge> clang format still doesn't support multiline star-aligned comment blocks :pepeW: 19:47 < bridge> yo should i just use freetype for font rendering or some wrapper of it like ? 19:47 < bridge> it depends 19:48 < bridge> what do you want to do 19:48 < bridge> theyre gonna run out of numbers atp 19:48 < bridge> making a small game in c++&opengl 19:48 < bridge> looks bit outdated 19:48 < bridge> prototype? 19:48 < bridge> i personally think freetype is ez to use. 19:48 < bridge> 19:48 < bridge> but generally text rendering is hard/annoying 19:48 < bridge> then yup why not 19:48 < bridge> nop xd 19:48 < bridge> I kinda wanna take a shot at 0.7 skins now, you know where might I find that on gh? @gerdoe 19:49 < bridge> okay freetype it is thx 19:49 < bridge> https://github.com/ocornut/imgui 19:49 < bridge> no xd 19:49 < bridge> something on master tree on src/game/client/*/skin.* o think 19:49 < bridge> why not xd 19:49 < bridge> something on master tree on `src/game/client/*/skin.*` i think 19:50 < bridge> doing from scratch with glfw opengl xd 19:50 < bridge> then use pure freetype 19:50 < bridge> https://scratch.mit.edu/ 19:50 < bridge> :troll: 19:50 < bridge> well then freetype it is indeed 19:50 < bridge> xd 19:51 < bridge> https://scratch.mit.edu/ 19:51 < bridge> :troll: 19:51 < bridge> /s 19:51 < bridge> xddd 19:51 < bridge> You can call me Master-GPT 19:51 < bridge> i know the words 19:51 < bridge> okey tell how to load font! 19:51 < bridge> @jupeyy_keks @jupeyy_keks 19:52 < bridge> @jupeyy_keks you could try to use std::file_system to load it 19:52 < bridge> then create a freetype font face @jupeyy_keks 19:52 < bridge> xddddd 19:52 < bridge> JPT 19:52 < bridge> JLM 19:53 < bridge> OJ 19:53 < bridge> thanks for asking 19:53 < bridge> ```cpp 19:53 < bridge> #include 19:53 < bridge> #include FT_FREETYPE_H 19:53 < bridge> 19:53 < bridge> int main() { 19:53 < bridge> FT_Library library; 19:53 < bridge> FT_Error error; 19:53 < bridge> 19:53 < bridge> // Initialize FreeType library 19:54 < bridge> error = FT_Init_FreeType(&library); 19:54 < bridge> if (error) { 19:54 < bridge> // Handle error 19:54 < bridge> return 1; 19:54 < bridge> } 19:54 < bridge> 19:54 < bridge> // Load the font file 19:54 < bridge> FT_Face face; 19:54 < bridge> error = FT_New_Face(library, "path_to_your_font.ttf", 0, &face); 19:54 < bridge> if (error == FT_Err_Unknown_File_Format) { 19:54 < bridge> // Handle unsupported file format 19:54 < bridge> return 1; 19:54 < bridge> } else if (error) { 19:54 < bridge> // Handle other errors 19:54 < bridge> return 1; 19:54 < bridge> } 19:54 < bridge> 19:54 < bridge> // Set character size 19:54 < bridge> error = FT_Set_Pixel_Sizes(face, 0, 24); 19:54 < bridge> if (error) { 19:54 < bridge> // Handle error 19:54 < bridge> return 1; 19:54 < bridge> actually looks correct 19:54 < bridge> but dunno if it compiles 19:54 < bridge> but smth like that is indeed the process 19:58 < bridge> archoover 19:58 < bridge> it's super super hard 19:58 < bridge> in dd-pg i now have a mode to disable msaa exactly once per frame 19:58 < bridge> and usually this is before UI code is rendered 19:59 < bridge> so UI code is not affected by mssa 19:59 < bridge> so UI code is not affected by msaa 19:59 < bridge> tbh i am not even sure if u can do that in opengl 19:59 < bridge> 19:59 < bridge> well in newer probably 19:59 < bridge> at least not as i did it 19:59 < bridge> 😄 20:00 < bridge> maybe i'll just use a texturemap with characters. all of the fonts will be my own anyways :D 20:00 < bridge> im not gonna try making ttfs 20:01 < bridge> that would limit me to monospace tho if i don't include other info 20:02 < bridge> if text rendering would be ascii chars only, it would not suck 20:02 < bridge> 😬 20:02 < bridge> but with unicode and all the weird stuff it just sucks to implement it xD 20:03 < bridge> that would limit me to monospace tho if i don't include other info. edit: it would not limit me to monospace xd 20:03 < bridge> ~~that would limit me to monospace tho if i don't include other info.~~ edit: it would not limit me to monospace xd 20:04 < bridge> quick question, where can I get the 0.7 client? 20:04 < bridge> https://teeworlds.com/ 20:05 < bridge> @jupeyy_keks do you think a texture hashmap would be fast enugh? 20:06 < bridge> does caching frequent phrases work? 20:06 < bridge> u want to create one texture per text? 20:08 < bridge> one texture map with all the characters and *maybe combine frequent combinations of characters and cache them* 20:08 < bridge> https://github.com/teeworlds/teeworlds 20:08 < bridge> first sounds good 20:08 < bridge> second sounds useless 20:08 < bridge> and releases 20:08 < bridge> and trouble to implement xdd 20:08 < bridge> macro and template magic in my head 20:10 < bridge> when having static gui that never changes it should be a good optimization rendering "Text" directly instead of "T" "e" "x" "t" 20:10 < bridge> i don't know how much of a difference it makes but i have noticed that ddnets ways or rendering text is not insane fast 20:11 < bridge> i dunno how ddnet does it tho 20:11 < bridge> i dunno, it only creates a few more vertices 20:11 < bridge> which one 20:11 < bridge> the chat or the menu? 20:12 < bridge> ingame xd 20:13 < bridge> how is it not fast? xd 20:13 < bridge> wait 20:13 < bridge> scoreboard? 20:13 < bridge> tele nums 20:13 < bridge> tele nums should be fast on newer GL versions 20:13 < bridge> you just use opengl 1.x all the time xD 20:13 < bridge> faster than anything u could achieve with freetype 20:13 < bridge> bcs it's created at client start 20:13 < bridge> wha? 20:15 < bridge> wait does client bake a whole font atlas on startup 20:15 < bridge> well only numbers 1-255 20:15 < bridge> but yes 20:15 < bridge> it does 20:15 < bridge> nice approach 20:15 < bridge> i get around 180 fps on 1500x1500 map full of teles xdd 20:15 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237467767704387735/image.png?ex=663bc12a&is=663a6faa&hm=20b95ade5d79c6863e8dc57b362175999eb948eab4b74e8a8b7f19f0626ff93f& 20:15 < bridge> with opengl 1? 20:15 < bridge> vulkan xD 20:15 < bridge> i forgor to change 20:15 < bridge> no way 20:15 < bridge> send map 20:16 < bridge> and that is ingame? 20:16 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1237468131706798080/tele_nums.map?ex=663bc181&is=663a7001&hm=0b12de0134e03b0b9af5c750b88651cdec77309da299ba91e5a07341442214da& 20:16 < bridge> yea 20:17 < bridge> okay with opengl 3.3 i get ~190 20:17 < bridge> and its a little more stable 20:18 < bridge> but just do 20:18 < bridge> `cl_text_entities 0` 20:18 < bridge> then you notice the problem is not the text rendering 20:18 < bridge> i get around 300-400 fps, depending on zoom lvl 20:19 < bridge> oh. okay 20:19 < bridge> i tried rendering some weight values some time ago for like a 300x300 map and it was pretty laggy 20:19 < bridge> although that was maybe my fault 20:19 < bridge> if u need high fps at high zoom levels u should use patigas rendering method 20:20 < bridge> it scales better at high zoom values 20:20 < bridge> note that it also uses lot of VRAM tho 20:20 < bridge> if that is an issue for you 20:22 < bridge> ```cpp 20:22 < bridge> float ScreenX0, ScreenY0, ScreenX1, ScreenY1; 20:22 < bridge> m_pGameClient->Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1); 20:22 < bridge> float BorderBuffer = 100; 20:22 < bridge> ScreenX0 -= BorderBuffer; 20:22 < bridge> ScreenX1 += BorderBuffer; 20:22 < bridge> ScreenY0 -= BorderBuffer; 20:22 < bridge> ScreenY1 += BorderBuffer; 20:22 < bridge> 20:22 < bridge> const int Width = m_pClient->Collision()->GetWidth(); 20:22 < bridge> const int Height = m_pClient->Collision()->GetHeight(); 20:22 < bridge> for(int x = 0; x < Width; ++x) 20:22 < bridge> { 20:22 < bridge> for(int y = 0; y < Height; ++y) 20:22 < bridge> { 20:22 < bridge> if(x * 32 > ScreenX1 || x * 32 < ScreenX0 || y * 32 > ScreenY1 || y * 32 < ScreenY0) 20:22 < bridge> continue; 20:22 < bridge> char aBuf[8]; 20:22 < bridge> int Index = y * Width + x; 20:22 < bridge> CUIRect Rect = {(float)x * 32, (float)y * 32, 32, 32}; 20:22 < bridge> // evil top left 20:22 < bridge> str_format(aBuf, 8, "%d", m_pClient->Collision()->IsEvilTeleport(Index)); 20:22 < bridge> m_pClient->Ui()->DoLabel(&Rect, aBuf, 15.f, TEXTALIGN_TL); 20:22 < bridge> // normal top Right 20:23 < bridge> str_format(aBuf, 8, "%d", m_pClient->Collision()->IsTeleport(Index)); 20:23 < bridge> m_pClient->Ui()->DoLabel(&Rect, aBuf, 15.f, TEXTALIGN_TR); 20:23 < bridge> // check evil bottom left 20:23 < bridge> str_format(aBuf, 8, "%d", m_pClient->Collision()->IsCheckEvilTeleport(Index)); 20:23 < bridge> m_pClient->Ui()->DoLabel(&Rect, aBuf, 15.f, TEXTALIGN_BL); 20:23 < bridge> // check normal bottom Right 20:23 < bridge> str_format(aBuf, 8, "%d", m_pClient->Collision()->IsCheckTeleport(Index)); 20:23 < bridge> ```cpp 20:23 < bridge> float ScreenX0, ScreenY0, ScreenX1, ScreenY1; 20:23 < bridge> m_pClient->Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1); 20:23 < bridge> float BorderBuffer = 100; 20:23 < bridge> ScreenX0 -= BorderBuffer; 20:23 < bridge> ScreenX1 += BorderBuffer; 20:23 < bridge> ScreenY0 -= BorderBuffer; 20:23 < bridge> ScreenY1 += BorderBuffer; 20:23 < bridge> 20:23 < bridge> const int Width = m_pClient->Collision()->GetWidth(); 20:23 < bridge> const int Height = m_pClient->Collision()->GetHeight(); 20:23 < bridge> for(int x = 0; x < Width; ++x) 20:23 < bridge> this is old code please just imagine the aBuf is outside the loops and so is the Index declaration 20:24 < bridge> yeah dolabel is rip 20:24 < bridge> this is old code please just imagine the aBuf is outside the loops and so is the Index and the CUIRect declaration 20:28 < bridge> @patiga do u plan to support physics layers rendering? 20:51 < bridge> `str_format` is also very slow, `str_from_int` is much faster if you just need to convert an integer to a string 21:17 < bridge> yea, will do at some point 21:18 < bridge> if it's too much work to get this to work, perhaps just remove the rust stuff from ddnet. it hasn't seen any use 21:20 < bridge> I heard @patiga knows a lot about rendering skins 21:21 < bridge> oh? 21:21 < bridge> I actually haven't looked at 0.7 skins yet, cant help there :/ 21:21 < bridge> ah rip 21:26 < bridge> but maybe you could document your findings in a document similar to this: https://github.com/heinrich5991/libtw2/blob/ac6b4c422aebd43bc18a5f9a3526b999e62e0b5c/doc/tee_rendering.md 21:26 < bridge> so that we can also get documentation on 0.7 skin rendering 21:27 < bridge> That's hella useful how did i not know about this 21:28 < bridge> (written by @patiga btw ^^) 21:28 < bridge> patiga my beloved 21:28 < bridge> 21:29 < bridge> Slight issue tho, I am wildly inexperienced in this stuff 21:29 < bridge> I'm doing this caveman style until I get it working 21:29 < bridge> then I'm never touching it again xd 21:29 < bridge> 😄 21:30 < bridge> my lib is public though, and I like to believe my code is easily understandable, so by all means check it out when I'm done :D 21:36 < bridge> @patiga btw, about 0.6 skins, how do I actually color them? 21:36 < bridge> if the player has custom colors set 21:37 < bridge> Do I just tint the image with the color or is there some other process I should do? 21:37 < bridge> my code is not correct there currently 21:38 < bridge> if you figure out the rgba color, you would only need to multiply it on top 21:38 < bridge> I've got the hsl from the tw code 21:38 < bridge> I can convert it 21:38 < bridge> but I meant applied the color 21:38 < bridge> do I just do a simple tint? 21:38 < bridge> but I meant applying the color 21:39 < bridge> multipy the pixel color by the tees color 21:39 < bridge> where rgba 255 = 1 21:39 < bridge> so non-transparent pixels 21:39 < bridge> aight 21:40 < bridge> you can do it for all ^^ 21:40 < bridge> for transparent it simply does nothing :) 21:42 < bridge> ye but every pixel excused from processing matters 22:04 < bridge> Do 0.7 color codes work differently than 0.6? 22:04 < bridge> I can't seem to be able to convert properly 22:04 < bridge> with 0.6 codes 22:05 < bridge> There is a slight difference. The lightness clamping is different 22:06 < bridge> Using latest NDK and Android API still results in the same linker errors 22:07 < bridge> yeah, might be the best solution :/ 22:07 < bridge> wdym 22:08 < bridge> Lightness values from 0 to 255 don't map to real hsl lightness 0.0 to 1.0 22:09 < bridge> For 0.6 they map to x to 1.0 and for 0.7 they map to y to 1.0. I don't remember x and y though, but I remember y < x 22:09 < bridge> i really wish I could read c++ 22:09 < bridge> so I can ask where might I find that 22:09 < bridge> :wearydrops: 22:09 < bridge> 😩 22:10 < bridge> C++ doesn't look too far off from JS, does it? 22:10 < bridge> uhh 22:10 < bridge> it's basically tring to read chinese while being an american 22:12 < bridge> The lightest value for 0.7 should be in teeinfo.h 22:12 < bridge> The one for 0.6 should be iiin color.h I think 22:13 < bridge> For 0.7 I used this kind sir's suggestion, lemme see if I can cook something similar for 0.6 22:18 < bridge> It's the same for both 0.6 and 0.7. It's just that you interpret the L component differently. Teeworlds just does not allow L to be 0 so you cant have pure blacks 22:19 < bridge> 0.6 and 0.7 have different darkest colors allowed. 0.7 allows slightly darker ones 22:25 < bridge> mhhhh it often says cxxbridge.. maybe update the cxx dep? 22:25 < bridge> but dunno i dont really understand why the allocator fails 22:26 < bridge> on the other hand side it works without problem on non android 22:26 < bridge> how should have it been integrated? 22:26 < bridge> as submodules? 22:27 < bridge> not sure what you mean with 'should' 22:27 < bridge> the rust integration works 22:28 < bridge> uhm 22:28 < bridge> i mean 22:28 < bridge> all .rs files are just rewritten from cpp ones 22:28 < bridge> `ld.lld: error: debug/libddnet_engine_shared.a(ddnet_engine_shared-fa6cb16cd6c82918.3zc566cpdlohmk2v.rcgu.o) is incompatible with elf_i386` sounds like you're compiling the rust code for the wrong architecture. check its architecture with `file` maybe 22:28 < bridge> doing them one by one is kinda not useful, by submodules i mean fully rewrite of `src/base` for example 22:29 < bridge> from my point of view though 22:29 < bridge> i just don't know what should be done to rustify codebase 22:30 < bridge> https://gaultier.github.io/blog/how_to_rewrite_a_cpp_codebase_successfully.html 22:30 < bridge> there's also the librsvg story 22:35 < bridge> hm so problem is that rust bus factor for ddnet is 0 (1) 22:38 < bridge> yea, I guess the gaultier story isn't applicable there 22:39 < bridge> there are more developers writing c++ code than those writing rust code in the ddnet community, I think 22:41 < bridge> ig problem is that current core code e.g `src/base` is maintainable enough to not be RIIR 22:53 < bridge> @robyt3 does it compile i386 on the x64 build or what? 22:53 < bridge> or is that the x86 build 22:55 < bridge> The long log in https://discord.com/channels/252358080522747904/293493549758939136/1237410618789728303 is from the `x86_64` build, with the `x86` build I get the `... is incompatible with elf_i386` errors instead, with arm/arm64 builds I also get other errors 23:29 < bridge> It outputs `libddnet_engine_shared.a: current ar archive` for the files from both the x86 and x86_64 builds 23:31 < bridge> hmm, sorry, thought it'd output the architecture 23:33 < bridge> When compiling for ARM I get errors like 23:33 < bridge> ``` 23:33 < bridge> ld.lld: error: debug/libddnet_engine_shared.a(ddnet_engine-97b91143faa7528b.zhg56s06o907mid.rcgu.o) is incompatible with armelf_linux_eabi 23:33 < bridge> ld.lld: error: debug/libddnet_engine_shared.a(ddnet_base-98591c5ad164f713.1wywbl7wtpc263ng.rcgu.o) is incompatible with armelf_linux_eabi 23:33 < bridge> ``` 23:37 < bridge> that sounds like you're compiling the rust code for the wrong architecture 23:37 < bridge> `readelf -h .a | grep 'Class\|File\|Machine'` 23:37 < bridge> is what stackoverflow gives me 23:38 < bridge> @robyt3 23:39 < bridge> This is for the x86 build: 23:39 < bridge> ``` 23:39 < bridge> File: libddnet_engine_shared.a(ddnet_engine_shared-fa6cb16cd6c82918.10dggtc7pn3aflxu.rcgu.o) 23:39 < bridge> Class: ELF64 23:39 < bridge> Machine: Advanced Micro Devices X86-64 23:39 < bridge> ... 23:39 < bridge> ``` 23:50 < bridge> x86_64 sounds like it compiled for the wrong architecture 23:50 < bridge> I think this looks promising: https://github.com/rust-lang/rustup/issues/2872#issuecomment-1158238378 23:51 < bridge> So uses `cargo` would need to be replaced with `cargo ndk -t aarch64-linux-android` (with the respective arch) 23:51 < bridge> So uses of `cargo` would need to be replaced with `cargo ndk -t aarch64-linux-android` (with the respective arch)