00:18 <+bridge> [ddnet] from the body and feet value how can i get rgb color? 00:18 <+bridge> [ddnet] How 15925091 is 255,99,146 in rgb 00:18 <+bridge> [ddnet] How 15925091 can be 255,99,146 in rgb 00:20 <+bridge> [ddnet] player_color_body and color_body_feet should display rbg values 00:20 <+bridge> [ddnet] player_color_body and player_color_feet should display rbg values 00:21 <+bridge> [ddnet] yes but i want generate 3 random value for rgb m_ClPlayerColorBody 00:21 <+bridge> [ddnet] but i must convert this in some weird value sus 00:37 <+bridge> [ddnet] In code you can use a `color_cast` 00:42 <+bridge> [ddnet] `g_Config.m_ClPlayerColorBody = color_cast(ColorRGBA(1.0f, 99.0f/255, 146.0f/255)).Pack(0.5f, false);` should(tm) be what you want roughly 01:06 <+bridge> [ddnet] u know how can i use random in this code? im cpp nub 01:28 <+bridge> [ddnet] g_Config.m_ClPlayerColorBody = color_cast(ColorRGBA(rand() % 2 * 255,rand() % 2 * 255,rand() % 2 * 255)).Pack(0.5f, false); 01:28 <+bridge> [ddnet] thats work but bringhtness always 255 01:28 <+bridge> [ddnet] why? 01:55 <+bridge> [ddnet] Thx 05:32 <+bridge> [ddnet] I have no idea how react native works. 05:34 <+bridge> [ddnet] The frontend guy messed up his fetch and show pattern, and everything is queried on the spot and can't retain after a window is closed. 05:34 <+bridge> [ddnet] :justatest: 05:34 <+bridge> [ddnet] So I thought it might be easier for him if there's a straight up web framework to use 05:35 <+bridge> [ddnet] Since we had TypeScript in unity already. I just dragged mithril.js in and wrote some fake DOM that creates, reorder and delete unity objects. 06:28 <+bridge> [ddnet] Yesd 07:54 <+bridge> [ddnet] Yes 08:20 <+bridge> [ddnet] https://seri.tools/blog/announcing-rust9x/ 08:20 <+bridge> [ddnet] lol 08:21 <+bridge> [ddnet] oldschool cool 10:12 <+bridge> [ddnet] i hate 10:12 <+bridge> [ddnet] c++ dep management 10:12 <+bridge> [ddnet] cmake sux 10:13 <+bridge> [ddnet] 30 mins trying to find libsodium 10:13 <+bridge> [ddnet] with rust i just do cargo add sodium 10:13 <+bridge> [ddnet] :feelsbadman: 10:13 <+bridge> [ddnet] trying to port xpanic to ddnet-skeleton 10:13 <+bridge> [ddnet] so its modern 10:14 <+bridge> [ddnet] btw current xpanic stores password in clear text in files 10:14 <+bridge> [ddnet] xd 10:19 <+ChillerDragon> I could swear it used to work to connect to servers using ``./DDNet "password foo"`` but if i understand the code correctly that does not work anymore since 4 years 10:19 <+ChillerDragon> super weird 10:19 <+ChillerDragon> https://github.com/ddnet/ddnet/blob/5c98d9227fec63a7617704a35858bb51b695b5e1/src/engine/client/client.cpp#L4185 10:20 <+ChillerDragon> So headless clients wont be able to join passworded servers. But i have done that already -.- 10:38 <+bridge> [ddnet] it warns about that very loudly before you register. ddnet saves are also plaintext codes, just in a sql db 10:39 <+bridge> [ddnet] ChillerDragon: You have to connect a second time, then it gets sent 10:43 <+bridge> [ddnet] well ill try to do it correctly 10:44 <+bridge> [ddnet] even if the password is still sent cleartext over udp xd 10:44 <+bridge> [ddnet] i figured the cmake thing finally 10:44 <+bridge> [ddnet] btw the database interface is p nice 10:44 <+bridge> [ddnet] i have sqlite and mysql support now xd 11:14 <+bridge> [ddnet] https://github.com/geekan/HowToLiveLonger 11:15 <+bridge> [ddnet] How to live longer. Step 1: Learn chinese 11:15 <+bridge> [ddnet] Damn, I'm dying early then 😦 11:16 <+bridge> [ddnet] looks like a ACM meme more than anything 11:17 <+bridge> [ddnet] oh shit 11:17 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/966991131994894346/unknown.png 11:17 <+bridge> [ddnet] looks like you have to sleep exactly 7 hours. 11:18 <+bridge> [ddnet] I frequently sleep 9 or more hours, fuck 11:18 <+bridge> [ddnet] one of the tips are to eat less egg yolk 11:19 <+bridge> [ddnet] and eat more nuts 11:19 <+bridge> [ddnet] I love egg yolks :/ I seem to be doing everything wrong 11:21 <+bridge> [ddnet] I'm actually wondering 11:22 <+bridge> [ddnet] Is there a way to redirect sunlight into my workplace but not onto my monitor during the whole day 11:22 <+bridge> [ddnet] :kek: 11:22 <+bridge> [ddnet] I can imagine an elaborate setup with mirrors 11:22 <+bridge> [ddnet] Sounds like a product I'd like to have 11:23 <+bridge> [ddnet] the tricky part is that the sun moves 11:23 <+bridge> [ddnet] i think the data may be biased, for example, older ppl tend to sleep less 11:23 <+bridge> [ddnet] but older ppl may die too 11:23 <+bridge> [ddnet] xd 11:23 <+bridge> [ddnet] 👀 older ppl die faster as well 11:24 <+bridge> [ddnet] and the cause of mortality in the charts is "all-cause" 11:24 <+bridge> [ddnet] which means ppl dieying of old age 11:24 <+bridge> [ddnet] based 11:24 <+bridge> [ddnet] iirc if u sleep 8 hours ur good 11:24 <+bridge> [ddnet] that's what i've heard 11:25 <+bridge> [ddnet] i dont think 7-9 matters much 11:25 <+bridge> [ddnet] ppl kill themselves 11:25 <+bridge> [ddnet] e.g drinking 11:25 <+bridge> [ddnet] and nobody cares 11:25 <+bridge> [ddnet] xd 11:25 <+bridge> [ddnet] dID yOu JuSt SaY dRiNkInG? 11:26 <+bridge> [ddnet] :Susge: 11:26 <+bridge> [ddnet] :PES3_Sus: 11:26 <+bridge> [ddnet] i'm offended 11:26 <+bridge> [ddnet] why 11:26 <+bridge> [ddnet] and I don't drink 11:26 <+bridge> [ddnet] i do sometimes 11:26 <+bridge> [ddnet] xd 11:26 <+bridge> [ddnet] And chronic depression sufferers sleep more and they also die more, I hope they accounted for those, otherwise worthless research 11:26 <+bridge> [ddnet] well then I do sometimes as well 11:26 <+bridge> [ddnet] usually not willingly tho 11:26 <+bridge> [ddnet] @Learath2 did u know most research ends up being useless 11:26 <+bridge> [ddnet] also 11:26 <+bridge> [ddnet] academic is plagued with filler research 11:26 <+bridge> [ddnet] just to get numbers 11:26 <+bridge> [ddnet] the more cited u are 11:26 <+bridge> [ddnet] the more "good" 11:26 <+bridge> [ddnet] but thats plain wrong 11:27 <+bridge> [ddnet] u need to find a needle in a haystack to find good research 11:27 <+bridge> [ddnet] the pages is deliberately being funny than accurate i think 11:27 <+bridge> [ddnet] the page is deliberately being funny than accurate i think 11:27 <+bridge> [ddnet] also that u have to pay to read a paper is plain wrong 11:27 <+bridge> [ddnet] humanity deserves to die 11:28 <+bridge> [ddnet] since ACM literally means that ICPC thing which a lot of CS students does. 11:28 <+bridge> [ddnet] do* 11:28 <+bridge> [ddnet] I think my english got worse and worse ever since I came back to china 11:28 <+bridge> [ddnet] :kek: 11:29 <+bridge> [ddnet] luckily heinrich isn't here tho 11:29 <+bridge> [ddnet] xd 11:34 <+bridge> [ddnet] heinrich is back :Celebrate: 11:34 <+bridge> [ddnet] 👀 11:35 <+bridge> [ddnet] I mean he isn't online 11:35 <+bridge> [ddnet] 11:35 <+bridge> [ddnet] its 11:35 11:35 <+bridge> [ddnet] maybe he is working 11:35 <+bridge> [ddnet] without discord 11:35 <+bridge> [ddnet] :monkalaugh: 11:35 <+bridge> [ddnet] I should be working rn 11:35 <+bridge> [ddnet] same 11:35 <+bridge> [ddnet] wht timee is it there 11:35 <+bridge> [ddnet] 5:35pm 11:36 <+bridge> [ddnet] This competitive programming thing is one of the most senseless attempts at "ranking" programmers. It's just one of those things that should never be used as a metric 11:37 <+bridge> [ddnet] I did it for like 5 years in middle school and high school 11:37 <+bridge> [ddnet] my college invited me but I didn't go 11:39 <+bridge> [ddnet] btw https://mithril.js.org/ is pretty lit 11:39 <+bridge> [ddnet] I mean it's fun surely, but it's not really useful. Should be done like a leasure sport 11:39 <+bridge> [ddnet] competitive programming tests is just algorithm solving 11:39 <+bridge> [ddnet] imagine if the tests where about figuring a data race in a 200k line code base or smth 11:39 <+bridge> [ddnet] xd 11:39 <+bridge> [ddnet] more like "problem" solving with a algorithm database baked into your head. 11:40 <+bridge> [ddnet] which you spent three years remembering. 11:40 <+bridge> [ddnet] ye 11:40 <+bridge> [ddnet] but there is undeniably smart ppl there 11:40 <+bridge> [ddnet] ~~like me~~ 11:40 <+bridge> [ddnet] I'd seen this on lichess' stack but hadn't checked it out yet. If you could describe it in one sentence, what would that sentence be? 11:40 <+bridge> [ddnet] https://en.wikipedia.org/wiki/Gennady_Korotkevich 11:40 <+bridge> [ddnet] this guy is good 11:41 <+bridge> [ddnet] "tourist" 11:41 <+bridge> [ddnet] his setup screams he is a mathematician tho 11:41 <+bridge> [ddnet] he uses windows 11:41 <+bridge> [ddnet] its actually a weird setup 11:42 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/966997295973421076/unknown.png 11:42 <+bridge> [ddnet] xd 11:42 <+bridge> [ddnet] imagine having this blue screaming screen 11:42 <+bridge> [ddnet] Has he made anything that's not just golfing code? 11:42 <+bridge> [ddnet] small, simple and easy to get into without reading five pages of getting started and can't get it started. 11:42 <+bridge> [ddnet] > Gennady is the highest-rated programmer on Codeforces,[2] CodeChef,[3] Topcoder,[4] AtCoder [jp][5] and HackerRank.[6] In January 2022, he achieved an historic rating of 3979 on Codeforces, becoming the first to break the 3900 barrier. 11:42 <+bridge> [ddnet] xd 11:42 <+bridge> [ddnet] idk 11:43 <+bridge> [ddnet] > Known for Programming prodigy; highly ranked sport programmer from an early age 11:43 <+bridge> [ddnet] lmao 11:43 <+bridge> [ddnet] mainly small tho 11:43 <+bridge> [ddnet] Sounds nice, maybe I'll make something with it to see how it feels compared to vue 11:43 <+bridge> [ddnet] the true prodigy ppl imho is ppl like the one i sent a article yesterday 11:43 <+bridge> [ddnet] about sorting algos 11:43 <+bridge> [ddnet] those are the real smart ppl 11:44 <+bridge> [ddnet] I've used vue twice 11:44 <+bridge> [ddnet] I think mithril might be better. But I did setup my own webpack config 11:44 <+ChillerDragon> @deen but ``./DDNet "connect localhost;connect localhost"`` does not connect twice. So for a headless client its non trivial 11:44 <+bridge> [ddnet] Exactly, imo the amount of time it takes someone to produce work of that quality is not very important 11:44 <+bridge> [ddnet] I think vue takes care of boilerplates 11:45 <+bridge> [ddnet] > Guild Wars 2 uses Mithril (yes, inside the game!) 11:45 <+bridge> [ddnet] Huh, someone already took my game ui idea and ran with it 11:45 <+bridge> [ddnet] ok 11:46 <+bridge> [ddnet] i'm doing it too 11:46 <+bridge> [ddnet] wats Mithril 11:46 <+bridge> [ddnet] never tried to get vue or react into unity yet. but mithril only needs a handful of dom implementation to work 11:46 <+bridge> [ddnet] ii only know it from final fantasy 11:46 <+bridge> [ddnet] :greenthing: 11:47 <+bridge> [ddnet] I just wrapped some unity code inside a js class with appendChild insertBefore and removeChild and it just works 11:47 <+bridge> [ddnet] to a certain degree 11:48 <+bridge> [ddnet] :kek: 11:48 <+bridge> [ddnet] @Learath2 https://devblogs.microsoft.com/oldnewthing/20220418-00/?p=106489 11:49 <+bridge> [ddnet] a blog from the microsoft guy 11:49 <+bridge> [ddnet] Raymond C 11:49 <+bridge> [ddnet] i think someone mentioned him one day 11:49 <+bridge> [ddnet] who 11:49 <+bridge> [ddnet] heinrich 11:49 <+bridge> [ddnet] https://discord.com/channels/252358080522747904/293493549758939136/927820019432325161 11:49 <+bridge> [ddnet] I posted a couple of his blogposts before aswell 11:49 <+bridge> [ddnet] @heinrich5991 hehe 12:19 <+bridge> [ddnet] dieying 12:28 <+bridge> [ddnet] i don't see a problem 13:32 <+bridge> [ddnet] https://devblogs.microsoft.com/oldnewthing/20220228-00/?p=106296 the next one he links to is also nice 14:30 <+bridge> [ddnet] how can I make the client send a chat message as if the player had sent it? 14:31 <+bridge> [ddnet] how can I make the client send a chat message as the player had sent it? 14:31 <+bridge> [ddnet] how can I make the client send a chat message as the player ? 14:37 <+bridge> [ddnet] `CChat::Say` 16:00 <+bridge> [ddnet] from menu settings if i want send Test message in global chat ((CChat *)pUserData)->Say(0, ("Test")) 16:00 <+bridge> [ddnet] but pUserData what is 16:00 <+bridge> [ddnet] void CChat::ConSay(IConsole::IResult *pResult, void *pUserData) 16:00 <+bridge> [ddnet] { 16:00 <+bridge> [ddnet] ((CChat *)pUserData)->Say(0, pResult->GetString(0)); 16:00 <+bridge> [ddnet] } 16:00 <+bridge> [ddnet] void CChat::ConSay(IConsole::IResult *-pResult, void *pUserData) 16:00 <+bridge> [ddnet] { 16:00 <+bridge> [ddnet] ((CChat *)pUserData)->Say(0, pResult->GetString(0)); 16:00 <+bridge> [ddnet] } 16:00 <+bridge> [ddnet] void CChat::ConSay(IConsole::IResult *pResult, void **pUserData) 16:00 <+bridge> [ddnet] { 16:01 <+bridge> [ddnet] ((CChat *)pUserData)->Say(0, pResult->GetString(0)); 16:01 <+bridge> [ddnet] } 16:01 <+bridge> [ddnet] I smell someone doing pattern match coding 😄 16:01 <+bridge> [ddnet] idk what u mean xd 16:02 <+bridge> [ddnet] I have a feeling you don't actually know C++ but you are just imitating the code we have by form 16:03 <+bridge> [ddnet] exactly xd 16:03 <+bridge> [ddnet] and i have to say it's not very easy haha 16:05 <+bridge> [ddnet] Anyway, from `CMenus` you want to go through the gameclient `GameClient()`, to get to `CGameClient::m_Chat`, on which you can just use `CChat::Say`. So something like `GameClient()->m_Chat.Say(0, "Test"));` 16:05 <+bridge> [ddnet] You will have a much better time if you just take some time to learn C++ 16:13 <+bridge> [ddnet] haha 16:16 <+bridge> [ddnet] bellard.org 16:16 <+bridge> [ddnet] https://bellard.org, about prodigys 16:17 <+bridge> [ddnet] is this a guy? is this a collection of random projects? 16:17 <+bridge> [ddnet] no about so cant know 16:18 <+bridge> [ddnet] if that's one guy that's insane 16:18 <+bridge> [ddnet] ye 16:18 <+bridge> [ddnet] qemu alone 16:18 <+bridge> [ddnet] is insane 16:18 <+bridge> [ddnet] xd 16:18 <+bridge> [ddnet] Fabrice Bellard yes it is 16:18 <+bridge> [ddnet] Known for "FFmpeg, QEMU, and the Tiny C Compiler." Now that is talent 16:18 <+bridge> [ddnet] > Fabrice Bellard is a French computer programmer known for writing FFmpeg, QEMU, and the Tiny C Compiler. He developed Bellard's formula for calculating single digits of pi. In 2012 16:18 <+bridge> [ddnet] ye 16:18 <+bridge> [ddnet] both 3 projects are insanely famous 16:19 <+bridge> [ddnet] i see that tiny c compiler mentioned everywhere 16:19 <+bridge> [ddnet] Insanely famous and massive in scale 16:19 <+bridge> [ddnet] i know another prodigy 16:19 <+bridge> [ddnet] https://stallman.org/ 16:20 <+bridge> [ddnet] @Learath2 16:20 <+bridge> [ddnet] Thank god Bellard's 50yo and not some 17yo with all those accomplishments 16:20 <+bridge> [ddnet] Makes me feel way better 16:20 <+bridge> [ddnet] xd 16:21 <+bridge> [ddnet] lets be real 16:21 <+bridge> [ddnet] most here probs wont achieve even a single project like that 16:21 <+bridge> [ddnet] and thats fine 16:21 <+bridge> [ddnet] accept urself 16:21 <+bridge> [ddnet] :BASED: 16:21 <+bridge> [ddnet] altho i always feel like programming is relatively young field 16:21 <+bridge> [ddnet] there is shitload more devs now 16:21 <+bridge> [ddnet] and in 40 years they will all be seniors 16:22 <+bridge> [ddnet] who knows what will be done 16:22 <+bridge> [ddnet] We all contributed to ddnet, the pinnacle of open source multiplayer gaming :TOOBASED: 16:22 <+bridge> [ddnet] :TOOBASED: 16:22 <+bridge> [ddnet] i cant wait to be 50y old and preach about the good old rust 16:22 <+bridge> [ddnet] and how todays lang suck 16:23 <+bridge> [ddnet] :greenthing: 16:23 <+bridge> [ddnet] actually that cant wait 16:23 <+bridge> [ddnet] ii dont wanna be 50y old 16:23 <+bridge> [ddnet] :monkalaugh: 16:23 <+bridge> [ddnet] can* 16:23 <+bridge> [ddnet] fck i cant type 16:23 <+bridge> [ddnet] We are also too late to make simpler ideas like these work. Back when this guy started on ffmpeg there was like 2 video codecs on earth 😛 16:24 <+bridge> [ddnet] true but im sure there is a lot to be done 16:24 <+bridge> [ddnet] Nowadays your best bet at making influential software is to foray into weird niche fields that require so much damn knowledge 16:25 <+bridge> [ddnet] Back in the day people used to make innovations like "mail but over the internet instead of over human carriers" 16:25 <+bridge> [ddnet] Isn't all human creation pattern matching? 😄 With experience the patterns just get better 16:26 <+bridge> [ddnet] well i think there needs to be some understanding 16:27 <+bridge> [ddnet] I guess at some degree it is, but what I was trying to point out there is that pattern matching without knowledge about the patterns is really prone to breaking 16:27 <+bridge> [ddnet] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4141622/ 16:27 <+bridge> [ddnet] pog 16:28 <+bridge> [ddnet] @Learath2 the new sorting algorithms 16:28 <+bridge> [ddnet] from that article 16:28 <+bridge> [ddnet] xd 16:29 <+bridge> [ddnet] i bet learath opens a restaurant in his life 16:30 <+bridge> [ddnet] i always thought a restaurant is a nice place to problem solve 16:30 <+bridge> [ddnet] specially with technology 16:30 <+bridge> [ddnet] xd 16:30 <+bridge> [ddnet] we always did brainstorming in restuarants with friends back in the school days 😄 16:30 <+bridge> [ddnet] we even did a lan party once xD 16:31 <+bridge> [ddnet] xd 16:31 <+bridge> [ddnet] they were ok wiht it 16:31 <+bridge> [ddnet] as long as u bring lot of ppl who pay 16:31 <+bridge> [ddnet] they are fine usually 16:31 <+bridge> [ddnet] xd 16:31 <+bridge> [ddnet] they are fine with it usually 16:31 <+bridge> [ddnet] Yeah look at those, back in Shell's day he could propose things like "sort by swapping BUT with gaps" 16:31 <+bridge> [ddnet] Now you want to improve sorting you need to do regression learning to drop a single instruction and vector dark magic to utilize cache better 16:32 <+bridge> [ddnet] xd 16:32 <+bridge> [ddnet] the same thing happens with math physics etc 16:32 <+bridge> [ddnet] Yep, the fields are getting so complicated :/ 16:32 <+bridge> [ddnet] well i think u have to specialize 16:32 <+bridge> [ddnet] u cant know everything 16:32 <+bridge> [ddnet] Unless you are into entrepreneurship you won't achieve shit in your lifetime 16:33 <+bridge> [ddnet] if we so advanced why not all games run at million fps 16:33 <+bridge> [ddnet] (I won't either, the "you" there was general) 16:33 <+bridge> [ddnet] i always thought that 16:33 <+bridge> [ddnet] i want to reach that age 16:33 <+bridge> [ddnet] xd 16:34 <+bridge> [ddnet] the point where u dont even need to thing about how much memory u use 16:34 <+bridge> [ddnet] We are here 😄 16:34 <+bridge> [ddnet] lets build a Matrioshka brain 16:34 <+bridge> [ddnet] https://en.wikipedia.org/wiki/Matrioshka_brain 16:36 <+bridge> [ddnet] well im talking to levels like where u accidentally make a program that overflows the stack but u have to wait days till it actually does 16:36 <+bridge> [ddnet] :BASED: 16:37 <+bridge> [ddnet] The world if chromium developers cared about memory usage 16:37 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/967071545707081738/unknown.png 16:37 <+bridge> [ddnet] xD 16:37 <+bridge> [ddnet] the computer needed to open 20 tabs in chrome 16:37 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/967071662115795024/unknown.png 16:38 <+bridge> [ddnet] does chromium use lot of mem cuz they leak a lot? 16:38 <+bridge> [ddnet] maybe its just the js engine uses shitload of ram 16:38 <+bridge> [ddnet] bcs every chrome tab is a full OS xd 16:38 <+bridge> [ddnet] idk the inner workins of that 16:38 <+bridge> [ddnet] xd 16:39 <+bridge> [ddnet] No one does probably, if there is one thing browser devs care about less than memory usage, it's code line count 16:39 <+bridge> [ddnet] xd 16:40 <+bridge> [ddnet] ye isnt chromium larger than linux 16:40 <+bridge> [ddnet] most likely 16:40 <+bridge> [ddnet] with the drivers included 16:40 <+bridge> [ddnet] ouch really? 16:40 <+bridge> [ddnet] over 26mio lines 16:40 <+bridge> [ddnet] sounds horribl 16:40 <+bridge> [ddnet] e 16:41 <+bridge> [ddnet] soon we need 1gb L3 cache or just run smoething smooth 16:41 <+bridge> [ddnet] 35mil in chromium, 28mil in the linux kernel 16:42 <+bridge> [ddnet] openrc has about 15k LoC, systemd has about 1.3mil 16:44 <+bridge> [ddnet] <ᶰ°Konͧsti> how comes that my dummy hammer is so fast after running 8 days straight :MonkaS: 16:44 <+bridge> [ddnet] <ᶰ°Konͧsti> https://cdn.discordapp.com/attachments/293493549758939136/967073351245910066/wat.demo.mp4 16:45 <+bridge> [ddnet] Google claims their internal repo is 2 billion lines of code btw 😄 16:45 <+bridge> [ddnet] do they use a monorepo? 16:45 <+bridge> [ddnet] ez 16:45 <+bridge> [ddnet] yes 16:45 <+bridge> [ddnet] <ᶰ°Konͧsti> how comes that my cl_dummy_hammer is so fast after running 8 days straight? :MonkaS: 16:45 <+bridge> [ddnet] <ᶰ°Konͧsti> https://cdn.discordapp.com/attachments/293493549758939136/967073771041194004/wat.demo.mp4 16:46 <+bridge> [ddnet] oh god 16:46 <+bridge> [ddnet] probs some weird floating point stuff 16:46 <+bridge> [ddnet] is the client running 8 days? 16:46 <+bridge> [ddnet] monorepo is really nice when you can just update a lib and all usages at once instead of needing backwards compat 16:46 <+bridge> [ddnet] <ᶰ°Konͧsti> but when i turned off and on it worked normal 16:46 <+bridge> [ddnet] ah maybe it has some start time or smth 16:46 <+bridge> [ddnet] for the internal interval 16:47 <+bridge> [ddnet] open an issue on github 16:47 <+bridge> [ddnet] so we dont forget 16:47 <+bridge> [ddnet] <ᶰ°Konͧsti> nah i dont think its worth an issue 16:47 <+bridge> [ddnet] <ᶰ°Konͧsti> nobody uses normal dummy hammer anyway 16:48 <+bridge> [ddnet] then we should still remove it or fix it 16:49 <+bridge> [ddnet] <ᶰ°Konͧsti> i were just afk on that map with dummy hammer on for 8 days 16:49 <+bridge> [ddnet] lol 16:49 <+bridge> [ddnet] Easy to reproduce then 16:49 <+bridge> [ddnet] Truly a bug only konsti could find 16:49 <+bridge> [ddnet] <ᶰ°Konͧsti> :afk: 16:49 <+bridge> [ddnet] could also be a visual bug like I posted in #bugs 16:51 <+bridge> [ddnet] every non finite time calculation should be changed to either use double if not other wise fixable, or fix otherwise xd 16:51 <+bridge> [ddnet] or no floating point even better xd 16:51 <+bridge> [ddnet] I don't think there is any time calculation for dummy hammer 16:51 <+bridge> [ddnet] some interval 16:52 <+bridge> [ddnet] it just increments on each OnSnapInput call 16:53 <+bridge> [ddnet] mh when turning off and on again fixes it, it kinda must be something related to weird math 16:53 <+bridge> [ddnet] I think this could be the cause: 16:53 <+bridge> [ddnet] ``` 16:53 <+bridge> [ddnet] if(NewPredTick > m_PredTick[g_Config.m_ClDummy]) 16:53 <+bridge> [ddnet] { 16:53 <+bridge> [ddnet] m_PredTick[g_Config.m_ClDummy] = NewPredTick; 16:53 <+bridge> [ddnet] Repredict = true; 16:54 <+bridge> [ddnet] 16:54 <+bridge> [ddnet] // send input 16:54 <+bridge> [ddnet] SendInput(); 16:54 <+bridge> [ddnet] } 16:54 <+bridge> [ddnet] ``` 16:54 <+bridge> [ddnet] Maybe the tick flows over or something? 16:54 <+bridge> [ddnet] possible too yeah 16:55 <+bridge> [ddnet] I could say we could wait 8 more days to test it again with debug mode on, but, 8 days *is* 8 days. 16:56 <+bridge> [ddnet] if the tick overflows it should actually be unrelated to the days 16:56 <+bridge> [ddnet] can even happen after 1 second 16:56 <+bridge> [ddnet] it's only an int, so max 2147483647, but 8 days would only be 34560000 ticks, so not nearly enough 16:56 <+bridge> [ddnet] isnt it server time tho 16:57 <+bridge> [ddnet] my guess would be that m_DummyFire flows over into negativ , the result of the calculation here: https://github.com/C0D3D3V/ddnet/blob/9dc2141ded307f013402e7d84c66bc793b45cc6c/src/game/client/gameclient.cpp#L422 16:57 <+bridge> [ddnet] would always be negativ, so every tick a hammer would be made 16:57 <+bridge> [ddnet] Server time would be 497 days to overflow I guess 16:57 <+bridge> [ddnet] is there a benefit from using int to int64 16:57 <+bridge> [ddnet] yes 16:57 <+bridge> [ddnet] sounds reasonable 16:57 <+bridge> [ddnet] bcs it uses floats xd 16:58 <+bridge> [ddnet] saves u 4 bytes, but i'd say a modern tw could also upper some limits 16:58 <+bridge> [ddnet] server time should not overflow not even after 1 year 16:59 <+bridge> [ddnet] ye xd 16:59 <+bridge> [ddnet] @Not Keks actually 16:59 <+bridge> [ddnet] using int i dont think it guarantees its 32 16:59 <+bridge> [ddnet] it may be 64 16:59 <+bridge> [ddnet] it doesnt but our target platforms use 32bit 16:59 <+bridge> [ddnet] in the code we also rely on it sometimes 17:00 <+bridge> [ddnet] remember its teeworlds 17:00 <+bridge> [ddnet] it hates standard 17:00 <+bridge> [ddnet] xd 17:00 <+bridge> [ddnet] xD we could use mpz_int instead of int 😄 these can get as big as you have memory, or just use rings for ticks and time related stuff 17:00 <+bridge> [ddnet] so int32 and stuff like that wasnt used 17:01 <+bridge> [ddnet] do 128bit floats exist? 17:01 <+bridge> [ddnet] yes 17:01 <+bridge> [ddnet] long double 17:01 <+bridge> [ddnet] but only linux i think 17:01 <+bridge> [ddnet] but that would also require 497 days to overflow I think 17:01 <+bridge> [ddnet] but floats 17:01 <+bridge> [ddnet] floats hate u 17:01 <+bridge> [ddnet] m_DummyFire is an int 17:01 <+bridge> [ddnet] if((m_DummyFire / 12.5f) - (int)(m_DummyFire / 12.5f) > 0.01f) 17:02 <+bridge> [ddnet] but it gets converted 17:02 <+bridge> [ddnet] mh true 17:02 <+bridge> [ddnet] Sure, could be this float calculation getting more imprecise (but not an overflow) 17:03 <+bridge> [ddnet] yeah ;D 17:03 <+bridge> [ddnet] we have bugs like these quite often 17:03 <+bridge> [ddnet] i also dont understand why float calculation here is even used 17:03 <+bridge> [ddnet] can just use integer math 17:04 <+bridge> [ddnet] int64 to be safe 17:04 <+bridge> [ddnet] I well just run some test code... to see if it overflows after 8 days ... one moment xD 17:04 <+bridge> [ddnet] its not about overflowing 17:04 <+bridge> [ddnet] the calculation will evaluate to true too often 17:04 <+bridge> [ddnet] and then the ticks get updated all the time or smth like that 17:05 <+bridge> [ddnet] or to false 17:05 <+bridge> [ddnet] I will check it ... 17:05 <+bridge> [ddnet] makes more sense 17:06 <+bridge> [ddnet] I think because 12.5 felt good to me for flying, and that's not an integer 😄 17:06 <+bridge> [ddnet] xd 17:07 <+bridge> [ddnet] many games in the past used floats to store current game time(added every time the game loop runs).. after like 20 minutes they are around 50ms off 17:11 <+bridge> [ddnet] jupstar is right xD 17:12 <+bridge> [ddnet] https://seri.tools/blog/announcing-rust9x/ 17:13 <+bridge> [ddnet] the condition is not true way before the int overfloats 17:18 <+bridge> [ddnet] it gets already imprecise at m_DummyFire = 13107213, then it hammers 3 times in a row, at some value it hammers constantly 17:20 <+bridge> [ddnet] 10 times in a row at 67108869 17:20 <+bridge> [ddnet] 50 at 104857646 17:21 <+bridge> [ddnet] 100 at 104857696 17:21 <+bridge> [ddnet] I used this code: 17:21 <+bridge> [ddnet] ``` 17:21 <+bridge> [ddnet] int m_DummyFire = 0; 17:21 <+bridge> [ddnet] int hammerd = 0; 17:21 <+bridge> [ddnet] int debug = 0; 17:21 <+bridge> [ddnet] while(m_DummyFire != -4000) 17:21 <+bridge> [ddnet] { 17:21 <+bridge> [ddnet] if((m_DummyFire / 12.5f) - (int)(m_DummyFire / 12.5f) > 0.01f) 17:21 <+bridge> [ddnet] { 17:21 <+bridge> [ddnet] m_DummyFire++; 17:21 <+bridge> [ddnet] hammerd = 0; 17:21 <+bridge> [ddnet] continue; 17:21 <+bridge> [ddnet] } 17:21 <+bridge> [ddnet] if(hammerd == 1) 17:21 <+bridge> [ddnet] { 17:21 <+bridge> [ddnet] debug = 0; 17:21 <+bridge> [ddnet] } 17:21 <+bridge> [ddnet] if(hammerd == 10) 17:21 <+bridge> [ddnet] { 17:21 <+bridge> [ddnet] debug = 0; 17:21 <+bridge> [ddnet] } 17:22 <+bridge> [ddnet] if(hammerd == 50) 17:22 <+bridge> [ddnet] { 17:22 <+bridge> [ddnet] debug = 0; 17:22 <+bridge> [ddnet] } 17:22 <+bridge> [ddnet] if(hammerd == 100) 17:22 <+bridge> [ddnet] { 17:22 <+bridge> [ddnet] debug = 0; 17:22 <+bridge> [ddnet] } 17:22 <+bridge> [ddnet] m_DummyFire++; 17:22 <+bridge> [ddnet] hammerd++; 17:22 <+bridge> [ddnet] I used this code: 17:22 <+bridge> [ddnet] ``` 17:22 <+bridge> [ddnet] int m_DummyFire = 0; 17:22 <+bridge> [ddnet] int hammerd = 0; 17:22 <+bridge> [ddnet] int debug = 0; 17:22 <+bridge> [ddnet] while(m_DummyFire != -4000) 17:22 <+bridge> [ddnet] { 17:22 <+bridge> [ddnet] if((m_DummyFire / 12.5f) - (int)(m_DummyFire / 12.5f) > 0.01f) 17:22 <+bridge> [ddnet] { 17:22 <+bridge> [ddnet] m_DummyFire++; 17:22 <+bridge> [ddnet] hammerd = 0; 17:23 <+bridge> [ddnet] 100 at 104857696 17:23 <+bridge> [ddnet] 1000 at 104858596 17:24 <+bridge> [ddnet] 100 at 104857696 17:24 <+bridge> [ddnet] 1000000 at 105857596 17:24 <+bridge> [ddnet] 100 at 104857696 17:24 <+bridge> [ddnet] 1000000 at 105857596 17:25 <+bridge> [ddnet] so after 2.14 days it is imprecise 17:25 <+bridge> [ddnet] after 11 days it hammers 10 times in a row 17:27 <+bridge> [ddnet] by changing 12.5f to 12.5 and 0.01f to 0.01, it does not get inpercise before the int oveflows to -2147483647 17:28 <+bridge> [ddnet] just change it to ints if you want to fix the "problem" 😛 17:29 <+bridge> [ddnet] you mean unsinged int 17:29 <+bridge> [ddnet] with int we will always have the wrong calculation after 497days 17:29 <+bridge> [ddnet] xD 17:29 <+bridge> [ddnet] who ever plays that long 17:29 <+bridge> [ddnet] after 497 days, something else probably had a bug first 17:32 <+bridge> [ddnet] we could just use m_DummyFire % 25 == 0 and reset m_DummyFire to 0 every hammer 17:33 <+bridge> [ddnet] I make the patch 17:33 <+bridge> [ddnet] nice 17:36 <+bridge> [ddnet] Why not just make m_DummyFire unsigned and do % 25? 17:37 <+bridge> [ddnet] Don't ever need to reset to 0 that way 17:38 <+bridge> [ddnet] But it will be inaccurate for one time after 497 days 😄 17:40 <+bridge> [ddnet] Yes you are right... I will do that... I also wanted to do that first, but thought, why not reset it every time, we do not need the value anyway. We could also just use a byte to save memory xD lol 17:40 <+bridge> [ddnet] If we use an exact power of two it won't be, let's check if % 32 feels good for dummy fly 😛 17:41 <+bridge> [ddnet] heathen 17:42 <+bridge> [ddnet] but a byte would be inaccurate more often 17:42 <+bridge> [ddnet] instead of once every 497day teeworlds session 17:43 <+bridge> [ddnet] (they were saying "by resetting it to 0 each time, you don't even need 32 bit, you can fit it into 8 bit") 17:45 <+bridge> [ddnet] Hm, I may have misinterpreted, but anyway in all reality both are performant enough that this discussion is just for fun 😄 17:45 <+bridge> [ddnet] yes 17:45 <+bridge> [ddnet] I guess no reset to 0 every 25 snaps is very technically better assuming the cpu is completely inept and can't pipeline it 😄 17:46 <+bridge> [ddnet] s\/technically/slightly/ 17:46 <+bridge> [ddnet] If we ever hope to run ddnet on an 8086 we should be careful of these 18:06 <+bridge> [ddnet] or use just floats 18:06 <+bridge> [ddnet] 18:06 <+bridge> [ddnet] std::stack 18:06 <+bridge> [ddnet] 18:06 <+bridge> [ddnet] push 25 times 18:06 <+bridge> [ddnet] 18:06 <+bridge> [ddnet] and then clear them again 18:08 <+bridge> [ddnet] also nice solution 18:08 <+bridge> [ddnet] 18:08 <+bridge> [ddnet] use some unsorted array 18:08 <+bridge> [ddnet] 18:08 <+bridge> [ddnet] use a sorting algotihm that sorts this array in 25 steps 18:08 <+bridge> [ddnet] 18:08 <+bridge> [ddnet] do one step per tick and check if sorted 18:08 <+bridge> [ddnet] then reset 18:09 <+bridge> [ddnet] open 25 chrome tabs 18:09 <+bridge> [ddnet] xd 18:29 <+bridge> [ddnet] I like the chrome tabs. A friend of me usealy has ~1k tabs in firefox open 18:29 <+bridge> [ddnet] I like the chrome tabs. A friend of me usually has ~1k tabs in firefox open 18:29 <+bridge> [ddnet] I like the chrome tabs idea. A friend of me usually has ~1k tabs in firefox open 18:30 <+bridge> [ddnet] I like the chrome tabs idea. A friend of me usually has ~1k tabs in firefox open. The tabs get to sleep at some point and are no longer in memory, thats why it works 18:41 <+bridge> [ddnet] The standalone 16.0 rc1 build doesn't have the update button to the newest version in the main menu :thonk: 18:42 <+bridge> [ddnet] do we not update the client on beta builds? 18:44 <+bridge> [ddnet] probs not 18:57 <+bridge> [ddnet] beta and rc builds have no update functionality 18:58 <+bridge> [ddnet] most convenient way to use them is through Steam 18:58 <+bridge> [ddnet] If we wanted to have updates for them, we'd need two additional update streams through the website 19:04 <+bridge> [ddnet] I didn't think that's worth the additional complexity 19:09 <+bridge> [ddnet] isn't that how you're supposed to do with a code base you don't know? 19:10 <+bridge> [ddnet] use sci-hub 19:11 <+bridge> [ddnet] ik 19:14 <+bridge> [ddnet] i do, but i suck at dummy 20:07 <+bridge> [ddnet] i have to do that when someone join in your server and check if he is in your friend list 20:07 <+bridge> [ddnet] someone know?^ 20:15 <+bridge> [ddnet] You are talking about a higher level of pattern matching, if you can break down the patterns you see into fundamental language constructs there is no problem 20:16 <+bridge> [ddnet] I think the client has no way of knowing who joined the server besides those " *** x joined the server" chat messages 20:16 <+bridge> [ddnet] 20:16 <+bridge> [ddnet] Someone pls tell me if I'm wrong xd 20:16 <+bridge> [ddnet] can someone reproduce this too? https://discord.com/channels/252358080522747904/757720336274948198/967069481279045633 20:16 <+bridge> [ddnet] with cl_predict on 20:17 <+bridge> [ddnet] So just use that string to extract the name of whoever joined 20:18 <+bridge> [ddnet] xD you could make a diff of the user list xD 20:18 <+bridge> [ddnet] but the join message should be easier 20:19 <+bridge> [ddnet] You can keep track of the clients in the snap 20:20 <+bridge> [ddnet] that is also what I mean by making a diff* 20:22 <+bridge> [ddnet] Ah yes ofc 20:27 <+bridge> [ddnet] someone has an Idea what settings causes this, because I'm mostly sure I have never seen this, but I tried it before to hold left click 20:27 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/967129639686402178/hammer_bug2-2022-04-22_20.24.13.mp4 20:28 <+bridge> [ddnet] and I always played with cl_predict and antiping 20:29 <+bridge> [ddnet] it is the same in latest master, the video is on the version from the commit I tracked down 20:30 <+bridge> [ddnet] it is the same in latest master, the video is on the version from the commit I tracked down (https://github.com/ddnet/ddnet/commit/eb1bacb969b3edc121934991380d1d03718cd718) 20:45 <+bridge> [ddnet] it is this added code: 20:45 <+bridge> [ddnet] ``` 20:45 <+bridge> [ddnet] if(m_FrozenLastTick) 20:45 <+bridge> [ddnet] FullAuto = true; 20:45 <+bridge> [ddnet] ``` 20:45 <+bridge> [ddnet] https://github.com/C0D3D3V/ddnet/blob/8c6a7ef38a89d123cf4b9c5e495e2c25971efe92/src/game/client/prediction/entities/character.cpp#L263-L264 20:45 <+bridge> [ddnet] 20:45 <+bridge> [ddnet] serverside it was added here: https://github.com/ddnet/ddnet/commit/f19220f1bbbb647954d6544865e3c2a2e9953037 20:45 <+bridge> [ddnet] 20:45 <+bridge> [ddnet] but why does noone else see this bug 😦 20:46 <+bridge> [ddnet] ah it is broken if cl_m_Predict_DDRace is off 😄 thats why I have never saw this 20:47 <+bridge> [ddnet] ah it is broken if cl_m_Predict_DDRace is off 😄 thats why I have never saw this, because then m_FrozenLastTick is not set to false 20:47 <+bridge> [ddnet] Why do we even need so much settings for predict and antiping 😦 can we not get rid of them 21:16 <+bridge> [ddnet] I think there is a render in the chat to see when a line appears, and if you match it you look among the online ones put in an array and you see who is new, but I was hoping there was a way more ez 21:20 <+bridge> [ddnet] 0.7 client does 21:20 <+bridge> [ddnet] not 0.6 one 21:22 <+bridge> [ddnet] explain 21:22 <+bridge> [ddnet] explain what 21:23 <+bridge> [ddnet] how know who jin 21:23 <+bridge> [ddnet] join 21:27 <+bridge> [ddnet] You already know who's new from the *** x has entered and joined the game 21:27 <+bridge> [ddnet] Right? 21:28 <+bridge> [ddnet] Then you see if they're your friend 21:31 <+bridge> [ddnet] not all servers have exactly same join message 21:32 <+bridge> [ddnet] afair 0.7 clients accept info about joined player as clientid 21:32 <+bridge> [ddnet] and then localize join message 21:33 <+bridge> [ddnet] I assumed he would be using it on ddnet servers 23:18 <+bridge> [ddnet] @c0d3d3v yes, let's decrease the number of settings! 23:42 <+bridge> [ddnet] @Learath2 may I change the type of `MACRO_CONFIG_INT` config variables to `std::atomic_int` so we can actually access it from multiple threads? ^^ 23:43 <+bridge> [ddnet] or do you have an idea on how to access stuff like `g_Config.m_ConsoleLogLevel` from multiple threads?