01:28 < bridge> lol 01:29 < bridge> hi 01:31 < bridge> what’s up fokko 03:26 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1192655323727675462/IMG_20240105_042529_302.jpg?ex=65a9ddd3&is=659768d3&hm=ac7b93775addd63fe3c95d2fe5b4a583d9aa40bab3d47df5664744a48a21ea9f& 03:26 < bridge> :owo: 04:46 < bridge> I use arch btw 07:03 < bridge> early morning 07:20 < bridge> helo 07:21 < bridge> okay lets start off the day by programming some bots 07:23 < bridge> morning 07:24 < bridge> 🐴 07:34 < bridge> https://tenor.com/view/anime-coffee-gif-24657578 07:55 < bridge> im actually drinking tea but i dont like the discord emoji for tea 07:56 < bridge> so coffee it is 07:59 < bridge> I’m drinking water 08:00 < bridge> about to go to bed 08:42 < bridge> hi everyone 08:44 < bridge> hi 08:45 < bridge> is there a program or command or something that i can run beside my server to show what function will get called on variety of event like; kill, tile collision, projectile ...... 08:46 < bridge> i assume you mean something like a debugger? 08:46 < bridge> yes 08:46 < bridge> what IDE are you using? 08:46 < bridge> depends what IDE are you using? 08:46 < bridge> depends on what IDE are you using? 08:47 < bridge> depends on what IDE are you using. 08:47 < bridge> vs code 08:47 < bridge> but 08:47 < bridge> i want something that i can run it beside my ./DDnet-Server command on my shell 08:48 < bridge> don't care about vscode 08:48 < bridge> you can use gdb. you can also make it visual with vscode. so you can step through your code and check values etc. 08:52 < bridge> there are also other frontends for gdb such as 08:52 < bridge> https://github.com/nakst/gf 08:54 < bridge> what do you use for debugging ? 08:54 < bridge> for c++ 08:55 < bridge> Explain emoji pls 08:55 < bridge> Gdb is the very best 08:56 < bridge> And asan is epic too if the gdb backtracked are not making sense 08:56 < bridge> is it stands for gnu debugger ? 08:57 < bridge> Very rarely I’ll also enable the tui using `tui enable` in gdb, it’s useful if you have only one screen 08:57 < bridge> Yes 08:58 < bridge> Asan, ubsan and valgrind are also indispensable yep 08:58 < bridge> thank you guys 08:59 < bridge> chillerdragon: dat was a horse 09:03 < bridge> lldb is nice too 09:04 < bridge> if u debug rust use rust-gdb or rust-lldb wrapper 09:04 < bridge> Lldb is acceptable, I’ll allow it 09:07 < bridge> i use gdb with that plugin tho 09:07 < bridge> gef 09:07 < bridge> Thanks but why horse 09:07 < bridge> Gef I only use when I’m doing reverese engineering 09:08 < bridge> chillerdragon: 🐴 09:08 < bridge> 🐴 09:08 < bridge> wats happenin 09:17 < ChillerDragon> https://www.urbandictionary.com/define.php?term=🐴 09:17 < ChillerDragon> A slang for Ketamine, a street drug. 09:22 < bridge> 💊 09:22 < bridge> 🐴 💊 09:22 < bridge> = 🐎 09:22 < bridge> =🐎 09:23 < bridge> 🐎 09:37 < bridge> when a player suicide, his character will be deleted before the function Die() get called ? 09:40 < bridge> no, the Die() function is ran before 09:40 < bridge> https://github.com/ddnet/ddnet/blob/master/src/game/server/player.cpp#L575 09:43 < bridge> hah 09:45 < bridge> i implement Extra Life : 09:45 < bridge> ```cpp 09:45 < bridge> void CCharacter::Die(int Killer, int Weapon, bool SendKillMsg) 09:45 < bridge> { 09:45 < bridge> //my stuff 09:45 < bridge> if(m_ExtraLives && m_pPlayer) 09:45 < bridge> { 09:45 < bridge> // dbg_msg("m_ExtraLives", "called"); 09:45 < bridge> Rescue(); 09:45 < bridge> m_ExtraLives--; 09:45 < bridge> return; 09:45 < bridge> } 09:45 < bridge> ``` 09:45 < bridge> it's working when the player get spiked, but not working when suicide 09:47 < bridge> what are you trying to achieve$ 09:47 < bridge> what are you trying to achieve 09:48 < bridge> players can buy Extra Life with theyr Scores 09:48 < bridge> it's a block server 09:50 < bridge> i implemented Extra Life : 09:50 < bridge> ```cpp 09:50 < bridge> void CCharacter::Die(int Killer, int Weapon, bool SendKillMsg) 09:50 < bridge> { 09:50 < bridge> //my stuff 09:50 < bridge> if(m_ExtraLives && m_pPlayer) 09:50 < bridge> { 09:50 < bridge> // dbg_msg("m_ExtraLives", "called"); 09:50 < bridge> Rescue(); 09:50 < bridge> m_ExtraLives--; 09:50 < bridge> return; 09:50 < bridge> } 09:50 < bridge> ``` 09:50 < bridge> it's working when the player get spiked, but not working when suicide 09:59 < bridge> and i wanna make the person who reached the maximum points, a god, give him 9 lives in exchange of all of his scores 😂 10:00 < bridge> and i wanna make the person who reached the maximum scores, a god, give him 9 lives in exchange of all of his scores 😂 10:00 < bridge> btw, maximum scores are 6969 10:01 < ChillerDragon> cl_kill calls KillCharacter 10:01 < ChillerDragon> which calls Die() and afterwards deletes the character 10:01 < ChillerDragon> u can return in Die() all u want if the obj is deleted 10:02 < ChillerDragon> https://github.com/ddnet/ddnet/blob/424d789f471c0926878d4431ee655232ff575a7f/src/game/server/gamecontext.cpp#L2742-L2744 10:02 < ChillerDragon> this is where selfkill happens 10:02 < ChillerDragon> https://github.com/ddnet/ddnet/blob/424d789f471c0926878d4431ee655232ff575a7f/src/game/server/player.cpp#L575-L584 10:03 < ChillerDragon> the ``delete`` and the set to 0 and the ``Respawn()`` are all things you do not want. 10:03 < ChillerDragon> I would put something in gamecontext.cpp where also the selfkill protection from ddnet is. And return there if the player has god mode 10:04 < bridge> i just return whenever is ExtraLive is more than 0 10:05 < bridge> thank you ❤️ 10:05 < ChillerDragon> <3 10:06 < ChillerDragon> disallowing selfkill might be annoying 10:06 < ChillerDragon> imagine the trollings you can do in a block server to a tee that can not respawn 10:06 < ChillerDragon> @mamad_melanin 10:08 < bridge> a the worst senario if he became a god, he needs to suicide 9 times 10:09 < ChillerDragon> Ah i see 10:09 < bridge> I worry about the others 😂 10:09 < ChillerDragon> axaxax true 10:09 < ChillerDragon> But if i see a god i would never spike him then. Only put him in a freeze pit and wait until he suicides 9 times hehe 10:10 < bridge> yeh me too 10:10 < ChillerDragon> depends on the map and playerbase i guess how the gameplay meta works 10:11 < ChillerDragon> I wonder if microsoft reads the irc logs and in chatgpt 5 you can ask ddnet codebase specific questions o.O 10:20 < ChillerDragon> omg the last few todos of ddnet 0.7 are fakin hydras. While solving one two new ones pop up. 10:20 < ChillerDragon> https://zillyhuhn.com/cs/.1704446411.png 10:20 < bridge> ```cpp 10:20 < bridge> if(pChr->m_ExtraLives && pPlayer) 10:20 < bridge> { 10:20 < ChillerDragon> unedited picture of me coding 10:20 < bridge> pChr->m_ExtraLives--; 10:20 < bridge> pChr->Rescue(); 10:20 < bridge> return; 10:20 < bridge> } 10:20 < bridge> pPlayer->m_LastKill = Server()->Tick(); 10:20 < bridge> pPlayer->KillCharacter(WEAPON_SELF); 10:20 < bridge> pPlayer->Respawn(); 10:20 < bridge> ``` 10:20 < bridge> now it's working like a charm 10:21 < ChillerDragon> nice 10:22 < bridge> player having extra lives and disconnect 😂 10:22 < ChillerDragon> just disallow disconnect axaxaxax 11:10 < bridge> this func is used 4 times haha 11:10 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1192772091817230436/image.png?ex=65aa4a93&is=6597d593&hm=db4be82d81808d832e6407de0f78104046a3861e4a6eba4740f807599ea3d4cf& 11:10 < bridge> perf isnt thaaaat bad if you dont call it a million times per frame 11:10 < bridge> perf isnt thaaaat bad if you dont call it a million times per tick 11:46 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1192781241334906990/SkyBlock_Alpha_v0.1_2024-01-05_14-11-12Why.mp4?ex=65aa5318&is=6597de18&hm=3027358db3838c0b8ca33cc5d879b6b155a426a1d325fc0158e265744e2d8597& 11:47 < bridge> ```cpp 11:47 < bridge> void CCharacter::ExtraLives() 11:47 < bridge> { 11:47 < bridge> Rescue(); 11:47 < bridge> UnFreeze(); 11:47 < bridge> GameServer()->ExtraLiveParticle(this); 11:47 < bridge> m_ExtraLives--; 11:47 < bridge> } 11:47 < bridge> ``` 11:47 < bridge> why the player not getting unfreezed ? 11:49 < bridge> sometimes it gets unfreeze and sometimes not 11:49 < ChillerDragon> @teero777 its one of the most expensive funcs that is used during gameplay 11:49 < bridge> xD 11:49 < ChillerDragon> but tbh idk how to make it smarter 11:50 < ChillerDragon> using intersectline for my hax clients drops my rapsi even without graphics down to fps where it cant even walk straight 11:50 < bridge> i thought GetMapIndices was the most expensive 11:51 < ChillerDragon> isnt that free? 11:51 < bridge> no? 11:51 < bridge> ```cpp 11:51 < bridge> std::vector CCollision::GetMapIndices(vec2 PrevPos, vec2 Pos, unsigned MaxIndices) const 11:51 < bridge> { 11:51 < bridge> std::vector vIndices; 11:51 < bridge> float d = distance(PrevPos, Pos); 11:51 < bridge> int End(d + 1); 11:51 < bridge> if(!d) 11:51 < bridge> { 11:51 < bridge> int Nx = clamp((int)Pos.x / 32, 0, m_Width - 1); 11:51 < bridge> int Ny = clamp((int)Pos.y / 32, 0, m_Height - 1); 11:51 < bridge> int Index = Ny * m_Width + Nx; 11:51 < bridge> 11:51 < bridge> if(TileExists(Index)) 11:51 < bridge> { 11:51 < bridge> vIndices.push_back(Index); 11:51 < bridge> return vIndices; 11:51 < bridge> } 11:52 < bridge> else 11:52 < bridge> return vIndices; 11:52 < bridge> } 11:52 < bridge> else 11:52 < bridge> { 11:52 < bridge> int LastIndex = 0; 11:52 < bridge> for(int i = 0; i < End; i++) 11:52 < bridge> { 11:52 < bridge> float a = i / d; 11:52 < bridge> vec2 Tmp = mix(PrevPos, Pos, a); 11:52 < bridge> int Nx = clamp((int)Tmp.x / 32, 0, m_Width - 1); 11:52 < bridge> int Ny = clamp((int)Tmp.y / 32, 0, m_Height - 1); 11:52 < bridge> int Index = Ny * m_Width + Nx; 11:52 < bridge> if(TileExists(Index) && LastIndex != Index) 11:53 < bridge> basically the same logic 11:54 < ChillerDragon> rip irc 11:54 < ChillerDragon> yea thats basically a fakin bitcoin miner i see it now 11:56 < ChillerDragon> @mamad_melanin maybe the unfreeze has to happen in the next tick otherwise the player is still in the freeze 11:57 < ChillerDragon> i assume setting some m_PlsDoUnfreeze = true which then in character tick unfreezes it should work but there might be a nicer way 11:57 < bridge> so i make it the firs tick it could unfreeze then 11:57 < ChillerDragon> does /r unfreeze? 11:58 < bridge> i didn't see any unfreezing in it 11:58 < bridge> so i make it the first tick it could unfreeze then 11:59 < bridge> rescue should be unfreezing automatically 12:03 < bridge> 50 баксов на стим 12:03 < bridge> [steamcommunity.com/gift/765615931809238015](https://u.to/FEQ4IA) 12:03 < bridge> @Discord Mod every channel 12:04 < bridge> sometime it is sometimes not 12:05 < bridge> problem fixed 12:05 < bridge> ok 12:05 < bridge> ```cpp 12:05 < bridge> if(UnfreezeNeeded && UnFreeze()) 12:05 < bridge> { 12:05 < bridge> UnfreezeNeeded = false; 12:05 < bridge> } 12:05 < bridge> ``` 12:05 < bridge> i just added this to character::Tick() 😂 12:06 < bridge> that will unfreeze the character every tick :justatest: 12:06 < bridge> if needed 12:07 < bridge> hum 12:07 < bridge> i think youre right 12:07 < bridge> yea since it quits if UnfreezeNeeded is false instantly and doesnt call UnFreeze(). very ugly imo 12:07 < bridge> brah 12:07 < bridge> nah its cool 12:09 < bridge> it's not ugly 12:10 < bridge> it's not ugly, it's cute :owo: 12:15 < bridge> is there a function to retract all the hooks attached to a player ? 12:19 < bridge> rewriting it will be fun tho 12:30 < bridge> Will the community filters add more server organization? 12:33 < ChillerDragon> @remakepower that seems to be the plan why? 12:36 < bridge> Is it means "That seems to be the plan, why?"? 12:45 < bridge> 1. Learning Unreal -> 12:45 < bridge> 2. Reaching the point of the need of a vesrion control system (decides on git) -> 12:45 < bridge> 3. Researches and finds that github is limited in the context of git-lfs -> 12:45 < bridge> 4. Looks up CodeBerg (reads faq/licences) -> 12:45 < bridge> 5. Looks up UE5 search term in CodeBerg's repos for the fun of it -> 12:45 < bridge> 6. Find a project -> 12:45 < bridge> 7. The project is a little broken (easily fixed) -> 12:45 < bridge> 8. The broken link is replaced with the correct one in the .uproject file -> 12:45 < bridge> 9. While fixing it needs to find the link and sees that an app isn't opened by default such as ddnet://address -> 12:45 < bridge> 10. Searches for way to add that default behaviour in their distro's forums -> 12:45 < bridge> 11. Ends up finding a thread which mentions rofi -> 12:45 < bridge> 12. Thinks rofi is pretty cool and continues to find very cool configurations -> 12:45 < bridge> 13. In the same thread there's a mention of ytfzf (posix script to search yt videos from terminal and watch them in mpv) -> 12:45 < bridge> 14. Starts to write this msg in #developer to show how much organized and collected they are. 12:45 < bridge> what's this? 12:47 < bridge> It's how I woke up 4 am and how my day went 12:48 < ChillerDragon> @remakepower yes that is the plan 12:48 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1192796669696286841/barsarefull.png?ex=65aa6177&is=6597ec77&hm=bebbd8d11609a1d0845ba4f486dc80a8f85402bc4bc86febd63ac07d69f9283b& 12:48 < ChillerDragon> @remakepower why do you ask 12:49 < bridge> I just wrote it for context. I mainly wanted to share about rofi but that's the backstory 12:50 < ChillerDragon> epic backstory 12:51 < bridge> This is rofi https://github.com/davatorium/rofi and this is the super duper configs https://github.com/adi1090x/rofi. 12:51 < bridge> In fact, i found community filters just today 12:51 < ChillerDragon> yrfzf looks amazing 12:52 < bridge> So i want to know is it true 12:52 < ChillerDragon> there is huge open source drama about communties :D 12:55 < bridge> It does. But after writting the backstory I feel like ytfzf and rofi aren't as cool anymore :(. here's a cool picture of rofi used as launcher https://raw.githubusercontent.com/adi1090x/rofi/master/previews/launchers/type-6/6.png 13:02 < bridge> @ryozuki FFR 13:02 < bridge> 13:02 < bridge> assuming i don't use any global variables. Do you know any lib that parses all variable names of a closure (only from syntax, so || { whatever ... }) 13:02 < bridge> that are bound to it? 13:02 < bridge> 13:02 < bridge> i mean u can probably create some weird edge cases like let a: fn() = somefunc; 13:02 < bridge> 13:02 < bridge> but let's not deal with those xd 13:02 < bridge> 13:03 < bridge> i basically need the captures of a closure by name 13:03 < bridge> 13:03 < bridge> i am 100% sure one of your quadtrillion tabs must have had the same weird problem i have rn 😏 13:04 < ChillerDragon> have you tried using C++? 13:04 < bridge> does it have proc macros? 13:05 < ChillerDragon> dont think so 13:05 < bridge> sad 13:06 < bridge> rust is always the opposite of cpp 13:06 < bridge> in cpp captures are explicit, in rust not xdd 13:07 < bridge> i fear that i have to write a rust compiler now, to find out this are non local variables so i know their name 13:07 < bridge> rip me 13:07 < bridge> or rust parser* 13:10 < bridge> ctrl-x ctrl-a is faster 13:16 < ChillerDragon> hacker deen 13:18 < ChillerDragon> how can i see where a method is called from? 13:18 < ChillerDragon> in my ide 13:18 < bridge> what ide? 13:18 < bridge> Shift + Alt + F12 13:18 < ChillerDragon> vscode vim grep 13:19 < bridge> TIL 13:19 < ChillerDragon> ah nice jopsti 13:20 < ChillerDragon> is this bug free? 13:21 < bridge> pretty, but if u have traits, or interfaces it can suck a bit 13:21 < ChillerDragon> i use c++ 13:21 < bridge> better use the base definition 13:21 < bridge> that's why i mentioned interfaces 13:21 < bridge> 😏 13:22 < bridge> I'm interested what you need it for ^^ 13:22 < bridge> virtual functions, if u prefer that 13:22 < ChillerDragon> ``int CSnapshotStorage::Get(int Tick, int64_t *pTagtime, const CSnapshot **ppData, const CSnapshot **ppAltData) const`` 13:22 < ChillerDragon> for this heinrich 13:22 < ChillerDragon> seems to be called in 2 places 13:22 < ChillerDragon> usually i search the func name but searching ``Get`` is no fun and idk how many snap storages are there 13:22 < bridge> how to tell a character to retract his hook ? 13:23 < ChillerDragon> hookstate retracted 13:23 < bridge> it's the last missing piece in my safe Rc impl 13:23 < bridge> 13:23 < ChillerDragon> gamecore 13:23 < bridge> instead of having a RefMut and work on it, you give a closure.. but a normal closure has to few restrictions.. so i want ALL captures to have this restriction instead 13:23 < bridge> i tried m_HookState = HOOK_RETRACT 13:23 < ChillerDragon> u mean == ? 13:23 < ChillerDragon> for a check 13:23 < ChillerDragon> a 13:23 < ChillerDragon> tell 13:23 < bridge> no 13:23 < ChillerDragon> not check 13:23 < ChillerDragon> ye i see 13:24 < bridge> the hook just disapear but still attached 13:24 < bridge> xDD chiller IRC moment 13:24 < ChillerDragon> .awdkawd 13:24 < bridge> turn on replies 13:24 < ChillerDragon> m_TriggeredEvents |= COREEVENT_HOOK_HIT_NOHOOK; 13:24 < ChillerDragon> idk man 13:24 < ChillerDragon> i would also have to try and error i never cut a hook 13:25 < ChillerDragon> but also wanted to code some powerup once that gets rid of all hooks attached to you 13:25 < ChillerDragon> is nice for endless nobs 13:26 < ChillerDragon> https://zillyhuhn.com/cs/.1704457553.png 13:26 < bridge> i tried reset() in character core, i found out character will spawn at x:0 y:0 , but hook still attached 😂 13:26 < ChillerDragon> i needed that powerup here 13:26 < ChillerDragon> this is a real pvp screenshot not staged 13:27 < bridge> did i said i made a server ? 13:27 < ChillerDragon> wot? 13:28 < ChillerDragon> yea u buildin a server side blox mod we know 13:28 < bridge> its on the internet tab <<< SkyBlock 13:28 < ChillerDragon> virus ip grabber 13:28 < ChillerDragon> https://zillyhuhn.com/cs/.1704457729.png 13:28 < ChillerDragon> nice skyblock map 13:29 < ChillerDragon> eww telegram ads 13:29 < bridge> yeh looks like my map 13:29 < ChillerDragon> u recognize it? xd 13:30 < bridge> the telegram is the only app which is still working here in iran 😂 beside discord 13:30 < bridge> what about signal? 13:30 < bridge> no 13:30 < bridge> i didnt try it tho 13:30 < bridge> and we use telegram with proxy, it's the only way 13:31 < bridge> it has builtin proxies 13:35 < ChillerDragon> https://paste.zillyhuhn.com/id 13:35 < ChillerDragon> epic 13:35 < ChillerDragon> this ddnet patch causes no crashes client or server side 13:35 < ChillerDragon> i have breaking my brain on this line of code wat to do with it and its fakin unused 13:44 < bridge> (?) 13:45 < bridge> yoho, made it working 13:45 < bridge> ```cpp 13:45 < bridge> void CCharacter::RetractAttachedHooks() 13:45 < bridge> { 13:45 < bridge> CPlayer *pPlayer; 13:45 < bridge> CCharacter *pChr; 13:45 < bridge> for(int i; (i < MAX_CLIENTS) && (pPlayer = GameServer()->m_apPlayers[i]) && (pChr = pPlayer->GetCharacter()); i++) 13:45 < bridge> { 13:45 < bridge> if(pChr->Core()->HookedPlayer() == m_pPlayer->GetCID()) 13:45 < bridge> { 13:45 < bridge> pChr->m_Core.SetHookedPlayer(-1); 13:45 < bridge> pChr->m_Core.m_HookState = HOOK_RETRACT_START; 13:45 < bridge> } 13:45 < bridge> } 13:45 < bridge> } 13:45 < bridge> ``` 13:52 < bridge> cool 13:55 < ChillerDragon> pro 13:56 < bridge> ok i guess i'll simply write my macro so, that it forces to write out the captures explicitly, problem solved 😏 13:56 < bridge> compile time panic-free safe Rc 13:56 < bridge> 13:56 < bridge> take that borrow checker 13:59 < bridge> discord.gg/teensleaks 14:00 < bridge> Yikes 14:01 < bridge> @Discord Mod :banhammer: needed 14:04 < bridge> u always have weird ideas 14:06 < bridge> i am just biggest RAII & hierarchy + macro abuser 😬 14:06 < bridge> dyn dispatch? 14:06 < bridge> that was just for chillerdragons thing xd 14:06 < bridge> no related to the problem 14:06 < bridge> which restriction? 14:06 < bridge> sounds interesting 14:10 < bridge> i have a derive macro that implements a "hierarchical value" to determine if your component is higher level than another one => you can safely use Rc without leaks 14:10 < bridge> 14:10 < bridge> but if you go even further and also restrict Rc to never allow RefMut outside of your class, then you can restrict all paramters of your function to only allow lower level components => no higher level component is used inside your function. 14:10 < bridge> and thus it's not possible to borrow mut twice (this component at least) 14:10 < bridge> 14:10 < bridge> the component itself also has wrapper that hides Rc so it cannot be acccessed. 14:10 < bridge> 14:10 < bridge> So basically the goal is to never call borrow_mut, only the macros do it. 14:10 < bridge> 14:10 < bridge> and the same macros apply the restrictions to the func parameters 14:10 < bridge> hiarc best crate 14:10 < bridge> sub to it on crates.io 😏 14:11 < bridge> cool 😮 14:12 < bridge> classic squatting crate on crates.io though 😄 14:15 < bridge> https://www.memorysafety.org/blog/rustls-performance/ 14:28 < bridge> looks nice 14:28 < bridge> the title says "on track to" because it doesn't 14:52 < bridge> I hope they drop c compiler requirement soon 14:54 < bridge> What do they even use it for? 14:58 < bridge> ring uses code from boringssl from openssl for crypto primitives 15:22 < bridge> https://en.wikipedia.org/wiki/Wirth%27s_law 15:22 < bridge> @heinrich5991 @learath2 @jupeyy_keks real or nah 15:27 < bridge> unfortunately real 15:31 < bridge> Very real 15:35 < bridge> depends xd 15:35 < bridge> average software for sure 15:35 < ChillerDragon> web 15:35 < bridge> well with wasm it kida gets faster again xd 15:36 < ChillerDragon> electron 15:36 < bridge> but adoption takes years 15:36 < ChillerDragon> rust 15:36 < bridge> 😏 15:36 < bridge> runtime checks 15:36 < bridge> 😬 15:36 < ChillerDragon> gigachad C devs in 1999 had speed and segfaults 15:37 < ChillerDragon> soydev rust devs in 2024 have checks and memory safety 15:37 < ChillerDragon> there is a crate for that! 15:37 < ChillerDragon> has become the new rust developer slogan 15:38 < bridge> i always wanted to see a java runtime that disables all safety checks, not for production 15:38 < bridge> 15:38 < bridge> simply to see perf benefits xd 15:38 < bridge> 15:38 < bridge> ofc this wont really work bcs u can catch the exceptions thrown, but would still be a funny project 15:38 < bridge> in rust, disable all "hidden" panics 15:38 < ChillerDragon> which he uses for checking if numbers are even. That crate then depends on two other crates 15:38 < bridge> so those u cant unwrap 15:38 < bridge> would also be cool 15:39 < bridge> well the funny thing about rust vs c is 15:39 < bridge> that rust theoretically has perf optimizations that c can't directly have 15:39 < bridge> 15:39 < bridge> so it's harder to write faster c code than rust 15:39 < bridge> but in reality it's not the case anyway 15:43 < bridge> if llvm didnt have bugs 15:43 < bridge> https://khei4.github.io/gsoc2023/ 15:44 < bridge> > 1. Constant Propagation for uniformly patterned aggregated types on InstCombine 15:44 < bridge> > 15:44 < bridge> > Originally, no implemented constant folding can handle constant global aggregate-type values with variable index access. This was the first issue I tackled on LLVM. Throughout the project, I decided to split the problem step by step and make the patch as small as possible. 15:44 < bridge> > 2. Removal of memcpy introduced on the attributed with readonly, noalias and nocapture on MemCpyOpt 15:44 < bridge> > 15:44 < bridge> > LLVM function arguments can have attributes, i.e. noalias shows there is no other pointer variable that points to the same as the argument, and readonly shows that the argument is not modified in the function. Functions attributed noalias and readonly at the same position show invariance during the execution of the functions. If it’s also attributed with nocapture, we can omit the memcpy of argument to pass for such functions. But to completely 15:44 < bridge> > 3. Attaching wrapping flags for the switch to look up table conversion on SimplifyCFG 15:44 < bridge> > 15:44 < bridge> > This issue reports dropped nsw (no signed wrap) flags for arithmetic instructions on SimplifyCFG and InstCombine. (This is motivated by Rust Issue reported in the issue). This can be addressed by SimplifyCFG and InstCombine/InstSimplify. For the former SwitchToLookupTable on SimplifyCFG is the place to handle this. 15:44 < bridge> its ez 15:44 < bridge> > 4. Stack Move Optimization, which merges the allocas neither captured nor simultaneously used 15:44 < bridge> > 15:44 < bridge> > Rust’s move semantics introduce memcpy when values are 1) rebind to the variables, 2) passed by value to the functions. But for most cases, also due to the property of the Rust references, both pointers aren’t used simultaneously. By using alias/dataflow analysis, we could find such patterns on LLVM-IR. Originally, liveness-analysis approach was proposed, but it stalled for a long time. So I pushed forward by splitting it’s patch. 15:44 < bridge> not only that 15:44 < bridge> 15:44 < bridge> expensive optimizations take longer the more code you have 15:44 < bridge> 15:44 < bridge> so huge code bases would be really slow to compile 15:44 < bridge> 15:44 < bridge> u already see this with LTO 15:44 < bridge> which is probably not the best you could get 15:45 < bridge> U use BlmapChill? 😂 15:45 < bridge> @ryozuki btw do u also do optimizations at job? 15:46 < bridge> for llvm? 15:46 < bridge> or for our code 15:46 < bridge> i guess for the code translation 15:46 < bridge> most projects we have consistently have benchmarks and we track if there are regressions 15:47 < bridge> i c 15:47 < bridge> also flamegraphs etc 16:07 < bridge> @jupeyy_keks i got a new project at work 16:07 < bridge> its a language our company will use 16:08 < bridge> more xp with compilers kek 16:13 < bridge> yeah 16:13 < bridge> cool 16:13 < bridge> i'll soon work at chillerdragon.corp 16:14 < bridge> at grindr? 16:14 < bridge> jkjk xd 16:15 < bridge> "Grindr is the world's largest social networking app for gay, bi, trans, and queer people." 16:15 < bridge> 16:15 < bridge> chiller u gay? 16:15 < bridge> never heard about it before tbh xD 16:15 < ChillerDragon> i am not gay 16:15 < ChillerDragon> who says im gay? 16:15 < bridge> your pfp 16:15 < ChillerDragon> ah fair xd 16:16 < bridge> well supporter or LGBTQ dont need to be part of it i guess xd 16:16 < bridge> but at least it increases the chance 16:16 < ChillerDragon> jopsti u fr dont know grinder? 16:16 < bridge> no soz 16:17 < bridge> i am not the social networkist guy u'll find 16:17 < bridge> discord is my socialist network 16:17 < bridge> socialister network 16:17 < bridge> hi 16:17 < bridge> how to protect my server against bots 16:17 < ChillerDragon> wat bots 16:18 < bridge> don't make your server ip public 16:18 < bridge> nice option 16:18 < bridge> only protection against bots is doing a nacked LAN party with metal detectors on your own PCs 16:19 < bridge> there must be a better option 16:19 < bridge> u should answer the question of the guy that is tagged with "bot" 16:19 < bridge> what kind of bots 16:19 < bridge> xdd 16:20 < bridge> kinda ironic 16:20 < bridge> Think of it as real people taking up space in the game, but they're all afk 16:25 < bridge> if they are bot connections a first would be collect their IPs 16:25 < bridge> additionally, try to block known VPS and/or VPN IPs 16:28 < bridge> @everyone @here discord.gg/teensleaks 16:28 < bridge> @Discord Mod 17:38 < bridge> friday finally 17:39 < bridge> https://www.factorio.com/blog/post/fff-392 17:41 < bridge> amazing 17:41 < bridge> factorio is my top 3 game 17:42 < bridge> - ddnet 17:42 < bridge> - dota 17:42 < bridge> - factorio 17:42 < bridge> - terraria 17:42 < bridge> they all different genre so they are all top 1 in each 17:42 < bridge> :poggers2: 17:44 < bridge> have you played stardew valley? 17:46 < bridge> i dont like that game 17:55 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1192873933188382871/image.png?ex=65aaa96c&is=6598346c&hm=d661342aa3629b9c2d51319cfe40a21b81d026cb6336c682611c0b47788b2101& 17:55 < bridge> @heinrich5991 does modulo has same precedence as mul? 17:56 < bridge> on most languages i mean 17:57 < bridge> Seems like it's the default in "C style" languages for mult/div/mod to have the same precedence 18:00 < bridge> what @robyt3 says 18:00 < bridge> it kinda makes sense, too, it's a similar operaton 18:00 < bridge> (in python: `i == i // 3 + i % 3`) 18:13 < bridge> I like requiring parentheses instead of setting a precedence for `&` and `|` btw 😉 18:13 < bridge> i.e. `(a & b) == c` is fine, `a & (b == c)` is fine, but `a & b == c` is a syntax error 18:16 < bridge> in C, `0 & 1 == 0` evaluates to `0`, but in python, it evaluates to `True` 18:16 < bridge> much fun 18:20 < bridge> Activate inactive kick option 18:47 < bridge> @learath2 let's get https://github.com/ddnet/ddnet/pull/7683 over the line? 18:47 < bridge> I'm okay with the busy waiting 19:03 < bridge> omg 19:03 < bridge> 1.63 19:04 < bridge> its old but not as old! 19:50 < bridge> Do we have anyone from dusseldorf here? 19:51 < bridge> I can fix the stuff Robyt mentioned tomorrow. Do you have anything you want fixed yourself? 19:52 < bridge> i know one xd 20:06 < bridge> im tired of this shitass mf bloatware, what should i use instead of VS or CLion, vim or nevim or emacs or maybe vscode(not big fan)? preferably it should work on windows and linux 20:06 < bridge> vscodium 20:06 < bridge> in 20 years you can finally use lapce 20:06 < bridge> when it's stable and feature rich 20:08 < bridge> neovim :greenthing: 20:08 < bridge> so this is just vscode without telemetry? 20:08 < bridge> it's open-source vscode 20:08 < bridge> and without telemetry maybe(?) 20:09 < bridge> 😂 20:09 < bridge> vscode is open-source 20:09 < bridge> i use vscodium and sometimes helix 20:09 < bridge> helix deez nuts :justatest: 20:10 < bridge> nope. but microsoft tries telling everyone that, but it's not 20:10 < bridge> vscodium is the open-source part of vscode 20:10 < bridge> where's the problem ? 20:11 < bridge> vscode or neovim with shitton of plugins 20:12 < bridge> yep and funny part that you can use microsoft extension marketplace instead of vscodium default one 20:12 < bridge> yup 20:18 < bridge> is that some hogwarts place? xdd 20:19 < bridge> Düsseldorf 20:24 < bridge> it's a big city in germany 20:24 < bridge> it reminds me of harry potter 20:24 < bridge> im sry 20:24 < bridge> angst potter 20:25 < bridge> I probably wouldn't know a city of this size in other countries 😅 20:25 < bridge> xD 20:25 < bridge> funny thing this reminded me japanese love german stuff 20:25 < bridge> they use it in animes 20:25 < bridge> names 20:25 < bridge> ye, that's funny ^^ 20:25 < bridge> https://www.youtube.com/watch?v=8OkpRK2_gVs 20:26 < bridge> one of the most famous ops is german 20:26 < bridge> XD 20:26 < bridge> "german" 20:26 < bridge> ok the intro :d 20:26 < bridge> @heinrich5991 lol 20:27 < bridge> i googled japanese german 20:27 < bridge> https://en.wikipedia.org/wiki/Japanese_people_in_Germany 20:27 < bridge> dusseldorf is first 20:27 < bridge> yep 20:27 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1192912211606245458/image.png?ex=65aacd12&is=65985812&hm=0c0cf5fa1a4e6623eab7eb3d691be0ea6a80d316d421a12d4e6426578d03cdde& 20:27 < bridge> my friends with japanese roots have family in düsseldorf 20:27 < bridge> > Sind sie das essen? Nein, wir sind der Jäger! 20:28 < bridge> > Angriff auf die Titanen 20:28 < bridge> > Der Junge von einst wird bald zum Schwert greifen 20:28 < bridge> > 20:28 < bridge> > Wer nur seine Machtlosigkeit beklagt kann, nichts verändern 20:28 < bridge> > Der Junge von einst wird bald das schwarze Schwert ergreifen 20:28 < bridge> > Hass und Zorn sind eine zweischneidige Klinge 20:28 < bridge> > Bald, eines Tages, wird er dem Schicksal die Zähne zeigen 20:33 < bridge> I'll be in dusseldorf for a day or two if any of you live there 20:35 < bridge> Do german ppl rly can hear "Sind sie das essen? Nein, wir sind der Jäger"? Sounds more like shhcjdhajzichshxhsg :justatest: 20:37 < bridge> Is this attack on titan op1? 20:42 < bridge> Yeah it is op1. I can only hear "Having the sex with the bees and the eagles" there 🙃 20:43 < bridge> xDDDDD 20:44 < bridge> Btw lots of AOT ost is german completely. Like Vogel im Käfig and T:T 20:44 < bridge> anybody used https://mixxx.org/ 20:44 < bridge> ill become a dj 20:44 < bridge> its open source 20:44 < bridge> linux 20:44 < bridge> does it use rust? 20:45 < bridge> c++ 20:45 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1192916709154230342/latenight-palemoon-3840x2160.png?ex=65aad142&is=65985c42&hm=d4ea54467db6e5186a654dd2a239afc481cc6c27f479c1db54851b983fdd5cc1& 20:45 < bridge> looks cool 20:45 < bridge> it has a gentoo package 20:45 < bridge> no rust, red flag :santatrollet: 20:45 < bridge> by "german completely" you mean "uses german words" 20:45 < bridge> not necessarily in an order that produces a meaning 20:45 < bridge> Are you sure? The lyrics look like full sentences to me 20:46 < bridge> Not that I speak german 20:46 < bridge> or pronounced in a way that native speakers can understand them 20:46 < bridge> it's lyrics that come up later in the full song but they're not in the tv size OP 20:46 < bridge> looks better than virtualdj ngl 20:46 < bridge> you forget mindustry and principia 20:47 < bridge> factorio > mindustry 20:47 < bridge> mindustry != factorio 20:47 < bridge> Probably not understandable to native speakers the way they pronounced, but the written lyrics themselves look more than just random words thrown in 20:48 < bridge> the written stuff does look somewhat intelligible, yea… 20:48 < bridge> hmm 20:49 < bridge> maybe I was wrong about that 20:55 < bridge> > are they food (maybe prey?)? no, we're the hunters/predators. 20:55 < bridge> > 20:55 < bridge> > attack on the titans 20:55 < bridge> > the boy of yore will soon reach for the sword 20:55 < bridge> > hate and wrath are a double-edged sword 20:55 < bridge> > soon, one day, he'll show fate his teeth 20:55 < bridge> not sure whether "to show someone one's teeth" is an idiom in english, too, but maybe? https://en.wiktionary.org/wiki/show_one%27s_teeth 20:58 < bridge> with subtitles, I can hear it 21:05 < bridge> bro i hate that rustfmt is breaking so often silently, no errors, nothing 21:05 < bridge> you mean in macros? 21:06 < bridge> i dunno it often has trouble with long lines etc. 21:06 < bridge> but yeah currently it is broken in a proc macro (so not inside a macro) 21:06 < bridge> normal rust syntax 21:07 < bridge> it might not touch anything in macros 21:07 < bridge> which is pretty annoying 😦 21:07 < bridge> well it worked 2 days ago 21:07 < bridge> but i dont always notice when it breaks xd 21:07 < bridge> ah 😦 21:07 < bridge> and "left behind trailing whitespace" is also a common bug i have 21:08 < bridge> and that one is at least written to cmd line 21:08 < bridge> ok no 21:09 < bridge> that's just the thing it would fix 21:09 < bridge> i got that wrong, but it's not fixing it xD 21:13 < bridge> i just find it weird that it simply does nothing.. --verbose also shows nothing 21:14 < bridge> it could at least say "no i can't do that and skip" or smth 21:14 < bridge> ``` 21:14 < bridge> rustfmt --edition=2021 --verbose lib.rs 21:14 < bridge> Formatting src/lib.rs 21:14 < bridge> Spent 0.001 secs in the parsing phase, and 0.013 secs in the formatting phase 21:14 < bridge> ``` 21:15 < bridge> 21:15 < bridge> that's all i get xd 21:25 < bridge> ```rust 21:25 < bridge> hi_closure!([a: i32, b: &i32], |arg: i32| -> i32 { arg + a + *b + 1 }) 21:25 < bridge> ``` 21:25 < bridge> my custom explicit closure syntax xdd 21:26 < bridge> well if you missing a item the error is a bit useless: 21:26 < bridge> ``` 21:26 < bridge> can't capture dynamic environment in a fn item 21:26 < bridge> use the `|| { ... }` closure form instead 21:26 < bridge> ``` 21:26 < bridge> 21:26 < bridge> but i guess i'll just add to docs and call it a day xdd 21:27 < bridge> well if you missing a item the error is a bit useless: 21:27 < bridge> ``` 21:27 < bridge> can't capture dynamic environment in an fn item in the capture list 21:27 < bridge> use the `|| { ... }` closure form instead 21:27 < bridge> ``` 21:27 < bridge> 21:27 < bridge> but i guess i'll just add to docs and call it a day xdd 21:27 < bridge> well if you missing an item in the capture list the error is a bit useless: 21:27 < bridge> ``` 21:27 < bridge> can't capture dynamic environment in a fn item 21:27 < bridge> use the `|| { ... }` closure form instead 21:27 < bridge> ``` 21:27 < bridge> 21:27 < bridge> but i guess i'll just add to docs and call it a day xdd 21:27 < bridge> Why do you need it? 21:27 < bridge> Are you injecting stuff? 21:27 < bridge> i want all captures to have a trait implemented 21:27 < bridge> i need to make sure they do 21:28 < bridge> else the closure is not panic-safe for Rc 21:28 < bridge> Can't have that with Fn? 21:28 < bridge> Ah, they are probably also not fixed form closures 21:29 < bridge> gimme a second 21:29 < bridge> i give u an example 21:31 < bridge> ```rust 21:31 < bridge> struct MyStruct { 21:31 < bridge> a: i32, 21:31 < bridge> } 21:31 < bridge> 21:31 < bridge> impl MyStruct { 21:31 < bridge> fn test(&self, a_normal_closure: F) where F: Fn() { 21:31 < bridge> a_normal_closure(); 21:31 < bridge> } 21:31 < bridge> } 21:31 < bridge> 21:31 < bridge> fn main() { 21:31 < bridge> let a = Rc::new(RefCell::new(MyStruct {a: 1})); 21:31 < bridge> let b = a.clone(); 21:31 < bridge> 21:31 < bridge> let c = a.borrow_mut(); 21:31 < bridge> c.test(|| b.borrow_mut().a += 1); 21:31 < bridge> } 21:31 < bridge> ``` 21:31 < bridge> bcs i passed b into the closure and have a borrowed mut 21:31 < bridge> => panic 21:32 < bridge> but if MyStruct implements Hiarc trait 21:32 < bridge> 21:33 < bridge> then it can't pass itself into that function call, bcs the hirarchical value must be smaller 21:33 < bridge> 21:33 < bridge> 21:33 < bridge> that's not 100% how i did that, bcs actually there is a wrapper around it 21:33 < bridge> but u could imagine it similar to this 22:27 < bridge> ChillerDragon I found yet another useful program https://github.com/mwh/dragon but only if you use terminal file managers 22:27 < bridge> So now I can drag and drop files from lf (https://github.com/gokcehan/lf) without needing to open thunar :) 23:00 < bridge> Im a Gnomie I use nautilus 23:04 < bridge> You there now? 23:06 < bridge> did u know u can use port 0 to use free port 🤯 23:06 < bridge> Yes 23:08 < bridge> 🐴 23:09 < bridge> ggffgrgrg 23:14 < bridge> horse 23:15 < bridge> cool terminal file manager 23:15 < bridge> https://github.com/sxyazi/yazi 23:15 < bridge> im sure ryo would like it 23:16 < bridge> im sure ryo will like it 23:21 < bridge> epyc 23:21 < bridge> i need a epyc cpu 23:22 < bridge> same 23:53 < bridge>