00:22 < ws-client> @ryozuki yes mestalin had another name: xush 00:25 < bridge> meskalin? 00:25 < bridge> 👀 00:26 < bridge> botox? 00:26 < ws-client> https://zillyhuhn.com/cs/.1743031577.png 00:26 < bridge> wait what??? 00:26 < bridge> why is freezehammer being removed 00:26 < ws-client> ddnet is no fun zone 00:27 < bridge> b-but 00:27 < ws-client> admins abused it to cheat shorter freeze times 00:27 < bridge> what? 00:27 < ws-client> jk 00:27 < bridge> lets remove invinsible 00:27 < bridge> aswell then ): 00:27 < ws-client> we never had that 00:27 < bridge> let's remove admins 00:27 < bridge> 👀 00:27 < bridge> f3 00:28 < ws-client> yes admins are the worst 00:28 < bridge> got 'em 00:29 < bridge> @chillerdragon btw uhmm 00:29 < bridge> with ddnet-insta you cant control much about ammo even with grenade 00:29 < bridge> i cant figure out how to make greande regen instantly or have infinate ammo 00:29 < bridge> and all the other weapons dont get any args 00:29 < bridge> also shouldnt they be tunes 00:29 < bridge> now ban them, admins! attack! 00:29 < bridge> :kek: 00:30 < bridge> gn8 02:31 < bridge> in demos, is g_Config.m_ClDummy always 0? 11:21 < bridge> @learath2 any clue why my macos build fails to compile 11:21 < bridge> on stuff like the std 11:21 < bridge> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/include/c++/v1/cmath:597:15 11:24 < bridge> ``` 11:24 < bridge> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/include/c++/v1/cwctype:59:5: error: tried including but didn't find libc++'s header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably 11:24 < bridge> 59 | # error tried including but didn't find libc++'s header. \ 11:24 < bridge> | ^ 11:24 < bridge> ``` 11:24 < bridge> i hate macos 11:28 < bridge> wtf 11:28 < bridge> `sudo xcode-select -s /Library/Developer/CommandLineTools` 11:28 < bridge> fixed it 11:37 < bridge> @jupeyy_keks i got this idk why 11:37 < bridge> 11:37 < bridge> ``` 11:37 < bridge> 2025-03-27 11:36:31 I vulkan: no compatible driver found. Vulkan 1.1 is required. 11:37 < bridge> 2025-03-27 11:36:31 I vulkan: vulkan warning: Creating instance failed. 11:37 < bridge> 2025-03-27 11:36:31 I sdl: SDL version 2.30.5 (compiled = 2.0.20) 11:37 < bridge> 2025-03-27 11:36:31 I gfx: Created OpenGL 3.0 context. 11:37 < bridge> 2025-03-27 11:36:32 I gfx: unable to create graphic context: Failed creating OpenGL context at version requested 11:37 < bridge> 2025-03-27 11:36:32 I sdl: SDL version 2.30.5 (compiled = 2.0.20) 11:37 < bridge> 2025-03-27 11:36:32 I gfx: Created OpenGL 2.1 context. 11:37 < bridge> 2025-03-27 11:36:32 I opengl: Vendor string: Apple 11:37 < bridge> 2025-03-27 11:36:32 I opengl: Version string: 2.1 Metal - 89.3 11:37 < bridge> 2025-03-27 11:36:32 I gfx: GPU vendor: Apple 11:37 < bridge> 2025-03-27 11:36:32 I gfx: GPU renderer: Apple M3 Pro 11:37 < bridge> 2025-03-27 11:36:32 I gfx: GPU version: 2.1 Metal - 89.3 11:38 < bridge> ``` 11:38 < bridge> i got the red popup saying failed 11:38 < bridge> @jupeyy_keks i got this idk why 11:38 < bridge> 11:38 < bridge> ``` 11:38 < bridge> 2025-03-27 11:37:54 I gfx: Created Vulkan 1.1 context. 11:38 < bridge> 2025-03-27 11:36:31 I vulkan: no compatible driver found. Vulkan 1.1 is required. 11:38 < bridge> 2025-03-27 11:36:31 I vulkan: vulkan warning: Creating instance failed. 11:38 < bridge> 2025-03-27 11:36:31 I sdl: SDL version 2.30.5 (compiled = 2.0.20) 11:38 < bridge> 2025-03-27 11:36:31 I gfx: Created OpenGL 3.0 context. 11:38 < bridge> 2025-03-27 11:36:32 I gfx: unable to create graphic context: Failed creating OpenGL context at version requested 11:38 < bridge> 2025-03-27 11:36:32 I sdl: SDL version 2.30.5 (compiled = 2.0.20) 11:38 < bridge> 2025-03-27 11:36:32 I gfx: Created OpenGL 2.1 context. 11:38 < bridge> 2025-03-27 11:36:32 I opengl: Vendor string: Apple 11:38 < bridge> 2025-03-27 11:36:32 I opengl: Version string: 2.1 Metal - 89.3 11:38 < bridge> 2025-03-27 11:36:32 I gfx: GPU vendor: Apple 11:38 < bridge> 2025-03-27 11:36:32 I gfx: GPU renderer: Apple M3 Pro 11:38 < bridge> 2025-03-27 11:36:32 I gfx: GPU version: 2.1 Metal - 89.3 11:38 < bridge> ``` 11:39 < bridge> i got the red popup saying failed 11:39 < bridge> MoltenVK installed? 11:39 < bridge> let me see 11:39 < bridge> When we met, it stilled worked, you even showed me the bug XD 11:39 < bridge> Warning: molten-vk 1.2.11 is already installed and up-to-date. 11:39 < bridge> To reinstall 1.2.11, run: 11:39 < bridge> brew reinstall molten-vk 11:39 < bridge> yeah xd, im using last commit now 11:39 < bridge> u told me to test hidpi 11:39 < bridge> yeah, shouldn't have messed with your moltenvk setup.. weird 😄 11:39 < bridge> cmake -DVULKAN=ON -G Ninja .. 11:39 < bridge> looks correct to me 11:40 < bridge> reinstalling molten 11:40 < bridge> -- * Vulkan found 11:40 < bridge> -- Building vulkan shaders 11:40 < bridge> /Users/edgarluque/Documents/misc/ddnet/data/shader/vulkan/quad.vert 11:40 < bridge> -- Finished building vulkan shaders 11:41 < bridge> it also can build the shaders 11:41 < bridge> -- Building vulkan shaders 11:41 < bridge> /Users/edgar/Documents/misc/ddnet/data/shader/vulkan/quad.vert 11:41 < bridge> -- Finished building vulkan shaders 11:41 < bridge> @jupeyy_keks one weird thing 11:41 < bridge> after the build 11:41 < bridge> ld: warning: ignoring duplicate libraries: '-lvulkan' 11:41 < bridge> 😮 11:41 < bridge> [324/324] Linking CXX executable DDNet 11:41 < bridge> ld: warning: ignoring duplicate libraries: '-lvulkan' 11:42 < bridge> Can you lookup where brew installs the package files to? 11:42 < bridge> It should have installed a json file somewhere 11:42 < bridge> ❯ ls /opt/homebrew/opt/molten-vk 11:42 < bridge> Frameworks LICENSE bin include libexec 11:42 < bridge> INSTALL_RECEIPT.json README.md etc lib sbom.spdx.json 11:43 < bridge> the etc 11:43 < bridge> might be interesting 11:43 < bridge> ❯ ls /opt/homebrew/opt/molten-vk/etc/vulkan 11:43 < bridge> icd.d 11:43 < bridge> yes 11:43 < bridge> ❯ ls /opt/homebrew/opt/molten-vk/etc/vulkan/icd.d 11:43 < bridge> MoltenVK_icd.json 11:43 < bridge> inside icd it should be 11:43 < bridge> try to start ddnet with 11:43 < bridge> 11:43 < bridge> ``` 11:43 < bridge> VK_ICD_FILENAMES=/opt/homebrew/opt/molten-vk/etc/vulkan/icd.d/MoltenVK_icd.json ./DDNet 11:43 < bridge> ``` 11:43 < bridge> ❯ cat /opt/homebrew/opt/molten-vk/etc/vulkan/icd.d/MoltenVK_icd.json 11:43 < bridge> { 11:43 < bridge> "file_format_version" : "1.0.0", 11:43 < bridge> "ICD": { 11:43 < bridge> "library_path": "../../../lib/libMoltenVK.dylib", 11:43 < bridge> "api_version" : "1.2.0", 11:44 < bridge> "is_portability_driver" : true 11:44 < bridge> } 11:44 < bridge> } 11:44 < bridge> 2025-03-27 11:44:13 I sdl: SDL version 2.30.5 (compiled = 2.0.20) 11:44 < bridge> 2025-03-27 11:44:13 I gfx: Created Vulkan 1.1 context. 11:44 < bridge> 2025-03-27 11:44:13 I vulkan: no compatible driver found. Vulkan 1.1 is required. 11:44 < bridge> 2025-03-27 11:44:13 I vulkan: vulkan warning: Creating instance failed. 11:44 < bridge> 2025-03-27 11:44:13 I sdl: SDL version 2.30.5 (compiled = 2.0.20) 11:44 < bridge> 2025-03-27 11:44:13 I gfx: Created OpenGL 3.0 context. 11:44 < bridge> 2025-03-27 11:44:13 I gfx: unable to create graphic context: Failed creating OpenGL context at version requested 11:44 < bridge> 2025-03-27 11:44:13 I sdl: SDL version 2.30.5 (compiled = 2.0.20) 11:44 < bridge> 2025-03-27 11:44:13 I gfx: Created OpenGL 2.1 context. 11:44 < bridge> 2025-03-27 11:44:13 I opengl: Vendor string: Apple 11:44 < bridge> 2025-03-27 11:44:13 I opengl: Version string: 2.1 Metal - 89.3 11:44 < bridge> 2025-03-27 11:44:13 I gfx: GPU vendor: Apple 11:44 < bridge> 2025-03-27 11:44:13 I gfx: GPU renderer: Apple M3 Pro 11:44 < bridge> 2025-03-27 11:44:13 I gfx: GPU version: 2.1 Metal - 89.3 11:44 < bridge> 2025-03-27 11:44:13 I sound: sound init successful using audio driver 'coreaudio' 11:44 < bridge> 2025-03-27 11:44:13 I textrender: Freetype version 2.13.3 (compiled = 2.13.3) 11:45 < bridge> 2025-03-27 11:44:13 I joystick: 0 joystick(s) found 11:45 < bridge> 2025-03-27 11:44:13 E serverbrowser: invalid address (ServerIndex=0, TypeIndex=6, AddressIndex=6) 11:45 < bridge> 2025-03-27 11:44:13 E serverbrowser: invalid address (ServerIndex=0, TypeIndex=8, AddressIndex=8) 11:45 < bridge> 2025-03-27 11:44:13 I gfx: unable to get display mode: displayIndex must be in the range 0 - 0 11:45 < bridge> 2025-03-27 11:44:13 I gfx: unable to get display mode: displayIndex must be in the range 0 - 0 11:45 < bridge> 2025-03-27 11:44:14 I http: task done: https://master1.ddnet.org/ddnet/15/servers.json 11:45 < bridge> 2025-03-27 11:44:14 I client: version 19.2 on macos arm64 11:45 < bridge> 2025-03-27 11:44:14 I client: git revision hash: 44f7db9c9872eed7 11:45 < bridge> 2025-03-27 11:44:14 W client: Warning: Could not initialize Vulkan: Creating instance failed. Could not initialize the given graphics backend, reverting to the default backend now. 11:45 < bridge> nope 11:45 < bridge> ok weird 11:45 < bridge> dunno what's broken :/ 11:45 < bridge> idk :d 11:45 < bridge> mac sux 11:45 < bridge> But thanks for testing xd 11:45 < bridge> :13 I sdl: SDL version 2.30.5 (compiled = 2.0.20) 11:45 < bridge> could this have. smth? 11:45 < bridge> i mean you could try to copy `libMoltenVK.dylib` to `libvulkan.dylib` directly next to the binary or smth 11:46 < bridge> 😮 i dunno, we use the SDL vulkan loader but with a custom path i think 11:46 < bridge> do you have: 11:46 < bridge> brew install vulkan-loader 11:46 < bridge> installed? 11:46 < bridge> ==> Downloading https://formulae.brew.sh/api/cask.jws.json 11:46 < bridge> Warning: vulkan-loader 1.4.311 is already installed and up-to-date. 11:46 < bridge> To reinstall 1.4.311, run: 11:46 < bridge> brew reinstall vulkan-loader 11:48 < bridge> This is what deen did for ddnet-rs 11:48 < bridge> That's also why I want a static build of moltenvk. 11:48 < bridge> 11:48 < bridge> Because it sucks to deal with such issues xD 11:51 < bridge> @ryozuki But if you have time, just download and exec this: 11:51 < bridge> 11:51 < bridge> 11:51 < bridge> or if you prefer to build from src 11:51 < bridge> 11:51 < bridge> i'd be interested in that too. 12:07 < bridge> Why can `m_pSkinInfo` be nullptr anyway, seems like we'd rather want a differenciaction between `FallbackToDefault` and `FullyLoaded` 12:21 < bridge> @learath2 is it had to make a c compiler? 12:21 < bridge> since im into compilers maybe ill do it 12:21 < bridge> i think a C compiler without preprocessor is somewhat a doable project in short time 12:22 < bridge> ok the include is preprocessor 12:22 < bridge> hmm idk what would be the hard part 12:22 < bridge> maybe im confusing with c++ since there is no templates it should be easy to do? 12:23 < bridge> Mh, not particularly (barring optimizations). C is fairly simple to parse/lex and also translates fairly naturally to assemblies 12:23 < bridge> maybe the hardest part would be making it compliant fully or smth 12:23 < bridge> As with all compilers hard part is imo optimizations 12:23 < bridge> and the static analysis for -W flags 12:23 < bridge> yeah but llvm does it for me kek 12:23 < bridge> someday ill make my own backend 12:24 < bridge> but that requires lot of time 12:24 < bridge> just for 1 arch 12:24 < bridge> Yeah you could make mistakes here with this, lots of tiny details with C 12:24 < bridge> i guess its also a good way to learn more about c 12:25 < bridge> This is also not that easy indeed, but iirc not required 12:25 < bridge> https://github.com/mortdeus/legacy-cc/tree/master/last1120c 12:25 < bridge> first compiler C code 12:25 < bridge> from 1972 12:26 < bridge> ```c 12:26 < bridge> main(argc, argv) 12:26 < bridge> int argv[]; { 12:26 < bridge> extern init, flush; 12:26 < bridge> extern extdef, eof, open, creat; 12:26 < bridge> extern fout, fin, error, exit, nerror, tmpfil; 12:26 < bridge> ``` 12:26 < bridge> weird syntax 12:27 < bridge> Oh yeah, early C looks weeeird 12:28 < bridge> u know the requirement to declare variables at start of function 12:28 < bridge> aligns a lot with how assembly works 12:28 < bridge> its like u dont have to do a prepass on the function to allocate stack space for variables 12:28 < bridge> u can do it in a single pass 12:28 < bridge> since u know vars are declared first 12:28 < bridge> I would guess that's probbaly why it was a requirement 12:28 < bridge> also llvm has a pass to put all allocas at start 12:29 < bridge> C was really designed in a way that makes the compilers job easy 12:29 < bridge> well it not like itsh ard to find variables used 12:29 < bridge> u just need a extra pass 12:29 < bridge> single pas. compilers are cool tho 12:29 < bridge> like turbopascal 12:30 < bridge> Declaration syntax following use is also very handy, you can use the same machinery to determine types and evaluate expressions 12:30 < bridge> can u give a example of what u mean? 12:31 < bridge> Well with the computers of the day I'd guess the extra pass is far slower than what we now experience 12:31 < bridge> probs 12:32 < bridge> the preprocessor is a pass too, but it makes it so the compile phase doesnt need to do a extra pass to resolve imports 12:32 < bridge> also forward declarations are made to avoid the extra pass too 12:33 < bridge> For a C declaration, you can take the stuff after the type and it's exactly the same syntax as how you'd use that variable in code. That means evaluating a declaration requires no special parsing, you just skip the type and evaluate the expression 12:33 < bridge> its probs also cheaper to use the preprocessor for resolving imports since u dont need to traverse the ast its just text replacement 12:33 < bridge> i would say C was made to be easily compiled indeed 12:34 < bridge> ah ic 12:35 < bridge> altho idk if the C grammar is context free 12:35 < bridge> probs not 12:35 < bridge> if its llk i think its linear parse time guaranteed 12:35 < bridge> I can't really know what they were thinking at the time, but that'd be my guess too 12:35 < bridge> or lalr 12:36 < bridge> Eeeeeh, I can only think of typedefs not being context free 12:37 < bridge> So I guess yeah you are right 12:39 < bridge> `x * y;` this is also not very context free 12:40 < bridge> Hm, it should be. That's always an arithmetic expression 12:40 < bridge> char *foo; 12:41 < bridge> i think a contex free grammar can have x * y and char * foo if they are separated by the = 12:41 < bridge> I see what you mean but that's not enough to make it not context free. It's always either a declaration or an arithmetic expression, but you'll know that as soon as you parse x. UNLESS typedefs are allowed 12:41 < bridge> lhs and rhs 12:44 < bridge> I can't really think of anything but typedefs introducing syntax rules at compile time. But I'm also very sleepy soo I might be missing something 12:46 < bridge> (The preprocessor on the other hand is obviously not context free at all) 14:20 < bridge> @milkeeycat daily lang dev update: got generic parameter type inference, no more ::<> on fn calls 14:20 < bridge> ```rust 14:20 < bridge> mod test { 14:20 < bridge> 14:20 < bridge> 14:20 < bridge> fn hello(x: u64) -> T { 14:20 < bridge> return x as T; 14:20 < bridge> } 14:20 < bridge> 14:20 < bridge> fn main() -> u32 { 14:20 < bridge> let ex: u64 = 2; 14:20 < bridge> let result: u32 = hello(ex); 14:20 < bridge> 14:20 < bridge> return result; 14:20 < bridge> } 14:20 < bridge> } 14:20 < bridge> ``` 14:20 < bridge> new color scheme in discord is so meh 14:20 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1354807374069764108/image.png?ex=67e6a231&is=67e550b1&hm=e24ff63dcbb4357ea2806abdd1a1ad6f73241ef953560fa30ec342add752feeb& 14:21 < bridge> epyc 14:21 < bridge> well this example is wrong cuz i dont have inference for return type generics 14:21 < bridge> its this 14:21 < bridge> ```rust 14:21 < bridge> mod test { 14:21 < bridge> fn hello(x: T) -> u32 { 14:21 < bridge> return x as u32; 14:21 < bridge> } 14:21 < bridge> 14:21 < bridge> fn main() -> u32 { 14:21 < bridge> 14:21 < bridge> let ex: u64 = 2; 14:21 < bridge> let result: u32 = hello(ex); 14:21 < bridge> 14:21 < bridge> return result; 14:21 < bridge> } 14:21 < bridge> } 14:21 < bridge> ``` 14:21 < bridge> xd 14:21 < bridge> infering the return type is a bit more complex :d 14:21 < bridge> is it possible to pass user defined types yet? 14:22 < bridge> iirc I wanted to do something like `func::()` and it didn't work 14:22 < bridge> ii got a nice error for the previous example tho 14:22 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1354807909149704424/imagen.png?ex=67e6a2b0&is=67e55130&hm=e77d75bb49699852cee189cb1b153588d2a4f01d5fb8a818c15d56fedc39f2ce& 14:23 < bridge> hm odd 14:23 < bridge> odd mine looks ok 14:23 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1354808026594541668/imagen.png?ex=67e6a2cc&is=67e5514c&hm=1f934d2b5f5c64028558eec7ef2f73598e74f3b13e02d78b17d9b185ddc2da0e& 14:23 < bridge> use this theme 14:23 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1354808114310025266/imagen.png?ex=67e6a2e1&is=67e55161&hm=25a1453f5d0e07419a995b361d6ef961b5484718d67d22a0ebbe38e40bdb6733& 14:24 < bridge> send example code xd 14:24 < bridge> i prefer 2nd one 😬 14:25 < bridge> ah, the type was in a module 14:25 < bridge> ```rust 14:25 < bridge> mod test { 14:25 < bridge> 14:25 < bridge> struct Test { 14:25 < bridge> a: u32 14:25 < bridge> } 14:25 < bridge> 14:25 < bridge> fn hello(x: T) -> u32 { 14:25 < bridge> return x.a; 14:25 < bridge> } 14:25 < bridge> 14:25 < bridge> fn main() -> u32 { 14:25 < bridge> let ex: Test = Test { 14:25 < bridge> a: 2 14:26 < bridge> }; 14:26 < bridge> // let result: u32 = hello::(ex); 14:26 < bridge> let result: u32 = hello(ex); 14:26 < bridge> 14:26 < bridge> return result; 14:26 < bridge> } 14:26 < bridge> } 14:26 < bridge> ``` 14:26 < bridge> works for me 14:26 < bridge> ic, submodule or like at same level? 14:26 < bridge> change 14:26 < bridge> ```rust 14:26 < bridge> struct Test { 14:26 < bridge> a: u32 14:26 < bridge> } 14:26 < bridge> ``` 14:26 < bridge> to 14:26 < bridge> ```rust 14:26 < bridge> mod test { 14:26 < bridge> struct Test { 14:26 < bridge> a: u32 14:26 < bridge> } 14:26 < bridge> } 14:26 < bridge> ``` 14:28 < bridge> ```rust 14:28 < bridge> mod test { 14:28 < bridge> import a.{Test}; 14:28 < bridge> 14:28 < bridge> mod a { 14:28 < bridge> struct Test { 14:28 < bridge> a: u32 14:28 < bridge> } 14:28 < bridge> } 14:28 < bridge> 14:28 < bridge> 14:28 < bridge> fn hello(x: T) -> u32 { 14:28 < bridge> return x.a; 14:28 < bridge> } 14:28 < bridge> 14:28 < bridge> fn main() -> u32 { 14:28 < bridge> let ex: Test = a::Test { 14:28 < bridge> a: 2 14:28 < bridge> }; 14:28 < bridge> // let result: u32 = hello::(ex); 14:28 < bridge> let result: u32 = hello(ex); 14:28 < bridge> 14:28 < bridge> return result; 14:29 < bridge> } 14:29 < bridge> } 14:29 < bridge> ``` 14:29 < bridge> this works 14:29 < bridge> but i found the issue 14:29 < bridge> i think using a type with path on the lhs of a let doesnt resolve the type if u use a full path 14:29 < bridge> a::Test before the = doesnt work 14:29 < bridge> can you do `let result: u32 = hello::(ex);`? 14:43 < bridge> rust pros i have a question, is it possible to make rust show error if `n` is used after dropping `ctx` 😬 ? 14:43 < bridge> ```rust 14:43 < bridge> use bumpalo::Bump; 14:43 < bridge> 14:43 < bridge> struct Context<'a> { 14:43 < bridge> allocator: &'a Bump, 14:43 < bridge> } 14:43 < bridge> 14:43 < bridge> impl<'a> Context<'a> { 14:43 < bridge> pub fn new() -> Context<'a> { 14:43 < bridge> Self { 14:43 < bridge> allocator: Box::leak(Box::new(Bump::new())), 14:43 < bridge> } 14:43 < bridge> } 14:43 < bridge> 14:43 < bridge> pub fn alloc_i32(&mut self) -> &'a i32 { 14:43 < bridge> self.allocator.alloc(0) 14:43 < bridge> } 14:43 < bridge> } 14:43 < bridge> 14:43 < bridge> impl<'a> Drop for Context<'a> { 14:43 < bridge> fn drop(&mut self) { 14:44 < bridge> unsafe { 14:44 < bridge> drop(Box::from_raw(self.allocator as *const _ as *mut Bump)); 14:44 < bridge> } 14:44 < bridge> } 14:44 < bridge> } 14:44 < bridge> 14:44 < bridge> fn main() { 14:44 < bridge> let mut ctx = Context::new(); 14:44 < bridge> let n = ctx.alloc_i32(); 15:03 < bridge> ```rust 15:03 < bridge> mod test { 15:03 < bridge> 15:03 < bridge> mod a { 15:03 < bridge> struct Test { 15:03 < bridge> a: u32 15:03 < bridge> } 15:03 < bridge> } 15:03 < bridge> 15:03 < bridge> fn hello(x: T) -> u32 { 15:03 < bridge> return x.a; 15:03 < bridge> } 15:03 < bridge> 15:04 < bridge> fn main() -> u32 { 15:04 < bridge> let ex: a::Test = a::Test { 15:04 < bridge> a: 2 15:04 < bridge> }; 15:04 < bridge> // let result: u32 = hello::(ex); 15:04 < bridge> let result: u32 = hello::(ex); 15:04 < bridge> 15:04 < bridge> return result; 15:04 < bridge> } 15:04 < bridge> } 15:04 < bridge> 15:04 < bridge> ``` 15:04 < bridge> @milkeeycat fixed it now works 15:04 < bridge> yes, use phantomdata with a lifetime from ctx 15:04 < bridge> if n doesnt need inherently a lifetime 15:04 < bridge> u can tie it to a lifetime via phantomdata 15:04 < bridge> https://doc.rust-lang.org/std/marker/struct.PhantomData.html 15:04 < bridge> this is called variance / covariance 15:04 < bridge> i tried but it didn't work 15:04 < bridge> maybe it was a skill issue 15:04 < bridge> show what u trie 15:05 < bridge> tried 15:07 < bridge> ```rust 15:07 < bridge> struct Context<'a> { 15:07 < bridge> allocator: &'a Bump, 15:07 < bridge> marker: PhantomData<&'a ()>, 15:07 < bridge> } 15:07 < bridge> 15:07 < bridge> impl<'a> Context<'a> { 15:07 < bridge> pub fn new() -> Self { 15:07 < bridge> Self { 15:07 < bridge> allocator: Box::leak(Box::new(Bump::new())), 15:07 < bridge> marker: PhantomData, 15:07 < bridge> } 15:07 < bridge> } 15:07 < bridge> } 15:07 < bridge> ``` 15:08 < bridge> wait 15:08 < bridge> u want n right 15:08 < bridge> n needs the lifetime 15:08 < bridge> but u know that alloc returns a mut ref? 15:08 < bridge> ur converting the mut ref to a ref 15:08 < bridge> & i32 i mean 15:08 < bridge> ye, it's fine for me 15:09 < bridge> why are u dropping the allocator like that 15:09 < bridge> bump already has proper drop 15:09 < bridge> oh cuz u want to have it as a ref 15:09 < bridge> why? 15:10 < bridge> `pub fn alloc_i32(&mut self) -> &'a i32 {` 15:10 < bridge> if you change `&mut self` to `&'a mut self` you ge the lifetime error 15:10 < bridge> i can make everything work if i pass `&'a Bump` in `new` fn, but I don't want to pass it xd 15:11 < bridge> ```rust 15:11 < bridge> use bumpalo::Bump; 15:11 < bridge> 15:11 < bridge> struct Context { 15:11 < bridge> allocator: Bump, 15:11 < bridge> } 15:11 < bridge> 15:11 < bridge> impl Context { 15:11 < bridge> pub fn new() -> Context { 15:11 < bridge> Self { 15:11 < bridge> allocator: Bump::new(), 15:11 < bridge> } 15:11 < bridge> } 15:11 < bridge> 15:11 < bridge> pub fn alloc_i32(&mut self) -> &mut i32 { 15:11 < bridge> self.allocator.alloc(0) 15:11 < bridge> } 15:11 < bridge> } 15:11 < bridge> 15:11 < bridge> fn main() { 15:11 < bridge> let mut ctx = Context::new(); 15:11 < bridge> let n = ctx.alloc_i32(); 15:11 < bridge> drop(ctx); 15:11 < bridge> dbg!(n); 15:11 < bridge> } 15:11 < bridge> ``` 15:11 < bridge> this doesnt let u use n 15:11 < bridge> https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=07be6a866f9d927bc557864921189aee 15:12 < bridge> btw playground has top 100 crates 15:12 < bridge> which includes bumpalo 15:12 < bridge> (also how I tested it ^^) 15:12 < bridge> https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=ffc59edb65e2490fcc1eb0a8702e60a0 15:12 < bridge> this is my version with just the added `'a` to bind the returned reference to the lifetime of the `Context` 15:13 < bridge> i think rn the non mut &i32 works because u leak the allocator and context just borrows it, since it doesnt own it when it drops it doesnt matter so u can use n 15:15 < bridge> i just dont get why u have bump as a ref 15:15 < bridge> xd 15:15 < bridge> is it intended 15:15 < bridge> yes 15:19 < bridge> Is it intended and useful? 15:19 < bridge> it doesn't do what i want, so it's not every useful 15:19 < bridge> well, it kinda does, but it also allows use after drop 😬 15:23 < bridge> isn't that what you want @milkeeycat 15:23 < bridge> this throws a lifetime error if you use it after the context is dropped 15:24 < bridge> this allows only 1 call to `alloc_i32` :kek: 15:24 < bridge> well if u want shared mutability 15:24 < bridge> u need interior mut 15:24 < bridge> rc refcell 15:25 < bridge> first it doesnt make sense to return &i32 instead of &mut i32 15:25 < bridge> because u are allocating and u will never modify it? 15:25 < bridge> xd 15:26 < bridge> @milkeeycat are u trying to implement interning? 15:27 < bridge> it will be allocating types, but changed it to i32 for everyone to understand 15:29 < bridge> im telling u 15:29 < bridge> use the arena xd 15:30 < bridge> u probs want to intern the types u create, thats why u doing this right 15:30 < bridge> i do this with a arena and i precreate the builtin types and store their ids 15:30 < bridge> and for user types i just have symbol tables 15:30 < bridge> to the type id 15:32 < bridge> i can't use this crate https://docs.rs/typed-generational-arena/latest/typed_generational_arena/ 15:34 < bridge> or wait, I actually can :thonk: 15:36 < bridge> i though i needed access to `StandardSlab` to be able to compare types :bluestripe: 15:36 < bridge> u can 15:36 < bridge> wdym 15:36 < bridge> StandardSlab is a type def to arena without removal btw 15:37 < bridge> its tru the StandardSlabIndex doesnt implement hash idk why, my hack is to use .to_idx() to get the id as usize 15:37 < bridge> and in hashmaps i store that 15:38 < bridge> pub adt_to_type_idx: HashMap, 15:38 < bridge> wait it works 15:38 < bridge> xd 15:38 < bridge> i didn't think that i can simply compare the indices 15:38 < bridge> i think in some place i needed to use usize 15:38 < bridge> but yeah 15:39 < bridge> @milkeeycat its ok if u use slab type of arena, which doesnt allow removal, so u will always only have 1 generation 15:39 < bridge> so u can simply compare the idx 15:39 < bridge> because the generation is always same 15:39 < bridge> yup 15:40 < bridge> i think i got a fix for vanilla demo tunes 👍 15:40 < bridge> is g_Config.m_ClDummy in demos always 0? 15:42 < bridge> @milkeeycat okay its weird because i can use the indexes in hashmaps 15:42 < bridge> i remember i had some problem but i changed it now and works 15:42 < bridge> xd 15:42 < bridge> maybe some outdated dep? 15:43 < bridge> @milkeeycat okay i probs wasnt using slab or idk 15:43 < bridge> ```rust 15:43 < bridge> impl Eq for Index {} 15:43 < bridge> 15:43 < bridge> impl PartialEq for Index { 15:43 < bridge> fn eq(&self, other: &Self) -> bool { 15:44 < bridge> self.index == other.index && self.generation == other.generation 15:44 < bridge> } 15:44 < bridge> } 15:44 < bridge> 15:44 < bridge> impl Hash for Index { 15:44 < bridge> fn hash(&self, state: &mut H) { 15:44 < bridge> self.index.hash(state); 15:44 < bridge> self.generation.hash(state); 15:44 < bridge> } 15:44 < bridge> } 15:44 < bridge> ``` 15:44 < bridge> they have this 15:44 < bridge> so it impls hash if i and g is hash 15:44 < bridge> slabs use this for G 15:44 < bridge> ```rust 15:44 < bridge> #[derive(Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd, Hash)] 15:44 < bridge> #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 15:44 < bridge> pub struct DisableRemoval; 15:44 < bridge> ``` 15:44 < bridge> so it implements hash and eq 15:45 < bridge> ``` 15:45 < bridge> #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 15:45 < bridge> #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 15:45 < bridge> pub struct NonzeroGeneration { 15:45 < bridge> gen: T::NonZero, 15:45 < bridge> } 15:45 < bridge> ``` 15:45 < bridge> standard arena uses this 15:45 < bridge> which doesnt have hash 15:45 < bridge> maybe they forgot 15:45 < bridge> ```rust 15:45 < bridge> #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] 15:45 < bridge> #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 15:45 < bridge> pub struct NonzeroGeneration { 15:45 < bridge> gen: T::NonZero, 15:45 < bridge> } 15:45 < bridge> ``` 15:45 < bridge> i would open a issue 15:45 < bridge> but they use gitlab 15:45 < bridge> i dont remember my account 16:45 < bridge> Become a maintainer they said 16:45 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1354843677620703332/Screenshot_20250327-164446.png?ex=67e6c400&is=67e57280&hm=e67784bb304a606f2d8aca0bfa7e33e5f72ee39e7524f9eb2f5de646693be214& 16:45 < bridge> It'll be fun they said 16:46 < ws-client> yes it very fun @meloƞ please become ddnet maintainer 16:46 < bridge> Hah nah, I'm not proficient enough in c++ yet to tell other people that their code sux 16:47 < bridge> :GreemDev: imagine being a maintainer for anything 16:47 < ws-client> then just review the prs where you feel confident ez @meloƞ 16:47 < bridge> I do that already 16:47 < bridge> Same with issues 16:47 < ws-client> but you dont merge 16:47 < bridge> review me daddy 16:48 < bridge> I don't want merge rights, I don't share the same vision for ddnet as other maintainers 16:48 < bridge> And it would be a mess 16:49 < bridge> I would drop every version older than a year, update everything and use c++21, rust nightly and clang21 16:49 < bridge> And then rewrite it In rust 16:49 < bridge> :cat_cracked_hehe: 16:49 < ws-client> seems aligned to me 16:49 < bridge> frfr 16:50 < bridge> thats the requisite to be in the discord club right 16:50 < bridge> :monkalaugh: 16:50 < bridge> well i would also drop any other version than latest 16:50 < bridge> move to c++23 if not remove c++ entirely 16:51 < bridge> but i know how to separate dreams from reality somewhat 16:51 < bridge> xd 16:51 < bridge> issues and PRS being blocked/closed because otherwise Ubuntu 12.04 wouldn't work anymore 16:51 < bridge> 16:51 < bridge> (This is not an actual scenario, it's an over the top example) 16:51 < bridge> :kekw: 16:51 < bridge> @blaiszephyr why does meskalin hate me btw 16:51 < bridge> I wonder what would happen if you'd just merge everything and resolve conflicts 16:51 < bridge> isnt he a botter 16:51 < bridge> i hate botters 16:52 < bridge> is he siO? 16:52 < bridge> Maybe he was caught in the ATH banwave a few years ago :Pepega: 16:52 < bridge> siO hates me for using GPL 16:52 < bridge> he said im retarded 16:52 < bridge> 🤷 16:52 < bridge> For using gpl? XD 16:52 < bridge> yeah xd 16:52 < bridge> siO was a big botter too 16:52 < bridge> and the first to be banned from all ddnet servers ingame 16:52 < bridge> he had another name i forgor 16:53 < bridge> 2016-01-05 » DDNet 9.1 has been released 16:53 < bridge> 2016-01-03 » DDRace Wiki by Ryozuki 16:53 < bridge> 9.1 16:53 < bridge> omg time flies 16:53 < bridge> Roco? 16:54 < bridge> no lol 16:54 < bridge> roco is a new player kek 16:54 < bridge> ah true Roco was the other dude 16:54 < bridge> From kog who was also caught cheating in a video iirc 16:54 < bridge> A decade ago tho 16:55 < bridge> https://forum.ddnet.org/search.php?keywords=siO&sid=80d7aaa83d148c2eb5d958f9aba58b2d 16:55 < bridge> Shorefire 16:55 < bridge> was his name 16:55 < bridge> https://www.youtube.com/watch?v=y8ELC2u_bls 16:59 < bridge> Ah good old tree client 18:35 < bridge> https://discord.gg/HkmPqFPW 18:37 < bridge> @discortmoderator 18:37 < bridge> @Discord Mod 18:37 < bridge> ty :) 20:04 < bridge> https://arstechnica.com/ai/2025/03/devs-say-ai-crawlers-dominate-traffic-forcing-blocks-on-entire-countries/ 20:04 < bridge> fuck ai ? 20:09 < bridge> no no, it's the idiots who think grabbing a few more projects worth of code is going to make their thing in any significant way better than the others 20:10 < bridge> they're the ones to be mad at, not the cool new technology that still needs to be researched more 20:10 < bridge> fuck Idiots using AI 20:12 < bridge> You could drop the last two words and you'd still be pretty much on point :D 20:12 < bridge> but yeah giving idiots access to computers was a mistake 20:12 < bridge> I've heard more and more about this "vibe coding" thing and it truly disgusts me 20:13 < bridge> AI is meant as a tool helping you to program, not replace your coding session with it 20:14 < bridge> at work we are shadow banning bots which we are detecting, that ignore the robots.txt 20:14 < bridge> this way we also banned the one or other user thinking he could automate some api things xD 20:50 < bridge> do we have a simple basic white circle particle/texture somewhere or can we draw circle quads natively? 20:52 < bridge> at least I found a texture for this, but abusing it for different things might not be ... wise xD 21:00 < bridge> We have `IGraphics::DrawCircle` but it's not very efficient, so a texture would probably better for ingame rendering 21:56 < bridge> how to change f-ddrace entities to ddnet entities from server-side 21:56 < bridge> What does `Graphics()->QuadsSetRotation();` take, a radiant, a degree angle, a floating point value betwen 0 and 1? 22:02 < bridge> I assume radians because there are several calls involving `pi` 22:03 < bridge> but 45° should be pi/4.0f, and it's not 45° 🤔 22:05 < bridge> ah now it works, thank you 22:32 < bridge> I have an issue, that the size of one texture in an image container affects the size of another, has somebody ever experienced something similar? 22:32 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1354931230386291008/screenshot_2025-03-27_22-22-19.png?ex=67e7158a&is=67e5c40a&hm=9e6a2f6eab1f3ba524697873395ff6cff3b84a476455d673d464427dcc4bfca8& 22:35 < bridge> what is an image container 22:35 < bridge> `m_PulleyHeadOffset = RenderTools()->QuadContainerAddSprite(m_ItemsQuadContainerIndex, 24.f * ScalePulley);` 22:35 < bridge> Quad-Container? 🤔 22:36 < bridge> I dunno, I don't even understand what you mean with affects the size 22:36 < bridge> the freeze laser on top is too small 22:37 < bridge> the blocky one? 22:37 < bridge> ah 22:37 < bridge> the purple end 22:37 < bridge> What's the value of ScalePulley here 22:40 < bridge> I found it out, I accidently changed a wrong line when scaling the pulley ... man I feel stupid 23:17 < bridge> soo ... I continued to make grabbers a bit nicer as well :owo: 23:17 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1354942528234848406/grabber_test_2025-03-27_23-15-15.mp4?ex=67e72010&is=67e5ce90&hm=5a0404ac715c9f6f2c01fb83cb1b6202b23605b99ad82b75745f2d8f772d98a7& 23:18 < bridge> summon @hectavoxel 23:20 < bridge> Strength is indicated by rotation speed and wallthrough by rotation (clockwise/anticlockwise) 23:22 < bridge> cool, but i feel like people wont be able to tell the strength based off on rotation when the pullers aren't neatly lined up like this 23:25 < bridge> so would you increase the effect? ^^ 23:25 < bridge> or do you think people wouldn't be able to tell this in general? 23:31 < bridge> good call, I made the speed difference much higher 23:35 < bridge> - I could also change the color depending on speed 23:35 < bridge> - Change/fixiate the line thickness depending on speed 23:38 < bridge> - I could also change the color depending on strength 23:38 < bridge> - Change/fixiate the line thickness depending on strength 23:41 < bridge> smth else than always 4 dots maybe? 23:42 < bridge> also possible, idea was to indicate a pulley (Flaschenzug in german) 23:42 < bridge> Downside of this would be adding 3 sprites instead of one 23:52 < bridge> i thout like 1 dot for each strenght 23:52 < bridge> so 1 dot = weak 3 dots = strong 23:52 < bridge> or smth else than dots, idk what represents strength 23:55 < bridge> 4 really small particles rotating around perhaps? 23:56 < bridge> Then you'd see the laser end, which is always tried to be hidden 23:56 < bridge> but maybe outside of it, I like the idea