00:43 <+bridge> i finally beat notelebro \o/, now how to fake camera position of a demo? can i edit the demo files with a binary file editor? 00:45 <+bridge> and about that i wanted to ask, when do i not have to chroma key out the bg? is there transparent video? or should i layer every frame on eachother as png and then make a video out of it? 00:50 <+bridge> Hm, I thought h264 supported alpha but it's an extension it seems, I'm not sure if you can do that, but that was my idea 00:54 <+bridge> You can also modify the client to export also an alpha only video for masking but honestly chroma-keying sounds much easier 01:37 <+bridge> :bluekitty: 01:37 <+bridge> discord app so slow for me on phone 01:50 < ws-client> !ping 01:50 < chillerbot1> pong 01:50 < ws-client> my apache back! 03:17 <+bridge> use old version, i'm using the 2021 one and everything is loading fast 03:40 <+bridge> can’t 08:49 <+bridge> how do u show tee skins darker when in the freeze instead of ninja 08:52 <+bridge> is that a custom client 08:57 <+bridge> Why do they have the ninja skin when frozen at all? 09:25 <+bridge> that's the game 09:28 <+bridge> Such a nice map 09:28 <+bridge> (@chairn) 09:28 <+bridge> You can freely move the camera with the mouse in the demo 09:28 <+bridge> (@cauldron1) 11:03 <+bridge> cl_show_ninja 0 if u want normal skins in freeze 11:04 <+bridge> f1 - cl_show_ninja 0 if u want normal skins in freeze 11:08 < ChillerD1> :q 11:08 < ChillerD1> ops 11:20 <+bridge> yeah but how do i dim them 11:20 <+bridge> i've seen it in demos sometimes 11:20 <+bridge> if i don't have them dimmed i just think they're not frozen and die lol 11:21 <+bridge> maybe taterclient 11:27 <+bridge> nah 11:45 <+bridge> If they're below the freeze layer they should automatically be dimmed right? @coke1465 11:50 <+bridge> @learath2 yo bro. I hope you're doing well. Got any time to look for the discord bot? 11:50 <+bridge> 11:50 <+bridge> My hope is that with that bot the skin submission gets a bit more active again. It's been over 3 months already since the last upload. 11:50 <+bridge> 11:50 <+bridge> Have a nice rest sunday 11:52 <+bridge> What does the bot have to with it being 3 months since the last upload? I thought we already have a way to upload skins 11:52 <+bridge> I'll take a look at the bot thing I guess tonight. Ping me again later 👍 11:54 <+bridge> i think the database crew finds it too annoying to download the skins, go on the website, manually fill the forms just to upload a single skin ^^ 11:54 <+bridge> the bot automates all these steps and u can upload multiple skins at once 11:55 <+bridge> Did the database crew say this or do we maybe just need more people in the skin database crew? 11:55 <+bridge> mh let me search the message. i cant remember if it was the database crew or murpi 11:55 <+bridge> any reason why templated work can't be done automatically xd 11:56 <+bridge> ^ 11:56 <+bridge> 11:56 <+bridge> it was about uploading hd skins is annoying 11:56 <+bridge> so i decided to generally make the upload easier 11:56 <+bridge> . 11:57 < ChillerDragon> jupsti writing emails on discord 12:09 <+bridge> Actually it's been 3 months can't it wait another week until I'm done with exams? 12:10 <+bridge> Or murpi could spin it up, he has the same permissions I have on all the relevant servers 12:17 <+bridge> Ofc, u can also try to make ur entities freeze darker 12:22 <+bridge> yeah no hurry, i'll ping u in a week xds 12:33 <+bridge> chiller i can't blocxk 12:35 <+bridge> block 12:36 < ChillerDragon> skill issue 12:37 < ChillerDragon> is there any chance asan and ubsan dont catch something? 12:38 < ChillerDragon> seems like my client starts to randomly send malformed garbage over the network but i get no asan warnings 12:41 <+bridge> Yes, ASan and UBSan can have false negatives 12:41 <+bridge> But if it's sending uninitialized memory then you need MSan to detect it 12:43 < ChillerDragon> ou msan 12:43 < ChillerDragon> where to buy it 12:43 < ChillerDragon> why isnt it in ddnet readme? is it even slower? 12:44 < ChillerDragon> ``-fsanitize=memory`` i assume 12:45 <+bridge> I think you can't combine it with the other sanitizers 12:45 <+bridge> So we'd need to run it separately 12:46 <+bridge> Would still be a good idea if it's possible 12:46 <+bridge> is there any documentation on map_create_pixelart? 12:47 <+bridge> somehow just segfaults for me 12:47 <+bridge> im probably doing something wrong with the arguments 12:47 <+bridge> Seems like MSan is included in Valgrind though, so I guess we don't need it 12:47 <+bridge> > MSan implements a subset of functionality found in Valgrind (Memcheck tool). 12:47 <+bridge> Can you share the command line arguments you are using to call it? 12:48 < ChillerDragon> ``invalid argument '-fsanitize=address' not allowed with '-fsanitize=memory'`` 12:48 < ChillerDragon> ye u rite robi 12:48 < ChillerDragon> sad 12:48 <+bridge> `./map_create_pixelart ~/Downloads/map_sao.png 0 ~/.local/share/ddnet/maps/pixelart1.map 0 0 0 0 0 ~/.local/share/ddnet/maps/pixelart.map` 12:49 <+bridge> `Usage: ./map_create_pixelart [optimize=0|1] [centralize=0|1]` this is the usage 12:49 < ChillerDragon> cool TIL there is a pixelart tool 12:49 <+bridge> `Note: set img_pixelsize to 0 to consider the largest possible size. 12:49 <+bridge> Note: set quad_pixelsize to 0 to consider the same value of img_pixelsize. 12:49 <+bridge> Note: if image.png has not a perfect pixelart grid, result might be unexpected, manually fix img_pixelsize to get it better.` 12:50 <+bridge> Yeah, seems like it's correct according to the those docs 12:50 <+bridge> I'll try if it crashes for me 12:50 < ChillerDragon> send pic and map 12:51 <+bridge> the input and output maps are just empty maps btw 12:51 < ChillerDragon> will it create tile layers then? 12:51 < ChillerDragon> how does the tool even work 12:51 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1122479184850194543/pixelart1.map 12:51 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1122479185278029845/pixelart.map 12:51 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1122479185861021696/map_sao.png 12:51 <+bridge> @kaphilipp wanted tzhis 12:51 <+bridge> @kaphilipp wanted this 12:51 < ChillerDragon> the image is huuughe 12:52 <+bridge> yea 12:52 < ChillerDragon> u insane? 12:52 <+bridge> It works for me with another image and map 12:52 <+bridge> but who cares xD 12:52 < ChillerDragon> every pixel would be a tile or what? 12:52 <+bridge> (if I counted correctly) Are you missing the quad_pixelsize argument? Seems like there's one argument missing as you provided a map where it expected quad_pixelsize. 12:52 <+bridge> (if I counted correctly) Are you missing the quad_pixelsize argument? Seems like there's one argument missing as you provided the output map where it expected quad_pixelsize. 12:53 <+bridge> you counted wrong 12:53 <+bridge> yyy 12:53 <+bridge> yy 12:54 <+bridge> hmm. so the image is just too large? 12:54 <+bridge> Yes 12:54 <+bridge> It creates a quad for every pixel 12:54 <+bridge> I used the game.png to test and that already makes the editor very laggy 12:55 <+bridge> It's pixel-art, so I assume you should use it with actual pixel art 12:55 <+bridge> hmm i always thought itd just make tile layers with diffrent colors 12:56 <+bridge> is there a reason to do it with quads? 12:56 <+bridge> is there a specific reason to do it with quads? 12:56 <+bridge> each tile layer could only have 256 colors, the algorithm for that would be more complex 12:57 <+bridge> @chillerdragon its your turn now 12:57 < ChillerDragon> wot 12:58 <+bridge> you would probably need a lossy algorithm for images with too many colors 12:58 <+bridge> start coding! 12:58 <+bridge> xD 12:58 < ChillerDragon> idk how to code 12:58 < ChillerDragon> idk wat even u want to do 12:58 < ChillerDragon> just embed the image 12:59 <+bridge> hmm yes seems smart. 12:59 < ChillerDragon> woah mem san is no fun 12:59 < ChillerDragon> client is booting since 2mins 12:59 <+bridge> but if someone wanted to edit some tiles then the whole image would need to be edited externally and then pasted in again 13:00 < ChillerDragon> tiles? 13:00 < ChillerDragon> is it guads or tiles now? 13:00 <+bridge> this is for a gores map 13:00 < ChillerDragon> so you want it to be tiles? 13:00 < ChillerDragon> like the pokemon maps? 13:00 <+bridge> And msan won't work very well because you don't have your libc compiled with it 13:00 <+bridge> exactly. 13:00 <+bridge> Should have stuck to valgrind 13:01 < ChillerDragon> ok ill use valgrind 13:01 <+bridge> or quads as long as you can edit them pixel by pixel everything is fine 13:01 < ChillerDragon> using quads to map gametiles sounds cursed 13:01 <+bridge> true 13:01 < ChillerDragon> i dont understand why the tool uses quads anyways? is it for easier coloring? 13:02 <+bridge> your image doesn't look suitable for a tiles layer. I think your image needs fewer colors 13:02 < ChillerDragon> yea when i look at the image i dont really see a gores map but maybe im not creative enough 13:02 <+bridge> (replied to the wrong message @teero777) 13:03 < ChillerDragon> reply moment 13:03 < ChillerDragon> loading skin files ... 13:03 < ChillerDragon> okok ill abort xd 13:03 < ChillerDragon> jesus 13:03 <+bridge> you gotta think outside the 3rd dimension! 13:04 <+bridge> i really dont know either. @kaphilipp asked me to do it 13:04 <+bridge> That's going to be impossible for such a large image. Even if the tool and mapformat would be able to support it, the editor would probably run at less than 5 FPS. 13:04 < ChillerDragon> yea and hfgl mapping such a long map by hand 13:05 <+bridge> if i can edit every pixel of an image in gimp then why cant i in the tw map editor :trollet: 13:05 <+bridge> well that is what image editors are for 13:05 < ChillerDragon> im currently working on a 3 x 1.7 k gores map and it takes forever 13:05 <+bridge> oh no. 13:06 <+bridge> its chillerdragores317 :justatest: 13:06 < ChillerDragon> chillerdragores6 actually xd 13:06 <+bridge> btw how do you choose your map names wtf? there is chillerdragores18 and others but now its 6? 13:07 < ChillerDragon> 6 always has been before 18 13:07 < ChillerDragon> 18 just was faster to finish 13:07 <+bridge> ah ok sure 13:10 <+bridge> @teero777 if my python script is correct, your image contains 317386 different colors ^^ 13:10 <+bridge> 😂 13:14 <+bridge> `print(len(set(Image.open(image_path))))` 13:57 <+bridge> still curios if it can be done in the demo file to change the "standard" camera position? 😅 13:57 <+bridge> still courios if it can be done in the demo file to change the "standard" camera position? 😅 13:57 <+bridge> still curios if it can be done in the demo file to change the "standard" camera position? 😅 14:02 < ChillerDragon> what does that mean? 14:02 < ChillerDragon> press your spectator options bind and select free view 14:02 < ChillerDragon> while playing the demp 14:03 <+bridge> i want to render many demos with exact same camera position 14:03 <+bridge> that's why i want to hard code it into the demo file 14:05 <+bridge> because when you play the demo without anything it has the camera position of when you were recording, so the demo must have a "default" camera position 14:05 <+bridge> but when i try to edit the demo with a text editor it is binary 14:05 < ChillerDragon> for what to record a video? 14:06 < ChillerDragon> you can use free view and set_view command 14:06 <+bridge> i didn't know set_view 14:06 <+bridge> but i would need to set it for every frame 14:07 < ChillerDragon> open console while in free view while watching a demo 14:07 < ChillerDragon> then do ``set_view 10 10`` 14:07 < ChillerDragon> and it stays like that for all frames 14:07 < ChillerDragon> you can just play the demo 14:08 <+bridge> but what if i want to have the camera follow the tee 14:08 < ChillerDragon> which tee? 14:08 < ChillerDragon> your tee? 14:08 <+bridge> yes 14:08 < ChillerDragon> isnt it doing that by default? 14:08 <+bridge> okay 14:08 < ChillerDragon> what okay 14:08 <+bridge> but if i want to follow a self-set path 14:09 < ChillerDragon> ??? 14:09 <+bridge> not just the same camera position for the whole demo 14:09 < ChillerDragon> so not follow a tee? 14:09 <+bridge> no 14:09 <+bridge> not follow a tee 14:09 < ChillerDragon> move randomly? 14:09 <+bridge> not random 14:09 < ChillerDragon> but the same way across multiple demo files?= 14:09 <+bridge> a pre defined path 14:09 <+bridge> yes 14:09 <+bridge> exactly 14:09 < ChillerDragon> i see 14:09 < ChillerDragon> is rerecording the demos a option? 14:10 <+bridge> no 14:10 < ChillerDragon> im not sure if there are any demo parsers out there 14:12 < ChillerDragon> you could probably edit camera.cpp to record the current coordinates and then do you camera movements and then force camera.cpp to replay those in the demo player 14:12 < ChillerDragon> seems way easier than editing the demo files 14:13 <+bridge> okay really stupid idea: if i render the demo with full map view (zommed out all the way) can i render it then with reaaallly high resolution like 16k or something 14:14 < ChillerDragon> yikes 14:14 <+bridge> ey where do you have the 2x slowdown with tunings? i mean the map config things 14:15 <+bridge> that?: https://wiki.ddnet.org/wiki/Settings_and_Commands#Tunings 14:16 <+bridge> i believe it's the best i can do to overwrite coordinates in camera.cpp 14:16 <+bridge> thanks 14:27 <+bridge> nah i think there was a specific config that made the game physics exactly 2x slower 14:30 <+bridge> how do i make tune zone settings global? 14:31 <+bridge> maybe i should ask in #mapping 14:33 <+bridge> just dont' put tune zone in fron of the command? 14:33 <+bridge> in the map settings 14:34 <+bridge> yeah #mapping 14:47 < ChillerDragon> @cauldron1 i cracked something together that kinda works xd 14:47 < ChillerDragon> its more a proof of concept 14:48 <+bridge> tell mek 14:48 <+bridge> tell me 14:49 < ChillerDragon> https://github.com/ChillerDragon/ddnet/tree/chiller_cam_rec 14:50 < ChillerDragon> open demo and do ``cl_rec_cam 1`` to record you camera movement and then playback the same demo with ``cl_rec_cam 2`` and itll do the same move 14:51 < ChillerDragon> its looking at the game tick to do the sync it so different demos will not work 14:51 < ChillerDragon> it needs adjust but yea its just a proof of concept of what is possible 14:52 <+bridge> okay 14:53 <+bridge> so different demos with same map don't work? 14:53 <+bridge> what else could it look for, instead of the game tick 14:53 <+bridge> could it do it per frame? 14:53 <+bridge> or is that not accessible in the code 14:54 < ChillerDragon> you could sync it based on start of replay 14:54 < ChillerDragon> but that might get of sync with varying frame times 14:55 <+bridge> i am also tempted by the simple stupid idea of rendering all my demos with static view zomming out of the whole map and then rendering with 8k or more and then do the stuff with rendered mp4s 14:55 < ChillerDragon> can you even record 8k without a 8k screen? 14:55 <+bridge> maybe with software renderer 14:56 <+bridge> <_voxeldoesart> what r u guys planning 14:56 <+bridge> gles 14:56 < ChillerDragon> sounds complicated 14:56 <+bridge> virtual screen 14:56 <+bridge> chiller_cam_rec 14:56 <+bridge> kog_cam 14:58 <+bridge> <_voxeldoesart> oh yeah speaking of demo rendering i had this idea about like, a mini video editor inside the demo preview, where you can place keyframes and have the demo automatically change settings accordingly 14:58 <+bridge> <_voxeldoesart> like playback speed, where its spectating, zoom 14:58 <+bridge> render many demos on top of eachother with synced camera movement 14:58 <+bridge> yeah we discussed such stuff already, maybe u can find it here in this channel 14:59 <+bridge> what is gles, is it only in the linux build? 14:59 <+bridge> yes 14:59 <+bridge> and android 14:59 <+bridge> is it software rendering? 14:59 <+bridge> no 15:00 <+bridge> its OpenGL ES 15:00 <+bridge> but wasn't there software rendering? 15:00 <+bridge> embedded systems 15:00 <+bridge> then it was something else 15:00 <+bridge> <_voxeldoesart> i remember making this too 15:00 <+bridge> <_voxeldoesart> https://cdn.discordapp.com/attachments/293493549758939136/1122511590969839746/image0.png 15:00 <+bridge> on linux u can select under vulkan a software renderer 15:00 <+bridge> but why would u want this? D: 15:02 <+bridge> because i want to render 8k demo 15:03 < ChillerDragon> ok the camera sync i built kinda works for multiple demos 15:03 <+bridge> and for some reason i think it could be possible with software rendering? 15:03 < ChillerDragon> buts its somehow not very smooth 15:03 <+bridge> okay, i'll try to build it 15:04 <+bridge> but software rendering does not help 15:04 <+bridge> quick google said u can create a virtual x server 15:04 <+bridge> with custom resolution 15:04 <+bridge> or use a linux VM 15:05 <+bridge> what is a virtual x server? can you see it or does it run invisible in the background? 15:06 <+bridge> i dunno, ask search engines 15:08 <+bridge> why do u even need it in 8k in first place xD 15:08 <+bridge> do you make a chile nature docu? 15:09 <+bridge> i would render the demo of the whole map with static view zoomed completely out 15:09 <+bridge> and then define the camera position in a video editing program by zomming in 15:09 <+bridge> and then define the camera position in a video editing program by zooming in 15:10 <+bridge> and 8k is enough for that? 😄 15:10 <+bridge> well rendering in 8k, i hope u have at least 16 cores 😄 15:11 <+bridge> it's just an idea... i can render through nidhts 15:11 <+bridge> it's just an idea... i can render through nights 15:22 <+bridge> damn, that's pretty good looking 15:22 <+bridge> shouldn't even be that hard to code too 16:20 <+bridge> there is set_view, is there also get_view for getting the current camera positions in a demo 16:48 < ChillerDragon> no 16:48 < ChillerDragon> but oh no wat u wanna do? :D 16:48 < ChillerDragon> use set_view frame by frame? :D 17:15 <+bridge> idk... it's complicated project... 17:26 <+bridge> <@&746414504488861747> @Tester What do you think about #6755 now? Some still want to use the RGB format quickly, so I added hotkeys for copy/pasting colors: 17:26 <+bridge> - Support shift-rightclicking color picker buttons to copy the color to the clipboard in RRGGBBAA hex format. 17:26 <+bridge> - Support shift-leftclicking color picker buttons to paste a color from the clipboard in RGB, RGBA, RRGGBB or RRGGBBAA format with optional leading `#` or `$`. 17:26 <+bridge> This system of copy&pasting could also be extended to other properties in the future, e.g. images, sounds, etc. 17:26 <+bridge> https://github.com/ddnet/ddnet/pull/6755 17:30 <+bridge> @robyt3 from what I understand they just want the hex field to stay but don't realize that it's now inside the color picker, but quick copying of values is a nice feature anyway 17:31 <+bridge> Yeah, either that or opening the color picker popup to paste the RGB color is too slow for them, so the hotkeys should also solve this 17:31 <+bridge> the screenshots in that pr don't show the color picker itself so it's not clear that the hex field is inside it 17:32 <+bridge> I don't think one more click to get to it is the problem 17:37 <+bridge> @texnonik what is your opinion on this? 17:37 <+bridge> would you be annoyed if the color picker is always one click away 17:42 <+bridge> i knew it was inside the color picker and still didn't like the 1 more click 17:42 <+bridge> the shortcuts fix it though 18:21 <+bridge> Why you ask me ? 18:21 <+bridge> I am used to select colors with sliders . 18:21 <+bridge> First i choose color and then i regulate it in with sliders. 18:21 <+bridge> Because you have more option to select . 18:21 <+bridge> 18:21 <+bridge> 1.Maybe after color picker selected you could change there also with sliders ? 18:21 <+bridge> 18:21 <+bridge> 2. Maybe ad option that can add this sliders back again ? 18:23 <+bridge> bcs u use the editor the whole day 😂 18:24 <+bridge> i think the sliders are still there, simply behind an extra click 18:24 <+bridge> With popup open 18:25 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1122563100332265603/image.png 18:25 <+bridge> You just don't have individual RGB sliders anymore 19:52 < ChillerDragon> yikes got a segfault in my bash script haha 19:55 <+bridge> u segfaulted bash? 20:18 <+bridge> hsv sliders is better than rgb anyways 20:22 <+bridge> would u know the HSV value for yellow from head? 20:22 <+bridge> i find HSV pretty unintuitive xD 20:24 <+bridge> its visually a lot easier 20:25 <+bridge> humans see colors in hue saturation and brightness more than they see it in red green blue 20:25 <+bridge> <_voxeldoesart> i unironically use hsv more 20:25 <+bridge> yeah but we talked about sliders? 20:25 <+bridge> 20:25 <+bridge> i think with sliders we mean the input fields 20:25 <+bridge> arent the input fields in there also sliders 20:25 <+bridge> just click and drag right/left 20:25 <+bridge> i meant, its not the thiong where u choose the color 20:25 <+bridge> yeah 20:26 <+bridge> the hex is rgb anyway 20:26 <+bridge> who cant read hexadecimals 😏 20:27 <+bridge> fr 21:18 <+bridge> hi, how i can install mysql for my server? 21:18 <+bridge> on windows 21:43 <+bridge> . 22:04 <+bridge> who can spot the bug: 22:04 <+bridge> just found it after ages of putting print statements all over my code. Cant trust copilot to write BFS 22:04 <+bridge> https://cdn.discordapp.com/attachments/293493549758939136/1122618396660478092/image.png 22:06 <+bridge> god isnt c++ ugly 22:06 <+bridge> i mean i can probably rewrite this to look better, just refactored a node based tree into an array based one with indices 22:07 <+bridge> so this was the first rewrite just to pass all my tests 22:07 <+bridge> but holy fuck this little bug wasted hours of my time 22:10 <+bridge> exceptions bad 22:11 <+bridge> idk 22:11 <+bridge> should u deref the childitr? 22:12 <+bridge> what is Idx 22:12 <+bridge> nah, the bug was that parentIdx and parentItr are references, and then the stack got popped 22:12 <+bridge> right at the top of the screenshot 22:12 <+bridge> idx = index 22:12 <+bridge> i meant is it a typedef 22:12 <+bridge> ah yeah for a size_t 22:12 <+bridge> i see u like to put const after it xd 22:13 <+bridge> const correctness 22:13 <+bridge> oh look, this is totally prevented by rust 22:13 <+bridge> why not const Idx 22:13 <+bridge> another bad thing about c++ its not const by default 22:13 <+bridge> there was some thing where if you put const on the left its not always consistent. i cant recall the situation ottomh 22:14 <+bridge> if you put const to the right then the thing to the left is what is const 22:14 <+bridge> yes, there are some bad defaults in c++ i agree 22:14 <+bridge> const is totally bad default, cuz u will forget to put const, but u cant forget to "unconst" something because the compiler can tell when u modify something 22:14 <+bridge> well in c++ case maybe there are some edges 22:14 <+bridge> cuz c++ is a shotgun 22:14 <+bridge> to the foot 22:15 <+bridge> const_cast 22:15 <+bridge> yes agreed 22:16 <+bridge> anyway ima get back to coding, just wanted to vent my frustration at that bug 22:41 <+bridge> yo my boys, what do you think about prefixing 'I' to abstract classes / interfaces in c++? I know its done in the DDNet codebase, but what do you guys think of the practice in general? 22:45 <+bridge> not enough experience to comment on this, I think 22:46 <+bridge> Wasn't the norm A instead of I? 22:54 <+bridge> I think I saw `I` in c# as well 22:54 <+bridge> No strong opinion on it, but from a pure reading perspective it probably is easier with such an prefix.. is the question how consistent it was used and if inherited classes are allowed to be inherited too 22:58 <+bridge> Me naming everything "idk lol" and other variations of that 22:59 <+bridge> Telling myself that when my project gets serious enough I'll switch to actually normal names 22:59 <+bridge> Haven't used abstract classes and interfaces that much at all actually 23:00 <+bridge> In practice i don't find it very useful tho i think. Most of the time I have an idea of what I want to use. And I rarely type out a type. E.g. if there is an enum called EEngineTypes I'd probably type in engtyp and let the ide search the exact name of the type for me 23:01 <+bridge> &stack top followed by stack pop, instant bug 23:01 <+bridge> ah, lol, mobile discord moment, why am I scrolled so high up? 23:02 <+bridge> yep, thats what I get for letting copilot write shit. Also for some reason asan didnt trip on it either, neither did my static analysis script -_- 23:02 <+bridge> tbh not sure about the static analysis, i may have missed it in the sea of output 23:03 <+bridge> I like `I` prefix for ABCs, adding data to them is imo a little sketch, but teeworlds/ddnet does it sadly 23:03 <+bridge> also interesting opinions wrt prefixing abstract classes, i'm leaning towards not prefixing them myself 23:03 <+bridge> The `I` prefix makes you think it's an ABC but it turns out not to be... 23:03 <+bridge> according to Microsoft, who most would consider to have coined this interface convention, `I` as a prefix does not just apply to abstract classes; it applies to interfaces, which are pure virtual classes which intend only to define the behavior of the implementation (nothing more, nothing less) and serve as a handle for the implementation via. pointer in COM/OLE 23:03 <+bridge> i dislike prefixes in the era of LSP and hovering 23:04 <+bridge> also most often u dont rly need to care much about what it is 23:04 <+bridge> thanks to autocomplete 23:04 <+bridge> what DDNet does with I might not even be 'real' interfaces in this regard 23:04 <+bridge> prefixes are old standards 23:04 <+bridge> when u used to code with ex 23:04 <+bridge> I like being able to read code without a 69 core machine with treesitter 86.3 beta edition running on llvm/clangd, sue me 23:04 <+bridge> LSP == liskov substitution principle right? what is hovering though? 23:04 <+bridge> ok where do i sue 23:04 <+bridge> My lawyer will be in touch 23:04 <+bridge> lsp = language server protocol, what gives u autocomplete 23:04 <+bridge> clangd is a lsp implementor 23:04 <+bridge> ah 23:05 <+bridge> i was confused about lsp 23:05 <+bridge> same, vscode regularly gets up to 5gb of ram for me -_- 23:06 <+bridge> but as it is i haven't seen any convention which explicitly distinguishes normal classes from abstract classes/interfaces like that, abstract classes are probably more of just an implementation detail and should be called the same as an implementation class if that's how it's being used 23:06 <+bridge> but if you're using it as common grounds for API maybe `I` would be appropriate 23:06 <+bridge> (fwiw my 4c/8t cpu can't deliver enough performance to give good ddnet completion, I may be holding it wrong but I cba to mess around with the setup) 23:06 <+bridge> mine's good enough 23:06 <+bridge> what, ddnet clangd is ultra fast 23:06 <+bridge> yea my clangd in qt creator is pretty good on ddnet 23:07 <+bridge> the only thing it misses is some autocomplete in the header file itself, cuz c++ is hard to parse 23:07 <+bridge> it's choking on something, no idea what, but have no reason to debug it anyway, I know my way around the ddnet code well enough that I don't need it 23:07 <+bridge> the autocomplete list will regularly arrive like in 5-15s, completely unusable latency for me 23:07 <+bridge> how many worker threads have u authorized it to use 23:08 <+bridge> idk how it works exactly, but I know that the game/components header files have a lot of recompilation cost 23:08 <+bridge> jobs or w/e (i don't think it corresponds to real cores) 23:08 <+bridge> idk how it works exactly, but I know that the game/components header files have a high recompile cost 23:08 <+bridge> haven't changed the defaults, I can mess around with that if it's a setting tomorrow 23:08 <+bridge> it is in mine. not sure about your setup (vscode?) 23:08 <+bridge> @heinrich5991 is it hard to setup precompiled headers 23:08 <+bridge> https://cmake.org/cmake/help/latest/command/target_precompile_headers.html 23:08 <+bridge> i tried vscode for cpp one time and i couldn't get mingw set up so i quit 23:09 <+bridge> getting the cmake and cpp and whatever other extensions to play in tandem with a custom cc path was painful 23:09 <+bridge> Sadly with Electron taking my cpu hostage, I fear I just might not have enough cores available anyway. Thanks javascript people for making my life worse 23:09 <+bridge> toolchain files and stuff 23:09 <+bridge> Maybe I can try with just vim, I think there is a vim clangd plugin 23:09 <+bridge> Qt Creator's kits are awesome cuz I don't have to deal with any of that 23:09 <+bridge> yea maybe 23:10 < ChillerDragon> https://zillyhuhn.com/cs/.1687727427.png 23:11 < ChillerDragon> yea its as simple as this @Jupstar ✪ didnt expect a segfault somehow 23:11 <+bridge> What did you expect? 😛 23:11 < ChillerDragon> idk 23:11 <+bridge> you can try to do it, I have no clue how hard it is 23:12 < ChillerDragon> i only ever saw segfaults in the c/c++ land 23:12 <+bridge> true 23:12 <+bridge> come to rust land 23:12 <+bridge> is that a segfault cuz overflow? 23:12 <+bridge> stack overflow 23:12 <+bridge> set a higher ulimit 23:12 <+bridge> watch the world burn 23:13 <+bridge> I think rust has no way of stopping infinite recursion either, not like it can ever fix it unless it disallows anything except tail calls 23:13 <+bridge> i don't think there is infinite recursion detection in an interpret language like python 23:13 <+bridge> or sh 23:13 < ChillerDragon> https://zillyhuhn.com/cs/.1687727612.png 23:13 <+bridge> @learath2 is there a general algorithm to convert recursion to loops, even indirect recursion? 23:14 <+bridge> something something halting problem something something cant prove something something infinite recursion is undetectable in a turing complete language 23:14 <+bridge> xd 23:14 <+bridge> halting problem always there 23:14 <+bridge> to remind us we human 23:14 <+bridge> https://www.youtube.com/watch?v=L3wKzyIN1yk 23:14 <+bridge> i forgot about this song lol 23:15 < ChillerDragon> hooman 23:15 <+bridge> it panics reliably instead of maybe segfaulting 23:15 <+bridge> im only human 23:15 <+bridge> it has max recursion depth ye, u can configure it with nightly iirc 23:15 <+bridge> I know an algo for tail calls, I think you rely on code restructuring trying to get to tail calls when optimizing generic recursion 23:15 <+bridge> Idk if any other kind of recursion is optimizable 23:16 <+bridge> wdym tail call 23:16 <+bridge> ```cpp 23:16 <+bridge> void fn() { 23:16 <+bridge> //do stuff 23:16 <+bridge> fn(); //? 23:16 <+bridge> } 23:16 <+bridge> ``` 23:16 <+bridge> no, that's for macros (unless I'm talking about something else) 23:16 <+bridge> tail call 23:16 <+bridge> idk it 23:16 <+bridge> the last expresion must be a call to the function itself 23:16 <+bridge> to be tail call optimizable 23:16 <+bridge> if you only call the function again at the very end of your recursive function it can be optimized out 23:16 <+bridge> 2 + fn() is not tail call 23:16 <+bridge> with a lot of fineprin 23:16 <+bridge> with a lot of fineprint 23:16 <+bridge> cool 23:17 <+bridge> @mpft this is like the pillar wall of functional programming langs 23:17 <+bridge> ``` 23:17 <+bridge> void x() { 23:17 <+bridge> std::vector y; 23:17 <+bridge> x(); 23:17 <+bridge> } 23:17 <+bridge> ``` 23:17 <+bridge> in erlang u do everything with tail calls 23:17 <+bridge> that's not a tail call 23:17 <+bridge> yes, very large ToS, I don't know off the top of my head the exact ruleset 23:17 <+bridge> ah cuz RAII 23:17 <+bridge> yep 23:17 <+bridge> rust has same problem 23:17 <+bridge> but there is a rfc iirc 23:17 <+bridge> yes 23:17 <+bridge> yes 23:17 <+bridge> `become` 23:17 <+bridge> where `become` guarantees tail calls and runs destructors beforehand 23:17 <+bridge> yea i just didn't know that's what it was called lol 23:18 <+bridge> fwiw, I think llvm and gcc still both optimize out these under some ruleset 23:19 <+bridge> because it sees that the destructor of y is side-effect free? 23:19 <+bridge> I don't think the optimization is legal if it has side-effects 23:19 <+bridge> Yeah, I think so, I only remember encountering a godbolt sample of people arguing about it 23:20 <+bridge> The as-if rule allows inlining then reordering the destructor call with the "tail-call" 23:20 <+bridge> making it an actual tail call 23:24 <+bridge> I hate recursion for some reason, always feels so unintuitive to me 23:24 <+bridge> The concept makes sense but looking at actual recursive code is always so meh for me 23:24 <+bridge> @learath2 recursion is only rly useful with tail calls, and it often requires u to reverse order the work done 23:25 <+bridge> in erlang its common 23:25 <+bridge> the reverse makes the runtime nearly equal 23:25 <+bridge> like 99/100 times I would always use an explicit stack 23:25 <+bridge> idk if for longer inputs is better tso 23:39 <+bridge> this seems like the kind of thing that would also be important in lisp 23:45 <+bridge> tail recursion is important on all functional langs 23:55 <+bridge> only if the destructor is side-effect free