01:35 <+bridge> [ddnet] anyone know how to fix that fucking bug that mouse goes in the 2ndscreen 01:36 <+bridge> [ddnet] anyone know how to fix that fucking bug when mouse goes in the 2nd screen 01:36 <+bridge> [ddnet] anyone know how to fix that fucking bug when mouse goes in the 2nd screen, and put game in background when you click 01:36 <+bridge> [ddnet] f1? 01:36 <+bridge> [ddnet] no 01:37 <+bridge> [ddnet] doesn't work 01:39 <+bridge> [ddnet] windowed fullscreen 01:39 <+bridge> [ddnet] or borderless i think its called 01:39 <+bridge> [ddnet] doesn't work 01:41 <+bridge> [ddnet] unplayable, I rq 01:45 <+bridge> [ddnet] you need some kind of "always on top" program to make exclusive fullscreen applications not minimize when you click second monitor, theres dozens of them they all do exactly what you want 01:45 <+bridge> [ddnet] 01:46 <+bridge> [ddnet] skill issue 01:51 <+bridge> [ddnet] it was fine before 01:54 <+bridge> [ddnet] maybe cuz I run another game 01:54 <+bridge> [ddnet] idk 01:59 <+bridge> [ddnet] Should i change to windows with wsl instead of linux if only reason behind using it is easy packaging, 'better performance' and sometimes w/easier development, but i cant use fav software and play fav games (wine/proton dont help) 02:00 <+bridge> [ddnet] Should i change to windows with wsl instead of linux if only reason behind using it is easy packaging, 'better performance' and sometimes easier development, but i cant use fav software and play fav games (wine/proton dont help) 02:00 <+bridge> [ddnet] the intended behavior is that the window minimizes 02:21 <+bridge> [ddnet] @Chairn I have tried the twmap on a fresh python setup, which worked just fine once it was installed 02:22 <+bridge> [ddnet] or, at the very least `import twmap` worked, thats where yours broke, right? 07:40 <+bridge> [ddnet] It literally started happening to me too recently 07:40 <+bridge> [ddnet] I have the game on fullscreen and when there is a window under the game like browser or file explorer my mouse can get stuck on it sometimes preventing me from interacting with the game 07:41 <+bridge> [ddnet] But I didn't know that you can set ddnet to always on top 08:20 <+ChillerDragon> yo @Robyt3 got a low hanging fruit client crash in teeworlds for you :) 08:42 <+bridge> [ddnet] What games and software do we talk about^^ 08:47 <+bridge> [ddnet] https://bevyengine.org/news/bevy-0-9/ 08:47 <+bridge> [ddnet] Holy 08:47 <+bridge> [ddnet] A big update 08:56 <+ChillerDragon> did u even ever try to use bevy? 09:00 <+bridge> [ddnet] ye 09:00 <+bridge> [ddnet] its rly gud 09:07 <+ChillerDragon> nice 09:07 <+ChillerDragon> still trying to figure out multi cursor plugin :( 09:07 <+ChillerDragon> https://camo.githubusercontent.com/9c5b7bf8ca253ce630841c19212d1ff01616a04899643dad972453769f6581b1/68747470733a2f2f692e696d6775722e636f6d2f646b6e736a66622e676966 09:07 <+ChillerDragon> any idea what "M" referrs to? 09:08 <+ChillerDragon> or better "M-j" 09:11 <+bridge> [ddnet] press M 09:11 <+bridge> [ddnet] and then j 09:11 <+bridge> [ddnet] M with shift iirc since its cap 09:11 <+ChillerDragon> so shift + m ? 09:11 <+bridge> [ddnet] ye 09:11 <+ChillerDragon> does not spawn cursors :( 09:12 <+bridge> [ddnet] idk bro 09:12 <+ChillerDragon> sad 09:12 <+ChillerDragon> do u even vim 09:12 <+bridge> [ddnet] u just dont know how to use it 09:12 <+ChillerDragon> rude 09:12 <+bridge> [ddnet] blame urself 09:12 <+bridge> [ddnet] and go to a corner 09:12 <+bridge> [ddnet] and cry 09:12 <+bridge> [ddnet] :PES3_WeirdSip: 09:12 <+ChillerDragon> bra obv idk how to 09:13 <+ChillerDragon> because the docs make no sense or are outdated 09:13 <+bridge> [ddnet] ok first 09:13 <+bridge> [ddnet] i dont support vim users 09:13 <+bridge> [ddnet] only neovim 09:13 <+bridge> [ddnet] im based 09:13 <+bridge> [ddnet] and why dont u use ctrl + v 09:14 <+bridge> [ddnet] imagine a child being raised with things like neovim and rust 09:14 <+bridge> [ddnet] what would they be like 09:14 <+bridge> [ddnet] good programmers probs 09:14 <+bridge> [ddnet] Hmm I use vis which have mutliple cursors. In normal mode I tap Ctrl+J and it spawns another cursor. Mutli-cursoring is really powerfull tbh 09:14 <+bridge> [ddnet] or atleast a higher understanding of computers 09:14 <+bridge> [ddnet] than normies 09:14 <+ChillerDragon> idk how to do proper word jumping with ctrl v 09:14 <+ChillerDragon> ctrl+v is so blocky 09:15 <+bridge> [ddnet] wait so what does it mean to use multiple cursors 09:15 <+bridge> [ddnet] i'll send vid 09:16 <+bridge> [ddnet] u dont rly need multiple cursors 09:17 <+ChillerDragon> so i got this: https://zillyhuhn.com/cs/.1668327418.png 09:17 <+ChillerDragon> i want the ``= attr[..]`` applied for like 6-2 09:18 <+ChillerDragon> in vscode i would do multi cursor select and copy all words and add = attr[: paste in and add ] 09:18 <+ChillerDragon> idk how to copy words of different length in vim 09:19 <+ChillerDragon> or append at the end of lines of different length 09:21 <+ChillerDragon> in vscode i do dis: https://zillyhuhn.com/cs/.1668327594.png https://zillyhuhn.com/cs/.1668327605.png type ``attr[:`` https://zillyhuhn.com/cs/.1668327631.png 09:21 <+ChillerDragon> @Ryozuki how would you do that? 09:22 <+bridge> [ddnet] idk 09:22 <+bridge> [ddnet] took me a while (played with obs) 09:22 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1041266679222648902/PointsVoxel.mp4 09:22 <+ChillerDragon> wait the magic m is typing /M ?! 09:22 <+ChillerDragon> xd 09:23 <+ChillerDragon> can you leak your keypresses pls? 09:23 <+bridge> [ddnet] no after I have multiple cursors I type /M to find the start of the M 09:23 <+ChillerDragon> a 09:23 <+ChillerDragon> shiet 09:23 <+ChillerDragon> makes sense 09:23 <+ChillerDragon> u use diff plugin anyways so i rip 09:23 <+bridge> [ddnet] I use vis not a plugin xD 09:23 <+ChillerDragon> okay hacker 09:23 <+bridge> [ddnet] 🥼 09:24 <+ChillerDragon> vi studio 09:24 <+ChillerDragon> ? xd 09:24 <+ChillerDragon> i feel like i will never get rid of my workflow of switching from vs to vim and back whenever i see fit xd 09:26 <+bridge> [ddnet] https://github.com/martanne/vis 09:26 <+ChillerDragon> @heinrich5991 @deen u also vim mains how do you solve the problem of copying a word from one position in a line to another position in a line on multiple lines at once? 09:27 <+bridge> [ddnet] I also found this plugin idk if it's any good though https://github.com/erf/vis-cursors 09:32 <+bridge> [ddnet] https://xkcd.com/1319/ 09:34 <+ChillerDragon> that xkcd is tru for sure but you also learn more than doing stuff manually and you do get better at predicting when and how useful automation would be 09:36 <+ChillerDragon> the most profit you get is if your automation tool can be easily adapted for other repetetive tasks 09:36 <+bridge> [ddnet] :soulless: 09:37 <+bridge> [ddnet] good thing i never start any of my "automation" ideas 10:40 <+bridge> [ddnet] It's already fixed by https://github.com/teeworlds/teeworlds/pull/2931, which should fix all of the datafile errors. I never got around to testing this with all maps though to see if some existing maps no longer load properly. 10:43 <+bridge> [ddnet] found a bug in my teeint 10:43 <+bridge> [ddnet] `result |= ((current_byte & mask) << shift) as i32;` 10:43 <+bridge> [ddnet] should be 10:43 <+bridge> [ddnet] `result |= (current_byte as i32 & mask) << shift;` 10:43 <+bridge> [ddnet] gg 10:43 <+ChillerDragon> Yea kinda expected that it might be fixed judging by the amount of pening prs ._. 10:43 <+ChillerDragon> Oy has been dark for a while 10:43 <+bridge> [ddnet] tw ded 10:43 <+bridge> [ddnet] ddnet where its at 10:44 <+ChillerDragon> oof 10:45 <+ChillerDragon> yo @Ryozuki btw did my unit tests for the packer help you in any way or did it inspire you or something? :D 10:46 <+bridge> [ddnet] i used some 10:46 <+bridge> [ddnet] but cvariableint had some tests 10:46 <+bridge> [ddnet] thanks to the roundtrip test i found the bug 10:46 <+ChillerDragon> pog 10:46 <+bridge> [ddnet] https://github.com/ddnet/ddnet/blob/bc4a5ee6f5dbfd1e144071dd7ef63c23f91f0480/src/test/compression.cpp#L9 10:46 <+bridge> [ddnet] idk if its urs 10:47 <+ChillerDragon> no :( 10:47 <+bridge> [ddnet] no, its by robyt 10:47 <+bridge> [ddnet] u nobo chiller 10:47 <+bridge> [ddnet] :BASED: 10:47 <+ChillerDragon> oof 10:47 <+ChillerDragon> https://github.com/ddnet/ddnet/blob/bc4a5ee6f5dbfd1e144071dd7ef63c23f91f0480/src/test/packer.cpp 10:47 <+ChillerDragon> i added those with nice ASCII art 10:48 <+bridge> [ddnet] im not doing packer yet 10:48 <+bridge> [ddnet] i think ill make a packet parser now 10:48 <+bridge> [ddnet] https://github.com/heinrich5991/libtw2/blob/master/doc/packet.md 10:48 <+bridge> [ddnet] but like rly low level 10:48 <+ChillerDragon> assembly 10:48 <+bridge> [ddnet] nah i mean i wont put a list of packet enums or smth u know 10:48 <+bridge> [ddnet] just parsing 10:49 <+ChillerDragon> my tests are also just for AddInt() 10:50 <+Ryozuki> how to disable highlights from the bridge 11:03 <+ChillerDragon> ou idk i never cared tbh 11:03 <+ChillerDragon> gotta rename on irc or discord :p 11:05 <+bridge> [ddnet] So just CNetPacket and CNetChunk? 11:06 <+bridge> [ddnet] ye 11:59 <+bridge> [ddnet] Games like Disco Elysium, Stalker, modded among us dont work at all, from software i'd love to use Photoshop, premiere and after effects again 12:06 <+ChillerDragon> i never used photoshop or premiere but also never felt like i was missing out when using gimp and kdenlive 12:10 <+bridge> [ddnet] kdenlive fucking sux, gimp fucking sux, at least it feels like it, i used adobe for few years and didn't get a single issue with it, kdenlive broke few my saves, had render artifacts, crashed and lagged, gimp is just confusing, buttons are located in weird placed and do weird stuff sometimes 12:11 <+bridge> [ddnet] And not mentioning a LOT of community plugins and tutorials for adobe software 12:13 <+bridge> [ddnet] https://www.protondb.com/app/632470 12:13 <+bridge> [ddnet] 12:13 <+bridge> [ddnet] stalker has many different games 12:13 <+bridge> [ddnet] https://www.protondb.com/app/20510 12:13 <+bridge> [ddnet] 12:13 <+bridge> [ddnet] but most have gold or platin 12:15 <+bridge> [ddnet] Didnt work for me, Disco Elysium just froze on loading screen and after some time crashed because of memory overflow (around 16gb) 12:15 <+bridge> [ddnet] some ppl post suggestions 12:15 <+bridge> [ddnet] e.g. 12:15 <+bridge> [ddnet] PROTON_USE_WINED3D11=1 %command% 12:15 <+bridge> [ddnet] 12:15 <+bridge> [ddnet] sometimes changing proton version helps 12:16 <+bridge> [ddnet] but i cannot judge anyway 12:16 <+bridge> [ddnet] probs depends on ur setup 12:16 <+bridge> [ddnet] without amd master race u doomed on linux anyway 12:16 <+bridge> [ddnet] if u want to game 12:17 <+bridge> [ddnet] Gimps total refusal of making their UX closer to the industry standard is so annoying. It worked so well for blender too, idk why they resist it so much 12:17 <+bridge> [ddnet] Software itself is actually almost as powerful as photoshop. It just has such a freaky UX 12:18 <+bridge> [ddnet] Linux is worst os for desktop, nothing works from the box, you need to compile and fix your system youself 12:18 <+bridge> [ddnet] anyway. since u asked what os u should use 12:18 <+bridge> [ddnet] 12:18 <+bridge> [ddnet] i'd say either dual boot, since u seem to use windows software that doesnt run on wine yet. Switch to linux for stuff like emulators, coding, gaming in most cases etc., else windows 12:18 <+bridge> [ddnet] 12:18 <+bridge> [ddnet] or windows only 12:18 <+bridge> [ddnet] u meant windows xD 12:18 <+bridge> [ddnet] KDE works smooth af out of box 12:19 <+bridge> [ddnet] Proton works surprisingly well for me. I only have to reboot into windows for genshin impact, league, valorant and tarkov. Anticheats are so intrusive now 12:19 <+bridge> [ddnet] and is highly customizable without stupid registry hacks 12:19 <+bridge> [ddnet] Hm, you don't have to use arch or gentoo you know? A lot of distros offer an OOBE like windows 12:20 <+bridge> [ddnet] the fact that windows 11 forces me to group same apps is just a joke 12:20 <+bridge> [ddnet] anti productivity 12:20 <+bridge> [ddnet] Never used kde tbh, i used ubuntu and fedora (wont mention arch cuz i couldnt set it up), it was a bit easier with fedora but both had a lot of crashes and bugs everywhere and to fix that i needed to install that that that then so that that that and after, maybe, it will work 12:20 <+bridge> [ddnet] Never used kde tbh, i used ubuntu and fedora (wont mention arch cuz i couldnt set it up), it was a bit easier with fedora but both had a lot of crashes and bugs everywhere and to fix that i needed to install that that that then do that that that and after, maybe, it will work 12:21 <+bridge> [ddnet] I personally enjoy starting from a bare bones system, but I know it's not for everyone. You have to know exactly what you want in that case, most people don't care about that level of customization and for them we have things like ubuntu, pop os, etc 12:22 <+bridge> [ddnet] yeah gnome sucks 12:22 <+bridge> [ddnet] thats correct 12:22 <+bridge> [ddnet] if u come from windows u have to use kde ofc 12:22 <+bridge> [ddnet] gnome is the worst shit invented anyway xD 12:23 <+bridge> [ddnet] i used it for over 1 year. and it sucks 12:23 <+bridge> [ddnet] xD 12:23 <+bridge> [ddnet] I used it for a whopping 3 hours and I concur 12:23 <+bridge> [ddnet] fake 12:23 <+bridge> [ddnet] stop spreading lies 12:24 <+bridge> [ddnet] Its the most honest opinion with no lie in it 12:24 <+bridge> [ddnet] ur opinion is wrong 12:24 <+bridge> [ddnet] :BASED: 12:24 <+bridge> [ddnet] There are no 'wrong' opinions, linux just not ready for desktop yet :feelsbadman: 12:25 <+bridge> [ddnet] Fwiw when windows breaks you can't fix it at all usually. The advice is reinstall. The fact that you can fix linux is a bonus imo 12:25 <+bridge> [ddnet] it is a wrong opinion 12:25 <+bridge> [ddnet] cuz its ready 12:25 <+bridge> [ddnet] it is indeed 12:25 <+bridge> [ddnet] the fact that u are using a framework, such as proton to make a non-compatible binary such as a windows only game work on linux and it have issues has nothing to do with linux being good or not 12:25 <+bridge> [ddnet] Windows most descriptive error: STOP 0x000007AB 12:26 <+bridge> [ddnet] if u compare use a native game 12:26 <+bridge> [ddnet] since valve and amd joined the game, linux is useable 12:26 <+bridge> [ddnet] you just dont know how to use linux 12:26 <+bridge> [ddnet] thats it 12:26 <+bridge> [ddnet] steamdeck also uses KDE out of box 12:27 <+bridge> [ddnet] its more advanced 12:27 <+bridge> [ddnet] bcs its windows friendly 12:27 <+bridge> [ddnet] i am not saying KDE has the best out of box, but u can easily make it behave similar to windows 12:27 <+bridge> [ddnet] 4-5 clicks 12:27 <+bridge> [ddnet] windows literally copies KDE 12:27 <+bridge> [ddnet] its a meme cuz its true 12:27 <+bridge> [ddnet] It's honestly way past usable now. I've been running a pop os laptop and everything justworks. You just don't get cutting edge multiplayer games and adobe software 12:27 <+bridge> [ddnet] https://www.reddit.com/r/linuxmemes/comments/qm8mns/microsoft_doing_what_it_does_best_copying_kde/ 12:28 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1041313493552463884/unknown.png 12:28 <+bridge> [ddnet] Default user wont appreciate your 'customisation', he cares about office programs (libre sux), games and web surfing 12:29 <+bridge> [ddnet] not rly 12:29 <+bridge> [ddnet] 95% of users 12:29 <+bridge> [ddnet] just thing a computer 12:29 <+bridge> [ddnet] is a web browser 12:29 <+bridge> [ddnet] think* 12:29 <+bridge> [ddnet] ah yeah microsoft office.. the office programm anyone can effort xd 12:29 <+bridge> [ddnet] and most appreciate it trust me 12:29 <+bridge> [ddnet] libre doesnt suck 12:29 <+bridge> [ddnet] Even libre is very decent now. When did you last give it a go? 12:29 <+bridge> [ddnet] libre is ok, but i never use it tho xd 12:29 <+bridge> [ddnet] haters gonna hate 12:30 <+bridge> [ddnet] when do u need it, i actually use google drive's solution more than the desktop programms xD 12:30 <+bridge> [ddnet] Dunno how you use it but i never met a single person who bought, a lot of russian sites with pirated versions :troll: 12:30 <+bridge> [ddnet] Dunno how you use it but i never met a single person who bought it, a lot of russian sites with pirated versions :troll: 12:30 <+bridge> [ddnet] Also web version is free afaik 12:31 <+bridge> [ddnet] It does, its hard to work with documents 12:31 <+bridge> [ddnet] Office 365 is pretty good too if you have to use microsoft ones because, um reasons 12:31 <+bridge> [ddnet] no ur just bad 12:31 <+bridge> [ddnet] :BASED: 12:31 <+bridge> [ddnet] Idk, your criticisms sound more like from 6-7 years ago 12:32 <+bridge> [ddnet] Most of the things you mention have been ironed out by now 12:32 <+bridge> [ddnet] https://www.youtube.com/watch?v=Qt2GkwwypDw 12:32 <+bridge> [ddnet] based youtuber 12:33 <+bridge> [ddnet] https://www.youtube.com/watch?v=TxDFjGPqYog 12:33 <+bridge> [ddnet] :GIGACHAD: 12:34 <+bridge> [ddnet] Even my bizarro gentoo install mostly justworks now and gentoo is the most finnicky distro of them all 12:34 <+bridge> [ddnet] @Learath2 the problem with most people about "linux desktop" is not linux itself but the "programs" available, cuz they want to keep using bloated propietary stuff 12:35 <+bridge> [ddnet] and they refuse to learn the superior free as in freedom software 12:35 <+bridge> [ddnet] :BASED: 12:35 <+bridge> [ddnet] Libreoffice is bloated too. Office suites are just ew 12:35 <+bridge> [ddnet] yeah 12:35 <+bridge> [ddnet] i just use latex 12:35 <+bridge> [ddnet] or md with pandox 12:35 <+bridge> [ddnet] pandoc 12:35 <+bridge> [ddnet] https://pandoc.org/ 12:35 <+bridge> [ddnet] is awesome 12:36 <+bridge> [ddnet] As I said, only problem I've had within these last 3 years with linux desktop is game anticheats and gimp being made by weirdos 12:36 <+bridge> [ddnet] who cares about freedom :feelsbadman: 12:36 <+bridge> [ddnet] lot of people 12:36 <+bridge> [ddnet] americans 12:36 <+bridge> [ddnet] kek 12:36 <+bridge> [ddnet] me 12:36 <+bridge> [ddnet] ukraines 12:37 <+bridge> [ddnet] 😉 12:37 <+bridge> [ddnet] 😉 12:37 <+bridge> [ddnet] kekw 12:37 <+bridge> [ddnet] @Learath2 a good talk while emerging packages 12:38 <+bridge> [ddnet] ``` 12:38 <+bridge> [ddnet] [The Tale of Two Elitists] 12:38 <+bridge> [ddnet] Carpenter Elitist: *walking in IKEA to buy some meatballs* 12:38 <+bridge> [ddnet] Carpenter Elitist: (thinks to himself) Look at all these IKEA sheeples, a bunch of normies who don't have the skills to build their own furniture. 12:38 <+bridge> [ddnet] Carpenter Elitist: (thinks to himself) These people neither have the curiosity nor the initiative to learn basic woodworking. 12:38 <+bridge> [ddnet] Carpenter Elitist: (thinks to himself) I guess some people are simply like that, docile and apathetic. 12:38 <+bridge> [ddnet] Later 12:38 <+bridge> [ddnet] Carpenter Elitist: (to his son) Son, I have the IKEA meatballs you want. Were you able to fix the issue with my laptop? 12:38 <+bridge> [ddnet] Son, Linux Elitist: Yes. That issue will keep coming back. I can install Linux in your laptop to permanently resolve that issue. 12:38 <+bridge> [ddnet] Dad, Carpenter Elitist: I don't have time for that Linux you keep talking about. Windows works for me. Just fix it again later if the issue returns. 12:38 <+bridge> [ddnet] Son, Linux Elitist: (thinks to himself) I guess some people are simply like that, docile and apathetic. 12:38 <+bridge> [ddnet] Son, Linux Elitist: (thinks to himself) Some people neither have the curiosity nor initiative to learn basic information about operating systems. 12:38 <+bridge> [ddnet] Son, Linux Elitist: (thinks to himself) I hate to admit it but my dad is a normie and a Windows sheeple. 12:38 <+bridge> [ddnet] ``` 12:39 <+bridge> [ddnet] lmao 12:44 <+bridge> [ddnet] Add weird tax software running in Wine for me (it's even written in Qt, wouldn't be that hard to port to Linux) 12:49 <+bridge> [ddnet] do u use wine staging? 12:49 <+bridge> [ddnet] I just use whatever wine my distro or homebrew give me 12:49 <+bridge> [ddnet] well its very important to use wine-staging 12:49 <+bridge> [ddnet] normal wine is really far behind 12:50 <+bridge> [ddnet] That's ok, the tax software has not changed in 10 years 12:50 <+bridge> [ddnet] wine-7.20 (Staging) 12:50 <+bridge> [ddnet] so it actually does run? 12:50 <+bridge> [ddnet] same version 12:50 <+bridge> [ddnet] i thought u had a typo 12:51 <+bridge> [ddnet] since learath talked about stuff that didnt work 12:51 <+bridge> [ddnet] yes, it runs, with some minor problems 12:51 <+bridge> [ddnet] running windows apps on linux is a good way to find UB xd 12:52 <+bridge> [ddnet] xd 12:55 <+bridge> [ddnet] https://vorpus.org/blog/why-does-calloc-exist/ 12:55 <+bridge> [ddnet] https://news.ycombinator.com/item?id=33579884 12:55 <+bridge> [ddnet] xd 13:07 <+bridge> [ddnet] why does smth else than aligned_alloc exists 13:08 <+bridge> [ddnet] why even allocating, just use the RAM directly 13:08 <+bridge> [ddnet] Why use ram, just use L3 cache 13:08 <+bridge> [ddnet] any program that doesnt work with registers only is slow af 13:30 <+bridge> [ddnet] @Not Keks java? 13:30 <+bridge> [ddnet] can a java app be memory efficient 13:30 <+bridge> [ddnet] xd 13:31 <+bridge> [ddnet] yes it can, by using JNI 13:31 <+bridge> [ddnet] xd 13:34 <+bridge> [ddnet] Well whenever a GC is involved there will be some inefficiency, but I heard java got some new gc that is pretty acceptable 13:35 <+bridge> [ddnet] there are big GC defenders out there 13:35 <+bridge> [ddnet] they would even make a kernel with gc 13:35 <+bridge> [ddnet] yeah 13:35 <+bridge> [ddnet] Zgc 13:35 <+bridge> [ddnet] https://wiki.openjdk.org/display/zgc/Main 13:36 <+bridge> [ddnet] After reading that I checked and probably not so easy to use calloc for the map layers in memory on server 13:36 <+bridge> [ddnet] because that would be a nice way to save memory on largely empty parts of maps 13:37 <+bridge> [ddnet] because we don't actually mem_zero them, but malloc and then io_read 13:37 <+bridge> [ddnet] Is that bad? 13:38 <+bridge> [ddnet] I didn't read the article yet, just wondering 13:38 <+bridge> [ddnet] i think calloc can be faster sometimes 13:38 <+bridge> [ddnet] cuz it knows if it needs to zero the memory 13:38 <+bridge> [ddnet] but malloc sometimes double zeroes 13:38 <+bridge> [ddnet] i only read it over fast 13:39 <+bridge> [ddnet] So if we'll mem_zero after anyway, we should calloc instead is the takeaway? 13:39 <+bridge> [ddnet] if you malloc + mem_zero all the memory needs to be there. With calloc you get a single COW page and it will be expanded on write access 13:39 <+bridge> [ddnet] yes 13:39 <+bridge> [ddnet] but the COW might make performance a bit less predictable 13:39 <+bridge> [ddnet] Ok, that fits with the mental model I've had already 😄 13:40 <+bridge> [ddnet] If after reading the map we don't touch it, I guess mmaping it could be an optimization there but honestly that part of the code is very much fine 13:40 <+bridge> [ddnet] Yeah, after looking at it my conclusion was also to change nothing 😄 13:40 <+bridge> [ddnet] 🥹 13:41 <+bridge> [ddnet] @Not Keks for the last couple months I've been getting some very harsh stuttering. Do you have any idea how I could go about diagnosing the issue? 13:41 <+bridge> [ddnet] Since this is very subjective I don't think I can easily bisect for it, we don't really have tooling in the code to profile frametimes either 13:41 <+bridge> [ddnet] what have u tried yet, unplug everything and stuff? 13:42 <+bridge> [ddnet] I tried an older version, I don't remember which and it didn't have the stuttering. Other than that nothing yet 13:42 <+bridge> [ddnet] I'm a little lost when it comes to debugging stuff that doesn't crash 13:42 <+bridge> [ddnet] whats the first version that doesnt lag 13:43 <+bridge> [ddnet] I profiled for a bit too but nothing really popped up as small spikes in frametime just get averaged out 13:43 <+bridge> [ddnet] You could try printing out the frametimes with our benchmarking tools, maybe it's objective there and can then be bisected? 13:43 <+bridge> [ddnet] I can try to find it but it's really hard. I have to play for a bit on each version to see if I get them 13:43 <+bridge> [ddnet] i c 13:43 <+bridge> [ddnet] Yesterday I clicked on server info on the 64 player multeasymap server and DDNet hung for > 1 second, never seen that before 13:44 <+bridge> [ddnet] lot of skins? 13:44 <+bridge> [ddnet] Ah, this is a good idea. I could set up some frametime metrics and just bisect and apply the patch to see if my worst frametimes get worse 13:44 <+bridge> [ddnet] 4k skins are a problem that could occur after time 13:44 <+bridge> [ddnet] if u use skins.tw 13:44 <+bridge> [ddnet] they make ur game lag if u dont have 8k ready GPU xd 13:44 <+bridge> [ddnet] No 4k skins, no local skins 13:44 <+bridge> [ddnet] skins.tw? 13:44 <+bridge> [ddnet] Nope, skins.ddnet.tw 13:44 <+bridge> [ddnet] ok 13:44 <+bridge> [ddnet] `benchmark_quit` 13:45 <+bridge> [ddnet] Maybe I'll try turning off download skins entirely. Though I didn't see the spikes correlate to any skin loads 13:45 <+bridge> [ddnet] Does this actually exist? What does it benchmark? 13:46 <+bridge> [ddnet] It exists, we use it for phoronix 13:46 <+bridge> [ddnet] it prints out the frametimes to a file and then quits after a specified number of seconds 13:46 <+bridge> [ddnet] if its just ddnet skins it should be fine 13:47 <+bridge> [ddnet] Does it join any server or sth? 13:47 <+bridge> [ddnet] `./DDNet "connect ger2.ddnet.org; benchmark_quit 3 foo.txt"` 13:48 <+bridge> [ddnet] Oh that should make this much easier 13:48 <+bridge> [ddnet] Is it just a list of frametimes? 13:48 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1041333741706035261/foo.txt 13:49 <+bridge> [ddnet] I'll just build a small tool to gather some easier to use metrics. Some percentiles, maybe worst/best, variance and make a graph of the distribution 13:50 <+bridge> [ddnet] See if anything pops out at me just by staring at data 13:50 <+bridge> [ddnet] I seem to have some jumps in there too, but not noticable since it's just to 11-13 ms 13:50 <+bridge> [ddnet] https://xkcd.com/1319/ 13:50 <+bridge> [ddnet] I get like insane stutters. Makes playing very hard 13:51 <+bridge> [ddnet] Easily noticeable to the eye 13:51 <+bridge> [ddnet] oof 13:51 <+bridge> [ddnet] linux? 13:51 <+bridge> [ddnet] maybe ur gpu is dying 13:51 <+bridge> [ddnet] temps? 13:51 <+bridge> [ddnet] throttling 13:51 <+bridge> [ddnet] Windows, on linux it is much better though I still get more stutters then I used to even on there 13:52 <+bridge> [ddnet] I'd probably see this on much more demanding games way before ddnet, no? 13:52 <+bridge> [ddnet] Temps seemed fine to me but I'll keep an eye on them just incase 13:53 <+bridge> [ddnet] Just a couple lines of python that I don't really intend to maintain 😛 13:54 <+bridge> [ddnet] generally: 13:54 <+bridge> [ddnet] - your GPU could be in a state where it down and upclocks all the time bcs its not used enough 13:54 <+bridge> [ddnet] - temps of CPU or GPU make the hardware downclock 13:54 <+bridge> [ddnet] - other software e.g. firewall or anti virus 13:54 <+bridge> [ddnet] - drivers are broken etc. 13:55 <+bridge> [ddnet] Difference between versions smells more like something we changed to me, but I'll keep an eye on those too incase 13:56 <+bridge> [ddnet] Maybe we accidentally made something block on the main loop accidentally and it blocks longer on my old cpu making it noticeable 13:57 <+bridge> [ddnet] question is how long did u test the other version 13:57 <+bridge> [ddnet] and also which version 13:59 <+bridge> [ddnet] I'll take a look tonight 👍 14:22 <+bridge> [ddnet] Hey, I'd like to contribute to DDNet, but I am completely new to programming..I mean, I have some projects but I never tried programming at larger scale or contributing. Also I never made a single pull request or issue on github. Could you give me some tips, to get started? Solving an issue is probably long way to go for me, so I need a way to get started. 14:23 <+bridge> [ddnet] depends on ur level 14:23 <+bridge> [ddnet] If you can build client and server locally following the github readme that already helps 14:23 <+bridge> [ddnet] maybe this helps, or not https://wiki.ddnet.org/wiki/Development 14:23 <+bridge> [ddnet] ah yes if you use windows check the github readme 14:23 <+bridge> [ddnet] I've read this all, and already made this changes: https://edgarluque.com/blog/chat-command-ddracenetwork/ 14:24 <+bridge> [ddnet] And yeah it works 14:24 <+bridge> [ddnet] oh poggers 14:24 <+bridge> [ddnet] i wonder who made that 14:24 <+ChillerDragon> fellow ryo enjoyer 14:24 <+bridge> [ddnet] This edgar dude seems really knowledgeable 14:24 <+bridge> [ddnet] :BASED: 14:24 <+bridge> [ddnet] And yeah, by now I want to somehow help you in solving issues, but I actually don't know how 14:25 <+ChillerDragon> I also made a video series for beginners https://www.youtube.com/watch?v=HB_aSIOmdu4&list=PLhJkqAQmOh5LyYOfnMy4PJB6CSZltQyTc @Aniak did you manage to compile and test out some code yet? 14:25 <+bridge> [ddnet] I started out exactly like this. I picked something that annoyed me and started there. However small it is 14:25 <+ChillerDragon> im pretty annoyed by missing 0.7 support 14:25 <+ChillerDragon> xd 14:26 <+bridge> [ddnet] I'll admit though back when I started out ddrace was in a much worse state than ddnet is in right now. Our bugs and problems aren't exactly too too easy to solve 14:26 <+ChillerDragon> there are always low hanging fruits even now 14:27 <+bridge> [ddnet] i should continue that ddnet blog series 14:27 <+bridge> [ddnet] There are some very low hanging fruits in the editor where we don't maintain a code quality as high as the rest of the client 14:27 <+bridge> [ddnet] Maybe I can start by looking at code, and make issues? 14:27 <+bridge> [ddnet] sure 14:27 <+ChillerDragon> yikes pls not more issues 14:27 <+bridge> [ddnet] For example I see a lot of magic numbers in code, and idk if its intended to be like that, or no 14:27 <+bridge> [ddnet] maybe something in #bugs is easy 14:27 <+bridge> [ddnet] or in github issues 14:27 <+ChillerDragon> pls close issues instead of opening them :p 14:27 <+bridge> [ddnet] identifiying whats hard or not is also a skill though 14:27 <+bridge> [ddnet] Or browse through issues and see if you find something that catches your eye, maybe annoys you aswell 14:27 <+bridge> [ddnet] Like this magic `-1 `in your videos, which means message to all 14:27 <+bridge> [ddnet] open issues if they are valid 14:28 <+bridge> [ddnet] its fine if u want to replace those 14:28 <+bridge> [ddnet] just make sure if its network related that it has the same value 14:28 <+bridge> [ddnet] That -1 for all would be a massive amount of manual work that won't teach you much coding imo. It's more labour 😄 14:29 <+ChillerDragon> If you are really really new to coding recommend having fun first build some feature that you would like in your client or server before you try to contribute something 14:30 <+bridge> [ddnet] Or that, it's also fun to mess around. One of the first things I built was a level system. You'd get xp as you killed tees and you'd level up 😄 14:31 <+bridge> [ddnet] Hm, maybe that's the way 14:31 <+ChillerDragon> yes that should give you dopamine while learning how the code works 14:31 <+ChillerDragon> Is there some feature you always wished for? 14:32 <+bridge> [ddnet] Actully, some would be cool to see 14:32 <+ChillerDragon> yes what 14:32 <+bridge> [ddnet] for example sking changing color dynamically 14:32 <+ChillerDragon> ? 14:32 <+bridge> [ddnet] for example skin changing color dynamically 14:32 <+ChillerDragon> could you ellaborate what that means 14:33 <+ChillerDragon> you mean automatic color changes on tees? 14:33 <+ChillerDragon> like a fading effect or something? 14:33 <+bridge> [ddnet] Yeah 14:33 <+ChillerDragon> yes thats a fun first task 14:33 <+bridge> [ddnet] Or its already there xd 14:33 <+ChillerDragon> there is 14:33 <+bridge> [ddnet] Rainbow tees are fun to code indeed 14:33 <+ChillerDragon> but it doesnt matter 14:33 <+bridge> [ddnet] Thats what i meant 14:33 <+ChillerDragon> only makes it easier if you get stuck 14:33 <+bridge> [ddnet] but i couldnt find a word 14:33 <+bridge> [ddnet] rainbow tee 14:33 <+bridge> [ddnet] <৳ iDiN τ> hi 14:33 <+bridge> [ddnet] <৳ iDiN τ> i want to set motd of my server to map info 14:34 <+bridge> [ddnet] <৳ iDiN τ> how can i do that 14:34 <+bridge> [ddnet] <৳ iDiN τ> just like ddnet in motd 14:34 <+bridge> [ddnet] <৳ iDiN τ> https://cdn.discordapp.com/attachments/293493549758939136/1041345176079171644/image.png 14:34 <+bridge> [ddnet] a good code QOL is replacing int flags with named enums 14:34 <+ChillerDragon> put sv_motd in server server settings 14:34 <+ChillerDragon> ah wait 14:34 <+ChillerDragon> i red wrong 14:34 <+bridge> [ddnet] <৳ iDiN τ> no i want to put there server info 14:34 <+ChillerDragon> yes sori xd 14:34 <+ChillerDragon> i think ddnet generates those with a script 14:35 <+bridge> [ddnet] <৳ iDiN τ> i have vote list 14:35 <+ChillerDragon> what maps are you using? 14:35 <+ChillerDragon> official ddnet maps? 14:35 <+bridge> [ddnet] <৳ iDiN τ> yup 14:35 <+bridge> [ddnet] <৳ iDiN τ> https://cdn.discordapp.com/attachments/293493549758939136/1041345562663997480/image.png 14:37 <+bridge> [ddnet] <৳ iDiN τ> @deen 14:39 <+bridge> [ddnet] I'm thinking about adding accounts: https://github.com/ddnet/ddnet/issues/3411#issuecomment-1312732896 14:39 <+ChillerDragon> wow 14:39 <+ChillerDragon> casually dropping that xd 14:39 <+bridge> [ddnet] wow 14:39 <+ChillerDragon> @pinkrat 14:39 <+bridge> [ddnet] *Grabs popcorn* 14:39 <+bridge> [ddnet] We're shipping the cfg files too, I think they should auto load 14:40 <+bridge> [ddnet] you can remove all .cfg files if you don't want them 14:40 <+bridge> [ddnet] <৳ iDiN τ> For motd 14:40 <+bridge> [ddnet] <৳ iDiN τ> what can i do ? 14:40 <+ChillerDragon> i do not see them shipped 14:40 <+bridge> [ddnet] Then you can set `sv_motd` in your autoexec_server.cfg 14:40 <+ChillerDragon> https://zillyhuhn.com/cs/.1668346713.png 14:40 <+bridge> [ddnet] Oh, ok 14:40 <+bridge> [ddnet] <৳ iDiN τ> bro i want to put map info in server motd 14:40 <+bridge> [ddnet] <৳ iDiN τ> like ddnet 14:40 <+ChillerDragon> or how are they named? 14:40 <+bridge> [ddnet] <৳ iDiN τ> everytime u change motd 14:41 <+bridge> [ddnet] <৳ iDiN τ> everytime u change map 14:41 <+bridge> [ddnet] <৳ iDiN τ> motd changes to map info 14:41 <+ChillerDragon> they are generated using this script btw https://github.com/ddnet/ddnet-scripts/blob/30df2cafb86a49a550690a79adce40e8e0330c45/servers/scripts/create-votes.py 14:41 <+bridge> [ddnet] <৳ iDiN τ> how can i do that ? 14:41 <+bridge> [ddnet] Like you personally? 😄 14:42 <+ChillerDragon> seems like those .map.cfg files are not published tho 14:42 <+bridge> [ddnet] f3 14:42 <+bridge> [ddnet] It's this script https://github.com/ddnet/ddnet-scripts/blob/master/servers/scripts/create-votes.py with this skeleton https://github.com/ddnet/ddnet-scripts/blob/master/servers/motd/skeleton 14:42 <+bridge> [ddnet] :greenthing: 14:42 <+bridge> [ddnet] Yeah, doesn't seem like that much work. 14:42 <+bridge> [ddnet] if people agree with the proposal. Don't want to roll it back again 14:43 <+ChillerDragon> thats crazy 14:43 <+ChillerDragon> history moment 14:43 <+ChillerDragon> will there be a feedback round or is that final? 14:43 <+bridge> [ddnet] if someone recording or screenshoting, hi mom, i was here! 14:44 <+bridge> [ddnet] 🥹 14:44 <+ChillerDragon> ikr 14:44 <+bridge> [ddnet] feedback round. I came up with this in 2 minutes just now, it's probably not perfect 😄 14:44 <+ChillerDragon> u made graphics? 14:44 <+ChillerDragon> deen artist confirmed? 14:44 <+ChillerDragon> wait those are not tw related ? xd 14:44 <+ChillerDragon> scam 14:45 <+ChillerDragon> ah i didnt read it says duolingo xd 14:45 <+bridge> [ddnet] Oh you made a proposal, I'll check it out tonight. Finally maybe some progress on accounts. It was time 14:45 <+ChillerDragon> @deen wat lang are you learning? 14:45 <+ChillerDragon> wow so basically 2 point systems?! 14:46 <+ChillerDragon> so we have to finish all those annoying novice maps from aoe again?! -.- 14:46 <+bridge> [ddnet] No, you don't have to. Only if you want the achievement 14:46 <+ChillerDragon> or the points 14:47 <+bridge> [ddnet] yes 14:47 <+ChillerDragon> crazy 14:47 <+bridge> [ddnet] Would be crazier to manually assign each of the thousands of active players to their new accounts 14:47 <+ChillerDragon> yes for sure 14:48 <+bridge> [ddnet] :feelsbadman: 14:48 <+ChillerDragon> what about ppl who loose their private key? or leak it? 14:48 <+bridge> [ddnet] get doxxed 14:48 <+ChillerDragon> or wait are there passwords the users type in? 14:49 <+bridge> [ddnet] For leaks a central server can invalidate the old key. For losing they can get a new one from a central server 14:49 <+ChillerDragon> can ddnet accounts be used by non ddnet servers to avoid having to reimplement a account system? 14:49 <+ChillerDragon> basically oauth xd 14:49 <+bridge> [ddnet] the private key would be a temporary token 14:49 <+bridge> [ddnet] so your password can be used to log in again and get a new token on each device 14:49 <+ChillerDragon> if i lose my password? 14:49 <+bridge> [ddnet] interesting 14:50 <+bridge> [ddnet] email address during signup 14:50 <+bridge> [ddnet] so you can restore it 14:50 <+ChillerDragon> has to be verified? 14:50 <+bridge> [ddnet] yes 14:50 <+bridge> [ddnet] if you want to rstore pw 14:50 <+ChillerDragon> if i forgot my email password? 14:50 <+bridge> [ddnet] otherwise don't care 14:50 <+ChillerDragon> or what email i used 14:50 <+bridge> [ddnet] yes, that's the idea 14:50 <+bridge> [ddnet] <৳ iDiN τ> @deen one question 14:50 <+bridge> [ddnet] <৳ iDiN τ> u have kog maps ? 14:50 <+bridge> [ddnet] no 14:50 <+ChillerDragon> wait but what happens if i lose access to my email account? 14:51 <+bridge> [ddnet] You can try asking @Avolicious if they have a ll maps to download 14:51 <+bridge> [ddnet] <৳ iDiN τ> @Avolicious hey bro 14:51 <+bridge> [ddnet] I hope you'll provide something for other mods/servers. As a mod dev/hoster I'd love to either use DDNet account server, or be able to run own server and let the players add it to their clients. 14:51 <+bridge> [ddnet] @deen this opens another attack tho, i come with thousands of ips and start registering like crazy 14:51 <+bridge> [ddnet] Same as with every account in the world, start begging them to switch to a different email and provide some proof of who you are, or bad luck and make a new account 14:51 <+bridge> [ddnet] can i get cash back in points by purchasing stuff in partner shops? :troll: 14:51 <+bridge> [ddnet] what good is that? 14:51 <+ChillerDragon> so there will be manual management of accounts? 14:51 <+bridge> [ddnet] yes, the idea would be that every game server can use the accounts 14:52 <+ChillerDragon> hm 14:52 <+bridge> [ddnet] Oh, *this*. I've composed my messages for a while 😄 14:52 <+ChillerDragon> xd 14:52 <+ChillerDragon> what about dummys? 14:52 <+ChillerDragon> how many tees per account? 14:52 <+ChillerDragon> how many accounts per ip? 14:52 <+bridge> [ddnet] Today the accounts, and tomorrow what, a skinshop?) 14:52 <+bridge> [ddnet] :brownbear: 14:52 <+bridge> [ddnet] Well with such an extreme circumstance there will definitely need to be manual intervention. You lost your password, you lost your email, you lost your emails password 14:53 <+bridge> [ddnet] twerking twinbop for 40$ 14:53 <+bridge> [ddnet] And the accounts+season 2 would be a good fit for the year 2023. You can say DDNet is 10 years old, first season is over 14:53 <+bridge> [ddnet] never 14:53 <+bridge> [ddnet] How will I buy my mansion then??? 14:54 <+bridge> [ddnet] google in discord phrase: "accounts" and see how many times was answering "never" 14:54 <+ChillerDragon> So I can send a email from real.milk@gmail.com to support@ddnet.org and say i lost access to my old account "milk+81289" and get in? xd 14:54 <+bridge> [ddnet] s\/my mansion/more servers for ddnet/ ofc 14:54 <+bridge> [ddnet] You will try to prove it. If you can't then no 14:55 <+ChillerDragon> yikes this will be drama 14:55 <+bridge> [ddnet] no 14:55 <+bridge> [ddnet] No it'll be fine 14:55 <+ChillerDragon> who is responding to those requests? 14:55 <+bridge> [ddnet] It's how accounts work everywhere 14:55 <+bridge> [ddnet] u must be responsible for ur own things 14:55 <+bridge> [ddnet] Are you going to spam it? I don't expect it to happen a lot 14:55 <+ChillerDragon> @Ryozuki learath and deen just confirmed there will be support if you mess up 14:55 <+bridge> [ddnet] nobody is entitled to give your account back if u lost credentials 14:55 <+ChillerDragon> @Learath2 not me but such things happen 14:56 <+bridge> [ddnet] How often do you lose your password and your email password? 14:56 <+bridge> [ddnet] That's probably less effort than the manual renames we do 3 times a week now 14:56 <+ChillerDragon> i dont mean neccessarly bad actors but also a bunch of youngsters who lost their mail 14:56 <+ChillerDragon> @Learath2 more often than i would like to admit 14:56 <+ChillerDragon> oh i see i wasnt aware of the renames 14:56 <+bridge> [ddnet] i saw guy on kog discord, he had like 7 accounts just cuz he forgot pass and email xd 14:56 <+bridge> [ddnet] We have a couple ways of verifying people are who they say they are, I think we'll be fine 14:56 <+bridge> [ddnet] ChillerDragon: use a password manager 14:57 <+bridge> [ddnet] ChillerDragon: start today. I use bitwarden 14:57 <+ChillerDragon> tell that to me 14y ago 14:57 <+ChillerDragon> i use "pass" 14:57 <+ChillerDragon> nowerdays 14:57 <+bridge> [ddnet] sounds good 14:57 <+bridge> [ddnet] bitwarden has a cool cli client 14:57 <+ChillerDragon> but also email providers might die etc 14:58 <+bridge> [ddnet] you can add multiple emails to your account, maybe discord, idk 14:58 <+ChillerDragon> ah yea 14:58 <+ChillerDragon> that sounds cool! 14:58 <+bridge> [ddnet] login/password registration OR discord/google/github etc oauth 14:58 <+bridge> [ddnet] 2FA 14:58 <+ChillerDragon> can i also provide the name of my first pet? xd 14:58 <+bridge> [ddnet] chiller go the unix way 14:58 <+bridge> [ddnet] use pass 14:58 <+ChillerDragon> i do use "pass" 14:58 <+bridge> [ddnet] ChillerDragon: no 14:58 <+bridge> [ddnet] https://www.passwordstore.org/ 14:58 <+ChillerDragon> sad 14:58 <+ChillerDragon> i do use it! 14:59 <+bridge> [ddnet] email, discord, matrix, telegram, github, goodle, facebook, and real adress 14:59 <+ChillerDragon> omg 14:59 <+ChillerDragon> xd 14:59 <+bridge> [ddnet] 🤓 14:59 <+bridge> [ddnet] xd 14:59 <+ChillerDragon> with pass-otp extension 14:59 <+ChillerDragon> for 2fa 14:59 <+ChillerDragon> its very poggers 14:59 <+ChillerDragon> and i cant login shit on my phone xd 14:59 <+ChillerDragon> phone bad anyways 15:00 <+bridge> [ddnet] So you can get owned by the Facebook quiz asking you to post your pet's name, mother's maiden name and birthday in some slightly encoded form? 😄 15:00 <+bridge> [ddnet] I hope you saved your 2fa codes somewhere not on your only machine 15:00 <+ChillerDragon> no 15:00 <+ChillerDragon> xd 15:00 <+bridge> [ddnet] do it, now 15:00 <+bridge> [ddnet] One serious question I have is whether we can integrate this with steam 15:00 <+bridge> [ddnet] or print them 15:00 <+ChillerDragon> print xd 15:00 <+bridge> [ddnet] we can, I thinkk 15:00 <+bridge> [ddnet] @Learath2 oauth2 15:00 <+bridge> [ddnet] It'd be nice if steam players got an account automatically somehow 15:01 <+bridge> [ddnet] ChillerDragon: yes, print 15:01 <+bridge> [ddnet] Yeah, every Steam user having an automatic account would be sweet and make this much easier 15:01 <+ChillerDragon> For example all emails I owned when i started to play tw which i would have used to signup for ddnet do not exists anymore 15:01 <+bridge> [ddnet] Maybe at steam startup we can ask if they have an account they want to link to their steamid and if they click no we create a new one for them 15:01 <+ChillerDragon> add in a 5yr tw break and account is gone 15:02 <+ChillerDragon> also please do add support for 2rd party servers making use of the accounts! 15:02 <+ChillerDragon> 3rd 15:02 <+ChillerDragon> omg 15:02 <+ChillerDragon> xd 15:03 <+bridge> [ddnet] 3nd 15:03 <+ChillerDragon> bra 15:04 <+bridge> [ddnet] Ah yes. Secord and Thind 15:05 <+bridge> [ddnet] if the id is 4 digits long i can see trolls registering 9999 accounts under deen nick 15:10 <+bridge> [ddnet] Noooo I will lose my 15 points https://discord.com/channels/252358080522747904/500032072455290880/1041265549709164545 15:16 <+bridge> [ddnet] Wait 15:17 <+bridge> [ddnet] Are we actually making accounts? 15:17 <+ChillerDragon> seems like 15:18 <+bridge> [ddnet] How do you solve linking existing names to accounts safely? Was that already talked about? 15:18 <+ChillerDragon> yes 15:18 <+bridge> [ddnet] As I understood season 2 will reset points 15:19 <+bridge> [ddnet] Really??? 15:21 <+bridge> [ddnet] Surely you don't mean the points reset I wouldn't believe that 15:21 <+ChillerDragon> keep both 15:21 <+ChillerDragon> u dont have to believe anything just read the proposal deen just sent 15:22 <+bridge> [ddnet] Ok I will sorry 15:22 <+bridge> [ddnet] Ah yes I worded wrong season 2 will not have the points from season 1 but I think season 1 will kinda continue or smt 15:33 <+bridge> [ddnet] I have a lot of ideas for ways this could be implemented but I think everyone does 16:35 <+ChillerDragon> @heinrich5991 how does "size": "specified_before" work? 16:36 <+ChillerDragon> is the skipped chunk field holding the size? https://github.com/heinrich5991/libtw2/blob/48a2573af66105fc38f032fe22cfcc60f95f7485/gamenet/generate/spec/teeworlds-0.7.5.json#L957 16:37 <+ChillerDragon> is this chunk field the size? https://github.com/teeworlds/teeworlds/blob/72c06a258940696093f255fb1061beb58e1cdd0b/src/engine/server/server.cpp#L487 16:37 <+ChillerDragon> and the dissector just reads it as the raw data saying that the first int is the size? 16:37 <+ChillerDragon> if so its a bit sad that "chunk" is not displayed in the dissector view :c 16:40 <+bridge> [ddnet] > but actual name+id are also shown 16:40 <+bridge> [ddnet] so to play anonymously i assume youd just have to log out of an account for the time being? 16:40 <+bridge> [ddnet] and yes accounts plz :f3: 16:41 <+ChillerDragon> wait map data also uses displays the chunk before 16:41 <+ChillerDragon> makes no sense to me 16:42 <+bridge> [ddnet] not 100% how deen planed it yet 16:42 <+bridge> [ddnet] 16:42 <+bridge> [ddnet] i guess the easiest would simply to add a unique ID column and respect it in all SQLs 16:42 <+bridge> [ddnet] and dont fill if not logged in 16:42 <+bridge> [ddnet] 16:42 <+bridge> [ddnet] but it sounded like deen generally prefers to have accounts, and split the ranks 16:43 <+bridge> [ddnet] how would the season work? 16:43 <+bridge> [ddnet] in the issue he mentioned smth about season 2 for ddnet so accounts start at 0 points, but he also disclaimed that he isnt sure yet 16:43 <+bridge> [ddnet] would the map pool be the same 16:44 <+bridge> [ddnet] yes 16:44 <+bridge> [ddnet] i think its just so it motivates ppl to use accounts 16:44 <+bridge> [ddnet] and not feel bad 16:44 <+bridge> [ddnet] i would support a different map pool 😅 16:44 <+bridge> [ddnet] but tbh, the ppl with 10k+ points needs to be transferred 16:44 <+bridge> [ddnet] 16:44 <+bridge> [ddnet] i simply dont see it comming else 16:44 <+ChillerDragon> @heinrich5991 nvm i think i actually understood ur dissector xd pr incomning 16:45 <+bridge> [ddnet] well if u do for one, u have to do for all 16:45 <+bridge> [ddnet] idk 16:45 <+bridge> [ddnet] if ~100 people help out to identify the ppl's current name for the accounts it shouldnt be too much works 16:45 <+bridge> [ddnet] yes, well i'd say not for all 16:45 <+bridge> [ddnet] but maybe a certain amount of points 16:45 <+bridge> [ddnet] i think the only way to do the no point transfer is to change the map pool and the point system/rank point system 16:45 <+bridge> [ddnet] 500 points are nothing xd 16:45 <+bridge> [ddnet] so people dont feel as theyre just playing the game twice 16:46 <+bridge> [ddnet] I think it'd be good for the game if the move included fixes to game mechanics, such as a toggle for strong / weak. (or removing weak in general), not allowing dummies being killed in team ranks, etc. 16:46 <+ChillerDragon> yo why is my vscode rust intellij so bad? 16:46 <+ChillerDragon> i cant click shit 16:46 <+bridge> [ddnet] what extension did u use 16:46 <+ChillerDragon> rust 16:46 <+bridge> [ddnet] yeah it sucks 16:46 <+bridge> [ddnet] better use rust analyzert 16:46 <+bridge> [ddnet] better use rust analyzer 16:46 <+bridge> [ddnet] i still have to update the workspace 16:47 <+ChillerDragon> yea i saw xd 16:47 <+ChillerDragon> https://zillyhuhn.com/cs/.1668354308.png 16:47 <+ChillerDragon> okeoke 16:47 <+bridge> [ddnet] as much as i hate strong/ weak there were some arguments as why its fundamentally hard to fix 16:47 <+ChillerDragon> scam 16:47 <+bridge> [ddnet] but there can def be some improvements 16:47 <+bridge> [ddnet] If we were to restart points for a new "season", it'd be a massive waste to not make such changes alongside it 16:47 <+ChillerDragon> do i need to configure da rust shiet 16:47 <+ChillerDragon> or can it just werk like c++ 16:51 <+bridge> [ddnet] I rembered this https://forum.ddnet.org/download/file.php?id=31119 16:54 <+bridge> [ddnet] chillerdragon it should just work™️ 16:54 <+bridge> [ddnet] i also made a pr rn 16:55 <+bridge> [ddnet] mh yeah seasons are a way for physic changes indeed. every fix will probs introduce a new "broken" physics anyway ^^ 16:55 <+ChillerDragon> wot u prn? 16:56 <+bridge> [ddnet] so that rust is auto formated 16:56 <+bridge> [ddnet] rust code 16:56 <+ChillerDragon> rost dev 16:56 <+ChillerDragon> pog 16:56 <+ChillerDragon> ctrl+shift+f it is 16:56 <+ChillerDragon> https://zillyhuhn.com/cs/.1668354881.png 16:56 <+bridge> [ddnet] is ur repo up to date? 16:56 <+ChillerDragon> lang server for nobs anyways 16:57 <+ChillerDragon> i rust pro 16:57 <+bridge> [ddnet] ryo fixed stuff 16:57 <+ChillerDragon> im not working on cringe ddnet 16:57 <+bridge> [ddnet] yes 16:57 <+ChillerDragon> i work on libtw2 rust masterrace proj 16:57 <+bridge> [ddnet] thats why i asked 16:57 <+bridge> [ddnet] lel 16:57 <+bridge> [ddnet] well heinrich probs doesnt care about rust analyzer working correctly xd 16:58 <+ChillerDragon> i didnt touch ddnet code since i rq playing tw basically 16:58 <+ChillerDragon> heinrich gigachad doesnt need it 16:59 <+ChillerDragon> OMG nvm i suck xd 16:59 <+ChillerDragon> i wrote all generated code by hand and the generate script deleted it xd 16:59 <+ChillerDragon> xxxxxxxxxxxxxxxxxxxxD 17:00 <+bridge> [ddnet] nais 17:00 <+bridge> [ddnet] maybe rewrite physics so they're faster/more efficient as a target? 17:01 <+ChillerDragon> yikes change physics 17:01 <+ChillerDragon> we need better test coverage for physic changes first 17:22 <+ChillerDragon> ok nvm i dont get it 17:22 <+ChillerDragon> heinrich sos 17:34 <+bridge> [ddnet] took long enough to make an acc system ready 17:34 <+bridge> [ddnet] :justatest: 17:34 <+bridge> [ddnet] imma stick to discord auth for tourneys 18:01 <+bridge> [ddnet] so many const in that pr 18:01 <+bridge> [ddnet] this is way immutable by default helps 18:01 <+bridge> [ddnet] ccuz u wont miss any 18:08 <+bridge> [ddnet] have u ever encountered a logical bug with non const stuff? 18:08 <+bridge> [ddnet] i feel like i havent tbh 18:08 <+bridge> [ddnet] i mean e.g. in rust its nice bcs its default 18:08 <+bridge> [ddnet] but in cpp u have to manually write const xD 18:09 <+bridge> [ddnet] also this only adds it to places where its sure it can be const 18:09 <+bridge> [ddnet] so at least for current bugs it wont help 18:19 <+bridge> [ddnet] yo wanna buy some free raycast collision detection code? 18:19 <+bridge> [ddnet] 150% more fps in some cases :D 18:19 <+bridge> [ddnet] sounds costly 18:20 <+bridge> [ddnet] should I diff it or should make a pr? 18:20 <+bridge> [ddnet] i'd like to know if u claim 150% 18:20 <+bridge> [ddnet] how much fps more do i get if i just replace sqrted checks with squared checks 18:21 <+bridge> [ddnet] sqrt is probs most expensive in the loop 18:21 <+bridge> [ddnet] I mean from 2000 fps down to 1200 on unpatched and to 1800 to patched 18:21 <+bridge> [ddnet] the main difference is that it checks only key points, not 32 per tile 18:22 <+bridge> [ddnet] i mean if u can garantuee its not changing physics that sounds good to me ^^ 18:22 <+bridge> [ddnet] sadly not changing physics sounds bad to me 😦 18:22 <+bridge> [ddnet] i mean changing physics would worth it 18:23 <+bridge> [ddnet] i mean changing physics would(or might) worth it 18:23 <+bridge> [ddnet] even changing roundings of floatingpoints might already break maps sadly 18:23 <+bridge> [ddnet] sometimes u stand against a wall and hold jump + d 18:24 <+bridge> [ddnet] or stuff like that 18:24 <+bridge> [ddnet] Season 2 :D if it breaks stuff. 18:24 <+bridge> [ddnet] I'll send diff real quick 18:24 <+bridge> [ddnet] ^^ 18:24 <+bridge> [ddnet] Well, I'm not sure for that 18:25 <+bridge> [ddnet] the algorithm does not depend on rounding of a specific way 18:28 <+bridge> [ddnet] Actually pushed to dfng :D. https://github.com/Inateblig/dfng/commit/769c074ed3b947f79d34cf30a580af3d4b58bf8a 18:29 <+bridge> [ddnet] this is my argument 18:29 <+bridge> [ddnet] u have to opt in 18:30 <+bridge> [ddnet] it should be opt out 18:31 <+bridge> [ddnet] we should use this season 2 to make ddnet 2.0 18:31 <+bridge> [ddnet] break the protocol 18:31 <+bridge> [ddnet] optimize it 18:31 <+bridge> [ddnet] but still i think const correctness is much less helpful then you probably would agree xd 18:31 <+bridge> [ddnet] map format 18:31 <+bridge> [ddnet] kek 18:32 <+bridge> [ddnet] in c++ const is useless cuz u can get rid of it 18:32 <+bridge> [ddnet] in rust u cant 18:32 <+bridge> [ddnet] i'd really like a language that actually tries to prevent common logic bugs 18:32 <+bridge> [ddnet] also the const (mut) is paired with the borrow checker 18:32 <+bridge> [ddnet] i have a server dedicated to ddnet idea spitballing if 2.0 ever happens 18:32 <+bridge> [ddnet] making it way more powerful 18:32 <+bridge> [ddnet] also the const (non mut) is paired with the borrow checker 18:33 <+bridge> [ddnet] well also depends on what u write 18:33 <+bridge> [ddnet] for APIs its probs better 18:33 <+bridge> [ddnet] than for a small module 18:33 <+bridge> [ddnet] its better for everything 18:33 <+bridge> [ddnet] When I runned it with valgrind smth it had 16x less calls. It's been a while since then though 18:34 <+bridge> [ddnet] its same discussion as using private vs getters etc 18:34 <+bridge> [ddnet] you know u pass smth to a function by reference e.g 18:34 <+bridge> [ddnet] and it wont be modified 18:34 <+bridge> [ddnet] unless its mut 18:34 <+bridge> [ddnet] for example 18:34 <+bridge> [ddnet] no 18:34 <+bridge> [ddnet] yes 18:34 <+bridge> [ddnet] until u suddenly need mutation and need to change 10000 functrions xD 18:34 <+bridge> [ddnet] not rly 18:36 <+bridge> [ddnet] give me stats how many bugs have been prevent for const correctness 18:36 <+bridge> [ddnet] no 18:36 <+bridge> [ddnet] i wont try to convince u 18:36 <+bridge> [ddnet] i feel like in most situation its smth like if(a = 1) or stuff like that xd 18:36 <+bridge> [ddnet] u can keep ur cpp 18:36 <+bridge> [ddnet] idc 18:36 <+bridge> [ddnet] but i dislike coding like this anyway xD 18:36 <+bridge> [ddnet] lel 18:37 <+bridge> [ddnet] u can also accidentially use mut in rust where it makes no sense 18:37 <+bridge> [ddnet] or depends what the fuck u design 18:37 <+bridge> [ddnet] fn HiIMutateOneAttributeButPlsNeverChangeAnythingElse 18:37 <+bridge> [ddnet] oh nice i have mutation rights, lets change stuff 18:37 <+bridge> [ddnet] not rly 18:37 <+bridge> [ddnet] cuz the compiler has a check 18:38 <+bridge> [ddnet] it tells u if the mutability is used 18:38 <+bridge> [ddnet] ok 18:38 <+bridge> [ddnet] this works cuz the whole type system works with the mut keyword 18:38 <+bridge> [ddnet] maybe u are right if the function is max 10 lines of code 18:38 <+bridge> [ddnet] e.g a function that modifies a struct takes a &mut self 18:38 <+bridge> [ddnet] but if u have a beast of a function 18:38 <+bridge> [ddnet] then rip 18:38 <+bridge> [ddnet] idc what u talking about here 18:38 <+bridge> [ddnet] idk 18:38 <+bridge> [ddnet] * 18:39 <+bridge> [ddnet] idk the mut and non mut falls in place rly ez in rust 18:39 <+bridge> [ddnet] it just makes sense 18:39 <+bridge> [ddnet] int i = 0 18:39 <+bridge> [ddnet] 18:39 <+bridge> [ddnet] if(i == 0) 18:39 <+bridge> [ddnet] dostuff 18:39 <+bridge> [ddnet] // 5000 lines of code 18:39 <+bridge> [ddnet] oh i need i now, i hope its never changed again 18:39 <+bridge> [ddnet] it was* 18:40 <+bridge> [ddnet] anyway i can only tell from my experience 18:40 <+bridge> [ddnet] and have to say i cannot really think of any case 18:40 <+bridge> [ddnet] a immutable value can be initialized at runtime 18:40 <+bridge> [ddnet] but a const has to he const evaluated 18:41 <+bridge> [ddnet] so its not exactly the same as cpp const i guess 18:41 <+bridge> [ddnet] let x = 2; 18:41 <+bridge> [ddnet] is called a binding 18:41 <+bridge> [ddnet] const X = 2; 18:41 <+bridge> [ddnet] a constant 18:41 <+bridge> [ddnet] yea 18:41 <+bridge> [ddnet] cpp thus create constexpr 18:41 <+bridge> [ddnet] const X: i32 = 2; 18:41 <+bridge> [ddnet] so its clear the expression it self is constant 18:41 <+bridge> [ddnet] rust const is like constexpr 18:41 <+bridge> [ddnet] yes 18:42 <+bridge> [ddnet] u only use const in rust where u would do a constexpr 18:42 <+bridge> [ddnet] ok if i say const i meant immutability 18:42 <+bridge> [ddnet] not a constant expression 18:42 <+bridge> [ddnet] the mutability is rly closely tied to the borrow checker 18:43 <+bridge> [ddnet] so i think it makes a lot of of sense, or even is required to be the way it is in rust 18:43 <+bridge> [ddnet] > As mentioned in the “Storing Values with Variables” section, by default variables are immutable. This is one of many nudges Rust gives you to write your code in a way that takes advantage of the safety and easy concurrency that Rust offers. However, you still have the option to make your variables mutable. Let’s explore how and why Rust encourages you to favor immutability and why sometimes you might want to opt out. 18:43 <+bridge> [ddnet] https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html 18:44 <+bridge> [ddnet] note that you can do this too btw 18:44 <+bridge> [ddnet] ```rust 18:44 <+bridge> [ddnet] let x; 18:44 <+bridge> [ddnet] 18:44 <+bridge> [ddnet] if a == 2 { 18:44 <+bridge> [ddnet] x = 3; 18:44 <+bridge> [ddnet] } else { 18:44 <+bridge> [ddnet] x = 4; 18:44 <+bridge> [ddnet] }``` 18:44 <+bridge> [ddnet] and x here is immutable 18:44 <+bridge> [ddnet] and rust checks that its init in all code paths 18:45 <+bridge> [ddnet] i just wonder is it like this for `mut` for parameters 18:45 <+bridge> [ddnet] 18:45 <+bridge> [ddnet] why isnt everything a immutable reference (or simple type) and then if u add & its automatically mut 18:45 <+bridge> [ddnet] 18:45 <+bridge> [ddnet] if u want a copy of the object as parameter it should be explicity `mut` 18:45 <+bridge> [ddnet] function parameters can be mut too 18:45 <+bridge> [ddnet] yes 18:45 <+bridge> [ddnet] but with mut as keyword? 18:45 <+bridge> [ddnet] but mut changes meaning on whether its a reference or not 18:45 <+bridge> [ddnet] ye 18:46 <+bridge> [ddnet] and why not simply have `&` which is mut, or mut which is a `copy` rest is const anyway and the compiler should decide 18:46 <+bridge> [ddnet] and why not simply have `&` which is mut, or mut which is a `copy`. rest is const anyway and the compiler should decide 18:46 <+bridge> [ddnet] can u even change parameters itself? 18:47 <+bridge> [ddnet] like 18:47 <+bridge> [ddnet] fn (i mut: i32) 18:47 <+bridge> [ddnet] 18:47 <+bridge> [ddnet] i = 2 18:47 <+bridge> [ddnet] ```rust 18:47 <+bridge> [ddnet] // pass by value 18:47 <+bridge> [ddnet] fn func(x: i32) { 18:47 <+bridge> [ddnet] // cant change x, its immutable 18:47 <+bridge> [ddnet] let y = x + 1; 18:47 <+bridge> [ddnet] } 18:47 <+bridge> [ddnet] 18:47 <+bridge> [ddnet] // pass by value 18:47 <+bridge> [ddnet] fn func(mut x: i32) { 18:47 <+bridge> [ddnet] // can change, but its value is only changed locally (for the copy passed) 18:47 <+bridge> [ddnet] x = x + 1 18:47 <+bridge> [ddnet] } 18:47 <+bridge> [ddnet] 18:47 <+bridge> [ddnet] fn func(x: &i32) { 18:47 <+bridge> [ddnet] // cant change x, its immutable 18:47 <+bridge> [ddnet] } 18:47 <+bridge> [ddnet] 18:47 <+bridge> [ddnet] fn func(x: &mut i32) { 18:47 <+bridge> [ddnet] *x = *x + 1 18:47 <+bridge> [ddnet] } 18:47 <+bridge> [ddnet] ``` 18:47 <+bridge> [ddnet] yes 18:47 <+bridge> [ddnet] exactly 18:47 <+bridge> [ddnet] this is what i dont get 18:47 <+bridge> [ddnet] ? 18:47 <+bridge> [ddnet] what does this help to make it so complicated 18:47 <+bridge> [ddnet] it helps 18:47 <+bridge> [ddnet] why does x:&i32 and x:i32 exists? 18:48 <+bridge> [ddnet] i dont think its complicated 18:48 <+bridge> [ddnet] u are just explicit 18:48 <+bridge> [ddnet] why doesnt the compiler decide? 18:48 <+bridge> [ddnet] here 18:48 <+bridge> [ddnet] with &i32 u pass by reference 18:48 <+bridge> [ddnet] yes 18:48 <+bridge> [ddnet] with i32 you pass by value 18:48 <+bridge> [ddnet] but why does it matter? 18:48 <+bridge> [ddnet] its const 18:48 <+bridge> [ddnet] in fact 18:48 <+bridge> [ddnet] ?? 18:48 <+bridge> [ddnet] but if you pass without a reference, then you give up the ownership of the object (if its not copy, e.g a complex object, not a integer) 18:48 <+bridge> [ddnet] see whatever i passed to the function 18:48 <+bridge> [ddnet] 18:48 <+bridge> [ddnet] its immutable 18:48 <+bridge> [ddnet] so its 100% whatever i holds 18:48 <+bridge> [ddnet] ownership is the answer 18:49 <+bridge> [ddnet] to ur question 18:49 <+bridge> [ddnet] https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html 18:49 <+bridge> [ddnet] yes but why isnt rust always using a const ref 18:49 <+bridge> [ddnet] how does the ownership help for the function call as is 18:49 <+bridge> [ddnet] do u always pass by const ref in cpp? 18:49 <+bridge> [ddnet] it help before and after 18:49 <+bridge> [ddnet] sometimes a function simply has to take ownership of the value you are passing 18:49 <+bridge> [ddnet] no but i'd love to not have to decide. 18:49 <+bridge> [ddnet] 18:49 <+bridge> [ddnet] When i say const it should automatically decide 18:50 <+bridge> [ddnet] i say its good y ou have to decide 18:50 <+bridge> [ddnet] and why not always enforce it for immutable objects? 18:50 <+bridge> [ddnet] i mean does this help for multi threading? 18:50 <+bridge> [ddnet] yeah 18:50 <+bridge> [ddnet] mh ok 18:50 <+bridge> [ddnet] when a function takes for example a &mut i32 18:50 <+bridge> [ddnet] it knows it has full exclusive access to it 18:51 <+bridge> [ddnet] and no other place has it 18:51 <+bridge> [ddnet] its thread safe 18:51 <+bridge> [ddnet] then my next question 18:51 <+bridge> [ddnet] what are u doing more often? pass an object by const ref or create a copy 18:51 <+bridge> [ddnet] hard to say 18:51 <+bridge> [ddnet] bcs i feel like i defs do more const ref 18:51 <+bridge> [ddnet] for example if i take a cheap object that implements Copy i take a copy 18:52 <+bridge> [ddnet] otherwise it depends on the logic 18:52 <+bridge> [ddnet] and thus this should be the "easiest" way of passing, same for references 18:52 <+bridge> [ddnet] sometimes it makes sense to take full ownership 18:52 <+bridge> [ddnet] and not let the called hold the passed value 18:52 <+bridge> [ddnet] after that comes a "real" copy 18:52 <+bridge> [ddnet] for example the builder pattern 18:52 <+bridge> [ddnet] u should learn rust 18:52 <+bridge> [ddnet] yes 18:52 <+bridge> [ddnet] then its better to argue 18:52 <+bridge> [ddnet] but dont half ass it 18:52 <+bridge> [ddnet] im also bad explaining xd 18:53 <+bridge> [ddnet] but from my current experience in c++ i'd say `mut` for reference is too verbose, as its more likely than a "real" copy 18:53 <+bridge> [ddnet] i dont think so 18:53 <+bridge> [ddnet] and for simple types like ìnt` it rarely useful anyway 18:53 <+bridge> [ddnet] and for simple types like `int` it rarely useful anyway 18:53 <+bridge> [ddnet] (const ref is rarely useful i mean) 18:54 <+bridge> [ddnet] mhh well u dont need to argree 18:54 <+bridge> [ddnet] to me this is a flaw in rusts thinking really 18:54 <+bridge> [ddnet] the borrow checker allows amazing things like safe array slices 18:54 <+bridge> [ddnet] slices in rust are amazing 18:54 <+bridge> [ddnet] yes 18:54 <+bridge> [ddnet] i know 18:54 <+bridge> [ddnet] https://doc.rust-lang.org/std/primitive.slice.html 18:54 <+bridge> [ddnet] slices even allow to split the borrowing for threading 18:54 <+bridge> [ddnet] ye 18:55 <+bridge> [ddnet] most stuff i know about rust is, when i encounter threading stuff and want to know how easy it is in rust xD 18:55 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1041411030972121178/image.png 18:55 <+bridge> [ddnet] idk u wont know if u dont try urself 18:55 <+bridge> [ddnet] but threading touches the hard part of rust 18:56 <+bridge> [ddnet] yeah but IMHO this is actually the most intersting 18:56 <+bridge> [ddnet] like in any language i would say 18:56 <+bridge> [ddnet] yeah 18:56 <+bridge> [ddnet] it is the most interesting 18:56 <+bridge> [ddnet] bcs more threading is cool 18:56 <+bridge> [ddnet] and what makes rust so amazing 18:56 <+bridge> [ddnet] but also destroys performance easily if u do it wrong 18:56 <+bridge> [ddnet] or overdo it 18:56 <+bridge> [ddnet] yeah 18:56 <+bridge> [ddnet] most often u need to profile 18:56 <+bridge> [ddnet] cuz u dont have definitive answers 18:56 <+bridge> [ddnet] when doing threaded stuff 18:58 <+bridge> [ddnet] yesterday i found out this is the way to make a slice without copying https://doc.rust-lang.org/stable/std/slice/fn.from_ref.html 18:58 <+bridge> [ddnet] a slice of len 1 18:58 <+bridge> [ddnet] didnt know before xd 19:00 <+bridge> [ddnet] u never learn out ^^ 19:00 <+bridge> [ddnet] i mean the projects i did when i was like 16 completly suck from my point of view.. but they still work xDD 19:01 <+bridge> [ddnet] and the best moments are when u are impressed about what your past you already did xD 19:01 <+bridge> [ddnet] "wow this is actually clever" XD 19:02 <+bridge> [ddnet] its probs like in sports.. sometimes you onfire and do epic stuff, and sometimes u do the worst solution possible xd 19:08 <+bridge> [ddnet] @Ryozuki i've one more question 19:08 <+bridge> [ddnet] 19:08 <+bridge> [ddnet] do u use mut for anything else than parameter/var declaration? 19:09 <+bridge> [ddnet] e.g. 19:09 <+bridge> [ddnet] why 19:09 <+bridge> [ddnet] let mut i = 1 19:09 <+bridge> [ddnet] 19:09 <+bridge> [ddnet] and not 19:09 <+bridge> [ddnet] mut i = 1 19:09 <+bridge> [ddnet] 19:09 <+bridge> [ddnet] where mut and let mut is basically the same... the let seems verbose 19:15 <+bridge> [ddnet] well idk bro 19:15 <+bridge> [ddnet] ur just nitpicking now 19:15 <+bridge> [ddnet] xd 19:15 <+bridge> [ddnet] no 19:15 <+bridge> [ddnet] i am actually serious 19:15 <+bridge> [ddnet] my argument would be that if i see a let i know its a variable binding/declaration 19:15 <+bridge> [ddnet] otherwise i dont know, and i dont rly care 19:16 <+bridge> [ddnet] mhh but if u wouldnt know let mut, it would be same for mut 19:16 <+bridge> [ddnet] ok anyway thanks 19:16 <+bridge> [ddnet] probs some syntax parsing limitation 19:16 <+bridge> [ddnet] or idk 19:16 <+bridge> [ddnet] design decisions 19:16 <+bridge> [ddnet] as soon as heinrich reads it i get some 50000000000 lines text anway 19:16 <+bridge> [ddnet] to explain all in detail 19:16 <+bridge> [ddnet] or not 19:16 <+bridge> [ddnet] he will skip this maybe 19:16 <+bridge> [ddnet] xd 19:16 <+bridge> [ddnet] xD 19:17 <+bridge> [ddnet] i bet he has "rust" highlighted like u 19:17 <+bridge> [ddnet] btw 19:17 <+bridge> [ddnet] u can do this 19:17 <+bridge> [ddnet] `let (a, mut b) = (1, 2);` 19:17 <+bridge> [ddnet] yeah ok, dunno but still interesting xD 19:17 <+bridge> [ddnet] u are unpacking 19:17 <+bridge> [ddnet] a declaring a and b 19:17 <+bridge> [ddnet] where b is mutable 19:17 <+bridge> [ddnet] yes 19:18 <+bridge> [ddnet] its like int a,*b 19:18 <+bridge> [ddnet] i dunno if i like such delcartions 19:18 <+bridge> [ddnet] well i like em 19:18 <+bridge> [ddnet] cuz they fit rust "everything is an expression" pattern 19:18 <+bridge> [ddnet] it feels like its less readable 😄 19:19 <+bridge> [ddnet] let (a, b) = if x == 2 { (3, 4)} else { (4, 5) }; 19:19 <+bridge> [ddnet] xd 19:19 <+bridge> [ddnet] imagine not having ternary operators 19:19 <+bridge> [ddnet] "mut is not paired with let in syntax, it's paired with each variable declaration" 19:19 <+bridge> [ddnet] ah 19:19 <+bridge> [ddnet] let (a, mut b) = get_pair(); 19:19 <+bridge> [ddnet] its the new let else sxntax? 19:20 <+bridge> [ddnet] no 19:20 <+bridge> [ddnet] wasnt there a recent addition 19:20 <+bridge> [ddnet] yeah 19:20 <+bridge> [ddnet] let else 19:20 <+bridge> [ddnet] if let else 19:20 <+bridge> [ddnet] but in this case its simply a tenary operator? 19:20 <+bridge> [ddnet] what i sent is just a one line if 19:20 <+bridge> [ddnet] to show u that its a expression 19:21 <+bridge> [ddnet] the "everything is an expression" 19:21 <+bridge> [ddnet] yeah 19:21 <+bridge> [ddnet] i see 19:21 <+bridge> [ddnet] also rust match is amazing 19:21 <+bridge> [ddnet] ok but thats also the way to write any tenary operator right? 19:21 <+bridge> [ddnet] pattern matching is rly powerful 19:21 <+bridge> [ddnet] i mean there is no alternative 19:21 <+bridge> [ddnet] yeah 19:21 <+bridge> [ddnet] there is not 19:21 <+bridge> [ddnet] ok 19:21 <+bridge> [ddnet] well u can make a macro 19:22 <+bridge> [ddnet] yeah i see 19:22 <+bridge> [ddnet] 19:22 <+bridge> [ddnet] it really just a question bcs i actually use them quite often 19:22 <+bridge> [ddnet] and putting a full if expression is ofc verbose xd 19:23 <+bridge> [ddnet] but with macros might be smaller 19:23 <+bridge> [ddnet] nah ppl dont write macros for this 19:23 <+bridge> [ddnet] you have to know the context 19:23 <+bridge> [ddnet] if you write code in a rusty way 19:23 <+bridge> [ddnet] it falls pretty nice i would say 19:23 <+bridge> [ddnet] rust mixes functional and imperative 19:23 <+bridge> [ddnet] i think it gets best of both 19:25 <+bridge> [ddnet] mh yeah, maybe i just need more ryozuki propaganda to like it more xd 19:26 <+bridge> [ddnet] this is how i decide to create a random seed or use the provided one from cli 19:26 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1041418686747119696/image.png 19:26 <+bridge> [ddnet] on my ddnet map gen 19:26 <+bridge> [ddnet] yeah looks like classic script languages, which i do not dislike 19:26 <+bridge> [ddnet] 19:26 <+bridge> [ddnet] makes it small and readable once u in it 19:27 <+bridge> [ddnet] thing is im bad at arguing and sometimes it feels like a race to nowhere 19:27 <+bridge> [ddnet] like the effort is futile 19:27 <+bridge> [ddnet] ppl will just believe their own opinion 19:27 <+bridge> [ddnet] so why bother 19:27 <+bridge> [ddnet] yeah but sometimes its better to ask such ppl, bcs they find a easy way to overcome problems, so they dont have to argue xD 19:28 <+bridge> [ddnet] Dioes anyone know how semaphores can work when you have multiple child process executing the same code, 19:28 <+bridge> [ddnet] and the main process waits that all child process has finished to execute the code in the function? (lets say the func is called `child()`) 19:28 <+bridge> [ddnet] in C 19:28 <+bridge> [ddnet] Does anyone know how semaphores can work when you have multiple child process executing the same code, 19:28 <+bridge> [ddnet] and the main process waits that all child process has finished to execute the code in the function? (lets say the func is called `child()`) 19:28 <+bridge> [ddnet] in C 19:28 <+bridge> [ddnet] oh in C 19:28 <+bridge> [ddnet] f 19:28 <+bridge> [ddnet] xD 19:28 <+bridge> [ddnet] yeah 19:28 <+bridge> [ddnet] that's for school lmao 19:29 <+bridge> [ddnet] when u say rust to my teacher he's like "nothing is better than C" 19:29 <+bridge> [ddnet] lmfao 19:29 <+bridge> [ddnet] is learath2 ur teacher 19:29 <+bridge> [ddnet] nah xD 19:29 <+bridge> [ddnet] imagine a teacher saying bullshit for 1 hour 19:29 <+bridge> [ddnet] what exactly is your problem 19:29 <+bridge> [ddnet] just to explain smth that could be simplified in 2min 19:29 <+bridge> [ddnet] @Not Keks wait I was starting my VM for some code 19:30 <+bridge> [ddnet] > A semaphore is an integer whose value is never allowed to fall 19:30 <+bridge> [ddnet] > below zero. Two operations can be performed on semaphores: 19:30 <+bridge> [ddnet] > increment the semaphore value by one (sem_post(3)); and decrement 19:30 <+bridge> [ddnet] > the semaphore value by one (sem_wait(3)). If the value of a 19:30 <+bridge> [ddnet] > semaphore is currently zero, then a sem_wait(3) operation will 19:30 <+bridge> [ddnet] > block until the value becomes greater than zero. 19:30 <+bridge> [ddnet] increment for each child created and decrement when the child finishes? 19:30 <+bridge> [ddnet] idk whats the problem there 19:31 <+bridge> [ddnet] ```c 19:31 <+bridge> [ddnet] #include 19:31 <+bridge> [ddnet] #include 19:31 <+bridge> [ddnet] 19:31 <+bridge> [ddnet] #include 19:31 <+bridge> [ddnet] #include 19:31 <+bridge> [ddnet] 19:31 <+bridge> [ddnet] #include 19:31 <+bridge> [ddnet] 19:31 <+bridge> [ddnet] #define NUM_CHILDS 4 19:31 <+bridge> [ddnet] 19:31 <+bridge> [ddnet] struct mmap_data 19:31 <+bridge> [ddnet] { 19:31 <+bridge> [ddnet] sem_t semaphore; 19:31 <+bridge> [ddnet] int pid; 19:31 <+bridge> [ddnet] }; 19:31 <+bridge> [ddnet] 19:31 <+bridge> [ddnet] void child(void *shared) 19:31 <+bridge> [ddnet] { 19:31 <+bridge> [ddnet] 19:31 <+bridge> [ddnet] struct mmap_data *data = (struct mmap_data*)shared; 19:31 <+bridge> [ddnet] 19:31 <+bridge> [ddnet] sem_wait(&data->semaphore); 19:31 <+bridge> [ddnet] 19:31 <+bridge> [ddnet] data->pid = getpid(); 19:31 <+bridge> [ddnet] 19:31 <+bridge> [ddnet] sem_post(&data->semaphore); 19:31 <+bridge> [ddnet] } 19:31 <+bridge> [ddnet] 19:32 <+bridge> [ddnet] int main(void) 19:32 <+bridge> [ddnet] { 19:32 <+bridge> [ddnet] what I need to do is to wait that all the code in `child()` is finished 19:32 <+bridge> [ddnet] and only after printf in main 19:32 <+bridge> [ddnet] unprotected shard memory 19:32 <+bridge> [ddnet] i actually very rarely ever used fork xd 19:32 <+bridge> [ddnet] not like i do c anymore 19:32 <+bridge> [ddnet] the printf at the end is cursed but it was 5am when I did it 19:33 <+bridge> [ddnet] @ReiTW u dont sem_post? 19:34 <+bridge> [ddnet] i think u have to sem_post on the for loop 19:34 <+bridge> [ddnet] before fork 19:34 <+bridge> [ddnet] or after 19:34 <+bridge> [ddnet] idk 19:34 <+bridge> [ddnet] ah wait 19:34 <+bridge> [ddnet] im 19:34 <+bridge> [ddnet] blind 19:35 <+bridge> [ddnet] :fuckyousnail: 19:35 <+bridge> [ddnet] Idk i'm kinda lost with that 19:35 <+bridge> [ddnet] dont mind me 19:35 <+bridge> [ddnet] i should reread stuff 19:36 <+bridge> [ddnet] Thing is there's 4 childs + parent so it's even more confusing about how to use it 19:36 <+bridge> [ddnet] so does it not work 19:36 <+bridge> [ddnet] i still dunno what ur problem is xD 19:36 <+bridge> [ddnet] i mean u basically use a mutex here 19:36 <+bridge> [ddnet] since counter is only 1 isnt it 19:37 <+bridge> [ddnet] does unsigned int value need to be 1 when u init it? 19:37 <+bridge> [ddnet] ok value is second parameter lel 19:37 <+bridge> [ddnet] otherwise nobody will unblock on wait 19:37 <+bridge> [ddnet] Imagine you don't use semaphore but instead you do `sleep(1);` in the main func before the printf at the end 19:37 <+bridge> [ddnet] I want the same result 19:38 <+bridge> [ddnet] what does the program do rn 19:38 <+bridge> [ddnet] does it work? 19:38 <+bridge> [ddnet] ``` 19:38 <+bridge> [ddnet] l@debian:~/c$ ./mmap_ex 19:38 <+bridge> [ddnet] Parent pid is 4726 19:38 <+bridge> [ddnet] ``` 19:38 <+bridge> [ddnet] it's stuck 19:38 <+bridge> [ddnet] int err = sem_init(&data->semaphore, 1, 0); 19:38 <+bridge> [ddnet] to 19:38 <+bridge> [ddnet] int err = sem_init(&data->semaphore, 1, 1); 19:38 <+bridge> [ddnet] u need 1 in the value 19:38 <+bridge> [ddnet] of the semaphore 19:39 <+bridge> [ddnet] wait only gets unlocked if value is greater than 0 19:39 <+bridge> [ddnet] https://man7.org/linux/man-pages/man3/sem_wait.3.html 19:39 <+bridge> [ddnet] and post increases it by one 19:39 <+bridge> [ddnet] thing is, it is always 0 19:39 <+bridge> [ddnet] so they all wait 19:39 <+bridge> [ddnet] u need to init it to 1 19:39 <+bridge> [ddnet] ``` 19:39 <+bridge> [ddnet] l@debian:~/c$ ./mmap_ex 19:39 <+bridge> [ddnet] Parent pid is 4815 19:39 <+bridge> [ddnet] pid:4815 shared:0 19:39 <+bridge> [ddnet] l@debian:~/c$ ./mmap_ex 19:39 <+bridge> [ddnet] Parent pid is 4844 19:39 <+bridge> [ddnet] pid:4845 shared:4845 19:39 <+bridge> [ddnet] 19:39 <+bridge> [ddnet] 19:39 <+bridge> [ddnet] ``` 19:39 <+bridge> [ddnet] did it work? 19:40 <+bridge> [ddnet] not as expected, wait let me explain what print should be: 19:40 <+bridge> [ddnet] 19:40 <+bridge> [ddnet] Each child (4) and the parent should print 19:40 <+bridge> [ddnet] pid:{self} shared:{the same value for all of them} 19:40 <+bridge> [ddnet] so fork() == 0 fails basically 19:40 <+bridge> [ddnet] thats ur problem 19:40 <+bridge> [ddnet] no fork() doesn't 19:41 <+bridge> [ddnet] just semaphores aren't used properly 19:41 <+bridge> [ddnet] if(fork() == 0) { 19:41 <+bridge> [ddnet] child(shared); 19:41 <+bridge> [ddnet] break; 19:41 <+bridge> [ddnet] } 19:41 <+bridge> [ddnet] it either enters child or doesnt at all 19:41 <+bridge> [ddnet] ```c 19:41 <+bridge> [ddnet] #include 19:41 <+bridge> [ddnet] #include 19:41 <+bridge> [ddnet] 19:41 <+bridge> [ddnet] #include 19:41 <+bridge> [ddnet] #include 19:41 <+bridge> [ddnet] 19:41 <+bridge> [ddnet] #define NUM_CHILDS 2 19:41 <+bridge> [ddnet] 19:41 <+bridge> [ddnet] int main(void) 19:41 <+bridge> [ddnet] { 19:41 <+bridge> [ddnet] void *shared = mmap(NULL, 19:41 <+bridge> [ddnet] sizeof(int), 19:41 <+bridge> [ddnet] PROT_READ | PROT_WRITE, 19:41 <+bridge> [ddnet] MAP_ANONYMOUS | MAP_SHARED, 19:41 <+bridge> [ddnet] -1, 0); 19:41 <+bridge> [ddnet] 19:41 <+bridge> [ddnet] int not_shared = getpid(); 19:41 <+bridge> [ddnet] *(int*)shared = getpid(); 19:41 <+bridge> [ddnet] 19:42 <+bridge> [ddnet] for(int i = 0; i < NUM_CHILDS; i++) { 19:42 <+bridge> [ddnet] if(fork() > 0) 19:42 <+bridge> [ddnet] break; 19:42 <+bridge> [ddnet] 19:42 <+bridge> [ddnet] not_shared = getpid(); 19:42 <+bridge> [ddnet] *(int*)shared = getpid(); 19:42 <+bridge> [ddnet] } 19:42 <+bridge> [ddnet] 19:42 <+bridge> [ddnet] sleep(1); 19:42 <+bridge> [ddnet] printf("pid:%d not_shared:%d shared:%d\n", getpid(), not_shared, *(int*)shared); 19:42 <+bridge> [ddnet] } 19:42 <+bridge> [ddnet] take that as another example 19:42 <+bridge> [ddnet] i mean every child would call sem_destroy(&data->semaphore); 19:42 <+bridge> [ddnet] in ur first 19:42 <+bridge> [ddnet] *(int*)shared = getpid(); doesnt that override semaphore 19:42 <+bridge> [ddnet] right? xd 19:42 <+bridge> [ddnet] ah u changed it 19:42 <+bridge> [ddnet] but instead of sleep(1); noby told me I could prob use semaphores to sync all process 19:42 <+bridge> [ddnet] xdd 19:42 <+bridge> [ddnet] sleep 1 is wrong anyway 19:42 <+bridge> [ddnet] and wait to print 19:42 <+bridge> [ddnet] its not the way sleep 19:42 <+bridge> [ddnet] its a hack 19:42 <+bridge> [ddnet] xD well it's the ugly way to do, this works & print the same value for all processes (shared) 19:43 <+bridge> [ddnet] can u print all fork()? 19:43 <+bridge> [ddnet] and all getpid() 19:43 <+bridge> [ddnet] then u must see whatever problem u have xD 19:44 <+bridge> [ddnet] ``` 19:44 <+bridge> [ddnet] l@debian:~/c$ ./mmap_ex 19:44 <+bridge> [ddnet] pid 4989 19:44 <+bridge> [ddnet] pid 4990 19:44 <+bridge> [ddnet] pid 0 19:44 <+bridge> [ddnet] pid:4989 shared:4989 19:44 <+bridge> [ddnet] pid 4991 19:44 <+bridge> [ddnet] pid 0 19:44 <+bridge> [ddnet] pid 4992 19:44 <+bridge> [ddnet] pid 0 19:44 <+bridge> [ddnet] pid 0 19:44 <+bridge> [ddnet] ``` 19:44 <+bridge> [ddnet] just that childs are waiting, and parent too 19:44 <+bridge> [ddnet] (I did that:) 19:44 <+bridge> [ddnet] 19:44 <+bridge> [ddnet] ```c 19:45 <+bridge> [ddnet] sem_init(&data->semaphore, 1, 1); 19:45 <+bridge> [ddnet] for(int i = 0; i < NUM_CHILDS; i++) { 19:45 <+bridge> [ddnet] pid_t pid = fork(); 19:45 <+bridge> [ddnet] printf("pid %d\n", pid); 19:45 <+bridge> [ddnet] 19:45 <+bridge> [ddnet] if(pid == 0) { 19:45 <+bridge> [ddnet] child(shared); 19:45 <+bridge> [ddnet] break; 19:45 <+bridge> [ddnet] } 19:45 <+bridge> [ddnet] } 19:45 <+bridge> [ddnet] ``` 19:45 <+bridge> [ddnet] (I did that:) 19:45 <+bridge> [ddnet] 19:45 <+bridge> [ddnet] ```c 19:45 <+bridge> [ddnet] sem_init(&data->semaphore, 1, 1); 19:45 <+bridge> [ddnet] for(int i = 0; i < NUM_CHILDS; i++) { 19:45 <+bridge> [ddnet] pid_t pid = fork(); 19:45 <+bridge> [ddnet] printf("pid %d\n", pid); 19:45 <+bridge> [ddnet] 19:45 <+bridge> [ddnet] if(pid == 0) { 19:45 <+bridge> [ddnet] child(shared); 19:45 <+bridge> [ddnet] break; 19:45 <+bridge> [ddnet] } 19:45 <+bridge> [ddnet] } 19:45 <+bridge> [ddnet] ``` 19:47 <+bridge> [ddnet] fork() isn't the issue at all 19:49 <+bridge> [ddnet] i still dunno exactly what u want to archive 19:49 <+bridge> [ddnet] but do u know what fork does? 19:49 <+bridge> [ddnet] its not a thread if u think that 19:50 <+bridge> [ddnet] yeah 19:50 <+bridge> [ddnet] what u want fits threads 19:50 <+bridge> [ddnet] here every child will cale sem_destroy 19:50 <+bridge> [ddnet] > Destroying a semaphore that other processes or threads are 19:50 <+bridge> [ddnet] > currently blocked on (in sem_wait(3)) produces undefined 19:50 <+bridge> [ddnet] > behavior. 19:50 <+bridge> [ddnet] > 19:50 <+bridge> [ddnet] > Using a semaphore that has been destroyed produces undefined 19:50 <+bridge> [ddnet] > results, until the semaphore has been reinitialized using 19:50 <+bridge> [ddnet] > sem_init(3). 19:51 <+bridge> [ddnet] mhh 19:51 <+bridge> [ddnet] @ReiTW why not threads 19:51 <+bridge> [ddnet] its a wonder whatever u did does not crash xD 19:51 <+bridge> [ddnet] cuz I've already did smth about threads 19:51 <+bridge> [ddnet] anyway 19:51 <+bridge> [ddnet] we're learning interprocess communication 19:52 <+bridge> [ddnet] add 19:52 <+bridge> [ddnet] sem_post(&data->semaphore); 19:52 <+bridge> [ddnet] before the printf 19:52 <+bridge> [ddnet] @ReiTW 19:52 <+bridge> [ddnet] I keep the wait? 19:52 <+bridge> [ddnet] u cannot destroy a locked semaphore 19:52 <+bridge> [ddnet] no wait required 19:52 <+bridge> [ddnet] u use the semaphore like a mutex here anyway 19:52 <+bridge> [ddnet] after the for loop 19:52 <+bridge> [ddnet] 19:52 <+bridge> [ddnet] acquire it and release it again 19:53 <+bridge> [ddnet] but i hope u understand that u are simply cloning the processes 19:53 <+bridge> [ddnet] xD 19:53 <+bridge> [ddnet] it has nothing todo with threading 19:53 <+bridge> [ddnet] yes I know I have another file using pthread 19:56 <+bridge> [ddnet] teacher talked about: 19:56 <+bridge> [ddnet] - threads 19:56 <+bridge> [ddnet] - semaphores 19:56 <+bridge> [ddnet] - processes 19:56 <+bridge> [ddnet] - mem shared communication between processes (mmap/shm idk) 19:56 <+bridge> [ddnet] 19:56 <+bridge> [ddnet] etc.. 19:56 <+bridge> [ddnet] I kinda have to do most of the job for everyone, everyone in the classroom doesn't understand a shit 19:56 <+bridge> [ddnet] Doing some small code example is good to help them, but ig doing mmap + processes + semaphores at the same time isn't the best way to learn 19:56 <+bridge> [ddnet] anyway do this ^ 19:56 <+bridge> [ddnet] for the rest i dunno what ur goal is xd 19:57 <+bridge> [ddnet] I did and all processes exits successfully just as expected: 19:57 <+bridge> [ddnet] ``` 19:57 <+bridge> [ddnet] pid:5403 shared:5403 19:57 <+bridge> [ddnet] pid:5404 shared:5404 19:57 <+bridge> [ddnet] pid:5402 shared:5404 19:57 <+bridge> [ddnet] pid:5405 shared:5405 19:57 <+bridge> [ddnet] pid:5406 shared:5406 19:57 <+bridge> [ddnet] ``` 19:57 <+bridge> [ddnet] shared isn't the same value 19:57 <+bridge> [ddnet] Yes I'm so sorry 😦 -.- It's really crazy how time flies. I'll start rebasing my changes right away. 19:58 <+bridge> [ddnet] shared isn't the same value, but ig i'll do it differently xD 19:58 <+bridge> [ddnet] but that makes sense 19:58 <+bridge> [ddnet] a better way to use semaphores cuz rn that sucks 19:58 <+bridge> [ddnet] u cloning the process 19:58 <+bridge> [ddnet] the old value still has old value 19:58 <+bridge> [ddnet] no 19:58 <+bridge> [ddnet] because this is a memory region shared between 5 processes 19:58 <+bridge> [ddnet] 4 childs & 1 parent 19:58 <+bridge> [ddnet] using mmap 19:58 <+bridge> [ddnet] *(int*)shared = getpid(); 19:58 <+bridge> [ddnet] why this tho 19:59 <+bridge> [ddnet] `*(int*)shared = getpid();` 19:59 <+bridge> [ddnet] was just to set a default value from the parent xd 19:59 <+bridge> [ddnet] ah well this is the thread example 20:00 <+bridge> [ddnet] ah lol 20:00 <+bridge> [ddnet] know i understand what u want to do xD 20:01 <+bridge> [ddnet] but ur semaphore isnt shared 20:01 <+bridge> [ddnet] xd 20:01 <+bridge> [ddnet] xd 20:01 <+bridge> [ddnet] yes I just want that the last child to run `data->pid = getpid();` sets his pid. at the end all processes shows this exact PID as it is "shared" memory 20:01 <+bridge> [ddnet] well technically it is lol it is 20:02 <+bridge> [ddnet] why 20:02 <+bridge> [ddnet] ```c 20:02 <+bridge> [ddnet] struct mmap_data 20:06 <+bridge> [ddnet] anyway if u want it equal put the print inside the child function 20:07 <+bridge> [ddnet] do you need your exact behavior? 20:07 <+bridge> [ddnet] exactly 20:07 <+bridge> [ddnet] dw i'll just find another way to do 20:08 <+bridge> [ddnet] idk it's like if semaphores are only binary 20:08 <+bridge> [ddnet] like can be only 1 or 0 20:08 <+bridge> [ddnet] so in my case it'd be too hard to use them 20:08 <+bridge> [ddnet] so in my case it'd be too hard to use them for 4 childs 20:10 <+bridge> [ddnet] you can initialize it with initial value 1 20:11 <+bridge> [ddnet] also values of it range from 0 to SEM_VALUE_MAX (according to man page) 20:16 <+bridge> [ddnet] i think the output makes sense 20:17 <+bridge> [ddnet] @ReiTW 20:17 <+bridge> [ddnet] ```c 20:17 <+bridge> [ddnet] #include 20:17 <+bridge> [ddnet] #include 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] #include 20:17 <+bridge> [ddnet] #include 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] #include 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] #define NUM_CHILDS 4 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] struct mmap_data 20:17 <+bridge> [ddnet] { 20:17 <+bridge> [ddnet] sem_t semaphore; 20:17 <+bridge> [ddnet] int pid; 20:17 <+bridge> [ddnet] int calls; 20:17 <+bridge> [ddnet] }; 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] void child(void *shared) 20:17 <+bridge> [ddnet] { 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] struct mmap_data *data = (struct mmap_data*)shared; 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] sem_wait(&data->semaphore); 20:17 <+bridge> [ddnet] 20:17 <+bridge> [ddnet] data->calls++; 20:18 <+bridge> [ddnet] data->pid = getpid(); 20:18 <+bridge> [ddnet] sem_post(&data->semaphore); 20:18 <+bridge> [ddnet] } 20:18 <+bridge> [ddnet] 20:18 <+bridge> [ddnet] int main(void) 20:18 <+bridge> [ddnet] the output never fits for the parent 20:18 <+bridge> [ddnet] bcs parent does not call `child()` 20:18 <+bridge> [ddnet] i hope this visualized the problem better to u 20:19 <+bridge> [ddnet] note that printf doesnt garantuee any order 20:19 <+bridge> [ddnet] thats also important to know xd 20:19 <+bridge> [ddnet] if that was your problem all along 20:20 <+bridge> [ddnet] your second `printf` was an extra argument 20:20 <+bridge> [ddnet] your second `printf` has an extra argument 20:20 <+bridge> [ddnet] your last `printf` has an extra argument 20:20 <+bridge> [ddnet] https://www.reddit.com/r/rust/comments/ytwxw4/mold_linker_170_released_and_author_seriously/ 20:20 <+bridge> [ddnet] ```c 20:20 <+bridge> [ddnet] #include 20:20 <+bridge> [ddnet] #include 20:20 <+bridge> [ddnet] 20:20 <+bridge> [ddnet] #include 20:20 <+bridge> [ddnet] #include 20:20 <+bridge> [ddnet] 20:20 <+bridge> [ddnet] #include 20:20 <+bridge> [ddnet] 20:20 <+bridge> [ddnet] #define NUM_CHILDS 4 20:20 <+bridge> [ddnet] 20:20 <+bridge> [ddnet] struct mmap_data 20:20 <+bridge> [ddnet] { 20:20 <+bridge> [ddnet] sem_t semaphore; 20:20 <+bridge> [ddnet] int pid; 20:20 <+bridge> [ddnet] int calls; 20:20 <+bridge> [ddnet] }; 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] void child(void *shared) 20:21 <+bridge> [ddnet] { 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] struct mmap_data *data = (struct mmap_data*)shared; 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] sem_wait(&data->semaphore); 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] data->calls++; 20:21 <+bridge> [ddnet] data->pid = getpid(); 20:21 <+bridge> [ddnet] } 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] int main(void) 20:21 <+bridge> [ddnet] { 20:21 <+bridge> [ddnet] @Not Keks 20:21 <+bridge> [ddnet] but only by luck 20:21 <+bridge> [ddnet] true i removed it 20:22 <+bridge> [ddnet] but 20:22 <+bridge> [ddnet] the problem is somewhere else 20:22 <+bridge> [ddnet] the open source community is too focused about source coding 20:22 <+bridge> [ddnet] we'd need a open world 20:23 <+bridge> [ddnet] its sad that mostly software devs live this dream 20:23 <+bridge> [ddnet] shared knowledge 20:23 <+bridge> [ddnet] remove patents 20:25 <+bridge> [ddnet] maybe it would help if we wouldnt see politics as a way to represent us 20:25 <+bridge> [ddnet] but see politics as a way to set goals that the community(basically all humans) want to "at least" archive 20:26 <+bridge> [ddnet] its same with climate change 20:26 <+bridge> [ddnet] 20:26 <+bridge> [ddnet] we talk every day... but we have no real plan 20:26 <+bridge> [ddnet] 20:26 <+bridge> [ddnet] maybe it works, if companies do it by their own, maybe not, bcs companies say "if other company doesnt do it, i wont either" XD 20:26 <+bridge> [ddnet] it often feels like the only communication layer is money xD 20:27 <+bridge> [ddnet] but maybe its simply bcs thats what everyone understands in long and short run 20:29 <+bridge> [ddnet] did u see the news bcs u subbed to the reddit? 20:29 <+bridge> [ddnet] i just wonder how u always find the interesting stuff xD 20:29 <+bridge> [ddnet] i check rust reddit dailly 20:29 <+bridge> [ddnet] hourly maybe 20:29 <+bridge> [ddnet] and hackernews 20:29 <+bridge> [ddnet] https://news.ycombinator.com/news 20:30 <+bridge> [ddnet] i only read phoronix once per day, but indeed he already wrote an article about it 😄 20:30 <+bridge> [ddnet] this one has the most interesting 20:30 <+bridge> [ddnet] for general stuff 20:30 <+bridge> [ddnet] well i often only read headlines anyway xD 20:30 <+bridge> [ddnet] if u read comments 20:31 <+bridge> [ddnet] often people from all the world comment 20:31 <+bridge> [ddnet] authors too 20:31 <+bridge> [ddnet] like people from facebook 20:31 <+bridge> [ddnet] engineers 20:31 <+bridge> [ddnet] and the fbi or smth 20:31 <+bridge> [ddnet] idk 20:32 <+bridge> [ddnet] what is minimum for sponsoring? 20:32 <+bridge> [ddnet] he currently has around 85 supporters 20:32 <+bridge> [ddnet] sponsoring what 20:32 <+bridge> [ddnet] github 20:32 <+bridge> [ddnet] ah 20:32 <+bridge> [ddnet] depends what he got setup 20:33 <+bridge> [ddnet] i got 2 ppl paying me 5$ 20:33 <+bridge> [ddnet] 1€ I guess at least I donate 1€/month to someone 20:33 <+bridge> [ddnet] lol wb codedev 20:33 <+bridge> [ddnet] But you can configure it 20:33 <+bridge> [ddnet] long time no see 20:33 <+bridge> [ddnet] 😦 20:33 <+bridge> [ddnet] yes 20:33 <+bridge> [ddnet] https://github.com/sponsors/edg-l 20:33 <+bridge> [ddnet] ok 1€ is ofc not a lot, if everyone does that 😄 20:33 <+bridge> [ddnet] if u would like to donate 20:34 <+bridge> [ddnet] @Ryozuki how much money u make 20:34 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1041435816158834749/image.png 20:34 <+bridge> [ddnet] 10$ month 20:34 <+bridge> [ddnet] nice 20:34 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1041435897364754562/image.png 20:35 <+bridge> [ddnet] i guess i can buy a meal 20:35 <+bridge> [ddnet] xd 20:35 <+bridge> [ddnet] still cool xd 21:04 <+bridge> [ddnet] uhuhuh time to try it out again ahah 21:04 <+bridge> [ddnet] im finally home 21:04 <+bridge> [ddnet] hi 22:31 <+bridge> [ddnet] > 4. Game server sends challenge to client, client uses its private key token to solve it. Thus evil server hosters can't steal tokens and impersonate players. 22:31 <+bridge> [ddnet] > 22:31 <+bridge> [ddnet] > Evil server hosters can still impersonate players: If someone joins the evil server, it can join a real server and forward the challenge from the real server to the player. The player solves it and now the evil server impersonates the player. 22:31 <+bridge> [ddnet] can't you keep challenge only between the account server and client? 22:32 <+bridge> [ddnet] and how does the game server know if the user is the real one then? 22:35 <+bridge> [ddnet] client sends game server info to account server and account server sends verification to that ip 22:35 <+bridge> [ddnet] and game server? xd 22:36 <+bridge> [ddnet] i mean what does it send 22:36 <+bridge> [ddnet] lets say u connected to a evil server, does the client then send the ip of the evil server? 22:36 <+bridge> [ddnet] or the server info of the evil server? 22:37 <+bridge> [ddnet] the ip 22:37 <+bridge> [ddnet] ok and now the evil server checks if the client is real or not 22:37 <+bridge> [ddnet] but how does that help with the real server? 22:40 <+bridge> [ddnet] ok now im confused 😅 im probably wrong anyways 22:40 <+bridge> [ddnet] tbh the easiest is if the server registers with a public key 22:40 <+bridge> [ddnet] 22:40 <+bridge> [ddnet] that will make the client -> server connection secure 22:40 <+bridge> [ddnet] 22:40 <+bridge> [ddnet] and even if you connect to a evil server the evil server can still not pretent its you, bcs you also send a public key with information that only the server you connected to should know 22:42 <+bridge> [ddnet] i mean you just have to guarantuee: 22:42 <+bridge> [ddnet] evil server can either not decrypt the one way or the other 22:43 <+bridge> [ddnet] Would it be possible to outsource the challenge to an dedicated server? 22:43 <+bridge> [ddnet] Or is every server in charge of handling challenges 22:44 <+bridge> [ddnet] i dont think we have decided yet 22:44 <+bridge> [ddnet] do you fear dos? 22:47 <+bridge> [ddnet] but i guess generally it could also register with a additional address just for challenges 22:47 <+bridge> [ddnet] maybe you could add your reason here 22:47 <+bridge> [ddnet] #3411 22:47 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/3411 22:54 <+bridge> [ddnet] Well I guess its more or less to offload this "authentication" to a dedicated service 22:55 <+bridge> [ddnet] yes, a rust backed auth server sounds the best 🥹 22:55 <+bridge> [ddnet] 😄 22:55 <+bridge> [ddnet] long time ago 22:55 <+bridge> [ddnet] i did this 22:55 <+bridge> [ddnet] https://github.com/edg-l/ddnet-authservice 22:56 <+bridge> [ddnet] I prefer would go for keycloak 👀 22:56 <+bridge> [ddnet] So building in full OAuth2/SAML support 22:56 <+bridge> [ddnet] its nothing serious tho dont lookat it 22:56 <+bridge> [ddnet] I prefer to go for keycloak 👀 22:58 <+bridge> [ddnet] Technically you could use Keycloak for other services too & you're able to federate ^^ 22:59 <+bridge> [ddnet] is keycloak written in java? 22:59 <+bridge> [ddnet] there is also https://github.com/ory/hydra 22:59 <+bridge> [ddnet] which is pretty famous 23:00 <+bridge> [ddnet] https://github.com/ory/kratos 23:02 <+bridge> [ddnet] Yes, Keycloak is written in Java EE 23:02 <+bridge> [ddnet] ew 23:03 <+bridge> [ddnet] i cant find anything in rust so 23:03 <+bridge> [ddnet] Its not that bad for Java EE 🙂 23:03 <+bridge> [ddnet] If it's optional ok. I just would prefer if my game server didn't need to connect to other servers 23:04 <+bridge> [ddnet] well this exists https://docs.rs/oauth2/latest/oauth2/ 23:04 <+bridge> [ddnet] That can always lead to being abused 23:04 <+bridge> [ddnet] Thats why you should use OAuth2 23:04 <+bridge> [ddnet] i also prefer a fully federated option 23:04 <+bridge> [ddnet] Share the public key with your gameservers from the keycloak instance 23:05 <+bridge> [ddnet] Keycloak signs a JWT after successful login & you can verify it on the server 23:05 <+bridge> [ddnet] https://activitypub.rocks/ 23:05 <+bridge> [ddnet] @heinrich5991 you have to read all this xd 23:06 <+bridge> [ddnet] i think he is on a trip 23:06 <+bridge> [ddnet] mentioned a flight yesterday 23:06 <+bridge> [ddnet] or before idk 23:06 <+bridge> [ddnet] Just so he doesn't forget 23:06 <+bridge> [ddnet] but he does read everything yeah 23:06 <+bridge> [ddnet] hi heinrich from the future 23:06 <+bridge> [ddnet] :PES3_WeirdSip: 23:11 <+bridge> [ddnet] well ty for that, I think I got it