07:21 < bridge> thats why its bad xd, explicit > implicit 07:22 < bridge> i was struggling like for a week when started learning cpp and tw code base together 07:22 < bridge> also it makes cserver unreusable 07:23 < bridge> btw with Chairn mem_zero implementation it works all good 07:23 < bridge> same pool but implicit + templatr based 07:23 < bridge> template* 07:27 < bridge> https://godbolt.org/z/dEvPz4xTd 07:29 < bridge> ah xd 07:30 < bridge> should pass m_Pool[ObjectId] as ObjectType*, mem_zero will not recognize it xd 08:16 < bridge> That’s an opinion and you are entitled to it 08:19 < bridge> go to work :giga_chad: 08:20 < bridge> If I wanted to replace it, I would probably just use a `std::array, N> Pool` 08:21 < bridge> i would use `[Option; N]` because cpp is unholy 08:21 < bridge> good morning 08:22 < bridge> Or if you are concerned about the iterator performance maybe a minimal wrapper `struct Pool { std::bitset m_Used; std::array m_Storage;}` 08:22 < bridge> looks like Rust reduces your keyboard EoL :giga_chad: they should mention it 08:23 < bridge> extend* 08:23 < bridge> looks like Rust extend your keyboard EoL :giga_chad: they should mention it 08:23 < bridge> I would definitely not write my own bitset, nor would I mess around with a char array 08:26 < bridge> I guess we do want to placement new it though, so maybe a char array is fine 08:35 < bridge> Anyway, I don’t see it being prettier than what we have. So if you’d like to see a change you’ll have to implement it and make a PR 12:26 < bridge> good morning fellow rustacean :troll: 12:26 < bridge> how are you about new rust foundation draft :troll: 12:27 < bridge> wat 12:28 < bridge> forgot about std::bitset so theres no need to use own bitset anyway 13:29 < bridge> ah yea people seems to complain about all the stuff 13:29 < bridge> https://news.ycombinator.com/item?id=35510987 13:30 < bridge> ohh 13:30 < bridge> til 13:30 < bridge> https://www.reddit.com/r/rust/comments/12e7tdb/rust_trademark_policy_feedback_form/ 13:31 < bridge> Rip 13:31 < bridge> But not uncommon 13:31 < bridge> Vulkan is a royalty free API. Still it's logo is copyrighted 13:32 < bridge> yeah thats bad 13:32 < bridge> but it still hasnt passed 13:32 < bridge> i hope they dont 13:32 < bridge> its common to have this 13:32 < bridge> the problem is its too restrictive 13:33 < bridge> they require u dont use a modified logo 13:49 < bridge> its not just prettier, i was trying to reuse cserver instances with one exec and they had shared ccharacter/cplayer pools xd 13:52 < bridge> is there a f1 command to show the bind of a key? ik i can look at my config 13:52 < bridge> Yep sucks 13:52 < bridge> dump_binds key 13:53 < bridge> I generally dislike global or thread vars 13:53 < bridge> Thread local 14:01 < bridge> @Learath2 i should use realloc in the scenario of implementing a dynamic array right 14:01 < bridge> vs free, copy and malloc 14:01 < bridge> according to benchmarks realloc is more efficient i think 14:01 < bridge> a growable array* 14:01 < bridge> vector 14:01 < bridge> xd 14:02 < bridge> > It's faster to realloc down, and might be faster to realloc up if there's room to grow in place. Otherwise, it translates to a malloc/copy/free. 14:03 < bridge> actually realloc is a jack of all trades 14:04 < bridge> > The realloc() function changes the size of the memory block pointed to by ptr to size bytes. The contents will be unchanged in the range from the start of the region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized. If ptr is NULL, then the call is equivalent to malloc(size), for all values of size; if size is equal to zero, and ptr is not NULL, then the call is equi 14:04 < bridge> Read a bit of it now. Seems to suck indeed xd 14:06 < bridge> The logo is ugly af. So why make such restrictions xD 14:22 < bridge> Definitely, if there is space, realloc won’t involve a memcpy 14:40 < bridge> realloc() knows more about the situation than the malloc() user so it can behave more efficiently 16:29 < bridge> hmm thinking about doing a pop from the front, just a memcopy? xD 16:29 < bridge> does memcopy allow memory overlap 16:30 < bridge> memmove allows overlap, memcopy doesnt 16:30 < bridge> for overlapping i need memmove i think 16:30 < bridge> > The memmove() function copies n bytes from memory area src to memory area dest. The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest. 16:30 < bridge> yeah thanks 17:02 < bridge> Ryozuki gives me my daily dose of low level function learning 17:03 < bridge> arent u c dev 17:03 < bridge> or u just use new 17:03 < bridge> xd 17:10 < bridge> I am no c dev. I know the standard API to some extend since with cpp98 u often still use it. With cpp11 i didn't use it anymore. But i think I know pitfalls of memory alignment, raw memory copying etc to some extend since GPUs obv face the same problem ^^ 17:12 < bridge> And cpp still has no standard network API. So there u'll probably face it too if u don't use a lib 17:12 < bridge> Weak cpp xd 17:12 < bridge> xd 17:13 < bridge> rust has a simple low level api 17:13 < bridge> https://doc.rust-lang.org/alloc/alloc/index.html 17:13 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1095366080022720542/image.png 17:13 < bridge> Are u currently writing the compiler for exactly this? 17:14 < bridge> Or does rust implement it with libc anyway 17:14 < bridge> im not writing a compiler for rust xd 17:14 < bridge> Oh thought u write allvm backend 17:14 < bridge> but the language has a builtin growable array type 17:15 < bridge> so i need to implement it 17:15 < bridge> i am writing a llvm backend 17:15 < bridge> well pedantically 17:15 < bridge> its a compiler frontend 17:15 < bridge> well no 17:15 < bridge> its a backend 17:15 < bridge> nevermind me xd 17:15 < bridge> (a backend that uses llvm) 17:15 < bridge> Lel 17:15 < bridge> So it's not a backend for llvm 17:15 < bridge> That rust might call xd 17:16 < bridge> i dont understand 17:16 < bridge> u know what llvm does right 17:16 < bridge> I mean like llvm to anything compiler 17:16 < bridge> The llvm language 17:16 < bridge> i write a backend as in a program that takes a input program and outputs LLVM IR 17:16 < bridge> like rust does 17:16 < bridge> Ah I c 17:17 < bridge> llvm is a framework for codegen 17:17 < bridge> So u writing a compiler that compiles to llvm ir 17:17 < bridge> yeah 17:17 < bridge> like most modern compilers do 17:17 < bridge> xD 17:17 < bridge> In rust? 17:17 < bridge> yeah 17:17 < bridge> Ez 17:17 < bridge> Html compiler 17:17 < bridge> actually not as ez as in cpp, cuz in cpp u have the fancy cpp api from llvm 17:17 < bridge> in rust u gotta use the C api 17:17 < bridge> Ez 17:17 < bridge> or deal with cpp stuff 17:18 < bridge> Use wrapper 17:18 < bridge> there isnt 17:18 < bridge> I saw one last time we talked about it 17:18 < bridge> inkwell 17:18 < bridge> yeah 17:18 < bridge> but im using MLIR not just llvm 17:18 < bridge> so its another api 17:19 < bridge> Ok I'm not so much in topic 17:19 < bridge> But just fix llvm while u at it 17:19 < bridge> mlir is like another layer on top of llvm ir 17:19 < bridge> what is there to fix xd 17:19 < bridge> Graphic drivers broken and llvm err xd 17:19 < bridge> i wanted to maybe contribute in extending the C api but im lazy 17:20 < bridge> and im sure its a long process to contribute 17:20 < bridge> Do it 17:20 < bridge> Would be super amazing 17:20 < bridge> i would go to twitter and say im a llvm dev 17:20 < bridge> clout please 17:20 < bridge> and then get a hot goth gf 17:20 < bridge> It's like me contributing to VK API xd 17:20 < bridge> xd 17:20 < bridge> u did? 17:21 < bridge> i kinda wanna do it 17:21 < bridge> No. But i defs have ideas to improve 2d stuff.. but i doubt Nvidia cares about me xdd 17:21 < bridge> i nfact ill probs contribute 17:21 < bridge> i also can get clout at my work 17:21 < bridge> hello boss, im a llvm dev now 17:21 < bridge> use me to flex in ur meetings thanks 17:21 < bridge> Ez xd 17:21 < bridge> I know real llvm dev 17:22 < bridge> its not really that hard 17:22 < bridge> Wtf is llvm 17:22 < bridge> its just a closed world 17:22 < bridge> Would be response 17:22 < bridge> like its hard to get into 17:22 < bridge> cuz docs about inner workings arent there 17:22 < bridge> but well i already llooked at llvm source code due to lack of docs 17:22 < bridge> Ez 17:23 < bridge> patiga is spying 👁️ 17:23 < bridge> How can u tell 17:23 < bridge> i saw him type 17:23 < bridge> Fbi 17:23 < bridge> fbi open up 17:25 < bridge> @Jupeyy_Keks u need disk space tho xd 17:25 < bridge> the fcking repo takes gb 17:28 < bridge> I once compiled it. Took quite long xd 17:28 < bridge> i did several times 17:28 < bridge> xd 18:15 < bridge> @Jupeyy_Keks https://twitter.com/rustlang/status/1645790199484665859 18:15 < bridge> some assurance3 for now 18:45 < bridge> Hey, I think it'd be great to have a timeline on mappers' profile 18:46 < bridge> Something like that : 18:46 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1095389328382894171/image.png 19:29 < bridge> Nice graphic. Make a issue on the web repo otherwise it probably gets lost 19:30 < bridge> 👍 20:40 < bridge> no trademark is the real trademark 20:40 < bridge> true 20:41 < bridge> i dunno how these organizations play together but defs weird, they should simply say "ok fuck it april fool bye" 20:41 < bridge> at the end capitalism always corrodes 20:41 < bridge> @Ryozuki can trust = can't rust 20:41 < bridge> can i trust you? 20:41 < bridge> but it wont be accepted as it is 20:41 < bridge> no 20:41 < bridge> u shouldnt even trust urself 20:41 < bridge> can you rust? 20:41 < bridge> ur brain senses can lie to you 20:41 < bridge> you cant spell trust without rust 20:42 < bridge> u can trust its more safe than cpp 20:42 < bridge> cant wait for the next gen language 20:42 < bridge> i can't rust cuz it's more safe than cpp 20:42 < bridge> as a hardware designer, i often do some unsafe c/cpp, true 20:42 < bridge> u cant trust hardware 20:42 < bridge> thus u cant trust software 20:42 < bridge> can you pin a variable to a specific address in rust? 20:43 < bridge> unsafe P{ 20:43 < bridge> unsafe {} 20:43 < bridge> in safe rust or unsafe rust? xd 20:43 < bridge> either 20:43 < bridge> u can maybe even in both 20:43 < bridge> can you inline assembly in rust? 20:43 < bridge> even nasa has failures 20:43 < bridge> ye 20:43 < bridge> but u can only dereference in unsafe 20:43 < bridge> https://doc.rust-lang.org/reference/inline-assembly.html 20:44 < bridge> this seems generic 20:44 < bridge> in unsafe rust u can do pretty much everything bcs pointers 20:44 < bridge> u can even trick the borrow checker with it 20:44 < bridge> too bad that x86 SIMD assembly will trigger segfault everywhere 20:44 < bridge> what does this mean 20:44 < bridge> can u do arch specific instructions 20:44 < bridge> portable simd support is in nightly 20:45 < bridge> https://doc.rust-lang.org/std/simd/index.html 20:45 < bridge> https://github.com/rust-lang/portable-simd 20:45 < bridge> yeah its assembly 20:45 < bridge> smiley 20:45 < bridge> actually u dont need assembly for that 20:45 < bridge> intrinsics aside 20:45 < bridge> rust most probs has intrinsics for those targets 20:46 < bridge> i made ryoos with rust 20:46 < bridge> u can do low level 20:46 < bridge> idk why u think not 20:46 < bridge> its stupid misconception 20:46 < bridge> can i define constraint on unsafe code? 20:46 < bridge> like cpp constraint? 20:46 < bridge> like, tell compiler input/output 20:46 < bridge> so that it can still optimizes around 20:47 < bridge> unsafe code allows a small list of things 20:47 < bridge> Dereference raw pointers 20:47 < bridge> Call unsafe functions (including C functions, compiler intrinsics, and the raw allocator) 20:47 < bridge> Implement unsafe traits 20:47 < bridge> Mutate statics 20:47 < bridge> Access fields of unions 20:47 < bridge> or give him referenced address in memory so that memory fence may be needed 20:47 < bridge> mr compiler 20:49 < bridge> https://doc.rust-lang.org/std/sync/atomic/fn.fence.html 20:50 < bridge> from the asm? 20:50 < bridge> for* 20:50 < bridge> yes 20:50 < bridge> https://doc.rust-lang.org/reference/inline-assembly.html#operand-type 20:50 < bridge> did u even look at my links 20:50 < bridge> but he should infer the memory fence by itself if i give it correct constraints 20:51 < bridge> https://doc.rust-lang.org/reference/inline-assembly.html#options 20:52 < bridge> not yet 20:52 < bridge> ok 20:52 < bridge> i have no reason to continue discussing 20:52 < bridge> :troll: 20:52 < bridge> rust fan extremly mad xD 20:53 < bridge> who is not mad at this lmao 20:53 < bridge> i tell u things and u dont care 20:53 < bridge> idk why i even answer in the first place 20:53 < bridge> he uses you as gpt 20:53 < bridge> 20:53 < bridge> u have to read the link and answer all questions 21:15 < bridge> well, i ask questions because i thought about these now, but i dont have time to delve into it right now 21:20 < bridge> im mad and there is nothing u can do about it 21:20 < bridge> i wont breathe now 21:21 < bridge> https://poorlydrawnlines.com/comic/mad/ 21:50 < bridge> hi who broke vertical alignment 21:50 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1095435789309059112/image.png 21:51 < bridge> my symmetric brain doesnt like this 22:07 < bridge> Where are those buttons? Maybe you can take a look at the text render and identify what's causing this. I assume somewhere the text height calculation is wrong or inconsistent with the actual rending. Otherwise the icon would be correctly vertically centered. 22:07 < bridge> its the search filters 22:08 < bridge> but it was never like this, tho i ddint play for like a week 22:08 < bridge> stable release 22:08 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1095440321946603581/image.png 22:12 < bridge> I recently overhauled vertical alignment in the UI, so if some alignment is wrong it's probably from that. But those changes are not in stable yet. And for me those buttons look correct also with current master. 22:16 < bridge> probably resolution dependent 22:21 < bridge> `TextRender()->SetRenderFlags(ETextRenderFlags::TEXT_RENDER_FLAG_ONLY_ADVANCE_WIDTH | ETextRenderFlags::TEXT_RENDER_FLAG_NO_X_BEARING | ETextRenderFlags::TEXT_RENDER_FLAG_NO_Y_BEARING | ETextRenderFlags::TEXT_RENDER_FLAG_NO_PIXEL_ALIGMENT);` 22:21 < bridge> 22:21 < bridge> these were removed for example 22:22 < bridge> they are important bcs some letters have bearings to look normal in latin text. but if you want to pixel perfect align u dont want it 22:24 < bridge> i think those functions use labels which have auto font size capability 22:24 < bridge> could be broken 22:25 < bridge> But for vertical centering you only need the correct total height of the text to align it? Or does this also change the offset somehow? 22:25 < bridge> Ligatures will make the height misleading 22:25 < bridge> I think it's Y bearing 22:25 < bridge> yeah the offset is probably part of the height 22:34 < bridge> looks like the compiler guesses which memory is touched, i don't see you can give him variable names directly touched by the assembly code 22:37 < bridge> mr compiler 22:38 < bridge> he is mr hardware 22:38 < bridge> ryo is mr compiler 23:55 < bridge> Ryo ia mr rust* 23:55 < bridge> Ryo is mr rust*