00:12 < bridge> im going to sleep, see you tomorrow :p 00:13 < bridge> could `Register` be an enum, maybe? 01:21 < bridge> What is the issue anyway? 01:29 < bridge> Ah, the double mutable borrow 01:54 < bridge> This is one of the things that annoy me the most about rust, non lexical lifetimes made it a bit better but it still annoys me so much 02:11 < bridge> in this case I'm thinking this 02:11 < bridge> then it'd be a simple datatype represented by a byte, copying wouldn't be bad 02:41 < bridge> hm static lifetimes could also work 02:42 < bridge> enum would be better tho imo 03:00 <+ws-client> lez go githubber dragon 03:00 <+ws-client> https://zillyhuhn.com/cs/.1717030796.png 03:03 <+ws-client> codecov.io sent me an email. Did anyone else get that? Is that from the ddnet pipelines? I don't remember giving them my email at some point 04:03 < bridge> <0xdeen> yes, people just wrote about it a few hours ago 07:25 < bridge> morning 07:25 < bridge> morning tea enjoyers and others 07:42 < bridge> <♂S1mple♂> Tee enjoyers 07:56 < bridge> If anyone has multimonitor setup, what does it show under the Graphics card settings? 07:56 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245616822238183508/91dd48b4c95c072f.png?ex=66596690&is=66581510&hm=3e9291641d5262ebcdde40625efa766ca48d6f720a243a10ab33ceba52db507a& 07:57 < bridge> I suspect there is a screen chooser, but I need to be sure 08:34 < bridge> there is one 08:35 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245626566122147850/image.png?ex=66596fa3&is=66581e23&hm=6b7b8c0a1744b70087d93d1e1a57e4b9ce71e86f9a2715f2d45289f4386197ba& 08:39 < bridge> it doesn't seem to work on KWin's wayland compositor though lol 08:44 < bridge> What does it show when you click it? I need that info for translation 09:00 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245633022275878932/image.png?ex=665975a7&is=66582427&hm=3966cb24f94bc727c5fcc772e9092eb18b6bd3363b7898b502313bbff272f860& 09:01 < bridge> Thanks! 09:21 < bridge> wouldn't have happened in C 09:30 < bridge> You would instead of borrowing the register out of a vector of registers, be returned an owned enum of Register type 09:44 < bridge> definitely wouldn't, C 💪 10:34 < bridge> i don't stole project from people. ryo should make it themselves 10:34 < bridge> :kek: ddnet 3.0 in VR written in rust 10:35 < bridge> i wouldn't do that 10:42 < bridge> oh btw freddie, what languages do you use the most? 10:42 < bridge> it depends really 10:43 < bridge> but i guess typescript and C# 10:43 < bridge> we hire devs at blockworlds corp 10:44 < bridge> maybe C++ as well cuz I also modify the engine and sometime write native modules. 10:49 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245660222152769576/18c86f5c3d4f0859.png?ex=66598efc&is=66583d7c&hm=d490cc7fba7fce8d3e2ed99f3d77e84d129b597f9622d05c932533f1999d1437& 10:49 < bridge> 500! 10:49 < bridge> 500! strings translated (out of 607) 11:01 < bridge> https://github.com/MilkeeyCat/meraki/blob/78e8f6baef683af92c25d033b3906dfca910a4b8/src/codegen/register.rs smth like that? 11:06 < bridge> Yes, atleast I think that's what heinrich was suggesting. You'll have to wait for him to know exactly 11:06 < bridge> can i hire you 11:07 < bridge> I'm already hired until midsummer 11:08 < bridge> my company probably wouldn't be ready until end of the year anyway 11:09 < bridge> Then we'll have to see 🙃 11:09 < bridge> but i am probably not serious 11:09 < bridge> :owo: 11:15 < bridge> nothing happens on C 11:15 < bridge> only UB 11:15 < bridge> <0xdeen> What are you working on? 11:15 < bridge> :owo: 11:16 < bridge> A little on the boring side. Doing some backend work in go, migrating code from a mishmash of elixir ruby and python 11:16 < bridge> i wouldn't say that's boring 11:17 < bridge> <0xdeen> Doesn't sound as bad as your describe it 😄 11:17 < bridge> <0xdeen> But personally I enjoy reimplementing the same ideas again and again at each company I'm at, improving them with each iteration 11:49 < bridge> The borrow checker is an amazing piece of software. It's safety however comes at great mental cost. It will take you very very long to completely change the way you think 11:50 < bridge> u just have to accept to not rely on borrow checker for every component 11:51 < bridge> inside the component itself it helps a lot tho 11:51 < bridge> but when ur proficient with rust its so much fun 11:51 < bridge> like all tools, u need to adapt urself too 11:51 < bridge> I always find my iteration cycle interrupted with mental compiling of borrowing hierarchies for dozens of minutes at a time, which really takes me out of the flow 11:52 < bridge> i dont have the same fun coding in rust as i do with go or c++ 11:52 < bridge> It's too much work, too much time. I have a decade of experience that needs to be overriden. The solutions I come up with instantly are usually the wrong one in Rust but in other languages they are atleast achievable 11:52 < bridge> https://github.com/edg-l/edlang/releases/tag/v0.0.1-alpha.19 11:52 < bridge> is it crazy that i now spend most of my time making assets anyway, coding is not really what I do dalily now 11:52 < bridge> new edlang version out! 11:53 < bridge> it'll probably change after I started my own project, since i have to get core components out before I can asset crunch 11:53 < bridge> 11:53 < bridge> This is something that took me too long to get to and still I'm not great at it, but you really need to learn when and how to work around the borrow checker to get truly proficient at rust 11:53 < bridge> > it's all about the ecosystem and very little about the language features 11:53 < bridge> for gamedev even bigger 11:54 < bridge> like webdev 11:54 < bridge> php sucks but laravel exists 11:54 < bridge> i ordered some fried dough cubes, ate half of them and thought, this is really bland and bad 11:54 < bridge> php is not so bad these days 11:54 < bridge> then i just found out there is a tub of condensed milk in the bag... 11:54 < bridge> I'll read more of this blogpost later. I need to get back to work moving around unit tests 11:54 < bridge> Fried dough cube 11:55 < bridge> whatever a Fried dough cube is 11:55 < bridge> i think gamedev in rust would be to make the engine/physics/render in rust 11:55 < bridge> but game logic in other lang 11:55 < bridge> with easier iteration 11:55 < bridge> and no compile 11:56 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245677053420896287/IMG_20240530_175538.jpg?ex=66599ea9&is=66584d29&hm=b7797e9df3769c3ac5b1a15f8341676ae0b652e626f53ea109e4046e604517e5& 11:57 < bridge> the funny thing is, that what i enjoyed rust most in is actually writing the game logic in it xD 11:57 < bridge> yeah 11:57 < bridge> renderer etc. could aswell been cpp 11:57 < bridge> i would do all pure rust 11:57 < bridge> yes 11:57 < bridge> but im talking about normies 11:57 < bridge> thats easiest xd 11:57 < bridge> they like their lua scripts 11:57 < bridge> 😬 11:58 < bridge> no RAII no language 11:58 < bridge> too bad that we mostly uses existing engines to save money and time 12:00 < bridge> y 12:02 < bridge> oh right, I had trouble sleeping last night 12:03 < bridge> so i was just noting every idea i had on my phone 12:03 < bridge> but everything just ended up with teeworlds 12:03 < bridge> :justatest: 12:05 < bridge> I do that too xD. I think because teeworlds as a game has many good aspects 12:05 < bridge> aspects/elements* 12:06 < bridge> 🎩 12:06 < bridge> eg. chat/console/simple ui/demos/map editor 12:06 < bridge> 🥼 🎩 12:06 < bridge> @mr.gh0s7 r u still working on teeworlds stuff? 12:06 < bridge> havent seen ya in a while 12:07 < bridge> yeah I was on hiatus xD 12:07 < bridge> I am continuing now but not as in tw dev but as in tw inspired dev ;) 12:07 < bridge> :justatest: 12:07 < bridge> sounds like u have a real life now 12:07 < bridge> 😬 12:08 < bridge> wow. imagine real life 12:08 < bridge> 😅 12:08 < bridge> let's go with that... 12:28 < bridge> https://www.arroyo.dev/blog/rust-plugin-systems 13:43 < bridge> @ryozuki 13:43 < bridge> 13:43 < bridge> i might - just for the sake of it. 13:43 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245704198050545806/image.png?ex=6659b7f0&is=66586670&hm=2fdaf2b74cb1baed3250c2cb1a52d3c19f6e653e13ddb19ee53f37ed2bd0827a& 13:44 < bridge> gogo 13:52 < bridge> yes, like that. you can also `#[derive(Copy)]`. the `impl Register` don't have to take `&self` but can take `self` then 13:52 < bridge> oh, and you should return `&'static str` instead of `&str` 13:53 < bridge> that's fixed by search engines nowadays 14:01 < bridge> @heinrich5991 say it has to be borrows and the mutables are mandatory. How would you handle that? 14:01 < bridge> Because technically the borrows are really disjoint, if there weren't those pesky function calls in the way blocking the borrow checkers sight, it would have been fine 14:06 < bridge> partial borrowing 14:06 < bridge> else u have to take the bitter pill and pass ur stuff as function arguments 14:06 < bridge> then it's not blocking the whole struct 14:06 < bridge> if that was ur question 14:06 < bridge> xd 14:08 < bridge> yeah, those were what I figured as well, was curious what a rust veteran though 14:08 < bridge> t 14:10 < bridge> I think Ill be returning owned type and slap `.clone()` there 14:11 < bridge> I do understand exactly why you'd code it the way you coded it btw. It's the intuitive thing, there is a bunch of registers, you want to borrow one of them, even the sentences work out 😄 14:12 < bridge> It also works if i just return `Box<&Register>` but we don't do heap here 14:13 < bridge> a boxed reference 14:13 < bridge> wtf 14:13 < bridge> (It works because boxes are owned) 14:13 < bridge> It works tho :santatrollet: 14:13 < bridge> Uh huh 14:14 < bridge> @milkeeycat show code 14:15 < bridge> https://github.com/MilkeeyCat/meraki/blob/main/src/codegen/register.rs 14:15 < bridge> There's also other branch 14:15 < bridge> With enums 14:15 < bridge> btw, when googling around about it I found this crate https://crates.io/crates/lease which is kinda cute 14:15 < bridge> @jupeyy_keks ^ 14:15 < bridge> where is the code where u want to put box that otherwise doesnt work 14:15 < bridge> Oh 14:15 < bridge> Sec 14:16 < bridge> https://github.com/MilkeeyCat/meraki/blob/ae7c44eca8bef3fa1eb66e4da9a5602a1bffebe8/src/codegen/codegen.rs#L57 14:17 < bridge> so register is actually a result of `expr` ? 14:18 < bridge> or wtf should the error be from the compiler xd 14:18 < bridge> Hm? 14:18 < bridge> That code doesn't work btw 14:18 < bridge> Xd 14:18 < bridge> This illustrates the issue in a minimal form I guess 14:19 < bridge> i dont understand why u'd ever box a reference to a known type inside a box 14:19 < bridge> This illustrates my skill issue xd 14:19 < bridge> I cooked this in my mind and checked. It worked 14:19 < bridge> i dont understand why u'd ever box a reference to a known type 14:20 < bridge> show how you checked I guess, that's what jupsti is curious about 14:20 < bridge> Im on phone now, Ill send code snippet later 14:20 < bridge> sure 14:20 < bridge> but in my head you are not extending the lifetime of the reference by wrapping it inside a box xD 14:21 < bridge> so it feels kinda weird 14:21 < bridge> it's also not unsized i guess? 14:22 < bridge> but anyway, do your phone call 14:23 < bridge> Maybe i had shit tons of errors and when i changed to box, it didn't show error but it's not actually correct 14:23 < bridge> xd 14:23 < bridge> lmao 14:23 < bridge> if it fixed an error i'd like to see that error 14:51 < bridge> i failed and reverted back to windows. 14:51 < bridge> ew 14:51 < bridge> 🚔 14:51 < bridge> nah wdym configuring the linux kernel 14:51 < bridge> cba 14:51 < bridge> gimme my gui back 14:51 < bridge> 14:51 < bridge> jajajaaj but calling me gui fanboy 14:51 < bridge> double standards 14:51 < bridge> xd 14:51 < bridge> xd 14:51 < bridge> and i thought installing arch without an install script can be annoying 14:51 < bridge> gentoo is on another level 14:51 < bridge> welcome back 14:51 < bridge> my highest respect ryo 14:51 < bridge> have you heard of LFS, melon? 14:51 < bridge> LFS is easier to install than gentoo 14:51 < bridge> frf 14:51 < bridge> LFS is easier to install than gento 14:51 < bridge> there is genkernel for nobos, it configures it for you 14:51 < bridge> LFS is easier to install than gentoo 14:52 < bridge> you installed Linux From Scratch?!? 14:52 < bridge> i think i'll just clean up my windows (so chiller and jupsti dont start puking again when i stream my desktop again) 14:54 < bridge> i think i'll just clean up my windows (so chiller and jupsti dont start puking again when i stream my desktop) 14:54 < bridge> go back try gentoo again, you must be mistaken 14:54 < bridge> I definitely won't, because I'm forced to use Windows for now too 14:54 < bridge> it's the best distro imagined by mankind, it makes me question whether intelligent creation is actually possible 14:54 < bridge> i didnt use genkernel because of that: 14:54 < bridge> 14:54 < bridge> `Genkernel should only be considered by users that have a required need that only Genkernel can meet, otherwise it is recommended to use the Distribution kernel or manually compile your own as it will make maintaining a Gentoo system a lot more simple.` 14:54 < bridge> or use the distribution kernel, that's also fine too, extra easy mode 14:54 < bridge> just use kubuntu and stop having excuses to use windows 14:54 < bridge> is there any difference other than that Kubuntu is shipped with KDE isntead of gnome? 14:55 < bridge> that is an important difference 14:55 < bridge> used both, felt both were decent 14:55 < bridge> ppl install ubuntu and think linux sucks 14:55 < bridge> i use wayland hyprland btw 14:55 < bridge> bcs gnome sucks 14:56 < bridge> Brodie Rebertson?! 14:56 < bridge> i.. dont know brodie robertson 14:56 < bridge> what exactly felt decent tho 14:56 < bridge> do something new, use a tiling wm 14:56 < bridge> the design? 14:56 < bridge> Oh, too bad 14:57 < bridge> with what it comes shipped with - gnome and plasma work out of the box 14:57 < bridge> I use Debian btw 14:57 < bridge> i currently use debian sid 14:58 < bridge> I use stable 14:58 < bridge> i beta test for u 14:58 < bridge> debian on a home computer is wild, sid is so unstable and stable is so old 14:58 < bridge> but atleast it has 1 trillion pre compiled packets 14:58 < bridge> not like arch 14:58 < bridge> and ubuntu is defs not hipster enough 14:58 < bridge> so i have no choice 14:59 < bridge> just used nixOS for every single environment you work in like scrumplex does :gigachad: 14:59 < bridge> https://codeberg.org/Scrumplex/flake 14:59 < bridge> I very rarely found myself missing a package on arch tbf 14:59 < bridge> u rarely use AUR on arch? 14:59 < bridge> i basically only used it lmao 14:59 < bridge> i have an arch install btw 14:59 < bridge> i just dont use it 15:00 < bridge> well i'd consider AUR to be part of arch, while not officially stated 15:00 < bridge> also arch is more beta than debian sid 15:00 < bridge> xD 15:00 < bridge> ?? 15:00 < bridge> but i said pre-compiled xD 15:00 < bridge> AUR is self-compiled 15:00 < bridge> I think I had like 7 total AUR packages. 4 of them were binary 15:00 < bridge> except you show me how to not self compile 15:00 < bridge> ah fair - skipped that message lol 15:01 < bridge> I might try Lubuntu, because why not 15:02 < bridge> egyt try uwuntu 15:02 < bridge> for me it's not really about distro anyway 15:02 < bridge> make milkeey proud 15:02 < bridge> gimme KDE + codium and i am happy i guess 15:02 < bridge> i used arch and nixOS mostly for their user repositories tbh 15:02 < bridge> pacman is defs faster than apt xD 15:03 < bridge> so arch is more compeeling generally 15:03 < bridge> I had like spotify, codium-bin, clang-format-static-bin and rsyslog I think 15:03 < bridge> never 15:03 < bridge> maybe like 2 more I'm forgetting 15:03 < bridge> Debian Pog 15:03 < bridge> Debian Chad 15:04 < bridge> chillerdragon pog 15:04 < bridge> apt has a new terminal design now 15:04 < bridge> have u already seen it chiller 15:04 < bridge> debian is like vanilla icecream 15:04 < bridge> it is sad they brag about these designs 15:04 < bridge> they're a few years off. 15:05 < bridge> awesome apt 15:05 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245724764970942534/image.png?ex=6659cb18&is=66587998&hm=6a64fe59eefbb9840471b8164a4404b36a8ae7cd60be625058f4888cb3645dc0& 15:05 < bridge> awesome 15:05 < bridge> :lol: 15:05 < bridge> :KEKW: 15:05 < bridge> ü is hard to render to be faiur 15:05 < bridge> ü is hard to render to be fair 15:07 < bridge> If it is so hard to render two additional dots, then how impossible rendering Esperanto would be?! 😱 15:07 < bridge> If it is so hard to render two additional dots, then how impossible rendering Esperanto would be?! 😱 15:07 < bridge> OH NO 15:08 < bridge> https://www.youtube.com/watch?v=Api1yjIi4yw 15:09 < bridge> I use Debian btw 😏 15:09 < bridge> his nix dotfiles are crazy 15:09 < bridge> 15:09 < bridge> all of these hosts are defined in the same dotfiles 15:11 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245725884053323856/image.png?ex=6659cc23&is=66587aa3&hm=5f31442cffc48d15300601df9d5704690396a6b5518006de3b681dc13a69297e& 15:11 < bridge> The amount of debian@home enjoyers is interesting, maybe it's better nowadays 15:11 < bridge> I chose it because gentoo hard :kek: 15:11 < bridge> Last time I used it was squeeze 15:11 < bridge> Whenever I don't feel gentoo it's usually artix for me 15:12 < bridge> I installed gentoo because ryo is using it, debian because jupstar is using it xd 15:13 < bridge> I used to have artix but the constant updates made me move to antix (artix = arch, antix = debian) 15:14 < bridge> and I am using testing repos mainly and sid as optional to install packages that don't exist in testing 15:14 < bridge> @blaiszephyr I'm using arch linux, that works wel for me 15:15 < bridge> yeah i prefer arch aswell 15:15 < bridge> i tried getting into nixOS but the declarative part, while awesome and adaptable just didnt fit my need, so i use arch with nixpkgs 15:17 < bridge> epyc 15:17 < bridge> Wot 15:17 < bridge> the new apt terminal design xd 15:17 < bridge> Germany’s moment 15:17 < bridge> they make it looks bit cleaner 15:17 < bridge> i mean when u do apt upgrade 15:19 < bridge> Debian on the road and arch at home is best. Change my mind. 15:20 < bridge> i still hate that one arch maintainer 15:20 < bridge> that ignored by bug report 15:20 < bridge> Hello Fred 15:22 < bridge> Wot who which bug 15:23 < bridge> that the vulkan package breaks the pkgconfig idea 15:23 < bridge> u have to explicitly install vulkan-headers, they are not a requirement 15:24 < bridge> and he was so stubborn to accept i am right 15:24 < bridge> just a fucker 15:24 < bridge> Did you have a discussion? Xd 15:24 < bridge> dunno if i want to post it 15:25 < bridge> but i brought it to the arch forums xD 15:25 < bridge> bcs i was so mad 15:25 < bridge> but on arch forums there are only arch fanboys 15:25 < bridge> that's the problem 15:26 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245730060053385268/a3441abf90009b29.png?ex=6659d006&is=66587e86&hm=99d111a0dd9e2101cb9351fec2724b9670cff4f4da8881bc6da666754c808fe0& 15:26 < bridge> why tho 15:26 < bridge> https://github.com/MilkeeyCat/meraki/blob/78e8f6baef683af92c25d033b3906dfca910a4b8/src/codegen/register.rs#L37-L49 — the `From` impl is not good. it should probably be a `TryFrom` 15:27 < bridge> Hehe Heinrich stalking milkey 15:27 < bridge> Lmao 15:29 < bridge> nice license btw @milkeeycat 15:30 < bridge> I thought that if my code perfectly will never encounter that last case i can use `From` :thonk: 15:31 < bridge> ask yourself if u want to handle unexpected errors or not 15:32 < bridge> errors without callstack kinda sucks too 15:32 < bridge> i use backtrace with anyhow 15:33 < bridge> https://doc.rust-lang.org/std/convert/trait.From.html 15:33 < bridge> > **Note: This trait must not fail.** The `From` trait is intended for perfect conversions. If the conversion can fail or is not perfect, use `TryFrom`. 15:37 < bridge> do you interpret that as non panic? 15:37 < bridge> yes 15:37 < bridge> mh 15:38 < bridge> if they would like you to not panic, then they should add that as language feature 15:38 < bridge> that's hard to impossible 15:38 < bridge> i'd interpret it as lossless 15:39 < bridge> a perfect conversion is not a string::fromutf8_lossy 15:39 < bridge> for example 15:39 < bridge> I would enjoy an `unreachable!()` which only compiles if the compiler can prove it ^^ 15:39 < bridge> you can have it. but it's super fickle 15:39 < bridge> because halting problem 15:45 < bridge> > [When not to implement `From`:] The conversion is infallible: if the conversion can fail, use `TryFrom` instead; don’t provide a `From` impl that panics. 15:45 < bridge> > [When to implement `From`:] The conversion is infallible: if the conversion can fail, use `TryFrom` instead; don’t provide a `From` impl that panics. 15:46 < bridge> but that section says "should" again 15:46 < bridge> not must 15:46 < bridge> the rust docs are sometimes really annoying 15:47 < bridge> there's no way to enforce it, so how would it be a "must"? 15:47 < bridge> must's are reserved for `unsafe` stuff, I think 15:47 < bridge> musts are reserved for `unsafe` stuff, I think 15:47 < bridge> sure, but if u don't expect a fail in the conversion that _having_ to use try_into can also suck 15:48 < bridge> you can just `unwrap` 15:48 < bridge> but then it's local to the function that tries to convert it 15:48 < bridge> it documents where the wrong assumption held 15:48 < bridge> https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science) 15:49 < bridge> it does't work :kek: it didn't show these errors because of others xd 15:50 < bridge> figures, I guess it just silenced one error but it now fails later 15:51 < bridge> I can imagine it silencing one of your lifetime errors I think 15:52 < bridge> yes i'd say that is a problem of rust then, the language is not perfect and must be extended 15:53 < bridge> or do you think it should stay unsound 15:53 < bridge> by design 15:53 < bridge> Is it possible though? I think there are some theoretical issues there, the compiler just can't figure that out, no? 15:54 < bridge> the problem is that you must severely restrict what the language can do for you. otherwise you run into the halting problem very soon or you have built a proof assistant 15:54 < bridge> I also like proof assistants, but I haven't wrote serious progams in them yet 15:54 < bridge> (check out stuff like lean, idris or agda for such stuff, where you can prove everything and `unwrap` is not a thing) 15:54 < bridge> mh but in this case it kinda sounds different 15:54 < bridge> the conversion must be perfect. so i assume the problem cannot even create "branches" that lead to panic could 15:54 < bridge> or to branches that must be explicitly handled 15:55 < bridge> the conversion must be perfect. so i assume the problem cannot even create "branches" that lead to panic code 15:57 < bridge> then integer addition/array slicing would need to be forbidden, e.g. 15:57 < bridge> and you can only call functions annotated with `no_panic` 15:57 < bridge> isnt that what u are basically saying 15:58 < bridge> then you get another color for your functions. how does that interact with the rest of the language, e.g. traits? 15:58 < bridge> I'm saying that the users should guarantee that there are no panics. I don't think the compiler will be able to prove it in a useful amount of cases 15:59 < bridge> mh ok 16:00 < bridge> yeah i dunno i hate such questions 16:00 < bridge> and if there's still a panic in the `From` impl, then it's a bug. but that's what panics are for: bugs 16:00 < bridge> if milkey says the value is never one that leads to unreachable 16:00 < bridge> then he kinda made this proof, independent of if it's true 16:01 < bridge> they could implement a `fn from` that is not the trait 16:01 < bridge> sure that's one way 16:01 < bridge> I wonder how hard it would be for a compiler to prove that a function is `no_panic`, you can basically walk up from `panic!` and color until you hit any function manually annotated `no_panic` where the user has guaranteed that it won't panic 16:01 < bridge> then you forbid integer addition/array indexing, sanity `assert!` checks, etc.? 16:03 < bridge> or do you rely on the optimizer optimizing them out? 16:03 < bridge> I was thinking an extension to integer addition and array indexing, where they would only be allowed if it can be proven that it's sane, and `assert!`s getting optimized out 16:04 < bridge> Mh, it's not actually that easy to extend these in a useful way though, It would be easy for constant indexes 16:04 < bridge> but it feels like the deref stuff: 16:04 < bridge> 16:04 < bridge> https://github.com/rust-lang/rust/commit/58645e06d9121ae37654b812d14041d0229d49c3 16:04 < bridge> they changed the docs bcs they noticed nobody uses wrappers like the doc intended 16:05 < bridge> You start having to think of stuff like returning constraints on the results of a function, so you can get the index of e.g. a byte by lookup and it's guaranteed to be < len(arr) 16:06 < bridge> (which is going into the proof assistant territory as heinrich mentioned, perhaps a `must` there is in order though, `should` sounds too weak, though tbf idk the definitions of those words rust documentation uses) 16:09 < bridge> yea. this is getting into proof assistant territory again, proving that integer additions do not go out of bounds 16:10 < bridge> but if we prove it. we can use the fact it never panics as optimization potential 16:10 < bridge> It would be easy enough to show when the constraints are right there, e.g. `if x < v.len() return v[x]` but anything more complicated and there is a loot of peeking into functions required which is not easy (perhaps impossible without some manual annotations) 16:11 < bridge> I actually don't know this one. Is there some overhead for the "panicability" of the function you are calling in Rust? 16:11 < bridge> yes 16:12 < bridge> he doesnt mean runtime overhead i think 16:12 < bridge> i think he means if it's not transparent? 16:32 < bridge> I want to do a language like milkeeycat is doing, there is so much to be learned doing something like that 16:36 < bridge> doit 16:41 < bridge> I feel like if you were to make a language you would do it in a month :justatest: 16:42 < bridge> No way. I'm a slowpoke, I refuse to implement something if I do not really understand it 16:42 < bridge> So me doing personal projects with no deadline is very slow 16:43 < bridge> But you know and understand 50x more than me so... 16:43 < bridge> Ill probably never finish it xd 16:44 < bridge> With that comes another character flaw of mine. When I know there is an optimal way to do something. It really bothers me to implement the unoptimal one 😄 16:44 < bridge> But I will definitely code a compiler of sorts soon enough. I missed doing that sort of thing 16:44 < bridge> Perhaps I'll use that one parser generator ryo loves this time around 16:45 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245749866966024243/31e00669aad76b3d.png?ex=6659e279&is=665890f9&hm=768b5a4f42144c4ecb17967ab8daa6ba7c27606919b0b57911b17307f4dcc862& 16:45 < bridge> What "Authed name" means there? 16:45 < bridge> Like a mod probably 16:45 < bridge> It's the color of people who are logged in to rcon 16:50 < bridge> @zwelf2 how is your attempt at replaying teehistorian files going nowadays? 17:09 < bridge> sometimes rust async is such a weirdo: 17:09 < bridge> ```rust 17:09 < bridge> let mut guard = self.guarded_stuff.lock(); 17:09 < bridge> guard.some_vec.push(val); 17:10 < bridge> drop(guard); 17:10 < bridge> 17:10 < bridge> if true { 17:10 < bridge> self.some_async_func().await; 17:10 < bridge> } 17:10 < bridge> ``` 17:10 < bridge> compile error (mutex guard cannot be hold accross async calls) 17:10 < bridge> 17:10 < bridge> vs. 17:10 < bridge> 17:10 < bridge> ```rust 17:10 < bridge> { 17:35 < bridge> I guess the compiler is just not smart enough yet 17:46 < bridge> @learath2 if u want more epyc rust async puzzles (that u can solve) 17:48 < bridge> try to make a recursive async call 17:48 < bridge> 😄 17:48 < bridge> Iirc only because on most mutex implementations you are not allowed to unlock on another thread 17:48 < bridge> Sadly I've already been spoiled on this before while working on something 17:49 < bridge> (the compiler directly spoils the solution when you try it btw 😄 ) 17:50 < bridge> oh yeah already forgot about it 😄 18:16 < bridge> I found another thing that is (or at least may be) a problem for Slavic translations: 18:16 < bridge> 18:16 < bridge> ``` 18:16 < bridge> 1 new mention 18:16 < bridge> == 18:16 < bridge> 18:17 < bridge> %d new mentions 18:17 < bridge> == 18:17 < bridge> 18:17 < bridge> 9+ new mentions 18:17 < bridge> == 18:17 < bridge> ``` 18:17 < bridge> 18:17 < bridge> Why? Because we have multiple grammatical numbers: 18:17 < bridge> 1 mention = 1 згад**ка** 18:17 < bridge> 2\~4 mentions = 2\~4 згад**ки** 18:17 < bridge> 5\~20 mentions = 5\~20 згад**ок** 18:17 < bridge> 18:17 < bridge> After 20 the cycle repeats 18:17 < bridge> 18:17 < bridge> 21 mentions = 21 згад**ка** 18:17 < bridge> 22\~24 mentions = 22\~24 згад**ки** 18:17 < bridge> 25\~30 mentions = 25\~30 згад**ок** 18:17 < bridge> 18:17 < bridge> 31 mentions = 31 згад**ка** 18:17 < bridge> 32\~34 mentions = 32\~34 згад**ки** 18:17 < bridge> 35\~40 mentions = 35\~40 згад**ок** 18:17 < bridge> 18:17 < bridge> And so on and so forth... 18:17 < bridge> Also, where those strings are used? 18:18 < bridge> in the editor when you get a mention ingame. 18:27 < bridge> https://github.com/MilkeeyCat/meraki/blob/3319292a18b9ceacdd319e5ef353904bc50bd5c7/src/codegen/register.rs dat's my final version xd 18:41 < bridge> These are hell to do for languages that have them varying. Not really many ways to fix it properly without adding special cases 18:41 < bridge> You'll have to just pick one 18:44 < bridge> Perhaps ки because it would be correct for 2, 3 and 4 and it's rare that you get more than that many notifications while in editor. But perhaps ок because it's correct for 5, 6, 7, 8, 9+ and that set is larger 18:44 < bridge> Idk, your language, you know what sounds best 18:48 < bridge> our translation system should deal with it 18:48 < bridge> do we have an issue for that yet? 18:49 < bridge> Mh, how though, keeping this one generic is hard. Would imo belong in the language file, but I don't think we want any logic in there 18:50 < bridge> Because what other language would the pattern 1,2-4,5-20,21,22-24,25-30... be useful for 18:50 < bridge> gettext can do it. they're using a different function for strings that may contain plurals 18:50 < bridge> you'd declare at the top of the language file which plural rule to use 18:55 < bridge> if we wanted a fancy solution, we'd probably use something like fluent 18:59 < bridge> at the top of the file you'd declare which plural rule you need 18:59 < bridge> you'd say: russian plural rule (or however they're called in a language-neutral way) 19:00 < bridge> It is supposed to be `CTile::m_Index` you just need to be checking the correct layer 19:00 < bridge> there's probably < 5 plural rules in the languages we translate ddnet to 19:00 < bridge> ther are probably < 5 plural rules in the languages we translate ddnet to 19:00 < bridge> Ah, so we still implement on the C++ side the plural rule 19:00 < bridge> there are probably < 5 plural rules in the languages we translate ddnet to 19:00 < bridge> ah yes 19:00 < bridge> Okay, that was the part that I was unsure about 19:00 < bridge> I see, sorry 19:01 < bridge> I tried it with GetTile in the collision class. But I was just getting indexes from 1 to 3 19:03 < bridge> Well look at the definition of `GetTile` 19:04 < bridge> It only ever returns tile indices 0 thru 4, it's only used for collision detection, so it only returns "solidish" tiles 19:05 < bridge> Got it, I needed to use GetPureMapIndex to get the index of the tile and then I could get it with GetTileIndex 19:05 < bridge> Yep 19:08 < bridge> There is no issue for it iirc btw, if you want to create one 19:38 < bridge> I'll just do the roundabout way: 19:38 < bridge> `New mentions: x` 19:42 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245794438135939245/5990205aaba4fa03.webp?ex=665a0bfb&is=6658ba7b&hm=36f1a8d8e5de3f936364413aaf932be11b67510c1cfc3661a3e4f700ca75c3dd& 19:42 < bridge> ^ Example 20:10 < bridge> I did so with 20:10 < bridge> 20:10 < bridge> ``` 20:10 < bridge> %i minute left 20:10 < bridge> %i minutes left 20:10 < bridge> %i second left 20:10 < bridge> %i seconds left 20:10 < bridge> ``` 20:10 < bridge> 20:10 < bridge> and with 20:10 < bridge> 20:10 < bridge> ``` 20:10 < bridge> %d of %d server 20:10 < bridge> %d of %d servers 20:10 < bridge> %d player 20:10 < bridge> %d players 20:10 < bridge> ``` 20:10 < bridge> I did so with 20:10 < bridge> 20:10 < bridge> ``` 20:10 < bridge> %i minute left 20:10 < bridge> %i minutes left 20:10 < bridge> %i second left 20:10 < bridge> %i seconds left 20:10 < bridge> ``` 20:10 < bridge> 20:10 < bridge> and with 20:10 < bridge> 20:10 < bridge> ``` 20:10 < bridge> %d of %d server 20:11 < bridge> %d of %d servers 20:11 < bridge> %d player 20:11 < bridge> %d players 20:11 < bridge> ``` 20:19 < bridge> https://nakst.gitlab.io/essence 20:20 < bridge> yo guys what so you think about changing map change vote veto? 20:20 < bridge> i havent really seen any case when vote veto helped real players doing their runs 20:22 < bridge> If you have an idea feel free to create an issue as a suggestion I guess 20:24 < bridge> i didn't check the related code though but i want to ask you what do you think if we have: 20:24 < bridge> an empty server 20:24 < bridge> 2 players joined 20:24 < bridge> they have their join tick (or we can reuse unique client id) 20:24 < bridge> another over9000 players join server, theyre trying to change map 20:24 < bridge> server sees that player joined later starts a map vote and server has older players that are currently in race state 20:24 < bridge> server vetoes the vote 20:26 < bridge> What if the 2 players want to vote yes? 20:26 < bridge> what about people beeing afk on a server? 20:26 < bridge> we can check these two cases? 20:27 < bridge> yeah, i would be glad to see any other edge case actually 20:27 < bridge> noted these two 20:27 < bridge> :owo: 20:28 < bridge> we can actually start vote and check it 20:28 < bridge> i've never seen this. how's it compare to serenityOS rn 20:29 < bridge> if they don't vote or vote no vote fails 20:29 < bridge> this one is harder imo, what about afk ranks? 20:30 < bridge> why is this getting million views? 20:30 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245806431307960492/image.png?ex=665a1727&is=6658c5a7&hm=dba9d76e950b8816c6b4df543a888777e06db7f88d299475316e58a52f2cdb88& 20:30 < bridge> antiranks* 20:30 < bridge> i wonder if you can 100% guarantee that this is not abusable 20:31 < bridge> abusable as what 20:31 < bridge> i think you could just check for m_isAfk 20:31 < bridge> nah i mean what to do 20:31 < bridge> forcing a map vote with other people running because of a higher tickrate 20:31 < bridge> ignore them or veto vote 20:31 < bridge> what 20:31 < bridge> this is how all dev/software youtube content looks to me 20:31 < bridge> maybe bcs they well made? xd 20:31 < bridge> "linux got wrecked by xz backdoor" 20:31 < bridge> this is clickbait 20:32 < bridge> it cant be well made 20:32 < bridge> they have their join tick (or we can reuse unique client id) 20:32 < bridge> another over9000 players join server, theyre trying to change map 20:32 < bridge> 20:32 < bridge> what if its the other way around? someone afk at start beeing in race for 2 hours jsut chatting votes a map, basically forcing the vote on people far but only racing for 20 minutes? 20:32 < bridge> he must be the first person ever to do clickbait 20:32 < bridge> lmao 20:32 < bridge> this is why i dont look at yt for dev stuff 20:32 < bridge> its ragebait 20:33 < bridge> if i make a video "rust is better than C" then i ragebait learath :justatest: 20:33 < bridge> hm good point 20:34 < bridge> I haven't checked out much of it but it looks very impressive. It even has it's own scripting language and build system. Lot's of work there 20:34 < bridge> but wait how would he force it, player needs other players to vote yes 20:35 < bridge> well i mean if veto doesnt trigger the vote goes through normally instead of vetoing, even tho there are still people racing 20:36 < bridge> but for that to be the case there would need to be an actual implementation XD 20:36 < bridge> i think veto was discussed before 20:37 < bridge> the point of vetoing map votes is to protect active racing players 20:37 < bridge> we have a way to check if player is racing 20:37 < bridge> and a halfway to check if player is active 20:38 < bridge> hm okey i see why veto is useless xd 20:39 < bridge> seems ddnet runs out of game servers 20:39 < bridge> time to implement multiworld in ddnet codebase :p 20:58 < bridge> @qxdfoxy hier 20:58 < bridge> Einfach sagen 20:58 < bridge> deutsch oder english :p 20:58 < bridge> eng 21:01 < bridge> hello so ive been having problem with lag on ger10 since i think ger2 was removed 21:01 < bridge> basically my ping keeps on spiking for a few milliseconds and then goes back to normal and i dont have this problem anywhere else i believe 21:47 < bridge> `Laser` is used in both Controls tab (where it stands for "Laser Rifle\`) and in Appearance tab. Well.. 21:49 < bridge> This is why I block YouTube in my hosts file 22:04 < bridge> People watch videos even if they are not useful to them 22:06 < bridge> but this wasnt supposed to be an educational video - i actually enjoyed it, even tho its clickbaity "learning c# in a week" and the thumbnail showing yet another sandbox clone :kek: 22:07 < bridge> egyt: yes, it's problematic 22:07 < bridge> This is why I block it 22:08 < bridge> youtube is free netflix for some, if every video i watched was educational i'd be a gigabrain 22:09 < bridge> but here i am watching 10 hours of the Cat dancing to EDM 22:11 < bridge> my feed is very educational :justatest: 22:11 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245831943879135284/image.png?ex=665a2ee9&is=6658dd69&hm=e83b6290e6089a4204ceb509a36a68475cc26bf4b0fb2122b1b3af23b1bb51fb& 22:13 < bridge> yeah same... 22:13 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1245832353046073394/image.png?ex=665a2f4b&is=6658ddcb&hm=8db6476ad2e01671f38ab271801f8008cc281b4c36522303cd5203f45da02d68& 22:17 < bridge> I don't have feed - I have Unhook installed 22:18 < bridge> ngl you look like the person who would have it 22:26 < bridge> ?? 22:27 < bridge> Wouldn't* 22:29 < bridge> ???