01:13 <+bridge> make a post request with params from http library 01:14 <+bridge> and save the response like this 01:14 <+bridge> m_pDDNetInfoTask = HttpGetFile(aUrl, Storage(), m_aDDNetInfoTmp, IStorage::TYPE_SAVE); 01:14 <+bridge> m_pDDNetInfoTask->Timeout(CTimeout{10000, 0, 500, 10}); 01:14 <+bridge> m_pDDNetInfoTask->IpResolve(IPRESOLVE::V4); 01:14 <+bridge> Engine()->AddJob(m_pDDNetInfoTask); 01:16 <+bridge> Looks about right to me, what's wrong? 01:38 <+bridge> tell me what you want to do and I might be able to give you some example code 07:04 <+bridge> Mi must do a POST request on a link and save the returned json 07:13 <+bridge> I must do a POST request on a link and save the returned json 07:13 <+bridge> What's this used for? 07:13 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106449002855149678/image.png 07:17 <+bridge> Use POST and pass Json param s 07:17 <+bridge> Use POST and pass Json params 07:23 <+bridge> anyways: this is the hypothetical i was talking about: 07:23 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106451507748028446/image.png 07:28 <+bridge> Would be cleaner yeah 07:28 <+bridge> Just look in the source. I doubt it's used in-game 07:28 <+bridge> Maybe in 07 07:29 <+bridge> Yeah it's unused. 07:29 <+bridge> And omg the png would look so much cleaner without it, 07:29 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106453038291492894/image.png 07:30 <+bridge> wait whats that blue bar for 07:30 <+bridge> was it for the old ninja timer? 07:30 <+bridge> Yes 07:30 <+bridge> But not old 07:30 <+bridge> 07 07:30 <+bridge> okay wait, let me sort everything out really quickly. some of these are UI elements, not map items 07:40 <+bridge> Updated: 07:40 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106455717969399828/image.png 07:43 <+bridge> Take 2 on HUD: much more optimized, less blank space 07:43 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106456556846972988/image.png 07:43 <+bridge> You should leave empty space 07:43 <+bridge> actually this may be doable, if we make a script to convert old type pngs to the new lauout 07:43 <+bridge> layout 07:44 <+bridge> ok fine old one is used then 07:44 <+bridge> Probably even mkre 07:44 <+bridge> because 07:45 <+bridge> if new icons are added, it would fuck up old pngs and it would also require the client to be modified to support the larger image 07:45 <+bridge> expanding the image down or right and supporting it is not hard 07:45 <+bridge> Thats true 07:45 <+bridge> But backward compatibility 07:46 <+bridge> is this better? 07:46 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106457372597170216/image.png 07:46 <+bridge> (@backwardserich5991) 07:46 <+bridge> @Voxel make the same pngs but with the grid info 07:47 <+bridge> and i make a rust script 07:47 <+bridge> :gigachad: 07:47 <+bridge> works for me 07:47 <+bridge> @Ryozuki rust fast? 07:47 <+bridge> ye 07:47 <+bridge> fastest 07:47 <+bridge> woaw 07:47 <+bridge> i want to make sure everything is finalized before i make coords 07:47 <+bridge> 500gb/s 07:49 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106458222631583764/image.png 07:51 <+bridge> wait are all the ninja dash streaks the same side in code? (checking right now) 07:53 <+bridge> yeah they are 07:55 <+bridge> idk what happened but when i split the image theres this weird ending trail thats cut off in one of the ninja muzzles 07:55 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106459597276975124/image.png 07:59 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106460569038491728/image.png 07:59 <+bridge> this is walward 07:59 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106460582216998972/image.png 07:59 <+bridge> this is awkward 07:59 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106460582216998972/image.png 08:00 <+bridge> bug 08:00 <+bridge> same case goes for another one, which also has a cut off piece 08:01 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106460998912708759/image.png 08:01 <+bridge> trigger warning 08:02 <+bridge> its ok, we can fix it when the svg gets accepted into the database ^^ 08:10 <+bridge> Should I wait until we get more opinions before I make coords? 08:10 <+bridge> And would the coords have to be formatted like in content.py? 08:10 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106463277820682240/image.png 08:12 <+bridge> you can’t fix it without changing the code. it looks for that resource in that place, the coordinates have to be in the same relative position 08:13 <+bridge> all the svg scripts do is export at a larger size 08:20 <+bridge> extras, game, hud, particles, strong_weak > hud, map_items, particles, weapons 08:26 <+bridge> ok im starting to see what you mean 08:27 <+bridge> theres a ton of empty space in the original images 08:32 <+bridge> What resolution do they have btw 08:33 <+bridge> lets make it 4k 08:33 <+bridge> who needs to support potatoes 08:35 <+bridge> It's even worse, I'm asking BCS i want to know if they are power of two textures 08:35 <+bridge> So actual potatoes xdd 08:36 <+bridge> 1995 gang xddd 08:41 <+bridge> oh tru 08:41 <+bridge> @Voxel tex needs to be 2**x 08:42 <+bridge> size 08:42 <+bridge> 128,256,512,1024 08:43 <+bridge> yeah yea 08:43 <+bridge> everything is on a 32x32 grid 08:44 <+bridge> the total image size i mean 08:44 <+bridge> are you trying to trace vanilla gameskin? 08:45 <+bridge> one second 08:45 <+bridge> rearranging 08:46 <+bridge> Power of two, not multiply of two 08:46 <+bridge> @Voxel what for lmao 08:46 <+bridge> 2^x 08:48 <+bridge> one seconnndd im getting the image sizes for everything 08:49 <+bridge> 2**5 08:55 <+bridge> weapons.png : 704 x 448 08:55 <+bridge> particles.png : 348 x 512 08:55 <+bridge> map_items.png : 256 x 384 08:55 <+bridge> hud.png : 384 x 384 08:55 <+bridge> game.png kind of sucks right now 09:01 <+bridge> Well might not matter anyway. Forgot we split them anyway 09:01 <+bridge> For pixel perfection xd 10:10 <+bridge> ye i kinda get the point 10:12 <+bridge> what annoys me the most is the fact that you need to update the whole gameskin even if you just want to change one single thing 10:16 <+bridge> Yep, I'd not use an texture atlas again for most stuff 10:16 <+bridge> Even at the cost of sightly higher load time 10:23 <+bridge> This was like that since I've made the templates for gameskin 10:24 <+bridge> yeah 10:25 <+bridge> Once it is done (and hopefully Nexus comes back), we'll progressively accept SVGs to teeskins 10:25 <+bridge> would be cool if we could maybe overwrite some gameskin part with additional file or something 10:26 <+bridge> like making your own template? 10:26 <+bridge> like if u have laser.png next to game.png it would show the laser from the second file or something 10:26 <+bridge> If there would be a text file which you can read the size of each weapon and paste it into the game with the appropriate size and position, it would be possible 10:27 <+bridge> i think this is a huge benefit for when we want to add more things 10:27 <+bridge> like map items or particles 10:27 <+bridge> it's healthily set up in a way where you can add more to the right or bottom 10:27 <+bridge> oh 10:27 <+bridge> i mean its not a big issue for me personally because i can use things like gimp 10:27 <+bridge> but it would make it easier for sure 10:27 <+bridge> of course i'll add a bit of whitespace but other than that i feel like this would be a game changer 10:28 <+bridge> Easier to manage storing Assets on databases too, as in we can just use an online editor API to edit SVGs (like color, size and outline) and let them implement their own 10:28 <+bridge> Damn I wish I knew typescript so that I can help Nexus 10:28 <+bridge> xd 10:29 <+bridge> Problem would be having other client migrate to that version, but I think it's for the better 10:30 <+bridge> It opens an opportunity to implement many things which would've made older / other clients broken 10:30 <+bridge> probably would require some asset loading priority 10:30 <+bridge> so it would support both 10:30 <+bridge> but load the new one over the old 10:31 <+bridge> It would need to recreate the old Assets from the new ones and load it into memory, so that other clients can see what Assets they use 10:31 <+bridge> Other than that, It should be fine 10:33 <+bridge> But this is what I'm getting at right now, because of other clients that don't depend on the newer versions of DDNet, it's made in a limited or restricted way. DDNet cannot expand as is right now 10:34 <+bridge> HUD is now updated so that we don't have to rearrange everything, just add more things into it 10:34 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106499580977221632/image.png 10:37 <+bridge> Please also nice the weapon Shields there 10:37 <+bridge> yes, please nice them 10:37 <+bridge> I still don't understand why they are in game png 10:38 <+bridge> They are not HUD so why should they be in hud.png? They are part of the game like health pickups 10:39 <+bridge> I mean, aren't these rendered onto the map? Like the flags? 10:39 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106500824848412732/image.png 10:39 <+bridge> Arent entities' hearts for floating hearts? 10:39 <+bridge> same for shields? 10:39 <+bridge> The. Extras png 10:40 <+bridge> But not game png. They are entities on the map 10:40 <+bridge> when we make this update i highly doubt we need an extras.png 10:40 <+bridge> if we make this update i highly doubt we need an extras.png 10:40 <+bridge> i doubt this will ever see the light but extras is the most useless thing ever 10:40 <+bridge> i doubt this will ever see the light of day but extras is the most useless thing ever 10:41 <+bridge> Tbh just stop using texture atlasses all along 10:41 <+bridge> They make customization impossible 10:41 <+bridge> Tomorrow someone adds a new map item and all customized map item png get incslid 10:42 <+bridge> Invalid 10:42 <+bridge> why not just yoink the 0.7 asset system :kek: 10:42 <+bridge> So what? Are you saying make each and every thing seperate? 10:42 <+bridge> Yes 10:42 <+bridge> Later in the client we do this anyway 10:42 <+bridge> Yeah why not, only load things which need to be loaded 10:42 <+bridge> Can't argue with that 10:43 <+bridge> I wanted to seperate weapons into their own things anyways 10:43 <+bridge> So I guess this is the only logical step after that 10:44 <+bridge> After what I experience in Teeworlds Data, changing one weapons and calling it a complete set, while the original is almost identical... It really makes you think that you can save a loooot of VRAM if we just separate weapons into their own category 10:44 <+bridge> cant we make the atlast at runtime, or is it worthless at that point 10:44 <+bridge> Then also change the structure a bit. Weapons in weapons directory. Map items in Map items etc 10:44 <+bridge> We currently do the opposite xd 10:44 <+bridge> ye would be nice 10:45 <+bridge> We split them to render pixel perfect 10:45 <+bridge> @Jupeyy_Keks i mean the point is to load just 1 texture so it uses less ram, and reuse parts of it for the weapons etc right 10:45 <+bridge> oh 10:45 <+bridge> ahm no 10:45 <+bridge> so u end up loading it as multiple images? 10:46 <+bridge> This also makes it easier to add more useless things! Like seperate explosion graphics for seperate objects! 10:46 <+bridge> (This is a joke) 10:46 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106502602734190592/image.png 10:46 <+bridge> ye, and good thing is, most duplicate texture parts in Assets would not need to be loaded at all, saving resources 10:46 <+bridge> aka u upload 6 textures instead of 1 10:46 <+bridge> to gpu 10:47 <+bridge> f.e: if you load 100 Assets which 30 has the same hook, then separating them will make you load only 1 hook and any other original asset parts will be loaded 10:48 <+bridge> why not 10:48 <+ChillerDragon> @heinrich5991 if i edit libtw2s gamenet loader.py how do i generate the json files? 10:48 <+ChillerDragon> ./generate_all didnt do anything 10:48 <+bridge> because people would be nosy about it again 10:48 <+bridge> like it'd be a fun detail but is it *really* nessicary? 10:48 <+bridge> ignroe it 10:48 <+bridge> depends on the community :justatest: 10:48 <+bridge> @Jupeyy_Keks i get a vulkang segfault on closing client 10:49 <+bridge> ``` 10:49 <+bridge> [Switching to Thread 0x7fffed90e6c0 (LWP 7581)] 10:49 <+bridge> 0x00007ffff4f0fc70 in _XSend () from /usr/lib64/libX11.so.6 10:49 <+bridge> (gdb) bt 10:49 <+bridge> #0 0x00007ffff4f0fc70 in _XSend () at /usr/lib64/libX11.so.6 10:49 <+bridge> #1 0x00007ffff4f0600a in XQueryExtension () at /usr/lib64/libX11.so.6 10:49 <+bridge> #2 0x00007ffff4ef96f2 in XInitExtension () at /usr/lib64/libX11.so.6 10:49 <+bridge> #3 0x00007ffff4ec536d in XextAddDisplay () at /usr/lib64/libXext.so.6 10:49 <+bridge> #4 0x00007fffedfc9e6f in () at /usr/lib64/libGLX_nvidia.so.0 10:49 <+bridge> #5 0x00007fffedfeb665 in () at /usr/lib64/libGLX_nvidia.so.0 10:49 <+bridge> #6 0x00007fffded4d499 in () at /usr/lib64/libnvidia-glcore.so.525.116.03 10:49 <+bridge> #7 0x00007fffded4b86c in () at /usr/lib64/libnvidia-glcore.so.525.116.03 10:49 <+bridge> #8 0x00007fffded4cf9f in () at /usr/lib64/libnvidia-glcore.so.525.116.03 10:49 <+bridge> #9 0x00007fffded3f7fc in () at /usr/lib64/libnvidia-glcore.so.525.116.03 10:49 <+bridge> #10 0x00007fffded3fdfe in () at /usr/lib64/libnvidia-glcore.so.525.116.03 10:49 <+bridge> #11 0x00007fffded3ffc1 in () at /usr/lib64/libnvidia-glcore.so.525.116.03 10:49 <+bridge> #12 0x00007fffedfea7bc in () at /usr/lib64/libGLX_nvidia.so.0 10:49 <+bridge> #13 0x00005555557490b5 in CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4224 10:49 <+bridge> #14 CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4220 10:49 <+bridge> #15 CCommandProcessorFragment_Vulkan::CleanupVulkanSwapChain(bool) (this=0x555555c7a630, ForceSwapChainDestruct=ForceSwapChainDestruct@entry=true) 10:49 <+bridge> at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5451 10:49 <+bridge> #16 0x000055555574eb64 in CCommandProcessorFragment_Vulkan::CleanupVulkan() (this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5462 10:49 <+bridge> #17 0x000055555575ee90 in CCommandProcessorFragment_Vulkan::Cmd_Shutdown(CCommandProcessorFragment_GLBase::SCommand_Shutdown const*) (pCommand=0x555556850f50, this=0x555555c7a630) 10:49 <+bridge> at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6649 10:49 <+bridge> #18 CCommandProcessorFragment_Vulkan::RunCommand(CCommandBuffer::SCommand const*) (this=0x555555c7a630, pBaseCommand=0x555556850f50) 10:49 <+bridge> at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6529 10:49 <+bridge> #19 0x00005555557672d6 in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) (this=0x555555c7c580, pBuffer=) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:335 10:50 <+bridge> #20 0x0000555555763186 in CGraphicsBackend_Threaded::ThreadFunc(void*) (pUser=pUser@entry=0x555555ad02a0) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:63 10:50 <+bridge> #21 0x00005555556f4de7 in thread_run(void*) (user=) at /home/edgar/data/ddnet/src/base/system.cpp:764 10:50 <+bridge> #22 0x00007ffff53efaa3 in () at /lib64/libc.so.6 10:50 <+bridge> #23 0x00007ffff5471b5c in () at /lib64/libc.so.6 10:50 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106503511384002570/image.png 10:50 <+bridge> we have nvidia-driver-530 yk 10:50 <+bridge> colors better xd 10:50 <+bridge> If we end up splitting all the game images and reordering them in folders, then we should just do this with all images once to get a better structure (including stuff like file icons, demo buttons, emoticons, etc.) 10:50 <+bridge> yeah the rewor needs to be done in 1 go 10:50 <+bridge> for everything 10:50 <+bridge> with scripts to convert old pngs to new 10:50 <+bridge> so custom assets are kept 10:50 <+bridge> or the other way around for compatibility 10:50 <+bridge> idc about backwards compat 10:50 <+bridge> me too :gigachad: 10:51 <+bridge> then why u say that 10:51 <+bridge> xd 10:51 <+bridge> idk, I had a brain damage for this moment 10:51 <+bridge> latest rls gang 10:51 <+bridge> :gigachad: 10:51 <+bridge> It won't necessarily use less ram. Also more textures don't mean more bandwidth. However it might mean using memory less effectively BCS it's in different locations 10:51 <+ChillerDragon> got it @heinrich5991 ``python3 serialize.py --version 0.7 raw/teeworlds-0.7.5.py > spec/teeworlds-0.7.5.json`` 10:51 <+bridge> nobo chiller 10:52 <+bridge> nobody cares about 0.7 10:52 <+bridge> @Jupeyy_Keks any hint on why the segfault happens? 10:52 <+bridge> Wait, so how would it work when you want to actually **customize** it? 10:52 <+bridge> What would this look like? 10:52 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106504178936840232/image.png 10:52 <+bridge> Enable Vulkan layers. Can't imagine why it crashes 10:52 <+bridge> crap forgot to untag robyt 10:53 <+bridge> @Jupeyy_Keks odd, my ddnet from gentoo ebuild doesnt crash 10:53 <+bridge> It would need a window rework :pepekek: 10:53 <+bridge> ``` 10:53 <+bridge> rm -rf build/* 10:53 <+bridge> 10:53 <+bridge> env CXXFLAGS='-march=native -mtune=native' cmake -S . -B build/ \ 10:53 <+bridge> -DCMAKE_BUILD_TYPE=RelWithDebInfo \ 10:53 <+bridge> -GNinja \ 10:53 <+bridge> -DDEV=ON \ 10:53 <+bridge> -DVULKAN=ON \ 10:53 <+bridge> -DCMAKE_EXPORT_COMPILE_COMMANDS=ON 10:53 <+bridge> 10:53 <+bridge> ln -f -s build/compile_commands.json compile_commands.json 10:53 <+bridge> ``` 10:53 <+bridge> it uses mold by default, thats pog 10:53 <+bridge> Maybe provide shortcut buttons that select entire sets that have the same name 10:53 <+bridge> how to do that 10:54 <+bridge> Start with dbg_gfx 4 10:55 <+bridge> For a start we could use the directory name.. e.g. default is weapons/default/*.png 10:55 <+bridge> 10:55 <+bridge> We can display them similar to here in a group 10:55 <+bridge> That's also how entities do it btw 10:55 <+bridge> yeah, just show them the same as before grouped, so you can select all of them at the same time 10:55 <+bridge> 2023-05-12 10:55:48 I vulkan: deallocated chunk of memory with size: 196608 for frame 1 (buffer) 10:55 <+bridge> 2023-05-12 10:55:48 I vulkan: deallocated chunk of memory with size: 196608 for frame 1 (buffer) 10:55 <+bridge> Segmentation fault 10:56 <+bridge> It must be Vulkan error if it's a detection by a VK layer 10:56 <+bridge> Also u need to install them 10:56 <+bridge> Dunno if they exist for Nvidia 10:56 <+bridge> i got vulkan-layers 10:57 <+bridge> Oh man, you know what would be great? I don't think this will be optimal for real time gameplay but what if you could choose random weapons for each tee for demo rendering/playback? 10:57 <+bridge> i had this idea before 10:58 <+bridge> Yes it's a long time suggestion 10:58 <+bridge> Like with everything our network code sucks 10:58 <+bridge> Before someone won't convince Heinrich to finally break with it it will create bloat 10:59 <+bridge> I mean for non random 10:59 <+bridge> E.g. a player sends his selection 10:59 <+bridge> Random is weird xd 10:59 <+bridge> But i like the idea of customization 11:00 <+bridge> yeah 11:00 <+bridge> i need to add new netobjs for damage indicator, spawn particles, etc so i can apply opacity correctly 11:02 <+bridge> imagine you can send over particles too 11:02 <+bridge> custom grenade explosions 11:02 <+bridge> 🔥 11:03 <+bridge> @Jupeyy_Keks ok, it segfaults on master, but not on 16.9 tag 11:03 <+bridge> im gonna find the commit 11:04 <+bridge> I don't want to go into detail but i talked to Heinrich. It's not that he dislike suchs ideas. It's simply that he wants such features always be downward compatible. So nice dreams but probably not maintainable. Esp. Since most contributions are not high quality and/or not highly tested 11:04 <+bridge> yeah he wantsb ackwards compat 11:04 <+bridge> idk why so much 11:04 <+bridge> we could make so much improvements 11:04 <+bridge> way more modularity 11:04 <+bridge> no ugly code 11:04 <+bridge> Oh weird indeed 11:04 <+bridge> https://github.com/ddnet/ddnet/pull/6560 11:13 <+bridge> Why do you want to split game.png anyway? 11:14 <+bridge> ```bash 11:14 <+bridge> ❯ git bisect bad 11:14 <+bridge> c8b69dd8156a4a36656d0467845ca9b02d20fc18 is the first bad commit 11:14 <+bridge> commit c8b69dd8156a4a36656d0467845ca9b02d20fc18 11:14 <+bridge> Author: Robert Müller 11:14 <+bridge> Date: Wed May 10 20:51:25 2023 +0200 11:14 <+bridge> 11:14 <+bridge> Properly uninitialize all client components 11:14 <+bridge> 11:14 <+bridge> Track stack of cleaner functions that destruct client components so exactly the correct cleanup is performed in the reverse order of initialization. 11:14 <+bridge> 11:14 <+bridge> This allows performing the cleanup also in the early-return cases without introducing duplicate code. 11:14 <+bridge> 11:14 <+bridge> src/engine/client/client.cpp | 61 +++++++++++++++++++++++++++----------------- 11:14 <+bridge> 1 file changed, 38 insertions(+), 23 deletions(-) 11:14 <+bridge> ``` 11:14 <+bridge> @Jupeyy_Keks found it 11:14 <+bridge> its this 11:14 <+bridge> causes segfault 11:14 <+bridge> @Robyt3 !! 11:14 <+ChillerDragon> ```bash xd 11:15 <+bridge> because its trash + incompatable and hard to update 11:16 <+bridge> added the trace there 11:16 <+bridge> xd 11:16 <+bridge> I'll take a look later 11:17 <+bridge> ok thx 11:17 <+bridge> Trash is hard to define. Incompatible with what? Why is 5 different images easier to update than 1? To me it seems that the steps would be about the same 11:17 <+bridge> diferent images allows more custom options tho 11:17 <+bridge> did you read the whole convo 11:18 <+bridge> ye read backlog 11:19 <+bridge> Mostly skimmed through it where you were talking about how you can add cool new graphics and how it’d break backwards compatibility. Neither are very convincing reasons to do it 11:20 <+bridge> @Learath2 do u know why gdb says warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts 11:21 <+bridge> This is about the only benefit I can think of 11:21 <+bridge> Nope, sorry boss 11:21 <+bridge> Sounds unimportant 11:22 <+bridge> @Learath2 any fancy plugin scripts for gdb u use? 11:22 <+bridge> i wanna make my gdb powerful 11:22 <+bridge> or is lldb better 11:22 <+bridge> I use GEF while reverse engineering 11:23 <+bridge> oh 11:23 <+bridge> lldb shows column too 11:23 <+bridge> not just line 11:23 <+bridge> It’s not as useful when debugging software you have the source to 11:23 <+bridge> What are u reverse engineering? 11:23 <+bridge> ```lldb 11:23 <+bridge> * thread #5, name = 'DDNet', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) 11:23 <+bridge> frame #0: 0x00007ffff4f0fc70 libX11.so.6`_XSend + 48 11:23 <+bridge> libX11.so.6`_XSend: 11:23 <+bridge> -> 0x7ffff4f0fc70 <+48>: movq (%rax), %rsi 11:23 <+bridge> 0x7ffff4f0fc73 <+51>: andl $0x1, %edx 11:23 <+bridge> 0x7ffff4f0fc76 <+54>: movq %rsi, (%rsp) 11:23 <+bridge> 0x7ffff4f0fc7a <+58>: jne 0x7ffff4f0fdb9 ; <+377> 11:23 <+bridge> (lldb) bt 11:23 <+bridge> * thread #5, name = 'DDNet', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) 11:23 <+bridge> * frame #0: 0x00007ffff4f0fc70 libX11.so.6`_XSend + 48 11:23 <+bridge> frame #1: 0x00007ffff4f0600a libX11.so.6`XQueryExtension + 170 11:24 <+bridge> frame #2: 0x00007ffff4ef96f2 libX11.so.6`XInitExtension + 50 11:24 <+bridge> frame #3: 0x00007ffff4ec536d libXext.so.6`XextAddDisplay + 77 11:24 <+bridge> frame #4: 0x00007fffedfc9e6f libGLX_nvidia.so.0`___lldb_unnamed_symbol3788 + 239 11:24 <+bridge> frame #5: 0x00007fffedfeb665 libGLX_nvidia.so.0`___lldb_unnamed_symbol4144 + 69 11:24 <+bridge> frame #6: 0x00007fffded4d499 libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75337 + 313 11:24 <+bridge> frame #7: 0x00007fffded4b86c libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75283 + 124 11:24 <+bridge> frame #8: 0x00007fffded4cf9f libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75329 + 31 11:24 <+bridge> frame #9: 0x00007fffded3f7fc libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75086 + 316 11:24 <+bridge> frame #10: 0x00007fffded3fdfe libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75094 + 110 11:24 <+bridge> frame #11: 0x00007fffded3ffc1 libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75095 + 17 11:24 <+bridge> frame #12: 0x00007fffedfea7bc libGLX_nvidia.so.0`___lldb_unnamed_symbol4127 + 60 11:24 <+bridge> frame #13: 0x00005555558379ee DDNet`CCommandProcessorFragment_Vulkan::DestroySwapChain(this=0x0000555555f99f60, ForceDestroy=true) at backend_vulkan.cpp:4224:25 11:24 <+bridge> frame #14: 0x000055555583bfda DDNet`CCommandProcessorFragment_Vulkan::CleanupVulkanSwapChain(this=0x0000555555f99f60, ForceSwapChainDestruct=true) at backend_vulkan.cpp:5451:19 11:24 <+bridge> frame #15: 0x0000555555857c60 DDNet`void CCommandProcessorFragment_Vulkan::CleanupVulkan(this=0x0000555555f99f60) at backend_vulkan.cpp:5462:27 11:24 <+bridge> frame #16: 0x000055555583fd56 DDNet`CCommandProcessorFragment_Vulkan::Cmd_Shutdown(this=0x0000555555f99f60, pCommand=0x0000555557150d10) at backend_vulkan.cpp:6649:22 11:24 <+bridge> frame #17: 0x000055555583f613 DDNet`CCommandProcessorFragment_Vulkan::RunCommand(this=0x0000555555f99f60, pBaseCommand=0x0000555557150d10) at backend_vulkan.cpp:6529:20 11:24 <+bridge> frame #18: 0x00005555558d0a63 DDNet`CCommandProcessor_SDL_GL::RunBuffer(this=0x0000555555f8f6c0, pBuffer=0x00007fffffffd390) at backend_sdl.cpp:335:38 11:24 <+bridge> frame #19: 0x00005555558cf7bb DDNet`CGraphicsBackend_Threaded::ThreadFunc(pUser=0x0000555555de32a0) at backend_sdl.cpp:63:34 11:24 <+bridge> frame #20: 0x00005555557ceae7 DDNet`::thread_run(user=0x0000555555edd8d0) at system.cpp:764:12 11:24 <+bridge> Mh, gdb I find easier to use, but they are about the same in capability 11:24 <+bridge> lldb shows more info for me 11:24 <+bridge> i think u can tell clang to make lldb optimized debug info 11:24 <+bridge> atleast thats a thing in llvm iirc 11:25 <+bridge> Oh I remember one feature in lldb that’s nice, it has full support for c++ syntax. So you can do method calls in expressions easily 11:26 <+bridge> Mostly ctfs, though it’s been a while since I had time to do one 11:27 <+bridge> can someone review https://github.com/ddnet/ddnet/pull/6560 too 11:27 <+bridge> i want this merged 11:28 <+bridge> i noticed we got 33prs there 11:28 <+bridge> starting to look like tw xd 11:29 <+bridge> and also my pr thanks 11:30 <+bridge> Yeah :AnyaSob: 11:31 <+bridge> Maybe I’ll do a review day tomorrow 11:31 <+bridge> i would merge stuff, but im not confident in havent missed stuff 11:31 <+bridge> having not* 11:31 <+bridge> english broke 11:44 <+bridge> https://youtu.be/IfCRHSIg6zo 11:45 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106517547156766801/image.png 11:45 <+bridge> why does clang doesnt find it 11:45 <+bridge> its annoying sometimes 11:46 <+bridge> clangd* 11:46 <+bridge> Do you have your compile_commands set properly? Does clangd even use them? 11:47 <+bridge> same thing happens in vscode 11:47 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106517911352389663/image.png 11:47 <+bridge> i have -DCMAKE_EXPORT_COMPILE_COMMANDS=ON 11:47 <+bridge> and it knwos the type of functions 11:47 <+bridge> if i hover on em 11:47 <+bridge> so its like partially knows 11:51 <+bridge> idk 11:51 <+bridge> oh 11:51 <+bridge> it onl happens in .h files 11:51 <+bridge> > The error occuring in an .h but not in a .cpp file may indicate that clangd is treating the .h file as a C header rather than a C++ header. 11:51 <+bridge> Maybe it's actually not included. I had such things too after the header include refactor 11:53 <+bridge> ok it already treats it as c++ header 11:53 <+ChillerDragon> !rust wot a function without body? 11:53 < chillerbot4> @Ryozuki 11:53 <+ChillerDragon> https://github.com/heinrich5991/libtw2/blob/0352e6f2f23e01e17c6212701f8faa166c524522/wireshark-dissector/sys/src/lib.rs#L2902-L2908 11:53 <+ChillerDragon> how does that work 11:54 <+bridge> dude its a extern fn 11:54 <+ChillerDragon> ``pub fn create_dissector_handle() -> dissector_handle_t;`` 11:54 <+bridge> its just inside and extern block 11:54 <+ChillerDragon> so its a c func? 11:54 <+bridge> same as pub extern fn 11:54 <+bridge> ye 11:54 <+ChillerDragon> hm 11:54 <+bridge> linked 11:54 <+bridge> libtw2 uses old rust 11:54 <+bridge> for lot of stuff 11:54 <+bridge> and also heinrich style 11:54 <+ChillerDragon> ye libtw is old 11:54 <+bridge> i dont like it much 11:54 <+ChillerDragon> hater 11:54 <+ChillerDragon> we know 11:54 <+bridge> xd 11:55 <+ChillerDragon> stop bully heinrich 11:55 <+ChillerDragon> i his fan 11:56 <+bridge> https://tenor.com/view/clippy-microsoft-office-word-publisher-gif-5630386 11:56 <+bridge> xd 11:57 <+bridge> it it compiles it means vec2 ends up there right 11:57 <+bridge> but why clangd doesnt find it 11:57 <+bridge> smh 11:57 <+bridge> rust-analyzer best 11:57 <+ChillerDragon> once again im stuck at hello world in rust fml 11:59 <+bridge> Try including the base vmath thing there and see if that helps? 12:00 <+bridge> Idk how these tools resolve things when they aren't included in this file but the previous one includes both 12:02 <+bridge> it helps 12:02 <+bridge> but heinrich will say its a useless include 12:03 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106522010923839599/image.png 12:03 <+bridge> same happens in otherp laces 12:03 <+bridge> sux 12:03 <+bridge> c++ tooling bad 12:03 <+ChillerDragon> skill issue 12:04 <+ChillerDragon> have you tried using eclipse c++ instead of vim? 12:05 <+ChillerDragon> @Ryozuki "i noticed we got 33prs there" where? 12:05 <+bridge> Is it really? I think it's fine, the include guard will stop it from being included and it's only strictly correct with the include no? 12:05 <+bridge> Do you happen to know if there is any possibility inside a .rs file to hide the keyword unsafe from a user? 12:05 <+bridge> 12:05 <+bridge> E.g. in c it's simply #define notunsafe unsafe 12:05 <+ChillerDragon> trol 12:06 <+bridge> This is a serious question if u mean me 12:06 <+ChillerDragon> i mean u 12:06 <+bridge> but this happens in many header files 12:06 <+ChillerDragon> > If you are looking for an alternative to C's #define, there is nothing that will allow arbitrary words to be used as keywords (which is probably a good thing). 12:06 <+bridge> cant we just use c++20 modules 12:06 <+bridge> or 22 12:06 <+bridge> i forgot 12:06 <+bridge> Don't know if it helps here 12:06 <+ChillerDragon> ryo where we got 33prs? 12:06 <+bridge> I'd bet the tooling is even worse for those 12:07 <+bridge> c++ headers are one of the hardest things to parse on earth 12:07 <+bridge> in ddnet chiller 12:07 <+bridge> I'd go so far to say that they are unparseable 12:07 <+ChillerDragon> who is we? xd 12:07 <+ChillerDragon> ah u mean open? 12:07 <+bridge> ye dumbo 12:07 <+ChillerDragon> fakof 12:07 <+ChillerDragon> !jup maybe a macro can hide it away 12:07 < chillerbot4> @Jupstar ✪ 12:07 <+bridge> Reported for being rude. You'll be banished to the shadow realm 12:08 <+ChillerDragon> !jup cargo add custom-unsafe-macro then call that and slap ur code in 12:08 < chillerbot4> @Jupstar ✪ 12:08 <+bridge> i added a o to not be rude 12:08 <+ChillerDragon> i added a fakof to not sound serious 12:08 <+bridge> I bet it was just a typo 12:09 <+bridge> dumbo is the elephant 12:09 <+ChillerDragon> lol 12:09 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106523461238652989/9k.png 12:09 <+bridge> im safe 12:09 <+bridge> I'll ban you to be safe 12:09 <+bridge> ChillerDragon mh yeah thought about that. Shit xddd 12:09 <+ChillerDragon> u tryna detect unsafe rust? 12:09 <+bridge> there is with macros 12:09 <+bridge> but u can add a forbid unsafe_code in the top level 12:10 <+bridge> unsafe rust? from ryo? 12:10 <+bridge> impossible 12:10 <+ChillerDragon> also there is generated code that can introduce unsafe code 12:10 <+bridge> i do it everyday at work 12:10 <+bridge> :justatest: 12:10 <+ChillerDragon> im sure rust macros could generate could that gets added to compilation 12:10 <+ChillerDragon> code* 12:10 <+bridge> I am thinking about a way to make sure unsafe is not used at all for an API. Maybe I should simply disallow extern creates 12:10 <+bridge> rust macros can do anything 12:10 <+bridge> in sqlx they verify a sql query is valid 12:10 <+bridge> by checking with the db 12:10 <+bridge> at compile itme 12:10 <+bridge> time 12:10 <+bridge> Yeah, they are a problem 12:11 <+bridge> Can u disable them xd 12:11 <+bridge> well the ones that can do anything are the procdural macros 12:11 <+ChillerDragon> yea so i can write a rust macro that generates rust code and includes it in the compiled end result using the unsafe keyword without using the string "unsafe" 12:11 <+bridge> Yep 12:11 <+bridge> i mean u cant avoid this 12:11 <+bridge> for example another attack vector is build.rs 12:11 <+bridge> Just don't expose any unsafe functions? 12:11 <+bridge> it executes on build time 12:12 <+bridge> forbid unsafe is the best bet 12:12 <+bridge> I cannot control the code directly 12:12 <+bridge> u mean a dependency? 12:12 <+bridge> I can only analyse it 12:12 <+bridge> safe rust can be evil too 12:12 <+bridge> But i could compile it. So maybe inject forbid unsafe... But how safe would that be 12:12 <+bridge> The user could simply allow it again 12:13 <+bridge> Who would lie to you about being unsafe anyway? 12:13 <+ChillerDragon> there are hacky macros to check for panics maybe there is something for unsafe too 12:13 <+bridge> forbid unsafe checks the current library has no unsafe usage 12:13 <+bridge> Someone who executes code on my computer 12:13 <+bridge> it works for macros too 12:13 <+bridge> it detects everything 12:13 <+bridge> but only for ur crate 12:13 <+bridge> You can execute evil code without unsafe too 12:13 <+bridge> yeah 12:13 <+bridge> safe rust is not sandboxed 12:13 <+bridge> It has no access to system api 12:14 <+bridge> Yeah it's sandboxed 12:14 <+bridge> @Jupeyy_Keks use this https://github.com/rhaiscript/rhai 12:14 <+bridge> You can open files in safe rust. You mean no unsafe anywhere in any call chain? 12:14 <+bridge> I need good performance 12:15 <+bridge> it should have good perf 12:15 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106525023423975504/image.png 12:15 <+bridge> I actually have code that is sandboxed completely except for a specific API. And all I need here is memory safety 12:15 <+bridge> The API must be robust anyway 12:15 <+ChillerDragon> !jup https://crates.io/crates/no-panic 12:15 < chillerbot4> @Jupstar ✪ 12:16 <+ChillerDragon> its not unsafe related but panic 12:16 <+ChillerDragon> > A Rust attribute macro to require that the compiler prove a function can't ever panic. 12:16 <+bridge> the panic case is hard 12:16 <+bridge> Panic is not a problem 12:16 <+ChillerDragon> maybe unsafe gets caught by that too 12:16 <+bridge> I can control abortion 12:16 <+bridge> panic is not unsafe 12:16 <+bridge> nobo 12:16 <+ChillerDragon> but is unsafe panic? 12:17 <+bridge> unsafe needs to deal with panics 12:17 <+bridge> but not the other way around 12:17 <+bridge> a panic is safe 12:17 <+bridge> unsafe needs to deal with panics in the way of assuming stuff 12:17 <+ChillerDragon> yes but can a unsafe not panic? 12:17 <+bridge> unsafe can panic 12:17 <+bridge> safe c an panic 12:17 <+ChillerDragon> will it always? 12:17 <+bridge> ???? 12:18 <+bridge> So you get a piece of code to execute in a sandbox. You already limited the api to the outside. Just disallow external crates and std in the 'sandboxed' code? 12:18 <+ChillerDragon> i mean the no-panic crate ensures that your program wont compile if you have the possibility to panic. if unsafe introduces that possibility then you catch those as well 12:18 <+bridge> Yeah but e.g. using a vec should be allowed again xD 12:18 <+bridge> related to unsafe and panick (unwinds): https://doc.rust-lang.org/nomicon/unwinding.html 12:18 <+bridge> > Rust has a tiered error-handling scheme: 12:18 <+bridge> > 12:19 <+bridge> > If something might reasonably be absent, Option is used. 12:19 <+bridge> > If something goes wrong and can reasonably be handled, Result is used. 12:19 <+bridge> > If something goes wrong and cannot reasonably be handled, the thread panics. 12:19 <+bridge> > If something catastrophic happens, the program aborts. 12:19 <+bridge> xd 12:19 <+bridge> I just need to make sure the vec is not nullptr for example once the API gets this vec 12:19 <+bridge> Mh expose vecs through your api 12:20 <+bridge> You can't let them use std, if they can use std they can do anything 12:20 <+bridge> Mhh I dunno 12:20 <+bridge> And if you get an our of memory then throw your hands up in the air since there is nothing you can do in Rust 12:21 <+bridge> Fwiw I think you should use something like wasm, it's performant enough nowadays 12:21 <+bridge> I guess the sandbox itself needs support for checking memory safety here :/ 12:21 <+bridge> there is try_ stuff getting in 12:21 <+bridge> but yeah 12:21 <+bridge> Yes. But if I want the wasm module to call host functions 12:21 <+bridge> https://rust-lang.github.io/rfcs/2116-alloc-me-maybe.html 12:21 <+bridge> https://docs.rs/fallible_collections/latest/fallible_collections/ 12:21 <+bridge> @deen 12:22 <+bridge> this got a push thanks to linux 12:23 <+bridge> You can export host functions to wasm. Just need to be selective with what you expose. No direct file opening mechanisms 12:24 <+bridge> And how does it handle data types? 12:25 <+bridge> @Jupeyy_Keks https://docs.wasmtime.dev/lang-rust.html#importing-host-functionality 12:25 <+bridge> In a very ugly manner 😄 12:26 <+bridge> Well this is with simple data types 12:26 <+bridge> Is there also a complex example? 12:26 <+bridge> u probs need to make them repr C 12:26 <+bridge> but idk 12:26 <+bridge> i never used this 12:26 <+bridge> Forget passing complex types, you have something like an array, something like a dict, bools, ints, doubles iirc 12:27 <+bridge> A dictionary? So a hashmap? 12:28 <+bridge> Mh ok anyway, guess have to think what exactly i want 12:30 <+bridge> I think they called them tables tho I'm not a web assembly expert 12:30 <+bridge> https://github.com/OfekShilon/optview2 12:30 <+bridge> Guess I need to use json strings 😂😂 javascript kiddos 12:31 <+bridge> utf-16 ftw 12:31 <+bridge> ah i read js 12:31 <+bridge> xd 12:33 <+bridge> @Learath2 how do u prevent oom or do something if a alloc fails in c++? 12:33 <+bridge> ah i guess malloc simply returns a nullptr? xd 12:33 <+bridge> Yes 12:34 <+bridge> but i bet 99% of ppl dont check nullptr on malloc 12:34 <+bridge> we certainly dont 12:34 <+bridge> And in C++ it's either nullptr or new throws 12:34 <+bridge> I always check mine religiously 12:34 <+bridge> xd 12:34 <+bridge> but malloc is tricky right 12:34 <+bridge> cuz overcommit 12:34 <+bridge> in linux 12:34 <+bridge> it can give u all u want 12:35 <+bridge> guys... already 500+ messages and it's not even noon... 12:35 <+bridge> well nobody forces u to read em kek 12:35 <+bridge> mainly a discussion about images and my segfault 12:35 <+bridge> which wouldnt happen in rust (probs) 12:39 <+bridge> But Friday 12:41 <+bridge> Yep, return of malloc doesnt mean much nowadays 😛 12:42 <+bridge> same here 🙂 12:42 <+bridge> merge my pr it will be fine 12:42 <+bridge> :kek: 12:43 <+bridge> I'll merge it later 12:44 <+bridge> on the image thing, i don't think it's a good idea to split to small files 12:45 <+bridge> https://www.twitch.tv/videos/1817384336 12:45 <+bridge> i did the fixes of the pr yesterday, it took me 1h cuz i forgot abotu the stupid m_Teams, im certainly rusty 12:45 <+bridge> we would lose thematic games doing so, but we can maybe split them in software and allow a lot more option directly in game (like a split game icons option) 12:45 <+bridge> the video has no voice btw xd 12:45 <+bridge> We lost what? 12:46 <+bridge> U mean that it will not look fitting design wise? 12:46 <+bridge> sorry, im working hard on friday too 😄 12:46 <+bridge> yes, like thematic game.png, such as Pipou's 12:46 <+bridge> Why would we loose it 12:46 <+bridge> He can create a game bundle just like now 12:47 <+bridge> we need to ask the resident designer ravie 12:47 <+bridge> Boring 12:47 <+bridge> im not sure it's more practical, gotta ask graphics people @Pipou @Voxel 12:47 <+bridge> i know, hence the title 12:47 <+bridge> He always has opposite opinion to mine 12:47 <+bridge> 10 minutes before my 2nd audition 🙂 12:47 <+bridge> Very simple xd 12:47 <+bridge> xd 12:48 <+bridge> audition for? 12:48 <+bridge> @Ravie 12:48 <+bridge> associate professor position 12:48 <+bridge> ohh 12:48 <+bridge> idk what that means but nice, or my condolences 12:48 <+bridge> (insert meme here) 12:49 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106533508832317440/fetchimage.png 12:49 <+bridge> xd 12:49 <+bridge> Xd 12:49 <+bridge> Are u then rich enough to buy win10? 12:50 <+bridge> my mind is not poor enough to do that 12:50 <+bridge> just use linux 12:50 <+bridge> if my teacher told me he uses windows 12:50 <+bridge> soon(tm) 12:50 <+bridge> i would respect him less 12:50 <+bridge> XD 12:50 <+bridge> :justatest: 12:50 <+bridge> i use linux for almost everything 12:50 <+bridge> except games 12:50 <+bridge> same 12:50 <+bridge> sadly 12:50 <+bridge> I use it for everything 12:50 <+bridge> pog 12:51 <+bridge> i teach RISC-V on linux 12:51 <+bridge> Games that don't work are not worth it from the start 12:51 <+bridge> we really need #dev-offtopic 12:51 <+bridge> true 12:51 <+bridge> but sometimes i wanna try those aaa games 12:51 <+bridge> to not pollute this channel 😄 12:51 <+bridge> 😎 12:51 <+bridge> and make use of my 3080 12:51 <+bridge> Steal 4090 from sis 12:52 <+bridge> @Jupeyy_Keks i went to her house and installed the 4090 vertically 12:52 <+bridge> it was like usual before, b ut we couldnt close the case 12:52 <+bridge> this time it worked 12:52 <+bridge> its a massive brick 12:52 <+bridge> vertical i mean like this 12:52 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106534441796518020/maxresdefault.png 12:53 <+bridge> @Jupeyy_Keks 190 fps on cyberpunk with the new rtx mode 12:53 <+bridge> and the fans barely spinning 12:53 <+bridge> 55c iirc 12:53 <+bridge> she has a slow ram i told her to change tho 12:53 <+bridge> Xd 12:54 <+bridge> xd 12:54 <+bridge> i hope nvidia releases a new gpu 12:54 <+bridge> so i can get this 4090 12:54 <+bridge> kek 12:54 <+bridge> But genshin has waifus 12:54 <+bridge> do u rly play genshin 12:54 <+bridge> i got bored in 10 mins 12:55 <+bridge> but genshin is played by all egirl weebs 12:55 <+bridge> well most egirls play valoran 12:55 <+bridge> xdd 12:55 <+bridge> valorant 12:55 <+bridge> boring game too 12:55 <+bridge> csgo is better 12:55 <+bridge> Ofc, the music is amazing and the story is pretty interesting 12:55 <+bridge> oh it has story 12:55 <+bridge> And it has waifus, it's good enough for me 13:00 <+bridge> @Patiga have you been writing an essay for the last hour or is mobile discord glitching? 😄 13:01 <+bridge> scrolling through the chat, I blame discord :bluekitty: 13:03 <+bridge> @Jupeyy_Keks btw what was your reasoning to drop the texture atlas? most of them do not have pixels at the borders of each segment. for example skin, emote, (most?) of game 13:03 <+bridge> That still scales them a bit 13:04 <+bridge> what scales them? 13:04 <+bridge> Because u have to remove texeloffset 13:04 <+bridge> From the texture coordinates 13:04 <+bridge> If u don't do this, it will bleed 13:05 <+bridge> ow what is a texel-offset? 13:05 <+bridge> if the textures within the atlas don't touch the border, it shouldn't be a problem, right? 13:05 <+bridge> If ur IMG is 1024*1024 it's 1/1024 13:05 <+bridge> But then it's luck 13:05 <+bridge> It only works under this circumstance 13:06 <+bridge> afaik we don't have anti-aliasing on guns and tees, right? 13:07 <+bridge> We don't do multi sampling for individual render calls 13:07 <+bridge> Only full screen 13:08 <+bridge> Or only framebuffer 13:08 <+bridge> Would be more correct 13:08 <+bridge> I'm confused. multi-sampling != mip-maps, right? did I falsely believe that ddnet uses mip-maps? 13:09 <+bridge> Ddnet uses mipmap 13:10 <+bridge> alongside multi-sampling, or are they used in different places? 13:10 <+bridge> yeah? 13:11 <+bridge> We only use multi sampling on the global framebuffer 13:11 <+bridge> We don't implement any other kind of anti aliasing 13:12 <+bridge> so we render a larger image and then multi-sample it down? 13:12 <+bridge> Doesn't matter much for a game. For some DBMSes I consider it essential not to crash on OoM, but to handle it better 13:14 <+bridge> I'm a bit confused rn. Why larger image 13:15 <+bridge> Ssaa, super sampling, does that afaik 13:15 <+bridge> Multi sample averages between neighbors pixels. Or is the name ambiguous? 13:16 <+bridge> > We only use multi sampling on the global framebuffer 13:16 <+bridge> I didn't understand this. is the global framebuffer the frame that gets presented, or one step before that? 13:17 <+bridge> That's a hard question. It's actually multiple framebuffer images that combine into one in the last step xD 13:17 <+bridge> i'm sure this has been answered recently enough but i can't find it 13:17 <+bridge> how do you get the check mark on your server? i see kog also has it so i know it's not ddnet exclusive, what hoops do you have to jump through to get "verified" 13:17 <+bridge> So u could say it's after the fragment shader but before written to the output image i think 13:18 <+bridge> @Patiga i feel like we drifting away, what was the original question? 13:18 <+bridge> Why I do pixel perfect 13:19 <+bridge> BCS without Texel offsets we can bleed 13:19 <+bridge> Even if just hypothetically 13:19 <+bridge> At least the hook would bleed 13:19 <+bridge> Since the chain hits the edge 13:20 <+bridge> true, I currently handle the hook differently because it has to be rendered alongside the tee 13:21 <+ChillerDragon> Still not too sure on how to read rust docs how do i create a CStr that is not nul terminated? https://doc.rust-lang.org/core/ffi/struct.CStr.html 13:21 <+bridge> so you have a texture for each atlas segment if I understand correctly, does that mean you have one draw call for each body part of each tee? 13:22 <+ChillerDragon> ah this should do ``CStr::from_bytes_until_nul()`` sorry for rubberducking in this channel 13:22 <+bridge> cstr is null terminated 13:22 <+bridge> a str or string isnt 13:22 <+bridge> ChillerDragon: is there context to your message in the chatlog? I don't think you are supposed to have a CStr without a nul byte 13:23 <+ChillerDragon> no context no brain 13:23 <+ChillerDragon> i probably do it wrong xd 13:23 <+bridge> what r u doing 13:23 <+bridge> cstr is only useful for ffi 13:23 <+ChillerDragon> trying to print a message in rust xd 13:23 <+bridge> why using cstr 13:23 <+bridge> check the example code 13:23 <+bridge> usnafe 13:23 <+ChillerDragon> im segfaulting since 1h on hello world 13:23 <+bridge> cstr is safe 13:23 <+bridge> Yes 13:24 <+bridge> does it guarantee termination 13:24 <+bridge> define termination 13:24 <+bridge> \0 at the end 13:24 <+bridge> cstr guarantees the str has a nul byte 13:24 <+bridge> its the stupid C requirement 13:24 <+bridge> also for each single particle? seems not that trivial to group them @Jupeyy_Keks 13:24 <+bridge> in rust code itself u should use str though, its more optimized 13:24 <+bridge> to be fair the only other way was to keep track of string lengths directly which would be even more of a pain 13:24 <+bridge> No 13:24 <+bridge> but yes i hate c string termination too 13:25 <+bridge> anyone know 13:25 <+bridge> It gets grouped as much as possible 13:25 <+bridge> But the particle groups are new draw calls indeed 13:25 <+bridge> chiller check rust_version.rs 13:26 <+ChillerDragon> ah no ryo in tw codebase im rust wizzard dont worry 13:27 <+ChillerDragon> im trying to log to console in libtw2 wireshark dissector 13:27 <+ChillerDragon> i kinda manage but it segfaults or doesnt print at all 13:27 <+bridge> But since u ask I'd only allow squares for particles here and use a texture array rather than atlas 13:27 <+ChillerDragon> https://zillyhuhn.com/cs/.1683890856.png 13:27 <+ChillerDragon> F 13:28 <+bridge> in ffi u have to be careful on the rust side 13:28 <+bridge> if u pass a object to cpp 13:28 <+bridge> cuz rust drops 13:28 <+bridge> use leak to give ownership to cpp side 13:28 <+ChillerDragon> if i def it in place? 13:28 <+bridge> mem forget 13:28 <+ChillerDragon> hm k 13:28 <+bridge> drop happens at the end of scope 13:28 <+bridge> https://doc.rust-lang.org/std/mem/fn.forget.html 13:29 <+ChillerDragon> ye got it 13:29 <+ChillerDragon> thanks 13:29 <+ChillerDragon> ima try 13:30 <+bridge> u can also use https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html 13:30 <+bridge> https://doc.rust-lang.org/std/mem/fn.forget.html#relationship-with-manuallydrop 13:30 <+bridge> ah do you actually group the entire particles png together in an texture-array, or only the same-sized ones? if you do actually group the entire thing together, would you consider also grouping the entire game.png together? 13:31 <+ChillerDragon> still abort ._. 13:32 <+ChillerDragon> maybe its wireshark commiting suicide because i use fatal log level 13:32 <+bridge> try debug level 13:33 <+bridge> Currently it's not done at all. I don't think that our particle system is build in a intelligent way anyway 13:33 <+bridge> 13:33 <+bridge> I think we already talked about pros and cons 13:33 <+bridge> 13:33 <+bridge> 13:33 <+bridge> Generally batching is obv better of the runtime. However it also means that u either need own sampling as for texture atlasses. Or u need texture arrays with equally sized images. Game PNG is simply too diverse for that 13:33 <+bridge> If we wouldn't care about ogl1.x I'd do the first 13:34 <+ChillerDragon> ok got it finally it was be not being able to rtfm https://zillyhuhn.com/cs/.1683891254.png 13:34 <+bridge> Mh the checkmark thing was supposed to be ddnet only. But then people started aggressively ddosing the masters, so we had to add some 3rd party servers to info.json, those ended up also getting the checkmark 13:35 <+ChillerDragon> @heinricj5991 did you code ur dissector without print driven debugging? xd 13:35 <+bridge> So there is no process for it since it's not even intended as far as I know 13:35 <+bridge> I do realize we were here before, but we do come from the direction off ddnet this time ^^. well if you would choose batching, would you go the texture atlas or texture array path? :) 13:35 <+bridge> @Patiga u can also do multi texturing if u write a pipeline for all game elements anyway 13:35 <+bridge> U should have a guarantee of 16 images per shader 13:36 <+bridge> Maybe in fact I'd do that 13:37 <+bridge> hm that does seem a bit extreme, even to me :p. The different images do seem mostly separated in a sensible way (except that game png and skin png mix during tee rendering) 13:38 <+bridge> What is extrem? 13:38 <+bridge> well I feel like I try to batch together much more stuff than ddnet currently does 13:38 <+bridge> (and at times am struggling coz of this a little ^^) 13:39 <+bridge> The only downside is that it doesn't lay in continuous memory which might hurt the cache a tiny bit 13:39 <+bridge> and throwing literally everything into the same shader goes quite extreme in that direction 13:39 <+bridge> And how does multi texturing prevent that 13:39 <+bridge> how did KOG and noby's get it? 13:40 <+bridge> Mh thinking of it, maybe only newer ogl versions allow index accessing a shader array tho 13:40 <+bridge> with multiple images attached you do get the problem of not being able to use the simple textureSample, because it isn't safe to use when in the same execution unit you might need to sample different textures (in wgpu its called non-uniform control flow) 13:40 <+bridge> Sampler array* 13:41 <+bridge> Even for indexing? 13:41 <+bridge> The second sentence. During the big ddos incident the masters were completely unusable, so we had to put some people in the ddnet list 13:42 <+bridge> (the ddnet list used to be over http even before the http masters) 13:42 <+bridge> I don't get it. Were they ddossing based on the check mark? 13:43 <+bridge> no, not for indexing. I thought you wanted to have multiple textures in your bind group and choose dynamically which one to sample (your number 16, led me to believe that somehow) 13:43 <+bridge> please do not lazily diminish other people's work 13:44 <+bridge> Servers inside ddnet-info.json get the checkmark. When the master servers were down, people could only play on ddnet servers. People asked us to add other servers to our list so they can show up aswell even when the masters are down. We add servers to the list, they get the checkmark as a side-effect 13:44 <+bridge> Oh I see 13:45 <+bridge> Yes I want that over an index xd 13:45 <+bridge> xd 13:45 <+bridge> I don't think that is a thing 13:45 <+bridge> I dunno 13:45 <+bridge> I am sure desktop GPUs should support it 13:45 <+bridge> Is there a way to get put into ddnet-info.json or do we just have to deal with being unavailable when the masters are down (and showing up lower in the server browser :/) 13:45 <+bridge> https://www.merriam-webster.com/dictionary/banter 13:45 <+bridge> and if it was, the problem with the normal texture-sampling function should still be tehre 13:46 <+bridge> Why 13:47 <+bridge> why do you add default params if you pass it all the time anyway? 13:47 <+bridge> cuz robyt asked 13:47 <+bridge> This was back in the day when the masters weren't http, current masters proved pretty resilient so there isn't need for that anymore. We have an issue somewhere github on how to revamp the internet tab #6506 13:47 <+bridge> it's good practice 13:47 <+bridge> https://github.com/ddnet/ddnet/issues/6506 13:47 <+bridge> no 13:47 <+bridge> default params are bad 13:47 <+bridge> is that ahot take 13:47 <+bridge> i can remove em if u want @heinrich5991 13:47 <+bridge> no its as cold as ice 13:47 <+bridge> Fwiw the checkmark has nothing to do with sorting in the server browser 13:48 <+bridge> I'd use structs to do what default parameters do 13:48 <+bridge> That at least doesn't lead to typing the default value all the time 13:48 <+bridge> Oh actually it's #5654 13:48 <+bridge> https://github.com/ddnet/ddnet/issues/5654 13:48 <+bridge> I'd also would preferred not passing the value explicitly if it's equal to the default. Default parameters there would mean that forks don't need to change as much when merging this 13:48 <+bridge> open `/proc/self/mem` 13:49 <+bridge> ah you seem to correct with the vulkan feature `SampledImageArrayNonUniformIndexing` 13:49 <+bridge> hmm wait I should look further first 13:49 <+bridge> funny this is actually exactly what i'm asking about 13:49 <+bridge> the places where alpha is epxlicitly and equal to default are mostly because we dont have the mechanisms to get whether our tee and the other differs in team, etc 13:49 <+bridge> for unique servers 13:49 <+bridge> less the ones for ur own effects 13:49 <+bridge> Oh so an extension? 13:50 <+bridge> yeah I think so 13:50 <+bridge> i think the registration system is the best bet 13:50 <+bridge> But yeah I think that would be the coolest solution 13:50 <+bridge> ChillerDragon: to log to the console, use `println!`? ^^ 13:51 <+bridge> But since extension not practical for us xd 13:51 <+bridge> I agree the current situation is less than ideal but there are 2 issues: 13:51 <+bridge> 1) Figuring out what the new internet tab should look like 13:51 <+bridge> 2) Finding a developer that has the time 13:51 <+bridge> why can't internet tab be everyone 13:51 <+bridge> probably not needed if you just call a function. it only needs to live as long as teh function call 13:51 <+bridge> let trustworthy parties have the checkmark, don't change how it appears 13:51 <+bridge> would work fine 13:51 <+bridge> @Patiga the simplest solution would be if textureOffset would also have a parameter for size 13:52 <+bridge> So textureoffsetanssize 13:52 <+bridge> so just servers in peoples' closets and fakes won't have the check 13:52 <+bridge> yeah, but i said if you want to give ownership :p 13:52 <+bridge> Then atlasses would be useful in an easy way 13:52 <+bridge> this is unclear from the outside. people see people bashing others for doing 0.7 work. this doesn't set a good tone for this chat. please stop doing that, even if it's "just a joke" 13:52 <+bridge> god 13:52 <+bridge> xd 13:52 <+bridge> :Pray: 13:52 <+bridge> It's hard to gauge who is trustworthy, it's very subjective. I'm pretty sure @Ryozuki wouldn't like it if his issue was resolved by me sitting here and handing out checkmarks to people I trust 😄 13:53 <+bridge> well it wouldn't just be you 13:53 <+bridge> you elect mods that way don't you? 13:53 <+bridge> clean track record and has been around 13:53 <+bridge> do the same for servers 13:53 <+bridge> Ok NVM it would cause problems with mipmaps anyway 13:54 <+bridge> CEO Learath gives blue checkmarks out 13:54 <+bridge> perhaps we can just get rid of the tabs altogether 13:54 <+bridge> oh i like that idea 13:54 <+bridge> i would say the outside is empty, i doubt anyone works for 0.7 at this point, just chiller 13:55 <+bridge> there are a lot of people watching this chat 13:55 <+bridge> we should break compatibility, with 0.7, and with old clients 13:55 <+bridge> they see that it's apparently okay to be lazily negative 13:55 <+bridge> and rework 13:55 <+bridge> (and what I see is not just banter here) 13:55 <+bridge> well i said banter to chiller 13:55 <+bridge> im not bantering with u 13:56 <+bridge> one can say smth as a joke and still hold it in a serious discussion 13:56 <+bridge> Chiller don't be sad, honey 13:56 <+bridge> or smth like that 13:56 <+bridge> what I mean is that you actually argue your point; i.e. now it seems like you actually meant it when you said that to chillerdragon 13:56 <+bridge> well i meant 13:56 <+bridge> it 13:56 <+bridge> nothing wrong with it? 13:56 <+bridge> yea, anyway. stop bantering in this chat 13:56 <+bridge> yep lets be robots 13:56 <+bridge> i don't understand why it's that serious, 0.7 is objectively a much less popular version of the game, therefore in comparison, nearly nobody cares about it 13:56 <+bridge> speak formally 13:57 <+bridge> yeah so I would still be interested if you yourself would go with a 1. texture atlas, 2. texture array and stretching all segments to the same size, 3. texture array and some only take up a part of the texture size ^^ 13:57 <+bridge> daring today arent we 13:57 <+bridge> i've never touched it. i have no bias for or against it 13:57 <+bridge> i'm just saying 13:57 <+bridge> I think u just have to write it like this @Ryozuki . 0.7 is not interesting for the future of our project in the current state 13:57 <+bridge> 0.7 is not interesting for the future of our project in the current state 13:57 <+bridge> lmfao 13:57 <+bridge> lol no 13:57 <+bridge> This is what I would do. Remove kog tab (maybe keep ddnet? we do have some extra functionality that idk how to expose to others, like finishes and region filtering), let everyone pass a "group_name", "group_key" in their server info, master server sends sha256(group_key) in the info, client groups by sha256(group_key) under name "group_name" 13:58 <+bridge> if we remove kog tab, we remove the ddnet tab IMO 13:58 <+bridge> The only issue is people faking entire networks, for which idk what to do 13:58 <+bridge> the way to go is using the http master, enable advanced filter options 13:58 <+bridge> like ddnet has 13:58 <+bridge> for everyone 13:58 <+bridge> I guess we could let all servers send region, so we can do the region filtering for everyone, the finishes idk how to do 13:58 <+bridge> you can say that you're not interested in 0.7 stuff, and you can say that you think it's holding us back 13:58 <+bridge> why would you use such corporate speak? it just looks like lies 13:58 <+bridge> i say both 13:59 <+bridge> well u dont want banter 13:59 <+bridge> u rly make it seem like we should be corporate speakers 13:59 <+bridge> no 13:59 <+bridge> no. I don't want to do that 13:59 <+bridge> you're allowed to say negative things 13:59 <+bridge> just not lazily 13:59 <+bridge> whathever lazily means here 13:59 <+bridge> i have put lot of effort into ddnet 13:59 <+bridge> where is the laziness 14:00 <+bridge> did you work on 0.7 heinrich 14:00 <+bridge> I'm honestly struggling with an answer rn. E.g. if u'd write it I'd probably benchmarking it against using more draw calls. For particles it's defs interesting. But for tees that max at like 64 it might not be worth it. But generally spoken I'd probably then accept the badness of texture atlasses and write the sampling itself even if it's harder generally. Texture arrays are simply only interesting for similar sized stuff.. or split the draw ca 14:00 <+bridge> lazy means "not putting work into the criticism" 14:00 <+bridge> being emotionally invested in ddnet, and seeing work on something that most likely, in my honest opinion, will end up not relevant or unused, is a bit sad 14:00 <+bridge> I guess "your work is shit" vs "your work is shit because you failed to do x, y and z" 14:00 <+bridge> we can just improve ddnet more 14:01 <+bridge> he's not even saying it's shit. just that people don't care about it 14:01 <+bridge> true, i originally said nobody cares about it 14:01 <+bridge> which is not a total lie 14:01 <+bridge> nobody is exaggerated, there will always be 1 like chiller 14:01 <+bridge> its a way of speaking 14:02 <+bridge> for civility, it doesn't really matter whether something is true or not 14:02 <+bridge> the way it's said matters 14:02 <+bridge> people are free to invest their time into whatever they want. time spent on 0.7 is not necessarily time lost for ddnet 14:02 <+bridge> it might just be time lost for playing some game 14:02 <+ChillerDragon> @heinrich5991 " ChillerDragon: to log to the console, use `println!`? ^^" 14:02 <+bridge> he is free to do whathever he wants yes 14:02 <+ChillerDragon> OMG YES I JUST FIGURED OUT 14:02 <+bridge> and me to say that 14:02 <+bridge> Anyway, I need to do real world stuff like doing the dishes. @Ewan Green if you have any ideas about merging all lists put it in the issue, I think the desirables are -> some sort of trust structure -> some way to group servers -> some way to allow advanced filtering for all 14:02 <+bridge> awesome Chiller 14:03 <+ChillerDragon> i fuckin reimplemented all wireshark loggy all day to realize println! wasnt priting because the code was not even compiled xd 14:03 <+bridge> wat 14:03 <+bridge> how can println not be compiled 14:03 <+bridge> he didn't recompile his code 14:03 <+bridge> ah 14:03 <+bridge> and didn't sanity-check it 14:03 <+bridge> always try to check whether your changes are actually there 😉 14:04 <+bridge> maybe try to crash at the earliest possible opportunity 14:04 <+bridge> thanks for answering so many questions even forcing an answer to a very opinionated question unprepared :heartw: 14:04 <+bridge> I should probably try to understand the ddnet rendering code some time and not only small extracts of it :happy: 14:04 <+bridge> How does that work btw. Is that something the rust compiler offers? 14:04 <+bridge> no, the linux kernel 14:04 <+bridge> you can simply edit your own memory using that file 14:04 <+bridge> https://github.com/ddnet/ddnet/issues/5654#issuecomment-1198010235 I think I like this here, maybe we can make a milestone or something so someone can start implementing it? 14:04 <+bridge> and easily do unsafe code 14:04 <+bridge> with root right? 14:05 <+bridge> Ah yeah I see 14:05 <+bridge> no, for your own program 14:05 <+bridge> why is that allowed tho 14:05 <+bridge> I think I read that before 14:05 <+bridge> Why not? 14:05 <+bridge> Ub in safe rust xd 14:05 <+bridge> why not? the program can already do it via pointers 14:05 <+bridge> i think the checkmark's presence should be based on some kind of vote, whether a server is verified or not be determined by what the master server says & not any local file. if the server is more robust now then i see no issue in this. as for advanced sorting, idk what that entails so i have no comment for now 14:05 <+bridge> i guess 14:06 <+ChillerDragon> now that i built the logger would you be interested heinrich? 14:06 <+bridge> Couldn't the rust Api prevent it xd 14:06 <+ChillerDragon> https://zillyhuhn.com/cs/.1683893168.png 14:06 <+bridge> The standard impl 14:06 <+bridge> ChillerDragon: if you integrate it with the rust logging system, yes 14:06 <+ChillerDragon> wot is rust logging system 14:06 <+bridge> If you want to expose fs to your user, you need to make your api forbid these things 14:06 <+bridge> check tracing 14:06 <+bridge> https://docs.rs/tracing/latest/tracing/ 14:06 <+bridge> I'd probably go with `log` here, but they're interoperable 14:07 <+bridge> log is old news 14:07 <+bridge> tracing is the future 14:07 <+bridge> log is math 14:07 <+bridge> https://docs.rs/log/latest/log/ 14:07 <+ChillerDragon> idk what u guys talk about 14:07 <+bridge> chiller u know what a logging facade is 14:07 <+bridge> my client just crashed when tabbing into your server ChillerDragon 14:07 <+ChillerDragon> whats the crash log 14:07 <+ChillerDragon> what server? 14:07 <+bridge> you basically can't 14:07 <+ChillerDragon> my coding skill is a facade ryo 14:07 <+bridge> symlinks will fuck up your day 14:08 <+bridge> dont be rude to urself chiller 14:08 <+ChillerDragon> will i get in trouble with heinrich for being rude? 14:08 <+bridge> nvm i'm silly 14:08 <+bridge> idk 14:08 <+bridge> i mistook one of these ki-o ones for one of urs 14:08 <+bridge> I'd not allow any Io directly 14:08 <+ChillerDragon> anyways heinrich here is what i have what u said sounds like work i will leave it here https://github.com/heinrich5991/libtw2/compare/master...ChillerDragon:libtw2:pr_add_ws_log 14:09 <+ChillerDragon> yo @heinrich5991 you got motivation to help me debug https://github.com/heinrich5991/libtw2/pull/78 ? 14:10 <+ChillerDragon> it doesnt show up in the dissector somehow ;_; 14:10 <+bridge> ChillerDragon: you only need to do this: https://docs.rs/log/latest/log/#implementing-a-logger 14:10 <+bridge> you'll learn a bit about rust 😉 14:10 <+ChillerDragon> i rust pro no need to learn 14:10 <+bridge> inkscape allows you to export in batches 14:11 <+bridge> i would also make dbg_log a safe wrapper, somehow 14:11 <+ChillerDragon> @heinrich5991 i dislike learning i am a result driven developer i only try to unserstand or learn something if I REALLY have to. otherwise its try and error until i get my gaming moment results 14:11 <+bridge> I see 14:12 <+bridge> @Patiga do u still use texture arrays for tee rendering? That's a part where I'd say it's more complex, and I'd love to see the performance cost of updating the array ^^ 14:12 <+bridge> permalink btw: https://github.com/heinrich5991/libtw2/compare/heinrich5991:0352e6f...ChillerDragon:c35fe8c 14:12 <+bridge> E.g. downloaded skins 14:12 <+ChillerDragon> ye the link i sent is totally scuffed xd 14:12 <+bridge> u can use <> to not embed btw 14:12 <+bridge> yea… unfortunately it changes the message I send to IRC 14:13 <+bridge> but irc should have no problems tho 14:13 <+bridge> hmm now i wonder 14:13 <+ChillerDragon> so wen i compile the dissector shouldnt it also compile gamenet/*/src/msg/connless.rs ? 14:13 <+bridge> alacritty highlights the link correctly for me 14:13 <+bridge> no <> in the url 14:14 <+bridge> that's not where the dissector gets its data from 14:14 <+bridge> it gets it from the json 14:15 <+bridge> https://github.com/heinrich5991/libtw2/blob/0352e6f2f23e01e17c6212701f8faa166c524522/wireshark-dissector/src/tw7.rs#L24 14:15 <+bridge> read log !! it's about deleting images atlas and splitting it into n files with one doodle per file 14:15 <+ChillerDragon> yes but i generated the json too 14:16 <+bridge> I'd say we should put it into a zip file then 14:16 <+bridge> so it can still be shared as a whole 14:16 <+bridge> so like splitting game.png into gun.png, bullet.png, grenade.png, hook.png... ? 14:16 <+bridge> refuse to follow any symlinks 😄 14:17 <+bridge> symlinks are a security hazard 14:17 <+bridge> `/home/user/linktoprocself/mem` 14:17 <+bridge> @Ravie start from here 14:17 <+bridge> can you ask the linux kernel not to follow this? 14:18 <+bridge> eeeh idk if linux has a way to avoid TOCTOU there but you can stat it first to see if any path component is a symlink 14:18 <+bridge> but I guess then hardlinks fuck up your day 14:19 <+bridge> (though I think in this case the person who writes the potentially malicious code has access to the underlying system, so no need to worry about symlinks if you don't allow them to create them) 14:19 <+bridge> can't hardlink directories 14:20 <+bridge> How does java prevent it? 14:20 <+bridge> it doesn't 14:20 <+bridge> Mh ok 14:20 <+bridge> Why does Linux offer it at all xd 14:20 <+bridge> probably useful for crashdumps or so 14:21 <+bridge> As said before, if you can access proc mem self you can also just use pointers 14:21 <+bridge> or any kind of meta functionality 14:21 <+bridge> Yeah but java is meant to run in a VM for a reason xD 14:21 <+bridge> @Learath2 assuming no symlinks, how do you detect whether the file being opened is something like /proc/self/mem? 14:21 <+bridge> Oh, actually why not run it in a jail? 14:21 <+bridge> you can also call native code in java 14:22 <+bridge> exactly 14:22 <+bridge> Yeah but that's easy to prevent 14:22 <+bridge> u can also call java code from rust 14:22 <+bridge> I'd say 14:22 <+bridge> I can think of one silly way, but it's just a thought experiment. Just generate a pattern in memory at runtime, then scan whatever you opened for it 14:22 <+bridge> heh, nice 😄 14:23 <+bridge> yup still on it :D 14:23 <+bridge> i read recently valve tracked memory access at places where it was never meant to access to detect cheats 14:23 <+bridge> but why tho? it would break all existing skins and make new ones an even bigger pain to create 14:23 <+bridge> script to port 14:23 <+bridge> since skins are structured its easy 14:24 <+bridge> yeah ok 14:24 <+bridge> but also if you make a gameskin then you have to hope that people install all your files and not turn it into some disgusting mix with parts from other ones 14:25 <+bridge> why? 14:25 <+bridge> do u care what others do 14:25 <+bridge> zip files: 14:25 <+bridge> Xd 14:25 <+bridge> I think this could be handles by zip files 14:25 <+bridge> but why limit 14:25 <+bridge> the idea is customization 14:25 <+bridge> U remove Atlas to use zip 14:25 <+bridge> Lmao 14:25 <+bridge> ah u mean for shipping 14:25 <+bridge> this way we can name the parts and add/remove them without backcompat 14:26 <+bridge> this way we can name the parts and add/remove them without backcompat problems 14:26 <+bridge> we all had the same idea but different ways of saying it 14:26 <+bridge> backcompat again :justatest: 14:26 <+bridge> FBI 14:26 <+bridge> without *future* backcompat problems 14:26 <+bridge> open up! 14:26 <+bridge> XD 14:26 <+bridge> it does make it a little more annoying to share skins though 14:26 <+bridge> it's no longer a single picture 14:26 <+bridge> like in #📬submit-skins 14:27 <+bridge> make a vote 14:27 <+bridge> separated skins + more customizatio or single file skins and status quo 14:27 <+bridge> i guess but at the same time, its muuuch easier to organize and add new items 14:27 <+bridge> remove atlas so you can upload more textures in hopes of breaking older computers :bigbrain: 14:27 <+bridge> (stating that old skins are not lost) 14:27 <+bridge> the way 14:28 <+bridge> let's be honest, "more customization" will just make people turn their game into an even bigger visual cacophony 14:28 <+bridge> is it even more customization? 14:28 <+bridge> people can edit a skin file today 14:28 <+bridge> u can mix parts easily in the client 14:28 <+bridge> it is easier customization, not more 14:28 <+bridge> yea 14:29 <+bridge> ah, that's a different thing you're asking for though 14:29 <+bridge> i think thats what ravie is arguing against 14:29 <+bridge> we don't need to change the file format for this 14:29 <+bridge> yeah but why not 14:29 <+bridge> "why not" is not a reason to change something in my book 14:30 <+bridge> especially user-facing 14:30 <+bridge> my book is the holy bible so it must be respected 14:30 <+bridge> for things that are not user-facing, maybe… 14:30 <+bridge> Yeah, change for changes sake isn't that great of an argument 14:30 <+bridge> well i think its better organized 14:30 <+bridge> i forgot what other reasons are there 14:30 <+bridge> It is better UX if people want to mix and match assets all the time 14:30 <+bridge> but I'm not sure that is a common demand even 14:31 <+bridge> people already mix & match 14:31 <+bridge> mix & ~~match~~ 14:31 <+bridge> if anything i just wanted to remove useless pngs 14:31 <+bridge> kind of odd to limit others on how they wanna mix the skins 14:32 <+bridge> why do u care 14:32 <+bridge> deep 14:32 <+bridge> depends on whether this shows on other people's screens 14:32 <+bridge> hes a perfectionist 14:32 <+bridge> I care about the fact that people opening the default installation of the game see something like tees 14:32 <+bridge> when joining a server 14:32 <+bridge> walking hammers 14:33 <+bridge> yeah but default will look the same 14:33 <+bridge> well, it depends whether you want to propagate your visuals to other players 14:33 <+bridge> it sounds like you want to? 14:33 <+bridge> i.e. that everyone sees how you mixed your skins? 14:34 <+bridge> by skins i was talking about hud elements 14:34 <+bridge> too 14:34 <+bridge> but yeah for skins that would happen 14:34 <+bridge> for example mixing laser from x and grenade fro my 14:34 <+bridge> from y 14:34 <+bridge> cause I think changing the look of the game in thematic batches is better than pure chaos, you can already do it if you edit the png's but the game isn't actively supporting and encouraging you to do it 14:34 <+bridge> yea, I don't really care how people view the game oneself 14:34 <+bridge> i was mainly talking about that 14:34 <+bridge> didnt think about skins 14:35 <+bridge> tees 14:38 <+bridge> people who make custom assets do, you don't make it with the purpose of being split for parts and mixed in weird ways that don't look good, it defeats the purpose of even making a set 14:39 <+bridge> let's say "you do"? 14:40 <+bridge> that's fine, I think we should take that into account before changing anything, since you're obviously one of the people creating custom assets 14:41 <+bridge> yeah I know it's a minority but you should still consider what the purpose of making custom assets really is 14:41 <+bridge> i disagree with the statement but meh 14:41 <+bridge> its like saying i coded X in a way, and it has a permissive license, but i dislike you doing Y with it 14:42 <+bridge> its for users to use them in whathever way they want 14:42 <+bridge> in my opinion 14:43 <+bridge> Btw we do that anyway internally ^^ 14:43 <+bridge> Good good, now we need to find a way to up the vram usage 14:44 <+bridge> True. 1gb on my 16gb limit is not enough 14:44 <+bridge> That's less than two tabs of Firefox xd 14:44 <+bridge> well for me personally if my work isn't gonna be used how I intended then there's no point in even making or sharing it 14:45 <+bridge> we differ then 14:45 <+bridge> for me the amazing thing is how people find ways to use stuff in unexpected or never thought of ways, such as making a programming language 14:45 <+bridge> also it's up to the creator how he licenses his work and what he wants users to do or not do with it 14:45 <+bridge> insert alan turing quote here 14:46 <+bridge> programming is much less subjective than art 14:46 <+bridge> @Learath2 i just want to make one thing clear. I am not wasting memory, it has a purpose. 14:46 <+bridge> 14:46 <+bridge> GC languages that want to be fast kinda have to waste memory by design 14:48 <+bridge> so i'm new hardwarephil, because it offers more opportunities for better software design and more performance besides the performance increase by the generational improvement that comes anyway 14:48 <+bridge> isn't that awesome 14:48 <+bridge> imho if more memory usage leads to more perf, its not that wasted memory is it 14:49 <+bridge> that's awesome — as long as we don't push users away from their old hardware IMO 14:49 <+bridge> depends on whether the increased perf has a positive effect or is just neutral 14:50 <+bridge> but the art here is used in a program 🤓 14:50 <+bridge> for me personally, it probably doesn't matter, because I don't run the game on a lot of FPS. for others, it does matter because they want to have very high FPS 14:50 <+bridge> anyway art benefits a lot from what i said too, derivative works and such 14:50 <+bridge> fanart 14:51 <+bridge> mix match xd 14:51 <+bridge> hardwarephil is not a word sadly 14:52 <+bridge> but e.g. m1 is a good example, more energy efficient than your laptop, while still having more fps, more RAM etc. 14:52 <+bridge> 14:52 <+bridge> just that apple sucks 14:52 <+bridge> and their drivers xD 14:52 <+bridge> the word would also have to be new_hardwarephil xd 14:52 <+bridge> bcs the new is important 14:52 <+bridge> new_safe_hardwarephil 14:53 <+bridge> I have yet to see a "derivative work" that comes anywhere close to the original in our community :justatest: 14:53 <+bridge> maybe we idealize teeworlds original art too much 14:53 <+bridge> cuz nostalgia or smth 14:53 <+bridge> its just a ball 14:53 <+bridge> most tee skins are derivative works of the original tee 14:54 <+bridge> I don't mean just original teeworlds art, I often see people mixing skins from Miper, Whis or Demix and it always looks terrible 14:55 <+bridge> well its hard to please u, but i understand, just like i find windows terrible 14:56 <+bridge> @Learath2 r u still interested in https://github.com/ddnet/ddnet/pull/2754 14:57 <+bridge> @heinrich5991 https://github.com/ddnet/ddnet/pull/1264#issuecomment-1408523015 14:57 <+bridge> the evening is lasting long xd 14:58 <+bridge> just speaking from the perspective of a huge perfectionist, and I can understand how much work other artists also put into making every pixel look just right, and then it gets twisted by some kid with gimp 14:58 <+bridge> dont insult my gimp 14:58 <+bridge> :BASEDDEPT: 14:58 <+bridge> I love gimp 14:58 <+bridge> I use all the open source alternatives to adobe products :gigachad: 14:59 <+bridge> chad 14:59 <+bridge> but u use windows? 14:59 <+bridge> :frozen: 14:59 <+bridge> yes but not 11 14:59 <+bridge> when they discontinue win10 I go the linux way:saddo: 15:00 <+bridge> I'm not sure. I don't like how storage works at all. I have a feeling this will break some setups because of how we find data directories 15:00 <+bridge> i forgot, does realloc zero memory? 15:00 <+bridge> every sewcond windows is unusable 15:00 <+bridge> Glow skins lets go 15:00 <+bridge> even more unusable than it already is xd 15:00 <+bridge> No 15:00 <+bridge> ok 15:01 <+bridge> i guess i need to get memzero in too 15:01 <+ChillerDragon> true designers use adobeOS over windows 15:01 <+bridge> wait libc has memzero? 15:01 <+bridge> memset(a, 0, sizeof(a)) 15:01 <+bridge> ah ok 15:01 <+bridge> note the funny parameter order 15:02 <+bridge> note that it "has" to use int as parameter 15:02 <+bridge> even tho we talk about bytes 15:02 <+bridge> (dst, src, dst_size) isn't it like this for all mem functions? 15:03 <+bridge> I'd have thought it's the src_size 15:03 <+bridge> why are memory functions in string.h? 15:03 <+bridge> xd 15:03 <+bridge> anyway the header doesnt matter cuz im on llvm ir 15:03 <+bridge> Shhhhhh 15:03 <+bridge> because strings are just arrays of bytes 15:03 <+bridge> mem* functions operate on strings that are not zero-terminated 15:03 <+bridge> Doesn't llvm have a way to set some memory without calling into libc? 15:04 <+bridge> str* functions operate on strings that are zero-terminated 15:04 <+bridge> to set memory allocated by malloc? 15:04 <+bridge> maybe there is a intrinsic 15:04 <+bridge> Memory allocated by malloc isn't any different to any other memory 15:05 <+bridge> https://llvm.org/docs/LangRef.html#llvm-memset-inline-intrinsic 15:05 <+bridge> oh pog 15:05 <+bridge> Perfect 15:05 <+bridge> @Ryozuki name ur wrapper 15:05 <+bridge> 15:05 <+bridge> crealloc 15:06 <+bridge> its ok 15:06 <+bridge> just need to get my open addressed linear probing hashmap done 15:06 <+bridge> recalloc 15:06 <+bridge> sounds funny too 15:06 <+bridge> i recall freeing this memory 15:06 <+bridge> said every c dev 15:08 <+bridge> but i'll do it again just to be safe 15:09 <+bridge> ✅ 15:09 <+bridge> ``` 15:09 <+bridge> declare void @llvm.memset.p0.i64(ptr , i8 , 15:09 <+bridge> i64 , i1 ) 15:09 <+bridge> ``` 15:09 <+bridge> seeing this signature reminded me 15:09 <+bridge> why memset accepts a int (32 bits) 15:09 <+bridge> ```c 15:09 <+bridge> free(malloc(0)); // you are free now, c is freedom 15:09 <+bridge> ``` 15:10 <+bridge> and not a char 15:10 <+bridge> it does? >_> 15:10 <+bridge> ``` 15:10 <+bridge> #include 15:10 <+bridge> void *memset(void *s, int c, size_t n); 15:10 <+bridge> ``` 15:10 <+bridge> yea why thoe 15:11 <+bridge> share with the class 15:11 <+bridge> i thought it was char 15:11 <+bridge> idk thats why am askin 15:11 <+bridge> oh 15:11 <+bridge> i thought it was a statement lol 15:11 <+bridge> mayeb just for filling a pattern 15:11 <+bridge> not unsigned char u meant xd 15:11 <+bridge> ye 15:11 <+bridge> i forget about C char stuff 15:11 <+bridge> It couldn't be a `char` it would be a `unsigned char` 15:11 <+bridge> xd 15:12 <+bridge> correct but signedness is not the question here 15:12 <+bridge> there are many questions to which there aren't answers 15:13 <+bridge> it seems char literals are actually ints in plain C 15:13 <+bridge> @Ryozuki what's worse, a C program that generates rust code or a rust program that generates C code? 15:13 <+bridge> maybe saves a cast 15:13 <+bridge> rust program that generates c 15:14 <+bridge> cuz the rust program is safe (if no unsafe) 15:14 <+bridge> "memset predates (by quite a bit) the addition of function prototypes to C. Without a prototype, you can't pass a char to a function -- when/if you try, it'll be promoted to int when you pass it, and what the function receives is an int." 15:14 <+bridge> it may also be a speed thing. sometimes smaller data is slower to access 15:14 <+bridge> eg why some bools used to also be ints 15:14 <+bridge> despite only needing 1 bit 15:14 <+bridge> but what about the program that it generated 15:15 <+bridge> i think it depends man 15:15 <+bridge> "prototypes were added during the C89 standardization. Before that, there were only function declarations, which specified the return type, but not the number or type(s) of parameter(s). " 15:15 <+bridge> ez 15:15 <+bridge> a rust program that generates c could realistically describe any of these new programming languages 15:16 <+bridge> x new lang is like zig in the fact that it makes c, but it's written in rust 15:16 <+bridge> could happen any second... 15:16 <+bridge> What are the quotes for? is that GiPiTed? 15:16 <+bridge> i teach ryo some awesomeness of c 15:16 <+bridge> idk 15:16 <+bridge> by copying stackoverflow answers 15:16 <+bridge> i think you google it xd 15:16 <+bridge> the thing is in llvm ir, you can have a data type of arbitrary bits 15:17 <+bridge> and llvm can use that to optimize better 15:17 <+bridge> i6 is valid 15:17 <+bridge> yeah 15:17 <+bridge> llvm also have infinite registers 15:17 <+bridge> bit packing is done under the hood 15:17 <+bridge> its the perfect machine 15:17 <+bridge> xd 15:17 <+bridge> std bitset is similar 15:17 <+bridge> a non 8*x bitfield 15:17 <+bridge> does it actually do that or do the non-register widths perform worse? 15:18 <+bridge> im sure they perform worse usually 15:18 <+bridge> but it can make optimizations to non 8*x size ints that it couldn't to 8*x ints because they're already optimized... 15:18 <+bridge> but it can make optimizations to non 8\*x size ints that it couldn't to 8*x ints because they're already optimized... 15:18 <+bridge> but it can make optimizations to non 8\*x size ints that it couldn't to 8*x ints because they're already 'optimized'... 15:19 <+bridge> bitset performs worse or the inifinite registers? 15:19 <+bridge> i would say it probs treats the underlying data as register widths, but it can make assumptions about the contents (?) and do optimizatiosn thanks to that 15:19 <+bridge> but dont quote on me 15:19 <+bridge> i dont know for sure 15:19 <+bridge> i6 15:19 <+bridge> ah 15:21 <+bridge> here ryo more c awesomeness 15:21 <+bridge> struct whatever { 15:21 <+bridge> char a:3; 15:21 <+bridge> char b:4; 15:21 <+bridge> char c:1; 15:21 <+bridge> }; 15:21 <+bridge> like im sure in an application where you're only using 6 bits, using an i8 would still be faster but i6 would be the better candidate because under the hood bit packing can be done to reduce memory footprint 15:21 <+bridge> ye i know xd 15:21 <+bridge> but i'm not sure because then pointers become impossible 15:22 <+bridge> i4 is used a lot in machine learning iirc 15:22 <+bridge> machine learning has gpu usually 15:22 <+bridge> idk how those work too well 15:23 <+bridge> magic devices 15:23 <+bridge> well llvm targets gpus too 15:23 <+bridge> yea 15:23 <+bridge> i have cpu bound brain 15:24 <+bridge> i wouldn't count on it xd 15:25 <+bridge> i can't see how it would be faster even theoretically 15:25 <+bridge> i can't see how i6 would be faster even theoretically 15:25 <+bridge> well theoretically it surely can bcs of the memory footprint, but practically u are probably right in almost all cases 15:26 <+bridge> but somewhere someone finds one case where its not the case 15:26 <+bridge> 15:26 <+bridge> also depends if u mean that it uses less memory in total 15:26 <+bridge> else ofc not xd 15:26 <+bridge> alignment is the thing here 15:26 <+bridge> we are speaking in bits 15:27 <+bridge> yeah thats the question did u mean packing multiple data efficiently 15:27 <+bridge> or only a single i6 15:27 <+bridge> multiple 15:27 <+bridge> then hard to say, probably its slower, but maybe there is some edge case 15:27 <+bridge> single wouldn’t really make a different usually because it would probably just be given those extra 2 bits 15:27 <+bridge> cuz you cant pack the next data 15:28 <+bridge> similar to if loading a zip and uncompress it might be faster than loading the whole file as is 15:28 <+bridge> but the calculations with it would be a problem 15:28 <+bridge> in practice accessing a non-multiple of 8 piece of data is slower because the cpu will have to first read that data then derive from it the relevant bits 15:29 <+bridge> but that mostly happens on the cpu 15:29 <+bridge> with registers 15:29 <+bridge> Ancient signature, probably from back before c89 even, so it'd be promoted to int by default 15:30 <+bridge> anyway before this leads to useless discussions i dunno, but would be interested with some benchmarks for some weird edge cases i cant think of rn 15:30 <+bridge> Fwiw "char" literals are just ints aswell for the same ancient reasons 15:30 <+bridge> in C++ 15:30 <+bridge> in C 15:30 <+bridge> not in C++ 15:30 <+bridge> ^ 15:31 <+bridge> `int is_cxx = sizeof(char) == sizeof('C');` 15:31 <+bridge> lol 15:32 <+bridge> xd 15:33 <+bridge> `sizeof (char)` is defined to be 1 anyway 15:33 <+bridge> i understand unsigned char is akin to "bytes" in sane languages 15:33 <+bridge> signed char for the numeric type, and char? 15:33 <+bridge> So might aswell check `sizeof 'c' == 1` 15:33 <+bridge> char for text? xd 15:33 <+bridge> char is randomly signed or unsigned xdd 15:33 <+bridge> they roll some dices 15:33 <+bridge> Eeeeeeeeeh 15:33 <+bridge> bytes being u8 15:33 <+bridge> arm got unsigned 15:33 <+bridge> x86 got signed 15:34 <+bridge> &[u8] rusty bytes 15:34 <+bridge> unsigned char is for bytes. char is for text. Try not to think too much of how it's handled internally 😄 15:35 <+bridge> char_t is for utf8 15:35 <+bridge> i love my &str 15:35 <+bridge> char8_t is for utf8 15:35 <+bridge> xd 15:35 <+bridge> `char` is neither the same as `signed char` nor `unsigned char` 15:35 <+bridge> char8_t doesnt ensure its valid utf8 tho 15:35 <+bridge> the epic thing in rust is str is valid utf8 always 15:35 <+bridge> or ub 15:35 <+bridge> plus this fact 15:36 <+bridge> utf8 supremacy 15:36 <+bridge> in a perfect world, there wouldnt be any utf 15:36 <+bridge> plus `char/signed char/unsigned char` could be non 8-bits 15:37 <+bridge> was there ever a CPU without 8 bits per byte? 15:37 <+bridge> probably 15:37 <+bridge> back in the ages 15:37 <+bridge> 194x 15:37 <+bridge> i remember hearing such a thing 15:37 <+bridge> why does memset return the passed pointer? 15:37 <+bridge> should i use the new pointer 15:37 <+bridge> it's the same 15:37 <+bridge> The issue isn't the cpu, I think the issue was how the data was to be encoded in transmission 15:38 <+bridge> whats wchar_t 15:38 <+bridge> wide char 15:38 <+bridge> 2 byte 15:38 <+bridge> for non ascii 15:38 <+bridge> > The wchar_t type is an implementation-defined wide character type. In the Microsoft compiler, it represents a 16-bit wide character used to store Unicode encoded as UTF-16LE, the native character type on Windows operating systems 15:38 <+bridge> oh god 15:38 <+bridge> xD 15:38 <+bridge> oh my god have u never messed with this 15:38 <+bridge> i know windows api loves it 15:38 <+bridge> maybe for chaining or something, like `char *p = memset(alloc(...), ...)` 15:38 <+bridge> try fucking specifying DoShitW on every win32 function ever 15:38 <+bridge> and thats why i never touched it 15:38 <+bridge> yea 15:38 <+bridge> painful 15:38 <+bridge> Just use utf8 15:39 <+bridge> makes sense 15:39 <+bridge> New winapi can mostly handle it too 15:39 <+bridge> wdym 15:39 <+bridge> if we only wanted to support Windows 10 and newer then we could also just use UTF-8 with the Windows API 15:39 <+bridge> LETS GO 15:39 <+bridge> without converting between `char` and `wchar_t` for every function 15:40 <+bridge> this is how they want you to do it 15:40 <+bridge> ```cpp 15:40 <+bridge> #ifndef UNICODE 15:40 <+bridge> #define UNICODE 15:40 <+bridge> #endif 15:40 <+bridge> 15:40 <+bridge> DoSomething(); // is a macro; resolves to DoSomethingW, a function 15:40 <+bridge> ``` 15:40 <+bridge> ``` 15:40 <+bridge> #ifdef UNICODE 15:40 <+bridge> #undef UNICODE 15:40 <+bridge> #endif 15:40 <+bridge> 15:40 <+bridge> DoSomething(); // is a macro; resolves to DoSomethingA, a function 15:40 <+bridge> ``` 15:40 <+bridge> this is how they want you to do it 15:40 <+bridge> ```cpp 15:40 <+bridge> #ifndef UNICODE 15:40 <+bridge> #define UNICODE 15:40 <+bridge> #endif 15:40 <+bridge> 15:40 <+bridge> DoSomething(); // is a macro; resolves to DoSomethingW, a function 15:40 <+bridge> ``` 15:40 <+bridge> ```cpp 15:40 <+bridge> #ifdef UNICODE 15:41 <+bridge> #undef UNICODE 15:41 <+bridge> #endif 15:41 <+bridge> 15:41 <+bridge> DoSomething(); // is a macro; resolves to DoSomethingA, a function 15:41 <+bridge> ``` 15:41 <+bridge> the conversion happens on the other side then, no performance on 15:41 <+bridge> wmemset ftw 15:41 <+bridge> wchar_t *wmemset(wchar_t *wcs, wchar_t wc, size_t n); 15:41 <+bridge> `wchar_t *wmemset(wchar_t *wcs, wchar_t wc, size_t n);` 15:41 <+bridge> pain 15:41 <+bridge> you can also (and maybe should) just call `DoSomethingW` directly 15:41 <+bridge> memset w/ sizeof type * count 15:41 <+bridge> depends 15:41 <+bridge> This is one thing I like about newer languages. Proper unicode support 15:41 <+bridge> yeah, we always call the `W` variant explicity even though we define `UNICODE` and `_UNICODE` 15:41 <+bridge> yep yep 15:41 <+bridge> @Learath2 but some chose to go the evil way and use utf 16 15:41 <+bridge> yeah this is good the only time this'll bite you in the ass is if using a system that somehow doesn't support unicode (old) 15:42 <+bridge> Windows doesn't even use utf16 technically. They use UCS2 15:42 <+bridge> u know whats funny? 15:42 <+bridge> 15:42 <+bridge> str functions accept the number of characters istead of the buff size 15:42 <+bridge> 15:42 <+bridge> so 15:42 <+bridge> wchar_t a[10]; 15:42 <+bridge> wsprintf(a, std::size(a), L"test %s", L"test"); would be correct while with sizeof(a) would be wrong 15:42 <+bridge> lol, that's win98? 15:42 <+bridge> yea 15:42 <+bridge> note `somehow` and `(old)` 15:42 <+bridge> no, not UCS-2. they use possible-invalid UTF-16 15:42 <+bridge> When migrating to utf16 they left some bizarre quirks that make using winapi pain 15:43 <+bridge> i blame c++20 15:43 <+bridge> why didnt they take the chance with char8_t and extend the std::filesystem to allow utf8 characters 15:43 <+bridge> and what happens under the hood is not our problem 15:43 <+bridge> utf8_t 15:44 <+bridge> c# calls it Rune 15:44 <+bridge> https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/ I probably sent this blog post a while back but until like 2018 the console was extremely bizarre 15:44 <+bridge> https://learn.microsoft.com/en-us/dotnet/api/system.text.rune?view=net-7.0 15:45 <+ChillerDragon> @heinrich5991 sori for all the oopsie daisys you probably could have done it twice in the time you spent reviewing my mess 15:45 <+bridge> std::filesystem is the worst 15:45 <+bridge> because it works pretty much only in theoreticals 15:45 <+bridge> that's probably the one thing i genuinely prefer doing the C way 15:46 <+bridge> what r u even working for? 15:46 <+bridge> 15:46 <+bridge> r u some secret microsoft dev? xd 15:46 <+bridge> I never used std::filesystem. What's wrong with it? 15:46 <+bridge> it's just strings 15:46 <+bridge> TIL about https://linux.die.net/man/3/iob_new 15:46 <+bridge> @Ewan Green are u playing ddnet? 15:46 <+bridge> or just chilln here 15:47 <+ChillerDragon> everyone with less than 1k ddnet points should be read only in this channel 15:47 <+bridge> xdd 15:47 <+bridge> xDD 15:47 <+ChillerDragon> i dont wanna hear this rando robyt talk about a game he doesnt play 15:47 <+bridge> im trying to play more lately, but i got 7k points anyway 15:48 <+bridge> lmao 15:48 <+bridge> Ooh, I hadn't seen this before 15:48 <+bridge> robyt is our saviour 15:48 <+ChillerDragon> !rob its a joke ofc we all love you <3 15:48 <+ChillerDragon> !robstr 15:48 <+ChillerDragon> !robster 15:48 <+ChillerDragon> omg xdf 15:48 <+ChillerDragon> !roby 15:48 <+ChillerDragon> fuck 15:48 <+bridge> bot is dead 15:48 <+ChillerDragon> how to ping roby 15:48 <+ChillerDragon> !ping 15:48 < chillerbot4> pong 15:48 <+bridge> good question 15:48 <+bridge> !robstar 15:49 <+bridge> !bugfixer 15:49 <+bridge> !roberster 15:49 <+bridge> weeb pfp = good dev 15:49 <+bridge> @Jupeyy_Keks get a vulkan waifu pfp 15:49 <+ChillerDragon> !robster 15:49 <+ChillerDragon> WTRF 15:49 <+bridge> u dont even know ur bot 15:49 <+bridge> give me midjourney access 15:49 <+bridge> and i generate one 15:49 <+bridge> !robster 15:50 <+bridge> ok wait 15:50 <+bridge> !jup 15:50 < chillerbot4> @Jupstar ✪ 15:50 <+ChillerDragon> https://github.com/ChillerDragon/ddnet-ircbot/blob/adfc747e1eb186fce903fa977939e6d50386b5ac/ping_pong.csv#L9 15:50 <+ChillerDragon> it says here ffs 15:50 <+bridge> stable diffusion tho 15:50 <+bridge> chiller forgot to reload? 15:50 <+ChillerDragon> maybe 15:50 <+ChillerDragon> lemme rebuild docker image 15:50 <+ChillerDragon> docker moment 15:50 <+bridge> sadly its too bad :/ 15:50 <+bridge> we don't have anything in the source code to build JSON, we always build it manually using `str_format` 15:50 <+bridge> it gets better and beter 15:50 <+bridge> but still too bad 15:50 <+bridge> oh jesus really? 15:51 <+bridge> they should use the lib then 15:51 <+bridge> I still need to port the `CJsonWriter` from upstream 15:51 <+bridge> @kio other than that, there's code in src/engine/server/register.cpp that uses HTTP to post some json. search that file for `Json` 15:51 <+bridge> Yeah, I wanted to do a json builder too for a while now 15:51 <+bridge> yes but the problem was do it with post 15:51 <+bridge> oh nice 15:51 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106579475514261504/image.png 15:51 <+bridge> i did this work around ahah 15:52 <+ChillerDragon> !rob i added upstream json writer in #5660 15:52 < chillerbot> https://github.com/ddnet/ddnet/issues/5660 15:52 < chillerbot> @Robyt3 15:52 <+ChillerDragon> EZ 15:52 <+bridge> what does the json writer do? 15:52 <+bridge> does it use rtti or what 15:52 <+bridge> it probably just formats 15:52 <+bridge> using variant union thing 15:52 <+bridge> oh shit nvm, it requires python 3.10 but i removed it on gentoo 15:53 <+ChillerDragon> it does ``system("jq %s > %s")`` 15:53 <+bridge> ChillerDragon: I'm not sure if the constants `SERVERINFO_LEVEL_MIN`/`SERVERINFO_LEVEL_MAX` add something. I'd either remove them or make them into an enum that names the variants, I think 15:53 <+bridge> ChillerDragon: after this is resolved (e.g. by discussing it), could you squash your PR? 15:53 <+bridge> u can use it on huggingface for free 15:53 <+bridge> ChillerDragon: nice. if you have the time, extract just the json writer in another PR already, so we can merge it separately 15:53 <+ChillerDragon> constants is the first thing i found to name ranges 15:53 <+bridge> its sadly even faster than my PC XD 15:54 <+bridge> why do you want a name though? it's 0-2 and cannot be changed 15:54 <+ChillerDragon> idk i thought its good style 15:54 <+ChillerDragon> but the info got lost in the rendered json anyways so we can also get rid of it 15:54 <+bridge> then let's get rid of it 15:54 <+ChillerDragon> oke sir 15:54 <+bridge> OMG 15:54 <+bridge> we need to embrace this 15:54 <+bridge> https://linux.die.net/man/3/bstring 15:55 <+bridge> i wouldn't call that intrinsic, it's still target dependent. Real intrinsic would be 0 page on DRAM directly 15:55 <+ChillerDragon> squash into one commit with generated code? 15:55 <+bridge> its a llvm intrinsic, it handles the target dependent thing for u 15:55 <+bridge> also known as mem* 15:56 <+bridge> Does anyone know if it's possible to edit the data of a demo ? 15:56 <+bridge> it also allows u to mark volatile 15:56 <+ChillerDragon> it took me so long to get the constants working :( but ye i see ur point 15:56 <+ChillerDragon> waste of time 15:56 <+bridge> you can also put it into an enum, if you want names, ChillerDragon 15:56 <+bridge> biggest troll ever, already got beaten by that several times 15:56 <+ChillerDragon> its also not obvious when looking at the json where the number comes from tho right? 15:57 <+bridge> first intel CPU were 4 bits iirc 15:57 <+bridge> it's really good fun. sometimes you have to say `< 0` and sometimes you have to say `> 127` to check for ascii 15:57 <+bridge> I have a problem where I see teams that I don't want to see in the rendered video 15:57 <+bridge> ChillerDragon: the JSON tries to be machine readable. so it will resolve any constants 15:57 <+bridge> btw, lots of circuits are also 1 bit technically but very fast 15:57 <+ChillerDragon> yea 15:57 <+ChillerDragon> so lets get rid of it 15:57 <+ChillerDragon> otherwise it has no readibility improvements anyways 15:57 <+ChillerDragon> nobody looks into loader.py 15:57 <+bridge> okay 🙂 15:58 <+bridge> > The memfrob() function encrypts the first n bytes of the memory area s by exclusive-ORing each character with the number 42. The effect can be reversed by using memfrob() on the encrypted memory area. 15:58 <+bridge> > 15:58 <+bridge> > Note that this function is not a proper encryption routine as the XOR constant is fixed, and is only suitable for hiding strings. 15:58 <+bridge> its not impossible but there isnt such demo. if u lucky replace the game tee skins with transparent skins 15:58 <+bridge> how did this function get into libc? 15:58 <+bridge> its not impossible but there isnt such tool. if u lucky replace the game tee skins with transparent skins 15:59 <+bridge> no way xD 15:59 <+ChillerDragon> @Robyt3 i wanted to do that at first to make step by step stuff easier and less git conflicty but thought nobody would merge a unused upstream feature 15:59 <+bridge> This is not standard C, right?? 15:59 <+bridge> That sounds like a clever solution, will do (can't get rid of other players' particles but it should be good enough already) 15:59 <+bridge> does /specteam works in demo? 16:00 <+bridge> no, just a libc function 16:00 <+bridge> glibc, probably 16:00 <+bridge> Seems like gnu c yeah 16:01 <+bridge> maybe create an issue about this as new idea/feature 16:01 <+bridge> Nope, I can't even see the team 16:01 <+bridge> Both are currently in team 16:01 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106582033389604954/image.png 16:02 <+bridge> yeah 16:02 <+bridge> the network code is weird 16:02 <+bridge> it only sometimes sends the information 16:02 <+bridge> xd 16:02 <+bridge> Ah 16:02 <+ChillerDragon> did someone say network code? 16:02 <+ChillerDragon> i became actual tw netcode enjoyer 16:02 <+bridge> no 16:03 <+bridge> i think its overcomplex 16:03 <+bridge> it is 16:03 <+bridge> demo code is all over place 16:03 <+ChillerDragon> ye xd 16:04 <+bridge> ChillerDragon: wait. you learned the netcode without any immediate benefit. I thought you did not like learning 🤔 16:05 <+ChillerDragon> i had to learn tw netcode which was a very long and frustrating process to get my desired outcome of uniting all tw playerbases 0.6 and 0.7 and be able to play ctf again with a client that allows me to control the mouse 16:08 <+bridge> I think it might have been easier to fix whatever mouse trouble you have with ddnet 16:08 <+ChillerDragon> teeworlds* 16:08 <+ChillerDragon> i need ddnet client to work on 0.7 to play ctf with OG ctf players 16:08 <+ChillerDragon> because teeworlds client is weird 16:08 <+bridge> does your server not support both 0.6 and 0.7? 16:09 <+ChillerDragon> some of my servers yes 16:09 <+ChillerDragon> but no ctf server 16:09 <+bridge> I see 16:09 <+ChillerDragon> especially not vanilla ctf servers 16:09 <+ChillerDragon> and also i think it makes a lot of sense to not split the game into ddnet and teeworlds 16:10 <+ChillerDragon> i dont wanna miss out on whats happening in 0.7 or switch clients 16:57 <+bridge> ```mlir 16:57 <+bridge> %3 = llvm.mlir.constant(296 : i64) : i64 16:57 <+bridge> %4 = llvm.mlir.null : !llvm.ptr 16:57 <+bridge> %5 = llvm.call @realloc(%4, %3) : (!llvm.ptr, i64) -> !llvm.ptr 16:57 <+bridge> %6 = llvm.mlir.constant(0 : i32) : i32 16:57 <+bridge> %7 = llvm.call @memset(%5, %6, %3) : (!llvm.ptr, i32, i64) -> !llvm.ptr 16:57 <+bridge> ``` 16:57 <+bridge> ez 16:58 <+bridge> ```llvm 16:58 <+bridge> %3 = llvm.mlir.constant(296 : i64) : i64 16:58 <+bridge> %4 = llvm.mlir.null : !llvm.ptr 16:58 <+bridge> %5 = llvm.call @realloc(%4, %3) : (!llvm.ptr, i64) -> !llvm.ptr 16:58 <+bridge> %6 = llvm.mlir.constant(0 : i32) : i32 16:58 <+bridge> %7 = llvm.call @memset(%5, %6, %3) : (!llvm.ptr, i32, i64) -> !llvm.ptr 16:58 <+bridge> ``` 16:58 <+bridge> ez 17:31 <+bridge> 3 people carrying ddnet :gigachad: 17:31 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106604627295735839/image.png 18:27 <+bridge> @deen i think for we need you to enable smth in steam 18:27 <+bridge> im looking for something ez to do next xd 18:33 <+bridge> I already did that 😄 18:33 <+bridge> (implement it) 18:34 <+bridge> oh nice xd 18:35 <+bridge> I usually use the github search `is:issue sort:updated-desc is:open -label:needs-discussion -label:to-reproduce -label:incomplete -label:"3rd party" -label:discussion` (with a bookmark) to find the issues to fix 18:35 <+bridge> oh nice 18:35 <+bridge> issue fix speedrun xD 18:36 <+bridge> But I think this issue is not solvable anyway, as I explained in the issue "You probably need to select each individual language that the game supports, so unsupported languages don't appear in the list. However this could mean that if a user has Steam configured with a language that's not supported by the Steam API, then the GetCurrentGameLanguage API might default to English, so we cannot use the Steam API to first determine the language, as this 18:37 <+bridge> I can't find this setting in the steam settings 18:37 <+bridge> the latter part could be fixed by setting the language to "autoselected" instead of setting it to a concrete thing 18:38 <+bridge> maybe we can just use the UI language instead of the configured game language 18:38 <+bridge> the docs say you usually want the game language and not the UI language, but I think it makes more sense here 18:38 <+bridge> because we don't change the language in the client later, after the game language is changed in the steam settings 18:39 <+bridge> but that could be fixed by marking the language as autoselected 18:39 <+bridge> also, the game language is the same as the UI language by default, I think 18:40 <+bridge> yeah, game language just uses the UI language if it's not set specifically for that game 18:40 <+bridge> what is "autoselected" though? 18:40 <+bridge> is that a setting you can use? 18:40 <+bridge> ye 18:40 <+bridge> basically like the nickname 18:41 <+bridge> if you don't set one explicitly, it's updated every time you change your steam nick 18:41 <+bridge> but if you set it explciitly, it'll no longer be updated 18:49 <+bridge> https://github.com/ddnet/ddnet/issues/6139 18:49 <+bridge> i dont understand this issue 18:49 <+bridge> > First tee joins /team 1 and use /practice 18:49 <+bridge> > Second tee joins /team 1 and is stuck there because of practice 18:49 <+bridge> > 18:49 <+bridge> > Practice should probably act as if the team started 18:49 <+bridge> what does it mean stuck 18:49 <+bridge> i tested it and i dont see anything wrong 18:53 <+bridge> https://github.com/rust-lang/rust/pull/111111 18:53 <+bridge> big numbers 18:53 <+bridge> xd 18:54 <+bridge> I think this complains about the fact that it *is* currently possible to join a /practice team 18:54 <+bridge> because you can't leave a /practice team without dying 18:54 <+bridge> not sure if making /practice teams unjoinable is really the best way to solve this 19:01 <+bridge> @heinrich5991 awaiting ur input https://github.com/ddnet/ddnet/issues/2762 19:02 <+bridge> ryo tryhard mode 19:02 <+bridge> ye 19:03 <+bridge> somebody has to do the dirty work 19:03 <+bridge> :kekCapture: 19:03 <+bridge> (joke i do nothing) 19:03 <+bridge> https://github.com/ddnet/ddnet/issues/3922 19:03 <+bridge> wh ocares about centos 19:03 <+bridge> close this 19:03 <+bridge> :gigachad: 19:03 <+bridge> right @Jupeyy_Keks 19:04 <+bridge> tru 19:05 <+bridge> @Jupeyy_Keks 19:05 <+bridge> is this true 19:05 <+bridge> i dont think it can cause such insane lags 19:05 <+bridge> but indeed its not the most efficient implementation 19:06 <+bridge> @Jupeyy_Keks https://github.com/ddnet/ddnet/issues/6134 19:06 <+bridge> can we render the tune zone config text in place? 19:06 <+bridge> xddd 19:07 <+bridge> mhh sounds hard to do nicely 19:08 <+bridge> also rly niche 19:09 <+bridge> the question is where do you even render the text exactly? would be distracting if it keeps moving while the tee moves 19:09 <+bridge> yeah^^ 19:10 <+bridge> close as wontfix? 19:10 <+bridge> xd 19:10 <+bridge> i vote+ 1 19:10 <+bridge> +1 19:10 <+bridge> god i cant type 19:10 <+bridge> we can close 90% as wont fix xDDDD 19:10 <+bridge> xdd 19:11 <+bridge> i got a idea for a feature 19:11 <+bridge> but maybe its too ddnet centric 19:11 <+bridge> a tab to show info about ur name, since we can query the json api 19:11 <+bridge> points etc 20:28 <+bridge> Do any of you use MATLAB? 20:31 <+bridge> why do u ask if we use non-free propietary software 20:31 <+bridge> Because we atleast have one academic here and academics love matlab 20:31 <+bridge> only when I'm forced by university st(u|a)ff 20:31 <+bridge> and there may be people using octave 😄 20:32 <+bridge> Anyway, any idea proprietary software enjoyers? 20:32 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1106650060562911333/matlab.png 20:32 <+bridge> ask chatgpt 20:33 <+bridge> actually not a bad idea 20:34 <+bridge> its sad u cant take a academic course and not be bombarded by propietary non free software 20:34 <+bridge> public teachings ought to be free as in freedom 20:34 <+bridge> i had a teacher who was very into pushing this 20:34 <+bridge> he wanted to make my high school change all windows into linux 20:34 <+bridge> and replace all the programs 20:34 <+bridge> gigachad 20:35 <+bridge> he was nearing the retarement age too xd 20:35 <+bridge> retirement 20:36 <+bridge> they are trying to upgrade the curriculum here but the professors are a bit resistant 20:36 <+bridge> circuit theory moved to python but they still use proprietary spice instead of ngspice 20:37 <+bridge> @Learath2 if gov made a law to only use fsf licensed software 20:37 <+bridge> it would push and motivate to make better 20:37 <+bridge> linear algebra is moving to python next year I think 20:38 <+bridge> not sure if I parse correctly, are you trying to zip the two cell arrays together? 20:39 <+bridge> Yes, I want to end up with one 2x2 cell array of 1x2 cell arrays 20:40 <+bridge> I think this control theory class will forever be in matlab tho. They use so many proprietary things, I can't imagine it existing without simulink and matlab 20:43 <+bridge> https://stackoverflow.com/questions/26165932/how-do-i-zip-multiple-cell-arrays-together while I don't know enough matlab to understand the solution, this looks good 20:52 <+bridge> i bet it crashes daily and has like a thousand memory leak issues 21:02 <+bridge> https://us05web.zoom.us/j/3715679378?pwd=N2VFVzJTV0xUQ3ZyeG02eFZiSVkxUT09 21:02 <+bridge> ew 21:02 <+bridge> Someone on the matlab discord found me something better `cellfun(@(x, y) {x, y}, n, d, 'UniformOutput', false)` 22:12 <+DkrTremos> sera all 23:31 <+bridge> @Learath2 @Jupeyy_Keks @heinrich5991 my heros i need help 23:33 <+bridge> dont ask to ask 23:33 <+bridge> 😦 23:33 <+bridge> crazy 23:33 <+bridge> xd 23:33 <+bridge> i need to share an object 23:33 <+bridge> no wait 23:37 <+bridge> so, let me explain better, I have my own class, and from there I want to manage everything, be able to hook, send messages in chat, move, jump, disconnect from the server, ... (these are random examples that came to my mind ) but I don't understand how to make my class globally shared in other classes or have access to other classes directly from mine, because I guess I can't reinstantiate a character or player or client object or whatever, I guess I n 23:52 <+bridge> friend classes i suppose 23:53 <+bridge> how it works 23:58 <+bridge> in c++ you can access your friends privates 😏 23:58 <+bridge> or so I heard 23:58 <+bridge> xd 23:58 <+bridge> oke but i never saw a similar thing in other languages 23:59 <+bridge> it's in every oop language you can think of 23:59 <+bridge> for example, this fucking m_pClient where can i find it without pass that from fucntion params 23:59 <+bridge> have another name? 23:59 <+bridge> it's called `friend` in every language I can think of