00:10 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203115242922582036/GFWGSw5WgAAtstB.png?ex=65cfeb62&is=65bd7662&hm=8a8b84bed72ac6801c71fd5542760096158315bce6efc7d8a20fe19bc6bb279c& 00:10 < bridge> :gigachad: 00:10 < bridge> :gigachad: 00:11 < bridge> What sum? 00:19 < bridge> cumulative 00:19 < bridge> ah, it says so 00:21 < bridge> @murpi ❤️ 00:22 < bridge> Can't wait for things to break left and right again 00:22 < bridge> Testing the bot changes was incredibly difficult. You can't even change a map channel twice without being rate-limited 02:23 < bridge> well, turkey kebab 02:23 < bridge> :gigachad: 02:23 < bridge> they built different fr 02:45 < bridge> @milkeeycat: ddnet does not appreciate your insane coding skills. Don‘t worry they will get to know you. 02:45 < bridge> 02:45 < bridge> We the discord-irc team thank you for your amazing services! We could not have done it without you. 05:41 < ws-client> htoprc is the greatest thing in the world 05:41 < ws-client> https://zillyhuhn.com/cs/.1706935266.png 07:22 * ChillerDragon a 08:15 < bridge> ChillerDragon: is there any updated version of the ddnet 0.7 client besides the headless one? I've been using the 17.2.1 release to play vanilla as a usa player with eu players but I can't see votes, which I see is now crossed off on the list of bugs. 08:47 < ws-client> woah @pisstine i did not expect anybody to actually use that how did you even hear of it :D 09:04 < bridge> I saw a vid you did of how to make a server dummy n make them do things n then saw the ddnet7 download thing after looking on github for a bit, its very helpful 09:05 < ws-client> common github stalking W 09:05 < ws-client> @pisstine windows user i assume? 09:07 < ws-client> I made a new release extra for you <:heartw:395753947396046850> @pisstine 09:07 < ws-client> https://chillerdragon.github.io/ddnet7-client/ 09:10 < bridge> chillerdragon thx 🥹 09:14 < bridge> oh yeah windows user, thank u very much!!! 09:29 < bridge> mmm 10:10 < bridge> lol 10:10 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203266229175844924/GFXhwmCacAAWw4Z.png?ex=65d07800&is=65be0300&hm=55af00806eefd07c1c2e37e98769bd805dc4dcebbd0343aae7196a8219011e94& 10:10 < bridge> @tsfreddie take notes of ur weird lang 10:11 < bridge> old news 10:20 < bridge> @learath2 https://neovide.dev/index.html 10:20 < bridge> it has cursor animations 10:20 < bridge> which are impossible in a normal terminal 10:21 < bridge> cuz terminals dont rly know what a cursor is 10:21 < bridge> it makes following vim motions nice 11:03 < bridge> wdym? Terminals definitely know what a cursor is :O 11:04 < bridge> I'm sure you could port that animated cursor to Alacritty or Kitty if you really wanted 11:09 < ws-client> Yea implementing a shell and a terminal emulator is on my bucket list for sure. To fully understand who is responsible for what. 11:09 < bridge> i made a function to convert hsla to int, but i think it's broken o_O 11:09 < bridge> this is the function 11:09 < bridge> ```cpp 11:10 < bridge> int CSkyb::HSLAToInt(std::uint8_t H, std::uint8_t S, std::uint8_t L, std::uint8_t A)//convert hsla color to int 11:10 < bridge> { 11:10 < bridge> std::uint32_t color = 0; 11:10 < bridge> color += H; 11:10 < bridge> color += S * 0Xff; 11:10 < bridge> color += L * 0Xffff; 11:10 < bridge> color += A * 0Xffffff; 11:10 < bridge> return static_cast(color); 11:10 < bridge> } 11:10 < bridge> ``` 11:10 < bridge> it's giving me rainbow kinda effect when i call it this way. 11:10 < bridge> ```cpp 11:10 < bridge> pPlayer->m_TeeInfos.m_ColorFeet = skyb.HSLAToInt(0,255, snum++, 0); 11:10 < bridge> ``` 11:10 < bridge> note: sum goes 0 to 255 in loop. 11:10 < bridge> can someone help ? 11:15 < bridge> We literally already have this in the code 11:15 < bridge> looks like you're not correctly scaling it correctly 11:15 < bridge> looks like you're not correctly scaling it 11:15 < bridge> Use `ColorHSLA` and the `Pack` function 11:15 < bridge> oh wait this is for ddnet - ah gg 11:16 < bridge> You also have the components all in the wrong places. Iirc we have our A on the MSB 11:16 < bridge> Oh wait. Those are multiplications 11:17 < bridge> hm 11:17 < bridge> I remember that 11:17 < bridge> Seems buggy because `A * 0Xffffff` is promoted to signed int, which can overflow. It should be `A * 0Xffffffu` to avoid any signed types in the calculation 11:17 < bridge> there is a mod do this 11:18 < bridge> Just use ColorHSLA::Pack, we already figured all this out for you 😄 11:18 < bridge> https://github.com/bonobo-craft/ddnet-infclass/blob/dcb706756c8e50acf22bcbd5e68a7428c24d4064/src/infcroya/skin.cpp#L154-L162 11:18 < bridge> i couldn't get rgb effect with ColorHSLA and Pack, can some one give me the exact code ? 11:19 < bridge> here is a HSLAtoInt 11:19 < bridge> Colors values are between 0.0f and 1.0f with our color functions 11:19 < bridge> Not between 0-255 11:20 < bridge> here is a HSLAtoInt (for 0.7, but also could use for 0.6) 11:20 < bridge> here is a HSLAtoInt (for 0.7, but also be able to use for 0.6) 11:21 < bridge> thank you ❤️ 11:22 < bridge> o_O 11:22 < bridge> colors looks complicated 11:22 < bridge> But these are skin colors 11:23 < bridge> For those he should use the `Pack` function 11:23 < bridge> But he likely initializes the `ColorHSLA` with 0-255 values, which are out of range 11:24 < bridge> by 0.6 you mean teeworlds and 0.7 DDNet ? 11:25 < bridge> No 11:25 < bridge> Teeworlds 0.7 11:26 < bridge> is the page you gave me works with DDNet ? 11:26 < bridge> Yes (for player skin) 11:26 < bridge> Yes (only for player skin) 11:27 < bridge> Those colors are in 0-255 values 11:29 < bridge> What's the CNetMsg_Sv_CommandInfoGroupStart use for? 11:29 < bridge> I only see it send on server 11:30 < bridge> Did it just a way to tell developer "There is a group command"? 11:31 < bridge> > This allows custom clients to understand when a list is complete, instead of relying on heuristics such as timeouts. 11:31 < bridge> #7764 11:31 < bridge> https://github.com/ddnet/ddnet/pull/7764 11:51 < bridge> But there isn't any things client to do 11:51 < bridge> i dont think so i read it somewhere 11:52 < bridge> freebsd terminal has mouse support 11:52 < bridge> epic 11:52 < bridge> hmm i read somewhere that making the motions neovide does is hard on a classic terminal 11:52 < bridge> any terminal has mouse 11:52 < bridge> oh wait 11:53 < bridge> well vim has mouse support so most terms do 11:53 < bridge> i mean the tty 11:53 < bridge> https://neovide.dev/assets/AnimatedCursor.gif 11:53 < bridge> i dont have mouse support there 11:53 < bridge> https://neovide.dev/assets/SmoothScrolling.gif 11:54 < bridge> kuhl 11:54 < bridge> welcome to 2024 11:55 < bridge> i hate smooth scrolling btw xd 11:55 < bridge> on 240hz it's useless 11:56 < bridge> smooth scrolling here means its not line based 11:56 < bridge> ah ok 11:56 < bridge> i think its better than line based 11:56 < bridge> u can follow lines easier 11:56 < bridge> i thought it scrolls smooth from line to line ^^ 11:57 < bridge> @ryozuki have u ever written a custom serde serializer? 11:57 < bridge> yeah but nothing fully 11:57 < bridge> why 11:57 < bridge> is it hard? 11:57 < bridge> shouldnt be hard as long as u can map well to the serde data model 11:57 < bridge> i kinda want to try out xd 11:57 < bridge> https://serde.rs/data-model.html 11:57 < bridge> do it 11:57 < bridge> its fun 12:09 < bridge> why im finding out you can add `u` literal to hex function on ddnet discord, i never seen it mentioned on any resource i read 😭 12:09 < bridge> why im finding out you can add `u` literal to hex on ddnet discord, i never seen it mentioned on any resource i read 😭 12:09 < bridge> https://gist.github.com/edg-l/11d096e694fd38bd71337a9abc03592d 12:09 < bridge> epic edlang ir 12:09 < bridge> ```rust 12:09 < bridge> mod Main { 12:09 < bridge> 12:09 < bridge> fn main(argc: i32) -> i32 { 12:09 < bridge> let mut x: i32 = 2; 12:09 < bridge> x = 4; 12:09 < bridge> let y: i32 = other(2); 12:09 < bridge> return x; 12:09 < bridge> } 12:09 < bridge> 12:09 < bridge> fn other(a: i32) -> i32 { 12:09 < bridge> return a; 12:09 < bridge> } 12:09 < bridge> } 12:09 < bridge> 12:09 < bridge> ``` 12:09 < bridge> this is the program 12:09 < bridge> this looks even less readable than rust:pepeW: 12:09 < bridge> dude its a IR its not mean to be readable 12:09 < bridge> its meant to be made so its easy to use on the codegen 12:09 < bridge> what IR stands for 12:09 < bridge> intermediate representation? 12:10 < bridge> will read :okSanya: 12:10 < bridge> yes 12:10 < bridge> https://en.wikipedia.org/wiki/Intermediate_representation 12:10 < bridge> a complex compiler goes like 12:11 < bridge> source code -> lex / parse -> AST -> IR (there can be like diferent levels of ir, for instance, rust has THIR, HIR, MIR) -> codegen 12:12 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203297037743955998/image.png?ex=65d094b1&is=65be1fb1&hm=d20a3590a206c0842d3532ae23e5ea0e8610b518d7d95bea2148e7f3adc249c2& 12:13 < bridge> Rust but not rust 12:13 < bridge> @learath2 yeah xd 12:13 < bridge> when i got smth more solid ill deviate from this 12:13 < bridge> Bro is so addicted to rust his own language looks like rust 12:14 < bridge> dis website is so cool https://astexplorer.net/ 12:14 < bridge> I use Kitty and if I go to insert mode, the cursor switches from a block to a line 12:15 < bridge> It should be part of the xterm "standard" 12:15 < bridge> https://github.com/edg-l/edlang/blob/master/lib/edlang_ir/src/lib.rs 12:15 < bridge> all my code is free software u can find it here 12:15 < bridge> agpl 12:16 < bridge> the repo is a bit mess cuz im transitioning from ast -> codegen to ast -> ir -> codegen 12:16 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203298022071476264/image.png?ex=65d0959c&is=65be209c&hm=c209954bd5e134a0abe262117ffd7e30ef86ca6060285903b69165294ef1206a& 12:16 < bridge> totally not copying rustc structure 12:17 < bridge> Kitty neovim cursor stuff 12:17 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203298168633040907/6HPRZN2.mp4?ex=65d095bf&is=65be20bf&hm=09cdd6abaf7d14ad80c4ebe1d127b9deeb140a41d08abf8d4aea86a755b4437b& 12:17 < bridge> when someone asks for ur homework and you tell them make it different so it doesnt look the same 12:17 < bridge> Also I just remembered that it also uses underline in replace mode 12:17 < bridge> I just remembered that it also uses underline in replace mode 12:18 < bridge> i use alacritty 12:18 < bridge> is kitty made with rust? no 12:19 < bridge> thats the answer 12:19 < bridge> :gigachad: 12:19 < bridge> Kitty has some nice features that Alacritty still doesnt have 12:19 < bridge> i hope alacritty uses vulkan someday 12:19 < bridge> like a proper image protocol and ligatures 12:19 < bridge> nice 12:19 < bridge> i dont use em 12:19 < bridge> xD 12:19 < bridge> i dont even use alacritty vim mode 12:20 < bridge> I love ligatures though :O 12:20 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203299030151602176/2iDDAcU.png?ex=65d0968d&is=65be218d&hm=071b5849eae7ae6e9d27a2a30539e92880f4cea69260169b19c7a8dc87dd5580& 12:20 < bridge> i dont 12:21 < bridge> i like seeing exactly 12:21 < bridge> what i type 12:21 < bridge> its confusing af xd 12:21 < bridge> I'm not a ligature enjoyer either 12:21 < bridge> for rust they should add a fish 12:21 < bridge> for ::<> 12:22 < bridge> @learath2 btw rust turbofish is made to avoid c++ mistake 12:23 < bridge> Who is a turbofish? 12:23 < bridge> https://scrumplex.rocks/img/1706959325_Uoj1Ne.png 12:23 < bridge> c++ uses Vec::xx 12:23 < bridge> ^^ 12:23 < bridge> rust requires 12:23 < bridge> Vec::::new() 12:24 < bridge> > The Vec:: syntax is what C++ uses. why doesn't that work with Rust and requires such odd syntax (Vec::::) ? 12:24 < bridge> Images in terminal? What kinda blasphemy? 12:24 < bridge> https://www.reddit.com/r/rust/comments/v4rir6/turbofish_why/ 12:24 < bridge> > Because it means that the meaning of < depends on whether the preceding symbol refers to a template, or not, which requires either: 12:24 < bridge> > 12:24 < bridge> > A complex parsing algorithm, such as GLR. 12:24 < bridge> > 12:24 < bridge> > A parsing algorithm which mixes parsing and symbol look-up. 12:24 < bridge> https://sw.kovidgoyal.net/kitty/graphics-protocol/ :D 12:24 < bridge> https://github.com/rust-lang/rust/blob/master/tests/ui/parser/bastion-of-the-turbofish.rs 12:25 < bridge> This isn't Kitty exclusive either. WezTerm and I think KDE's Konsole also support the protocol 12:25 < bridge> ```rust 12:25 < bridge> // check-pass 12:25 < bridge> 12:25 < bridge> // Bastion of the Turbofish 12:25 < bridge> // ------------------------ 12:25 < bridge> // Beware travellers, lest you venture into waters callous and unforgiving, 12:25 < bridge> // where hope must be abandoned, ere it is cruelly torn from you. For here 12:25 < bridge> // stands the bastion of the Turbofish: an impenetrable fortress holding 12:25 < bridge> // unshaking against those who would dare suggest the supererogation of the 12:25 < bridge> // Turbofish. 12:25 < bridge> // 12:25 < bridge> // Once I was young and foolish and had the impudence to imagine that I could 12:25 < bridge> // shake free from the coils by which that creature had us tightly bound. I 12:25 < bridge> // dared to suggest that there was a better way: a brighter future, in which 12:25 < bridge> // Rustaceans both new and old could be rid of that vile beast. But alas! In 12:25 < bridge> // my foolhardiness my ignorance was unveiled and my dreams were dashed 12:25 < bridge> // unforgivingly against the rock of syntactic ambiguity. 12:25 < bridge> // 12:25 < bridge> // This humble program, small and insignificant though it might seem, 12:25 < bridge> // demonstrates that to which we had previously cast a blind eye: an ambiguity 12:25 < bridge> // in permitting generic arguments to be provided without the consent of the 12:26 < bridge> // Great Turbofish. Should you be so naïve as to try to revolt against its 12:26 < bridge> // mighty clutches, here shall its wrath be indomitably displayed. This 12:26 < bridge> // program must pass for all eternity: forever watched by the guardian angel 12:26 < bridge> // which gave this beast its name, and stands fundamentally at odds with the 12:26 < bridge> // impetuous rebellion against the Turbofish. 12:26 < bridge> // 12:26 < bridge> // My heart aches in sorrow, for I know I am defeated. Let this be a warning 12:26 < bridge> // to all those who come after: for they too must overcome the impassible 12:26 < bridge> // hurdle of defeating the great beast, championed by a resolute winged 12:26 < bridge> // guardian. 12:26 < bridge> this is a rustc test 12:26 < bridge> Hm, what is the other meaning of in C++? 12:27 < bridge> any type 12:28 < bridge> its using a templated type 12:28 < bridge> or wahtever 12:28 < bridge> like u got a generic class 12:28 < bridge> Oh, I just saw it in the reddit post, it can be interpreted as less than T greater than ... 12:28 < bridge> yeah 12:28 < bridge> I was wondering what the parsing ambiguity was 12:28 < bridge> in c++ to solve this 12:28 < bridge> they do like complex af parsing 12:28 < bridge> and symbol lookup 12:28 < bridge> iirc 12:29 < bridge> https://en.wikipedia.org/wiki/GLR_parser 12:29 < bridge> > A complex parsing algorithm, such as GLR. 12:29 < bridge> > 12:29 < bridge> > A parsing algorithm which mixes parsing and symbol look-up. 12:29 < bridge> Is rust even parsable by just an LR parser? 12:29 < bridge> iirc yes 12:30 < bridge> https://github.com/chuckcscccl/rustlr/ 12:30 < bridge> hm i wonder xd 12:31 < bridge> > ust-analyzer uses a hand-written recursive descent / Pratt parser 12:31 < bridge> > rust-analyzer uses a hand-written recursive descent / Pratt parser 12:32 < bridge> So it is LR huh cool 12:32 < bridge> > An operator-precedence parser is a simple shift-reduce parser that is capable of parsing a subset of LR(1) grammars. More precisely, the operator-precedence parser can parse all LR(1) grammars where two consecutive nonterminals and epsilon never appear in the right-hand side of any rule. 12:40 < bridge> Actually I remember rust-analyzer having some trouble with some rust. I wonder if they use an LR parser but the language as defined isn't LR 12:41 < bridge> In other news I'll be trying out C++20 coroutines today 12:53 < bridge> xD 13:31 < Konsti> i just updated client to latest and instantly regretted 13:31 < bridge> rip Konsti 13:31 < Konsti> how do i find servers that are neither kog or ddnet now? 13:32 < bridge> its all under the globe, you disable the filters on the left tab 13:32 < bridge> its all under the globe, you disable the filters on the right, at the left tab 13:32 < bridge> its all under the globe, you disable the filters on the right, at the left tab | on update, the DDRaceNetwork community filter is on by default 13:32 < bridge> Include "None" in your community filter 13:33 < Konsti> xd thanks i found it 13:33 < Konsti> unfair to check that by default 13:36 < bridge> well it IS the ddracenetwork client, so i find it okay either way to have it automatically checked tbh 13:36 < bridge> but it can be confusing as to why you dont see other servers on startup - true 13:38 < bridge> "None" is disabled by default? 13:53 < bridge> @archimede67 Thanks! ^ 13:59 < bridge> :poggers2: 14:08 < bridge> AAAAAA coroutines are soo cool 14:08 < bridge> They just need some STL support for them to be very usable, but even by hand they are not too bad, and so flexible too 14:08 < bridge> I hope the performance isn't god awful 14:12 < bridge> ugh 14:12 < bridge> should i implement short circuit for ifs etc 14:12 < bridge> sounds pain 14:14 < bridge> i see it puts and and or in a diferent way at the ast level 14:31 < bridge> you have to, it would be very meh without 14:32 < ws-client> Konsti still here? 14:32 < ChillerDragon> ah rip rat gone 14:35 < bridge> unfortunately the serde data model lacks fixed-size byte arrays: https://github.com/serde-rs/serde/issues/2120 14:46 < bridge> @archimede67 WTF 14:50 < bridge> https://paste.pr0.tips/SuA look at this 14:54 < bridge> the meat is the `gen_steps` function? 14:54 < bridge> the rest is helper code? 14:54 < bridge> does the compiler to a transform into a state machine? 15:03 < bridge> Yes, the rest is just boilerplate only because the stl doesn't come with helpers yet, easily can be made generic 15:04 < bridge> Hm, I don't think that's the case with this kind of stackless coroutine 15:04 < bridge> yea, seems like a lot of overhead right now 15:04 < bridge> is there a different option? 15:04 < bridge> I think rust/C# compile stuff like that into state machines 15:05 < bridge> Oh, I just took a look at what's generated and yeah it does seem to be a state machine 15:10 < bridge> C++23 is bringing `std::generator` the first stl template that wraps coroutines, with that you'll just have to do 15:10 < bridge> ```cpp 15:10 < bridge> std::generator gen_steps(int start, int end, int stride = 1) { 15:10 < bridge> for(int i = start; i < end; i += stride) co_yield i; 15:10 < bridge> } 15:10 < bridge> ``` 15:11 < bridge> that looks like dynamic dispatch 15:11 < bridge> is it? 15:11 < bridge> Huh, why? 15:11 < bridge> > `std::generator` 15:11 < bridge> there's nothing unique about this type 15:12 < bridge> like `std::function` is also dynamic dispatch 15:12 < bridge> There is no type erasure here though, why would there be dynamic dispatch? 15:13 < bridge> Specialized on int it'd look about exactly like what I wrote with an implementation for `std::generator::iterator` so you can use range based for loops 15:13 < bridge> how can there be no type erasure? 15:14 < bridge> the type `std::generator` mentions nothing about this particular function 15:14 < bridge> i.e. it looks like it's the same type for all generators returning `int` 15:14 < bridge> am I missing something? 15:15 < bridge> Oh, yep it's exactly the same for every generator that returns int 15:15 < bridge> but why does that imply dynamic dispatch anywhere? 15:15 < bridge> sooo, it needs to have a function pointer to advance to the next element? 15:15 < bridge> rust async can do static dispatch right? 15:15 < bridge> making it dynamic dispatch 15:15 < bridge> yes 15:16 < bridge> iirc it requires object safe 15:16 < bridge> whivh is why u need to box some stugg 15:16 < bridge> stuff 15:16 < bridge> omg mobile 15:16 < bridge> dynamic dispatch needs object safety 15:16 < bridge> ah ye 15:17 < bridge> good morning 15:17 < bridge> try cppcoro 15:17 < bridge> try edlang 15:17 < bridge> available soon 15:18 < bridge> Would that even really be considered dynamic dispatch? Which implementation of resume() gets called is completely determined at compile time 15:18 < bridge> with short circuit 15:18 < bridge> Yeah already saw it, I wanted to see what Core is capable of for now 15:19 < bridge> i feel sick but idk why 15:19 < bridge> every time a function pointer is involved, it's dynamic dispatch, no? 15:20 < bridge> for performance considerations 15:20 < bridge> I am unsure, idk if there is an official definition we can refer to, but for me picking which function to call at runtime is the characteristic of dynamic dispatch 15:21 < bridge> I see 15:21 < bridge> I wanted to say that this is as much dynamic dispatch as passing an `std::function`, even if it's a constant 15:21 < bridge> but I was wrong about there being no type erasure to begin with, generators hold a `std::coroutine_handle<>` erasing the promise type 15:25 < bridge> I wonder how well current compilers can see through this to optimize, what I wrote should be optimized out to just a for loop 15:30 < bridge> https://godbolt.org/z/ef8xj87cb atleast clang is pretty good at it 😄 15:30 < bridge> Though I did have to suggest inline to it 15:31 < bridge> my oficial def is if the llvm call is indirect or not 15:31 < bridge> gcc is godawful at it 15:31 < bridge> llvm ir 15:35 < bridge> hungry 15:35 < bridge> It has been a while since I've seen gcc fumble so badly against clang 15:35 < bridge> im at gym :owo: 15:36 < bridge> this basement looking thing has no Internet and no wifi 15:36 < bridge> u gotta go to a spot to get better Signal 15:36 < bridge> xd 15:38 < bridge> MSVC is even worse, I guess until they both improve using coroutines in anything serious is out of question 15:40 < bridge> rip 15:40 < bridge> tldr: use rust 15:43 < bridge> one day 15:43 < bridge> but 15:43 < bridge> if u wanna do async u almodt 15:43 < bridge> almost always 15:44 < bridge> wanna use erlang or elixir 15:44 < bridge> Anyway, enough messing around, it is time to learn some vulkan 15:44 < bridge> or gleam 15:44 < bridge> gleam uses BEAM too but is rust like 15:44 < bridge> i need to learn it 15:44 < bridge> I wonder what performance and the ecosystem is like for these more exotic languages 15:45 < bridge> they literally made for async 15:45 < bridge> the lang itself is a actor system 15:45 < bridge> One of the biggest charms of using C++, Rust, Java, JS, Python is that the performance characteristics are very well known 15:45 < bridge> its fault tolerant 15:45 < bridge> whatsapp uses erlang 15:46 < bridge> u should learn it 15:46 < bridge> i need to too 15:46 < bridge> It at the very least sounds cool 15:46 < bridge> my company uses erlang elixir for distributed, and to call cpu bound programs in rust 15:46 < bridge> and rust for making VMs and cpu bound stuff 15:47 < bridge> my company uses erlang elixir for distributed, and to call cpu bound programs made in rust 15:47 < bridge> also BEAM allows full introspection 15:47 < bridge> to memory, tasks etc 15:47 < bridge> I wonder if gleam has erlang ffi seeing as they run on the same vm 15:47 < bridge> and u can kill stugg 15:47 < bridge> stuff 15:47 < bridge> since its preemptive 15:47 < bridge> and update live code 15:48 < bridge> e.g. this would make me worry about performance characteristics of the language 15:48 < bridge> this is why u dont use it for cpu bound dtut 15:48 < bridge> stuff 15:48 < bridge> Introspective capabilities usually come with a medium to large performance hit 15:48 < bridge> its for managinh tasks 15:48 < bridge> high level async 15:49 < bridge> Hm, and if a task needs to be highly performant you just spawn something native to take care of it? 15:49 < bridge> also 15:49 < bridge> for most apps 15:49 < bridge> the bottleneck is internet 15:49 < bridge> not cpu 15:49 < bridge> i/o 15:49 < bridge> beam world across computers 15:50 < bridge> its a shared vm 15:50 < bridge> works 15:50 < bridge> my phonenis so broken 15:50 < bridge> yes 15:50 < bridge> my company made a game engine backend in elixir 15:50 < bridge> It does sound interesting, I might check it out later 15:50 < bridge> it calls rust for some stugf 15:50 < bridge> like physixs 15:50 < bridge> server side i mean 15:50 < bridge> What does a game engine backend imply? 15:51 < bridge> managinh lobbies and each lobby itself 15:51 < bridge> scoreboards 15:51 < bridge> Oic 15:51 < bridge> etc 15:51 < bridge> ok, it's vk time, cya 15:53 < bridge> obligatory "anyone else at FOSDEM?" ^^ 15:53 < bridge> @ryozuki lots of gpl enjoyers here 15:54 < bridge> @patiga idk if fossdem but probs ccc 15:54 < bridge> what time is fossdem 15:54 < bridge> fosdem is rn and tomorrow 15:54 < bridge> ah rip 15:55 < bridge> @patiga check the llvm talks 15:55 < bridge> :poggers2: 15:55 < bridge> you wanna find co-workers? :p 15:56 < bridge> xD 15:56 < bridge> im just interested in llvm itself 15:56 < bridge> i got a nice project idea 15:56 < bridge> https://fosdem.org/2024/schedule/event/fosdem-2024-3163-copyleft-and-the-gpl-finding-the-path-forward-to-defend-our-software-right-to-repair/ 15:56 < bridge> a llvm ir bitcode builder in rust 15:56 < bridge> so u dont need to use llvm until u wanna convert the bitcode 15:57 < bridge> but its a rly bit project 15:57 < bridge> nice 15:57 < bridge> stallman is not at fosdem right? 15:57 < bridge> i have a coworker who is into gpl too 15:57 < bridge> he met stallman 15:57 < bridge> and has a pic 16:00 < bridge> ryo ur company stuff sounds rly cool 16:00 < bridge> when send pic 16:00 < bridge> this coworker is my tech lead 16:00 < bridge> xd 16:01 < bridge> he is in the rust-lang github team 16:01 < bridge> (which is big tho) 16:04 < bridge> :NekoDrink: 16:04 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203355291152810085/Screenshot_2024-02-03-16-03-42-824_com.linkedin.android-edit.jpg?ex=65d0caf2&is=65be55f2&hm=8ad0f8dc15e56069b9982daed6f2c634d5012b996c20fa92c6281bc0ccb98ed7& 16:25 < bridge> are u gonna do it 16:26 < bridge> based on only the 2 sentences 16:26 < bridge> xd 16:26 < bridge> gotta know more 16:27 < bridge> i like my current place but if i do same stuff and better pay i may think it 16:41 < bridge> ryochad 16:42 < bridge> poor kid 17:20 < bridge> i just tried ddnet editor after one year, it was awesome, nice job whoever done it 17:21 < bridge> today is a good day 17:25 < bridge> where is the code that when you are freeze, game gives you ninja skin ? can i change it ? 17:27 < bridge> i seen it somewhere but i can't remember 17:33 < bridge> btw, i only want to change server side stuff not client side 17:35 < bridge> I've noticed RAII is kinda annoying to do when you have exceptionphobia like me 17:35 < bridge> in what way? 17:35 < bridge> haven't noticed it in rust, at least 17:36 < bridge> c++ exceptions kek 17:36 < bridge> Failing in a constructor or a destructor is um impossible-ish 17:36 < bridge> do it like in rust. never do work in a constructor. do the work in a static member function 17:36 < bridge> well in rust a drop cant return a result but u can panic 17:36 < bridge> never mind i found it 17:36 < bridge> and resources failing to clean up is really something 17:37 < bridge> Well, problem is what would I return if I failed? 17:37 < bridge> damn debug info asking for taxes 17:37 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203378771562864711/image.png?ex=65d0e0d0&is=65be6bd0&hm=e0e1933b2e8f7a9988ccffe4a757b6a4f355c06d788bb42a1044cbd27036df49& 17:37 < bridge> kek 17:37 < bridge> you can either use std::variant or use the C++ pattern where every object has an empty state 17:37 < bridge> I could have a `bool Init` like I would in C 17:38 < bridge> you kinda need to have that C++ pattern anyway because of move constructors 17:38 < bridge> I find that really bad 😦 17:38 < bridge> Anyway, I've avoided exceptions for far too long, I'll just try to make peace with them 😄 17:39 < bridge> I don't like that exceptions are essentially untyped 17:39 < bridge> dwarfsourcelanguage 17:39 < bridge> what should i put here for my language lol 17:39 < bridge> edlang? 17:39 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203379354378305608/image.png?ex=65d0e15b&is=65be6c5b&hm=e5a0a49ed3827522285807f1ae2c3be54de3fe2ef05e478d964a8b9753877a57& 17:39 < bridge> its a static enum 17:40 < bridge> unfair 17:40 < bridge> I don't like code-as-picture 17:40 < bridge> can you send a link? 🙂 17:40 < bridge> I don't like exceptions in general, too heavy 17:40 < bridge> ok 17:40 < bridge> https://thedan64.github.io/inkwell/llvm_sys/debuginfo/enum.LLVMDWARFSourceLanguage.html 17:40 < bridge> here 17:41 < bridge> if I was allowed to take only one thing from rust for a hypothetical language I'd take `Result` 17:41 < bridge> I guess you could just choose a new value? @ryozuki 17:41 < bridge> the builder accepts the enum 17:41 < bridge> i guess ill just use rust 17:41 < bridge> could also check what nim does 17:41 < bridge> or maybe i should do c17 17:41 < bridge> does nim use llvm? 17:42 < bridge> doesn't nim generate C? 17:42 < bridge> ah. apparently nim compiles to C/C++/JS 17:43 < bridge> https://dwarfstd.org/languages.html 17:43 < bridge> > Note: Issue 210419.1 introduced a way to separately specify languages and versions, which is expected to be adopted for DWARF Version 6. See DWARF Version 6 Languages and Version Codes for the new codes. 17:43 < bridge> ``` 17:43 < bridge> g.dcu = d.dIBuilderCreateCompileUnit( 17:43 < bridge> DWARFSourceLanguageC99, df, "nlvm", 4, isOptimized, flags, flags.len.csize_t, 17:43 < bridge> runtimeVer, "", 0, DWARFEmissionFull, 0, False, False, nil, 0, nil, 0) 17:43 < bridge> ``` 17:44 < bridge> there is a nim compileri n llvm 17:44 < bridge> they use c99 17:44 < bridge> ill put c17 xd 17:45 < bridge> ```nim 17:45 < bridge> g.dcu = d.dIBuilderCreateCompileUnit( 17:45 < bridge> DWARFSourceLanguageC99, df, "nlvm", 4, isOptimized, flags, flags.len.csize_t, 17:45 < bridge> runtimeVer, "", 0, DWARFEmissionFull, 0, False, False, nil, 0, nil, 0) 17:45 < bridge> ``` 17:45 < bridge> u gotta gym in the gym and discord at home 🙂 17:45 < bridge> what does it affect? 17:45 < bridge> i check discord when i rest 17:45 < bridge> i wonder idk 17:45 < bridge> does it affect what syntax gdb uses for `print` etc commands? 17:45 < bridge> if so, rust would probably be better 17:46 < bridge> since your language looks like rst 17:46 < bridge> since your language looks like rust 17:46 < bridge> true 17:48 < bridge> is that on discord 😄 ? 17:48 < bridge> linkedin 17:48 < bridge> I still don't have a linkedin account 17:48 < bridge> maybe one should 17:48 < bridge> someone kows what dwo_id is 17:48 < bridge> even @ryozuki has one 😮 17:48 < bridge> in dwarf 17:48 < bridge> @heinrich5991 ofc i have one 17:48 < bridge> its how i found my job 17:49 < bridge> rest at home then, you gotta optimize your workout 😛 17:50 < bridge> > The value in the dwo_id field of the unit header for this unit is the same as the6 17:50 < bridge> > value in the dwo_id field of the unit header of the corresponding full7 17:50 < bridge> > compilation unit (see Section 7.5.1 on page 199).8 17:50 < bridge> > The means of determining a compilation unit ID does not need to be similar or related9 17:50 < bridge> > to the means of determining a type unit signature. However, it should be suitable for10 17:50 < bridge> > detecting file version skew or other kinds of mismatched files and for looking up a full11 17:50 < bridge> > split unit in a DWARF package file (see Section 7.3.5 on page 190). 17:50 < bridge> i mean the 1 min rest between sets xd 17:50 < bridge> i don't know, i don't go to gym 17:53 < bridge> u can do strenous exercise for a bit but then u gotta rest, 1 min is kind of the standard 18:07 < bridge> I Rest until my Body feels fit enough to Continue, im still resting from my Set from over 3 years ago 18:07 < bridge> should I also get one? 18:13 < bridge> its nice having a "this is me" page ngl 18:15 < bridge> i would say yes if u wanna find a job, or maybe with a local german job website its enough 18:15 < bridge> but specially if u want a international company to find u 18:15 < bridge> i think in europe job hunting is mostly done in linkedin 18:15 < bridge> that said 18:15 < bridge> its a big privacy loss 18:16 < bridge> @tsfreddie when u in the photoshoot mode and u shoot a sg it will do sg color laser for 1 frame then it turns laser/rifle color 18:16 < bridge> https://edgarluque.com/ 18:16 < bridge> this is me btw 18:16 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203388468017758278/image.png?ex=65d0e9d8&is=65be74d8&hm=ee50e900d7a874ceee2bcc0608c261c826dfe92137db7635254e5fad697d9151& 18:16 < bridge> i've read through this one! 18:16 < bridge> i didnt understand 80% of it! 18:16 < bridge> which one 18:16 < bridge> intro to LLVM and MLIR with Rust and Melior 18:16 < bridge> https://edgarluque.com/blog/rust-hashmap/ 18:23 < bridge> i forgot to add video 18:23 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203390295086075954/photoshoot.mp4?ex=65d0eb8c&is=65be768c&hm=069b84e0bc8b0ea5be8dc86a2f866a3302c5b757a8b2729f5046d8e84a5bf6b3& 18:49 < bridge> looks cool 18:51 < bridge> does look pretty cool 19:17 < bridge> quick question, is there a reason we are still defaulting `cl_skin_download_url` to https://skins.ddnet.org/skin ? there are proxy's that either include more custom skins by default, or query skins from multiple db's (taking Scrumplex's proxy as an example: `https://skins.Scrumplex.net/skin` 19:18 < bridge> or is it more of a "this one works for certain so we are using this" ? 19:18 < bridge> quick question, is there a reason we are still defaulting `cl_skin_download_url` to https://skins.ddnet.org/skin ? there are proxy's that either include more custom skins by default, or query skins from multiple db's (taking Scrumplex's proxy as an example: https://skins.Scrumplex.net/skin 19:19 < bridge> Quality over quantity 19:21 < bridge> the default is intentionally limited/curated 19:22 < bridge> ah okay - thanks 19:25 < bridge> there's a skins proxy :monkaS::monkaS: 19:25 < bridge> wanted that for so long 19:25 < bridge> didnt know it was real 19:25 < bridge> is scrumplex's gonna be slow 19:26 < bridge> i think it's intended that you use cl_skin_community_download_url for that 19:46 < bridge> tfw can't get a `move_iterator` out of `istream_iterator` :pepeW: 19:49 < bridge> why would u 19:50 < bridge> Because it won't optimize properly, copy elision isn't enough it seems 20:07 < bridge> when https://github.com/ddnet/ddnet/issues/6825 😦 20:08 < bridge> omg 20:08 < bridge> time flies 20:08 < bridge> i decided to just use llvm and not mlir for edlang 20:08 < bridge> @stormaxd your time to shine 20:08 < bridge> why 20:08 < bridge> @mpft so i do it different from work 20:08 < bridge> xd 20:08 < bridge> <-StormAx> How you want me to do? 20:09 < bridge> ```llvm 20:09 < bridge> ; ModuleID = 'Main' 20:09 < bridge> source_filename = "simple.ed" 20:09 < bridge> target triple = "x86_64-unknown-linux-gnu" 20:09 < bridge> 20:09 < bridge> define private i32 @main(i32 %0) { 20:09 < bridge> entry: 20:09 < bridge> %"0" = alloca i32, align 4 20:09 < bridge> %"1" = alloca i32, align 4 20:09 < bridge> store i32 %0, ptr %"1", align 4 20:09 < bridge> %"2" = alloca i32, align 4 20:09 < bridge> br label %block_0 20:09 < bridge> 20:09 < bridge> block_0: ; preds = %entry 20:09 < bridge> store i32 2, ptr %"2", align 4 20:09 < bridge> store i32 4, ptr %"2", align 4 20:09 < bridge> %1 = load i32, ptr %"2", align 4 20:09 < bridge> store i32 %1, ptr %"0", align 4 20:09 < bridge> %2 = load i32, ptr %"0", align 4 20:09 < bridge> ret i32 %2 20:09 < bridge> } 20:09 < bridge> 20:09 < bridge> !llvm.dbg.cu = !{!0} 20:09 < bridge> 20:09 < bridge> !0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "edlang", isOptimized: true, runtimeVersion: 1, emissionKind: FullDebug, splitDebugInlining: false, sdk: "edlang-sdk") 20:09 < bridge> !1 = !DIFile(filename: "simple.ed", directory: "programs") 20:09 < bridge> ``` 20:09 < bridge> remake stats page but do it dedicated 20:09 < bridge> ```rust 20:10 < bridge> mod Main { 20:10 < bridge> 20:10 < bridge> fn main(argc: i32) -> i32 { 20:10 < bridge> let mut x: i32 = 2; 20:10 < bridge> x = 4; 20:10 < bridge> return x; 20:10 < bridge> } 20:10 < bridge> } 20:10 < bridge> 20:10 < bridge> ``` 20:10 < bridge> my program xd 20:10 < bridge> ```x86asm 20:10 < bridge> .text 20:10 < bridge> .file "simple.ed" 20:10 < bridge> .p2align 4, 0x90 20:10 < bridge> .type .Lmain,@function 20:10 < bridge> .Lmain: 20:10 < bridge> .Lfunc_begin0: 20:10 < bridge> .cfi_startproc 20:10 < bridge> movl $4, %eax 20:10 < bridge> the assembly :o 20:10 < bridge> <-StormAx> Currently working on different things 20:10 < bridge> >:/ 20:11 < bridge> free will is cool 20:11 < bridge> wdym 20:11 < bridge> ah ye 20:14 < bridge> edlang on  master [$✘!] via 🦀 v1.75.0 20:14 < bridge> ❯ ./target_ed/simple 20:14 < bridge> 20:14 < bridge> edlang on  master [$✘!] via 🦀 v1.75.0 20:14 < bridge> ❯ echo $? 20:14 < bridge> 4 20:14 < bridge> epic 20:15 < bridge> the ir made codegen so stupidly simple 20:15 < bridge> but well the meat is in the lowering 20:15 < bridge> :justatest: 20:15 < bridge> the what 20:15 < bridge> ? 20:15 < bridge> lowering 20:15 < bridge> when u go from ast to ir 20:15 < bridge> its called lowering 20:16 < bridge> https://luctielen.com/posts/how-to-lower-an-ir/ 20:17 < bridge> i see 20:18 < bridge> r u on linux? 20:18 < bridge> well u need llvm 17 20:19 < bridge> ```bash 20:19 < bridge> git clone git@github.com:edg-l/edlang.git 20:19 < bridge> cd edlang 20:19 < bridge> cargo r -- programs/simple.ed 20:19 < bridge> ./target_ed/simple 20:19 < bridge> ``` 20:20 < bridge> the rank table 20:20 < bridge> i have the scripts 20:20 < bridge> just need to be adapted to ddnet 20:21 < bridge> <-StormAx> Ooof 20:21 < bridge> <-StormAx> Well, i would try 20:22 < bridge> ill send it to you 20:59 < bridge> i am not 20:59 < bridge> i was reconsidering doing it again last night tho 20:59 < bridge> i see people's riced out i3 desktops and i get weak at the knees 20:59 < bridge> i just hate that linux and windows are so polarizing (at least for desktop) 21:00 < bridge> you might hang out in the wrong circles 21:00 < bridge> for most people I know, the choice of the OS is not polarizing 21:01 < bridge> I guess it's different on this discord :/ 21:02 < bridge> this is the only place i get shit for running windows 21:02 < bridge> idk why we are harboring toxic mentality when it comes to software 21:02 < bridge> i notice ppl are generally very uppity about proprietary software 21:02 < bridge> in this channel 21:03 < bridge> that sort of mindset is exactly why many of the few who are anti-OSS are the way they are 21:03 < bridge> they hate the preachy elitist mentality 21:03 < bridge> that seems weird as well 21:03 < bridge> astonishing how such a great idea can have a bad stigma 21:03 < bridge> not liking OSS because people have too strong opinions on it 21:03 < bridge> no, they deciding to be anti oss because they dont care about foss 21:04 < bridge> I haven't heard it having a stigma tbh. is that a US thing? 21:04 < bridge> it's a some people thing 21:04 < bridge> also high expectations for code maintenance is a big turn off 21:04 < bridge> its more that windows ppl hate linux without even trying, and say windows is better without even trying 21:04 < bridge> so u grow annoyed of such ignorance 21:05 < bridge> cool but i don't remember expressing anything like that a single time in here 21:05 < bridge> and i still get shit for it 21:05 < bridge> hm? I think you're generally allowed to dump your code as OSS without maintenance being expected 21:05 < bridge> im kinda anti OSS too, im pro FOSS 21:05 < bridge> well from what i remember reading one of the big reasons avo won't go oss is not because there's anything super valuable to them that they want to keep private in their code, it's that he thinks there is an expectation of maintenance 21:06 < bridge> also have heard this from another dev directly 21:06 < bridge> i doubt it's an uncommon sentiment 21:06 < bridge> you know we are talking about the same thing 21:06 < bridge> its just an excuse imho 21:06 < bridge> i like to quote this again 21:06 < bridge> https://www.gnu.org/philosophy/pragmatic.en.html 21:06 < bridge> open-source is the same as FOSS 21:06 < bridge> no it isnt 21:06 < bridge> technically speaking no but for the sake of this convo yes 21:07 < bridge> https://www.gnu.org/philosophy/open-source-misses-the-point.en.html 21:07 < bridge> yes. they literally created the term open-source to say exactly what GNU says on that website 21:08 < bridge> > Not all of the users and developers of free software agreed with the goals of the free software movement. In 1998, a part of the free software community splintered off and began campaigning in the name of “open source.” The term was originally proposed to avoid a possible misunderstanding of the term “free software,” but it soon became associated with philosophical views quite different from those of the free software movement. 21:08 < bridge> > 21:08 < bridge> > Some of the supporters of open source considered the term a “marketing campaign for free software,” which would appeal to business executives by highlighting the software's practical benefits, while not raising issues of right and wrong that they might not like to hear. Other supporters flatly rejected the free software movement's ethical and social values. Whichever their views, when campaigning for open source, they neither cited nor advoca 21:08 < bridge> > 21:08 < bridge> > The two now describe almost the same category of software, but they stand for views based on fundamentally different values. For the free software movement, free software is an ethical imperative, essential respect for the users' freedom. By contrast, the philosophy of open source considers issues in terms of how to make software “better”—in a practical sense only. It says that nonfree software is an inferior solution to the practical probl 21:08 < bridge> we are all familiar with the difference between oss and foss 21:08 < bridge> the thing is we do not care 21:08 < bridge> i care 21:08 < bridge> so im posting it again 21:08 < bridge> im not breaking any rule 21:09 < bridge> it's always a bad sign when you think that posting this message makes things better 21:09 < bridge> ok, i dont care 21:09 < bridge> as far as i understand this sort of strictness in terms is only a thing because the FSF made it different term just to promote and exemplify what they do 21:09 < bridge> created solely to promote elitism 21:09 < bridge> no it promotes a ideal, open source doesnt 21:09 < bridge> its the main difference 21:09 < bridge> I'll move to DMs with @ryozuki about this so that it doesn't derail the actual discussion 21:10 < bridge> i also dislike how u will say anything is elitism now 21:10 < bridge> its like a argument u can simply not argue, because u can always say its elitism 21:10 < bridge> strictness in terms is necessary to not confuse people when discussing highly controversial and/or technical stuff 21:11 < bridge> ive thought that i can just move file here and there make new configs and everything will work as before. oh boy how wrong was i 21:11 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203432703186440252/image.png?ex=65d1130b&is=65be9e0b&hm=5a80591f07083676f1044317c65b205cfb1bbb57a3473a33e7a446084651bd88& 21:12 < bridge> there is people who care about free software that upholds user rights and use licenses such as gpl 21:12 < bridge> then therei s people who make code with the source code available and say: do anything u want 21:12 < bridge> its the difference 21:12 < bridge> context? xD 21:12 < bridge> Hello, can you tell me how I can get clientId for my dummy? 21:13 < bridge> for a bot client? 21:13 < bridge> i opened that bitch 10 times in rust project 21:13 < bridge> its not in da mood to work 21:13 < bridge> for 21:13 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203433094141448323/image.png?ex=65d11368&is=65be9e68&hm=712d2cc0af30add1167d9daa244f13f331996a872bf8fda2d7446df697cf7d05& 21:13 < bridge> i think ur rust analyzer is broken or smth 21:14 < bridge> i dont think its good :justatest: 21:14 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203433286811123822/image.png?ex=65d11396&is=65be9e96&hm=e5cb3a37f085317b7cc6c299d5296628dbccbd3e6bc08108346d2a755c8c8654& 21:14 < bridge> you should only have either rustup or a distro rust installed 21:14 < bridge> i know 21:14 < bridge> but it worked before xD 21:14 < bridge> you should probably uninstall the distro one 21:16 < bridge> hein u use fish right 21:16 < bridge> it's in `m_aLocalIDs`, I think 21:16 < bridge> You can use `m_aLocalIDs[!g_Config.m_ClDummy]`, remember to also check if you're dummy connected before doing this otherwise you will get a segfault I think. 21:17 < bridge> i just add some shit to path and it works :clueless: 21:21 < bridge> it works now, ez clap. didnt even take few weeks 21:27 < bridge> ty <3 21:57 < bridge> Snap will cut dummy position info when you will be too far 23:13 < bridge> There is no simple way to read a file into an `std::vector` without the stl forcing you to zero initialize the entire vector 23:14 < bridge> I'm starting to remember why I was sticking to C 23:14 < bridge> is this an update that caused the switch numbers to be so absurdly small? 23:14 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1203463538828513401/image.png?ex=65d12fc2&is=65bebac2&hm=f3c4b2c26bc552468253f2e38b67ed0dacaa322fc208245b27c5bc72ecd5e71e& 23:15 < bridge> what is your cl_text_entities_size 23:15 < bridge> 44 23:15 < bridge> i dont think i ever changed that 23:15 < bridge> default is 100 23:16 < bridge> ohh thanks 23:16 < bridge> i dont know how it got changed 23:16 < bridge> hm idk 23:18 < bridge> probably don't do a vector of chars then 23:18 < bridge> use another flexible buffer 23:18 < bridge> or an stl type which wraps a raw buffer 23:18 < bridge> std data 23:18 < bridge> You'd have to write your own as the stl doesn't contain any other dynamic array 23:18 < bridge> well why would you want to use it this way 23:19 < bridge> i think sane ppl would create an intermediate buffer 23:20 < bridge> And add an extra copy for the lulz? 23:20 < bridge> yep 23:20 < bridge> I love how the new generation treats code 23:22 < bridge> ```rust 23:22 < bridge> use std::mem::MaybeUninit; 23:22 < bridge> 23:22 < bridge> // Create an uninitialized array of `MaybeUninit`. The `assume_init` is 23:22 < bridge> // safe because the type we are claiming to have initialized here is a 23:22 < bridge> // bunch of `MaybeUninit`s, which do not require initialization. 23:22 < bridge> let mut data: [MaybeUninit; 1000] = unsafe { MaybeUninit::uninit().assume_init() }; 23:22 < bridge> // Count the number of elements we have assigned. 23:22 < bridge> let mut data_len: usize = 0; 23:22 < bridge> 23:22 < bridge> for elem in &mut data[0..500] { 23:22 < bridge> elem.write(String::from("hello")); 23:22 < bridge> data_len += 1; 23:22 < bridge> } 23:22 < bridge> 23:22 < bridge> // For each item in the array, drop if we allocated it. 23:22 < bridge> for elem in &mut data[0..data_len] { 23:22 < bridge> unsafe { elem.assume_init_drop(); } 23:22 < bridge> } 23:22 < bridge> ``` 23:22 < bridge> with rust ucan have partially initialized arrays 23:22 < bridge> The correct argument to be made there was that IO dwarfs the zero initialization anyway, that's what the rust people do, you should learn from them 23:23 < bridge> well, it is kind of true 23:23 < bridge> most stuff is io bound 23:24 < bridge> It's definitely true, doesn't mean I'm not annoyed at seeing 0s written just to be overwritten immediately 😄 23:25 < bridge> ok 23:25 < bridge> edlang will have it easy 23:25 < bridge> :gigachad: 23:25 < bridge> but no C strings 23:25 < bridge> i have em 23:25 < bridge> but on the other hand it makes C interop harder 23:25 < bridge> but meh 23:25 < bridge> I wonder if rust can do it with a Vec of maybeuninit 23:26 < bridge> i think u can 23:26 < bridge> vec has a "reserve" 23:26 < bridge> wait 23:26 < bridge> Do the nim compromise, have both the length and zero termination 23:26 < bridge> does it make sense to use a Vec of maybeuninit? 23:26 < bridge> vec internally keeps track of a capacity 23:26 < bridge> and the unpushed values are uninit 23:26 < bridge> u mean Array right 23:27 < bridge> no because i get to ensure zero termination which is what i dislike 23:28 < bridge> Oh true, so the only issue is having to push the characters one by one, even if it doesn't allocate it's far less efficient than copying in blocks like memcpy 23:28 < bridge> Honestly a non issue, but something so simple in C being very annoying to get right in these languages is quite entertaining 23:29 < bridge> i htink u can mimic that 23:29 < bridge> with the Write trait 23:29 < bridge> and WriteBuffer 23:29 < bridge> use a Cursor 23:29 < bridge> https://doc.rust-lang.org/std/io/struct.Cursor.html 23:29 < bridge> cursor + bufwriter 23:29 < bridge> the inner buffer can be a vec 23:29 < bridge> `Write is implemented for Vec by appending to the vector. The vector will grow as needed.` oh this is cute 23:30 < bridge> rust is nice 23:30 < bridge> Rust 1, C++ 0 23:30 < bridge> where is this doc from 23:30 < bridge> Well you can technically do it in C++ too but you need to pass a custom allocator that blocks the value initialization 23:30 < bridge> https://doc.rust-lang.org/std/vec/struct.Vec.html#impl-Write-for-Vec%3Cu8,+A%3E 23:31 < bridge> nice 23:31 < bridge> self.extend_from_slice(buf); 23:31 < bridge> it does this internally 23:31 < bridge> https://doc.rust-lang.org/std/vec/struct.Vec.html#method.extend_from_slice 23:32 < bridge> > Clones and appends all elements in a slice to the Vec. 23:32 < bridge> > Iterates over the slice other, clones each element, and then appends it to this Vec. 23:32 < bridge> nvm, uncool 23:32 < bridge> this is the specialization for slices 23:32 < bridge> u want to use .extend for non cloning i guess 23:33 < bridge> it cant take ownership of a slice values 23:33 < bridge> ```rust 23:33 < bridge> #[inline] 23:33 < bridge> fn write(&mut self, buf: &[u8]) -> io::Result { 23:33 < bridge> self.extend_from_slice(buf); 23:33 < bridge> Ok(buf.len()) 23:33 < bridge> } 23:33 < bridge> ``` 23:33 < bridge> cloning a u8 is nothing 23:33 < bridge> its a copy 23:34 < bridge> Cloning them one by one is not the best, I guess as long as the optimizer is smart enough to notice it's dozens of small copies in a row it's fine 23:36 < bridge> Anyway, if I really cared I'd just map it into memory and call it a day, I just found it interesting that it's not all that simple to get the "optimal" behaviour 23:36 < bridge> i think it does some smart thing 23:36 < bridge> because it looks rtly close tied to compiler 23:37 < bridge> xd 23:37 < bridge> https://doc.rust-lang.org/src/alloc/vec/spec_extend.rs.html 23:37 < bridge> something here 23:37 < bridge> but idk