00:11 <+bridge> [ddnet] is it possible that compiler may choose a value for enumeration? 00:22 <+bridge> [ddnet] okay, i got a really weird bug 00:22 <+bridge> [ddnet] i have an assertion to test if memory has been zeroed, it fails on clang, but not on gcc 00:22 <+bridge> [ddnet] but when i look up the memory with gdb, it is 0 00:29 <+bridge> [ddnet] smells like UB 00:38 <+bridge> [ddnet] ```gdb 00:38 <+bridge> [ddnet] (gdb) p *pCursor 00:38 <+bridge> [ddnet] $9 = {m_Flags = 0, m_LineCount = 0, m_GlyphCount = 0, m_CharCount = 0, m_MaxLines = 0, 00:38 <+bridge> [ddnet] m_StartX = 0, m_StartY = 0, m_LineWidth = 0, m_X = 0, m_Y = 0, m_MaxCharacterHeight = 0, 00:38 <+bridge> [ddnet] m_LongestLineWidth = 0, m_pFont = 0x0, m_FontSize = 0, m_AlignedFontSize = 0, 00:38 <+bridge> [ddnet] m_CalculateSelectionMode = TEXT_CURSOR_SELECTION_MODE_NONE, m_PressMouseX = 0, 00:38 <+bridge> [ddnet] m_PressMouseY = 0, m_ReleaseMouseX = 0, m_ReleaseMouseY = 0, m_SelectionStart = 0, 00:38 <+bridge> [ddnet] m_SelectionEnd = 0, m_CursorMode = TEXT_CURSOR_CURSOR_MODE_NONE, m_CursorCharacter = 0} 00:39 <+bridge> [ddnet] (gdb) x/26wx pCursor 00:39 <+bridge> [ddnet] 0x7fffffff4ee0: 0x00000000 0x00000000 0x00000000 0x00000000 00:39 <+bridge> [ddnet] 0x7fffffff4ef0: 0x00000000 0x00000000 0x00000000 0x00000000 00:39 <+bridge> [ddnet] 0x7fffffff4f00: 0x00000000 0x00000000 0x00000000 0x00000000 00:39 <+bridge> [ddnet] 0x7fffffff4f10: 0x00000000 0x00000000 0x00000000 0x00000000 00:39 <+bridge> [ddnet] 0x7fffffff4f20: 0x00000000 0x00000000 0x00000000 0x00000000 00:39 <+bridge> [ddnet] 0x7fffffff4f30: 0x00000000 0x00000000 0x00000000 0x00000000 00:39 <+bridge> [ddnet] 0x7fffffff4f40: 0x00000000 0x04007fff 00:39 <+bridge> [ddnet] ``` 00:39 <+bridge> [ddnet] this is beyond me 00:42 <+bridge> [ddnet] `sizeof(*pCursor)`? 00:43 <+bridge> [ddnet] 104 00:43 <+bridge> [ddnet] which is actually weird given that i count 100 manually 00:43 <+bridge> [ddnet] then there's probably padding? 00:43 <+bridge> [ddnet] so i'd guess there's some extra data 00:43 <+bridge> [ddnet] the last four bytes 00:43 <+bridge> [ddnet] is there a `int64_t` in there? 00:43 <+bridge> [ddnet] there's a pointer in the middle 00:44 <+bridge> [ddnet] ah yea 00:44 <+bridge> [ddnet] so the structure is padded to a multiple of 8 bytes 00:44 <+bridge> [ddnet] 104 is divisible by 8 00:46 <+bridge> [ddnet] @Chairn do you understand the problem now? 00:47 <+bridge> [ddnet] yup 00:47 <+bridge> [ddnet] looks like standard doesn't require padding to be initialized to 0 00:47 <+bridge> [ddnet] no, padding is indeterminate 00:47 <+bridge> [ddnet] and can change at any time 00:53 <+bridge> [ddnet] `ptype /o var` shows padding in gdb 01:08 <+bridge> [ddnet] > If T is an non-union class type: 01:08 <+bridge> [ddnet] > 01:08 <+bridge> [ddnet] > all padding bits are initialized to zero bits, 01:08 <+bridge> [ddnet] hmm, clang not compliant with standard? 01:08 <+bridge> [ddnet] 01:09 <+bridge> [ddnet] **HUGE** Update to this project! Fokkonaut cleaned up and polished the laser code so now that (with anti-ping on only right now), the lasers are differentiated by weapon and type! Huge shoutout to him! 01:09 <+bridge> [ddnet] If we were to mainstream this into the actual game, it would require an update to the server to send over weapon/laser types. It's not perfect right now, but it's a very solid concept build. 01:09 <+bridge> [ddnet] https://github.com/VoxelDoesCode/ddnet/tree/multicolored-lasers 01:09 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998728130887942144/unknown.png 01:09 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998728131240280124/unknown.png 01:09 <+bridge> [ddnet] **HUGE** Update to this project! Fokkonaut cleaned up and polished the laser code so now that (with anti-ping off only right now), the lasers are differentiated by weapon and type! Huge shoutout to him! 01:09 <+bridge> [ddnet] If we were to mainstream this into the actual game, it would require an update to the server to send over weapon/laser types. It's not perfect right now, but it's a very solid concept build. 01:09 <+bridge> [ddnet] https://github.com/VoxelDoesCode/ddnet/tree/multicolored-lasers 01:09 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998728130887942144/unknown.png 01:09 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998728131240280124/unknown.png 01:10 <+bridge> [ddnet] **HUGE** Update to this project! Fokkonaut cleaned up and polished the laser code so now that (with anti-ping **on** only right now), the lasers are differentiated by weapon and type! Huge shoutout to him! 01:10 <+bridge> [ddnet] If we were to mainstream this into the actual game, it would require an update to the server to send over weapon/laser types. It's not perfect right now, but it's a very solid concept build. 01:10 <+bridge> [ddnet] https://github.com/VoxelDoesCode/ddnet/tree/multicolored-lasers 01:10 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998728130887942144/unknown.png 01:10 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998728131240280124/unknown.png 01:11 <+bridge> [ddnet] **HUGE** Update to this project! Fokkonaut cleaned up and polished the laser code so now that (with anti-ping **off** only right now), the lasers are differentiated by weapon and type! Huge shoutout to him! 01:11 <+bridge> [ddnet] If we were to mainstream this into the actual game, it would require an update to the server to send over weapon/laser types. It's not perfect right now, but it's a very solid concept build. 01:11 <+bridge> [ddnet] https://github.com/VoxelDoesCode/ddnet/tree/multicolored-lasers 01:11 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998728130887942144/unknown.png 01:11 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998728131240280124/unknown.png 01:12 <+bridge> [ddnet] Little correction: On an up-to-date server it works without antiping, but older servers fall back to the rifle laser color. If you use antiping on an older server it also shows the correct color :) 01:12 <+bridge> [ddnet] Maybe nuborn can do something, that it predicts the laser color correctly when holding shotgun, we'll see 01:13 <+bridge> [ddnet] <ᴿᵉˣᵉᴺ> Hello, can anyone talk to me about Client ID? 01:13 <+bridge> [ddnet] Hello, yes 01:21 <+bridge> [ddnet] why don't you PR it? It would be easier to discuss it there 01:23 <+bridge> [ddnet] Pull Request to the main ddnet repo? 01:23 <+bridge> [ddnet] Yes 01:23 <+bridge> [ddnet] You can add commits later on, after the pull request is made already 01:23 <+bridge> [ddnet] @fokkonaut can't wait for colored laser drawings on your server :justatest: 01:23 <+bridge> [ddnet] 01:24 <+bridge> [ddnet] Thought about that too already, but I can only let people choose color 1-4, cuz everyone can set their own colora 01:24 <+bridge> [ddnet] the amount of knowledge by everyone in that question, wtf 01:27 <+bridge> [ddnet] Let me just finalize the menu first, and then I'll PR 01:27 <+bridge> [ddnet] (after supper) 02:52 <+bridge> [ddnet] lol, nice github username 02:53 <+bridge> [ddnet] thanks 😅 03:31 <+bridge> [ddnet] i feel bad whenever i do an if else statement in code, because of how infamous it has become with bad programmers 03:40 <+bridge> [ddnet] whatN 03:40 <+bridge> [ddnet] what? 03:41 <+bridge> [ddnet] :what: 03:42 <+bridge> [ddnet] i dont know, i guess its just a self conscious thought that if i put an if else statement in a piece of code im going to be called yanderedev 03:43 <+bridge> [ddnet] (it works, i tested it) 03:43 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998767111222607872/unknown.png 03:44 <+bridge> [ddnet] i don't know what's a yanderedev, but why would oyu be called names for using correct logic? 03:46 <+bridge> [ddnet] lol thats only if its 03:46 <+bridge> [ddnet] ``` 03:46 <+bridge> [ddnet] if condition: 03:46 <+bridge> [ddnet] do this 03:46 <+bridge> [ddnet] else if condition2: 03:46 <+bridge> [ddnet] do this 03:46 <+bridge> [ddnet] else if condition3: 03:46 <+bridge> [ddnet] . 03:46 <+bridge> [ddnet] . 03:46 <+bridge> [ddnet] . 03:46 <+bridge> [ddnet] else if condition36: 03:46 <+bridge> [ddnet] do this 03:46 <+bridge> [ddnet] ``` 03:46 <+bridge> [ddnet] lol thats only if its 03:46 <+bridge> [ddnet] ```py 03:46 <+bridge> [ddnet] if condition: 03:46 <+bridge> [ddnet] do this 03:46 <+bridge> [ddnet] else if condition2: 03:46 <+bridge> [ddnet] do this 03:46 <+bridge> [ddnet] else if condition3: 03:46 <+bridge> [ddnet] . 03:46 <+bridge> [ddnet] . 03:46 <+bridge> [ddnet] . 03:46 <+bridge> [ddnet] else if condition36: 03:46 <+bridge> [ddnet] do this 03:46 <+bridge> [ddnet] ``` 03:47 <+bridge> [ddnet] i guess im just nervous to finally be programming around people who've been doing it for a decade plus 03:47 <+bridge> [ddnet] its ok most the devs are new too plus things get reviewed 03:51 <+bridge> [ddnet] @Voxel btw what is that conditional for? 03:51 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998769010554441748/unknown.png 03:51 <+bridge> [ddnet] shouldnt it be && or am i misunderstanding 03:52 <+bridge> [ddnet] oops 03:52 <+bridge> [ddnet] ah yup, that condition is always true ^^ 03:52 <+bridge> [ddnet] :justatest: 03:53 <+bridge> [ddnet] given the code shown here, i think a switch would be better 03:54 <+bridge> [ddnet] or not, some code path are completely exclusive 03:54 <+bridge> [ddnet] thing is, if it was a switch there would be a lot more copied code 03:54 <+bridge> [ddnet] but i think compiler would merge code path on itself 03:54 <+bridge> [ddnet] im not sure about conventions but i think readability is prioritized 03:55 <+bridge> [ddnet] i'll change it to switch 03:58 <+bridge> [ddnet] Don't forget to use the same enumeration value from 04:07 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998773167420080138/unknown.png 04:08 <+bridge> [ddnet] wait i dont think i did it right 04:08 <+bridge> [ddnet] How do I call over the enums properly? 04:09 <+bridge> [ddnet] you need to use pointer to variable of type CLaserData, not the class directly 04:09 <+bridge> [ddnet] and for the enums, you probably need to include protocol.h 04:34 <+bridge> [ddnet] what the 04:34 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998779938243088414/unknown.png 04:35 <+bridge> [ddnet] did the lasertype enum just delete itself?! 04:36 <+bridge> [ddnet] probably not 04:36 <+bridge> [ddnet] or maybe im just looking in the wrong place 04:36 <+bridge> [ddnet] @_@ 04:36 <+bridge> [ddnet] are you sure you included the correct files? 04:37 <+bridge> [ddnet] like you're trying to access a pointer to CNetObj_EntityEx without having the class definition 04:37 <+bridge> [ddnet] there's an enum in network.py 04:37 <+bridge> [ddnet] just the forward declaration 04:47 <+bridge> [ddnet] The thing it it was just fine an hour ago, and now it doesn't even build corrently 04:47 <+bridge> [ddnet] The thing is it was just fine an hour ago, and now it doesn't even build corrently 04:49 <+bridge> [ddnet] i dont even know what happened-- what got deleted and undefined the whole load of lasertypes? 04:49 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998783639863177246/unknown.png 04:50 <+bridge> [ddnet] or maybe it was always like this, 04:57 <+bridge> [ddnet] i dont get it.. it didnt have an issue last time i tested this 04:57 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998785708162560021/unknown.png 04:58 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998785836709585028/unknown.png 05:08 <+bridge> [ddnet] sometimes visual studio will freak out and tell you that you have errors which don't exist and you need to restart it. but usually it will still build when that's the case 05:09 <+bridge> [ddnet] did you include protocol.h? 05:10 <+bridge> [ddnet] you can also try to copy the include from items.cpp which seems to be working and then remove them one by one to find the one you need 05:30 <+bridge> [ddnet] otherwise, you can save your work with `git stash` to go back to safe state 05:35 <+bridge> [ddnet] yes 05:35 <+bridge> [ddnet] yes 05:40 <+bridge> [ddnet] the enum's in the x64 release protocol.h 05:50 <+bridge> [ddnet] i think im going to take a break from this for today 05:54 <+bridge> [ddnet] if you click yes it does run and everything acts natural, though it's confusing why none of the programs recognize the enum in program 06:03 <+bridge> [ddnet] I have 2-3 incomplete gamemode with error like this, it can be bad generating, project include 08:18 <+bridge> [ddnet] @Voxel 1st rule: dont look at all the errors visual studio give u xddd 08:20 <+bridge> [ddnet] :monkalaugh: 08:20 <+bridge> [ddnet] its a python file, it is to generate protocol.h for example. 08:21 <+bridge> [ddnet] yea 08:21 <+bridge> [ddnet] You can still b 08:21 <+bridge> [ddnet] not build? 08:21 <+bridge> [ddnet] You can still not build? 08:24 <+bridge> [ddnet] it says "build failed" but if i click yes, it works as intended 08:24 <+bridge> [ddnet] I think it takes an old build, not the current one 08:24 <+bridge> [ddnet] rip 08:25 <+bridge> [ddnet] Can you show the errors? 08:25 <+bridge> [ddnet] the errors are all to the enum 08:25 <+bridge> [ddnet] the errors are all related to the enum 08:26 <+bridge> [ddnet] Thats probably visual studio not recognizing it, because its in a generated file, that can happen sometimes. 08:26 <+bridge> [ddnet] Look for other errors 08:26 <+bridge> [ddnet] Errors that are in files you modified and that include things you made 08:27 <+bridge> [ddnet] Solving 1-2 mostly solves the others, as they are just VS bugging out 08:28 <+bridge> [ddnet] You see that here: It says they are not recognized, but they actually are, or once the build would be successful, they suddenly spawn in again 08:31 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998839502560833546/unknown.png 08:31 <+bridge> [ddnet] all 80 errors are in items.cpp 08:34 <+bridge> [ddnet] Ok, stay in that file and try to build again 08:34 <+bridge> [ddnet] Then look at the errors again/look at the code you wrote 08:35 <+bridge> [ddnet] okay, the build failed. i have 62 errors but i cant scroll through them because windows wont let me until i do something with the popup 08:35 <+bridge> [ddnet] You cant click it? 08:36 <+bridge> [ddnet] Or click the top bar of it? 08:36 <+bridge> [ddnet] i cant click anything in the main vs page until i click one of these popup buttons LOL 08:37 <+bridge> [ddnet] Yea thats to be expected 08:37 <+bridge> [ddnet] click no i think 08:42 <+bridge> [ddnet] a lot of them are related to m_pClient or pCurrent 08:42 <+bridge> [ddnet] Can you show some 08:44 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998842766165540925/unknown.png 08:44 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998842766526255135/unknown.png 08:45 <+bridge> [ddnet] Okay thats the same thing, they are also generated to visual studio doesnt recognize them 08:45 <+bridge> [ddnet] Dont worry about those for now 08:46 <+bridge> [ddnet] you might got a real bug beside all the "pointer to incomplete class" messages and thats why you cant build 08:46 <+bridge> [ddnet] Yea, he does 08:46 <+bridge> [ddnet] Be he has to find it 08:46 <+bridge> [ddnet] Between all this garbage 08:46 <+bridge> [ddnet] :D 08:46 <+bridge> [ddnet] ye, just take a look at your last changes xD 08:47 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998843412507791361/unknown.png 08:48 <+bridge> [ddnet] It says that cuz it doesnt recognize the enum entry 08:48 <+bridge> [ddnet] Dont worry 08:48 <+bridge> [ddnet] @fokkonaut do we still have to guaran'tee' seven support in new PR's? 08:48 <+bridge> [ddnet] No, of course not 08:48 <+bridge> [ddnet] thank good 08:48 <+bridge> [ddnet] i'm still looking :( 08:48 <+bridge> [ddnet] clientside changes are only for ddnet clients 08:48 <+bridge> [ddnet] or what do you mean? 08:48 <+bridge> [ddnet] Oh 08:49 <+bridge> [ddnet] Well, yes you have to guarantee it works and doesnt break 08:49 <+bridge> [ddnet] i mean the whole ToSixup stuff 08:49 <+bridge> [ddnet] Yea ofc 08:49 <+bridge> [ddnet] people should know about ddnet by now and just download it 08:49 <+bridge> [ddnet] all of the errors are just "this is imcomplete" or stuff like that 08:49 <+bridge> [ddnet] Can you try to click on "Project" -> Generate Cache 08:49 <+bridge> [ddnet] praise teeworlds and everything but its not continued 08:50 <+bridge> [ddnet] praise teeworlds and everything but ddrace is the future 08:50 <+bridge> [ddnet] There is an issue on whether support for vanilla should be cancelled. 08:50 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998844313079386132/unknown.png 08:51 <+bridge> [ddnet] Delete Cache and Reconfigure 08:51 <+bridge> [ddnet] Or just rebuild everything 08:56 <+bridge> [ddnet] `fucking kill me` 08:56 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998845823741861988/unknown.png 08:58 <+bridge> [ddnet] **yep it works now** 08:59 <+bridge> [ddnet] 08:59 <+bridge> [ddnet] can you link it please 08:59 <+bridge> [ddnet] I dont have it 08:59 <+bridge> [ddnet] but u should be able to find it 09:00 <+bridge> [ddnet] @Voxel classic :D 09:01 <+bridge> [ddnet] it was located in the switch case i just added too 09:02 <+bridge> [ddnet] xddd 09:53 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/5041 10:07 <+ChillerDragon> @heinrich5991 any idea what this could be about? https://github.com/DDNetPP/DDNetPP/issues/346 it is probably a ddnet++ issue but i did not edit the http or job pool as far as i know 10:10 <+bridge> [ddnet] everything in that mod is broken... 10:10 <+bridge> [ddnet] xd 10:17 <+bridge> [ddnet] whats ddnet++ now 10:18 <+bridge> [ddnet] it's a mod by chillerdragon 10:18 <+bridge> [ddnet] what can it do 10:18 <+ChillerDragon> crash 10:20 <+bridge> [ddnet] xD 10:20 <+bridge> [ddnet] @heinrich5991 thanks for deleting my message btw wtf? 11:45 <+bridge> [ddnet] @heinrich5991 @Ryozuki https://blog.cloudflare.com/a-story-about-af-xdp-network-namespaces-and-a-cookie/ 11:45 <+bridge> [ddnet] Rust ! And they talk about AF_XDP which is damn interesting type of socket 11:46 <+bridge> [ddnet] ow there's C too 11:47 <+bridge> [ddnet] Pog 11:47 <+bridge> [ddnet] cloudflare's blogs are always hq 15:54 <+bridge> [ddnet] how to make bind for dummy deep fly that can switch normal mode and dummy deep fly with only one button? 15:55 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998951179482562560/deepfly_switch.txt 15:55 <+bridge> [ddnet] ^ drag into `%appdata%\teeworlds 15:55 <+bridge> [ddnet] f1 -> exec deepfly_switch.txt 15:55 <+bridge> [ddnet] ^ drag into `%appdata%\teeworlds` 15:55 <+bridge> [ddnet] f1 -> exec deepfly_switch.txt 15:56 <+bridge> [ddnet] yes, it works for me but i tried to help my friend with it 15:56 <+bridge> [ddnet] he has new version 15:56 <+ChillerDragon> asking for a friend 15:58 <+bridge> [ddnet] @Ryozuki hello rustacean, can you briefly explain why this code wont work? 🥺👉👈 15:58 <+bridge> [ddnet] 15:58 <+bridge> [ddnet] The error is 15:58 <+bridge> [ddnet] ```log 15:58 <+bridge> [ddnet] error[E0499]: cannot borrow s as mutable more than once at a time 15:58 <+bridge> [ddnet] --> src/main.rs:7:18 15:58 <+bridge> [ddnet] | 15:58 <+bridge> [ddnet] 4 | let s1 = &mut s; 15:58 <+bridge> [ddnet] | ------ first mutable borrow occurs here 15:58 <+bridge> [ddnet] ... 15:58 <+bridge> [ddnet] 7 | let s2 = &mut s; 15:58 <+bridge> [ddnet] | ^^^^^^ second mutable borrow occurs here 15:58 <+bridge> [ddnet] ... 15:58 <+bridge> [ddnet] 11 | println!("{} {}", s1, s1); 15:58 <+bridge> [ddnet] | -- first borrow later used here 15:58 <+bridge> [ddnet] 15:58 <+bridge> [ddnet] For more information about this error, try rustc --explain E0499. 15:58 <+bridge> [ddnet] ``` 15:58 <+bridge> [ddnet] But s2 goes out of the scope before i use s1, whats wrong? 15:58 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/998951920876126298/IMG_20220719_165141_723.jpg 15:58 <+bridge> [ddnet] declare it afterwards 15:59 <+bridge> [ddnet] only one mutable reference may be live at the same time 16:00 <+bridge> [ddnet] meh okay 16:01 <+bridge> [ddnet] this e.g. ensures that in the presence of multiple threads, only one thread can have a mutable reference to data 16:03 <+bridge> [ddnet] Also none of those references need to be mut to begin with, you aren't mutating through them :P 16:04 <+bridge> [ddnet] That was just a test 😁 16:05 <+bridge> [ddnet] if you give something more real-world-y, we might be able to suggest a replacement 16:06 <+bridge> [ddnet] Sure, as soon as i would be doing something not ... test 🧐 16:06 <+bridge> [ddnet] But thanks 16:07 <+bridge> [ddnet] @heinrich5991 did I ever ask you to take a look at @DDNet? I really want to get back to it but I'm still very undecided on the modules, feels way too static 16:08 <+bridge> [ddnet] I really wanted something like a central registery of commands instead of passing all messages to all modules, but asynchronous callbacks are so hard to work with 16:08 <+bridge> [ddnet] you have not (that I remember) 16:08 <+bridge> [ddnet] link? 16:09 <+bridge> [ddnet] (also, I'm unexperienced with rust async stuff) 16:09 <+bridge> [ddnet] https://github.com/Learath2/discordbot 16:10 <+bridge> [ddnet] The configuration through environment variables isn't very pleasent either, I'll probably move to something like ini or json or toml 16:20 <+bridge> [ddnet] hmm 16:21 <+bridge> [ddnet] true i would only use env vars for secrets 16:21 <+bridge> [ddnet] @Learath2 https://crates.io/crates/config 16:21 <+bridge> [ddnet] i recommend this crate 16:21 <+bridge> [ddnet] i used it before 16:22 <+bridge> [ddnet] and imho toml is the most readable 16:22 <+bridge> [ddnet] and simple 16:22 <+bridge> [ddnet] ill look into ur bot 16:23 <+bridge> [ddnet] @Learath2 would taking a closure returning a `Box` work for the command registry? 16:25 <+bridge> [ddnet] Yeah, you need something along those lines like, been a while since I looked at it but this is about what I had `for<'f> fn(&'f ctx, &'f msg, &'f args) -> Pin + Send + 'f>>` 16:26 <+bridge> [ddnet] that sounds horribly long but about right 😮 16:26 <+bridge> [ddnet] The problem was lifetimes, the context of the command needs to just outlast the callback, but I couldn’t for the life of me get it to take anything that’s not static lifetime 16:26 <+bridge> [ddnet] and i thought people wanted more expressive/human language 16:26 <+bridge> [ddnet] that looks even worse than c++ template 😄 16:27 <+bridge> [ddnet] (we don't do async stuff in c++ to be fair, no idea how that looks like) 16:27 <+bridge> [ddnet] This is an edge case where the rust syntax fails imo, in regular usage it’s much more pleasant than C++ 16:28 <+bridge> [ddnet] It looks much better since you don’t have to spend characters convincing the compiler. However the burden of making sure things live long enough is then upon the coder 16:28 <+bridge> [ddnet] > for<'a> can be read as "for all choices of 'a", and basically produces an infinite list of trait bounds that F must satisfy. Intense. There aren't many places outside of the Fn traits where we encounter HRTBs, and even for those we have a nice magic sugar for the common cases. 16:28 <+bridge> [ddnet] https://doc.rust-lang.org/nomicon/hrtb.html 16:31 <+bridge> [ddnet] why not make a general command trait with an async function and each command is a struct that implements that trait and then u save it on a vector of those traits? 16:32 <+bridge> [ddnet] https://docs.rs/async-trait/0.1.56/async_trait/ 16:32 <+bridge> [ddnet] I can give it a try, with async_trait I think I could make it work 16:34 <+bridge> [ddnet] also if you wanna be database agnostic 16:34 <+bridge> [ddnet] i recommend this https://github.com/SeaQL/sea-orm 16:34 <+bridge> [ddnet] its a orm tho 16:34 <+bridge> [ddnet] but yeah 16:34 <+bridge> [ddnet] its built on top of sqlx 16:35 <+bridge> [ddnet] it uses this https://github.com/SeaQL/sea-query 16:39 <+bridge> [ddnet] i kind of did this pattern when making the paypal api, i made a endpoint trait and then the api endpoints are structs that implement it, this way it also gives the end user the ability to make endpoints that may not yet be implemented, and the api client can execute any struct that impls Endpoint 16:40 <+bridge> [ddnet] kinda proud of this xd 23:01 <+bridge> [ddnet] Now is your Bitcoin wallet or coinbase 0.00000 I promise 0.80500 in less than 24 hours without sending money to anyone. Earn 0.764 in 7hours, No referrals, No Ads, No scams. Ask how(me) 23:01 <+bridge> [ddnet] 23:01 <+bridge> [ddnet] 23:01 <+bridge> [ddnet] Or join https://t.me/+JdEg2rIn7E0wZDFk