00:01 <+bridge> [ddnet] I will try to bisect it tomorrow, if no one else found the problem 00:05 <+bridge> [ddnet] https://ddnet.tw/downloads/#16.1 😅 00:15 <+bridge> [ddnet] We should try to make the new version work well and recommend everyone to use it. Old versions won't get fixes and other improvements 01:04 <+bridge> [ddnet] 16.2 ping doesnt get updated 01:04 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/994016052528816210/unknown.png 02:05 <+PickleRick> where can i find tutorials for brutal servers 02:15 <+bridge> [ddnet] what kind of tutorials are you looking for? 02:16 <+bridge> [ddnet] play-throughs are on youtube, many mechanics are explained on the wiki :) 02:23 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/4508 13:58 < ***> Buffer Playback... 13:58 <+bridge> [11:45:22] [ddnet] oO 13:58 <+bridge> [11:45:27] [ddnet] https://github.com/ddnet/ddnet/runs/7212109106?check_suite_focus=true 13:58 <+bridge> [11:45:36] [ddnet] 13:58 <+bridge> [11:46:17] [ddnet] that looks completely unrelated to my pr, but looks frightening 13:58 <+bridge> [12:08:42] [ddnet] https://news.ycombinator.com/item?id=31993713 13:58 <+bridge> [12:08:54] [ddnet] https://www.openssl.org/news/secadv/20220705.txt 13:58 <+bridge> [12:09:03] [ddnet] > OpenSSL Security Advisory [5 July 2022] 13:58 <+bridge> [12:09:03] [ddnet] > ======================================= 13:58 <+bridge> [12:09:04] [ddnet] > 13:58 <+bridge> [12:09:06] [ddnet] > Heap memory corruption with RSA private key operation (CVE-2022-2274) 13:58 <+bridge> [12:09:07] [ddnet] > ===================================================================== 13:58 <+bridge> [12:09:08] [ddnet] > 13:58 <+bridge> [12:09:09] [ddnet] > Severity: High 13:58 <+bridge> [12:09:11] [ddnet] > 13:58 <+bridge> [12:09:12] [ddnet] > The OpenSSL 3.0.4 release introduced a serious bug in the RSA 13:58 <+bridge> [12:09:13] [ddnet] > implementation for X86_64 CPUs supporting the AVX512IFMA instructions. 13:58 <+bridge> [12:09:15] [ddnet] > This issue makes the RSA implementation with 2048 bit private keys 13:58 <+bridge> [12:09:16] [ddnet] > incorrect on such machines and memory corruption will happen during 13:58 <+bridge> [12:09:17] [ddnet] > the computation. As a consequence of the memory corruption an attacker 13:58 <+bridge> [12:09:20] [ddnet] > may be able to trigger a remote code execution on the machine performing 13:58 <+bridge> [12:09:21] [ddnet] > the computation. 13:58 <+bridge> [12:09:24] [ddnet] :monkalaugh: 13:58 <+bridge> [12:40:14] [ddnet] Hm heap memory corruption 13:58 <+bridge> [12:40:52] [ddnet] And it's in the optimized codepath. I wonder if rust could have stopped this one 13:58 <+bridge> [12:44:04] [ddnet] looks more like they misused (or compiler did) some assembly instruction 13:58 <+bridge> [12:47:39] [ddnet] sounded like handrolled assembly, haven't investigated 13:58 <+bridge> [12:47:46] [ddnet] if that were the case, rust would not have helped 13:58 <+bridge> [13:07:54] [ddnet] Handrolled assembly generated by perl 13:58 <+bridge> [13:07:59] [ddnet] Work of art 13:58 < ***> Playback Complete. 14:23 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/994217039117942865/RDT_20220706_1422264600909581534588199.jpg 14:35 <+bridge> [ddnet] nice rant, but does he have any valid argument against c++? 15:46 <+bridge> [ddnet] https://tenor.com/view/linus-linus-torvalds-nvidia-fuck-you-gif-18053606 16:02 <+bridge> [ddnet] Turns out, it's always been that way O.o 😦 16:10 <+bridge> [ddnet] obv scratch > c++ 16:34 <+bridge> [ddnet] @ReiTW how is rust going 16:35 <+bridge> [ddnet] fine, still have hard time to work with it, but just need more practice, ig i'll go on codingames to practice more 16:36 <+bridge> [ddnet] the syntax sometimes can be very difficult to read when you're beginning 16:37 <+bridge> [ddnet] yeah 16:39 <+bridge> [ddnet] recently did a bencode parser in nom 16:39 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/994251296053919784/unknown.png 16:39 <+bridge> [ddnet] :PepeA: 16:39 <+bridge> [ddnet] https://github.com/edg-l/nom-bencode 16:40 <+bridge> [ddnet] bencode is the stuff .torrent files are encoded as 16:49 <+bridge> [ddnet] Still have hard time understanding the usage of lifetimes 16:50 <+bridge> [ddnet] what part of lifetimes do you struggle with? 16:50 <+bridge> [ddnet] when taking reference parameters? when passing them? 16:51 <+bridge> [ddnet] well lifetimes are hard to understand itself 16:51 <+bridge> [ddnet] like when learning pointers 16:51 <+bridge> [ddnet] the best way is to practice 16:51 <+bridge> [ddnet] atleast for me 16:52 <+bridge> [ddnet] i still struggle to wrap my head around https://doc.rust-lang.org/nomicon/hrtb.html sometimes 16:56 <+bridge> [ddnet] Weirdest part about lifetimes for me was probably `'static` meaning two different things in two contexts 16:57 <+bridge> [ddnet] As a trait bound it implies that the type does not contain any non static references, but as a reference lifetime it implies a reference lives for the entire duration of the program 16:57 <+bridge> [ddnet] Subtle but annoying difference 😛 16:58 <+bridge> [ddnet] I guess coercion and elision aren't exactly trivial either 16:59 <+bridge> [ddnet] oh yeah 16:59 <+bridge> [ddnet] where was the doc i had 16:59 <+bridge> [ddnet] it mentioned that 16:59 <+bridge> [ddnet] https://github.com/pretzelhammer/rust-blog/blob/master/posts/common-rust-lifetime-misconceptions.md 16:59 <+bridge> [ddnet] here 16:59 <+bridge> [ddnet] rly good document 17:00 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/994256423527661598/unknown.png 17:03 <+bridge> [ddnet] another interesting thing is phantom 17:03 <+bridge> [ddnet] https://doc.rust-lang.org/std/marker/struct.PhantomData.html 17:03 <+bridge> [ddnet] https://doc.rust-lang.org/nomicon/phantom-data.html 17:28 <+bridge> [ddnet] "c++ sux because bad programmers use it" 17:28 <+bridge> [ddnet] "lego sux because ameture builders use it" 17:40 <+bridge> [ddnet] It is a valid argument imo, I see poor c++ libs every other day with many bugs, mem leaks, etc. 17:40 <+bridge> [ddnet] rust on the other hand attracts a lot of talented programmers because it is a bit niche and sexy, and has a high barrier to entry compared to c++ and it makes it harder to write bad code, and I tend to trust more an unknown lib because of that 17:41 <+bridge> [ddnet] and yet you use javascript everywhere xd, with infinite bugs and infinite memory usage 17:41 <+bridge> [ddnet] but that's no question of choice XD 17:43 <+bridge> [ddnet] from my personal experience the best u can do is keep your code modular and easy 17:43 <+bridge> [ddnet] 17:43 <+bridge> [ddnet] logic errors will always haunt you and they often cost lot of time to find 17:44 <+bridge> [ddnet] you lost me at rust LOL 17:45 <+bridge> [ddnet] rust does prevent certain stuff, but also adds complexity, since you are in a forced system. 17:45 <+bridge> [ddnet] You could say every memory bug in c++ is just a logic bug in the end. So a language that prevents logic errors would be OP 17:47 <+bridge> [ddnet] also rusts goal is to be secure, a bug there simply results in a panic 17:47 <+bridge> [ddnet] that doesnt mean your plain will continue flying if the pilot crashes 17:51 <+bridge> [ddnet] Not rly rust enforces you to handle results (provided u dont use unwrap) this handling the path of an error 17:51 <+bridge> [ddnet] Thus* 17:54 <+bridge> [ddnet] High barrier of entry compared to C++?? C/C++ are walking pitfalls with shitty stdlibs that don't compare to rusts. The high barrier of entry is just an illusion for us that knew programming before rust existed 17:54 <+bridge> [ddnet] *adds a complexity you would otherwise offload to later, when you get a bug prevented by that added complexity 17:55 <+bridge> [ddnet] ye. barrier to entry to "get started with coding", not be efficient at. that's the point 17:56 <+bridge> [ddnet] Maybe you can get to code toys in C++ quicker. But try linking with a library :P The lack of a package manager makes it hell for newbies 17:57 <+bridge> [ddnet] > Maybe you can get to code toys in C++ quicker. 17:57 <+bridge> [ddnet] i think this is what he means 17:57 <+bridge> [ddnet] rust essentially prevents that 17:57 <+bridge> [ddnet] good point lol 17:58 <+bridge> [ddnet] Don't get me wrong. I love my C but I also know it's very painful to make substantial programs in it 17:58 <+bridge> [ddnet] well i mean within the scope of c++ not about the tooling 17:58 <+bridge> [ddnet] prototypes in rust will always be safer than those in c++ 17:59 <+bridge> [ddnet] in rust, most c++ memory errors will simply not compile. those are not runtime errors, so our pilot will never face that issue 17:59 <+bridge> [ddnet] @Learath2 rust high barrier of entry is that of "it wont even let you compile your program" 18:00 <+bridge> [ddnet] I guess that's fair. C++ will happily let you leak all over the place and use UB 18:01 <+bridge> [ddnet] ?????? 18:02 <+bridge> [ddnet] XD 18:02 <+bridge> [ddnet] thats not my point, you have to redesign your app to archive this 18:04 <+bridge> [ddnet] what does redesign mean 18:04 <+bridge> [ddnet] Hm, wym redesign? Apart from having to handle all errors you'll code pretty much the same way 18:04 <+bridge> [ddnet] you may even find branches u havent handled 18:04 <+bridge> [ddnet] rust enums are pretty dope 18:04 <+bridge> [ddnet] A C++ program doesn't look fundamentally different from a Rust program, atleast in the program structure department 18:05 <+bridge> [ddnet] One thing that might lead to cancer is async callbacks, now that might force you to redesign a bit :P 18:06 <+bridge> [ddnet] I found them much easier to work with in C/C++ where I don't have to spend an hour trying to convince the compiler it's safe 18:06 <+bridge> [ddnet] i never seen c++ async code yet 18:06 <+bridge> [ddnet] @Learath2 you know there is a cult that goes around saying async itself is the devil 18:06 <+bridge> [ddnet] in all languages 18:06 <+bridge> [ddnet] i seen that a lot in hackernews 18:06 <+bridge> [ddnet] xD 18:07 <+bridge> [ddnet] Even without async, just using threads the callbacks are still annoying to get right 18:07 <+bridge> [ddnet] what u talking about xD 18:07 <+bridge> [ddnet] c++ can look the same yes 18:07 <+bridge> [ddnet] now open ddnet source code 18:08 <+bridge> [ddnet] I've actually had a hunch this might be the case. How is a fair threadpool supposed to know how to thread my program better than me? 18:08 <+bridge> [ddnet] u should get to the point whee you write the code already in a way the compiler things its safe 18:09 <+bridge> [ddnet] ? ddnet code rewritten in rust you wouldn't really need to redesign it to get it to work, you just need to clarify some ownership semantics and handle errors we let slip 18:10 <+bridge> [ddnet] Albeit a redesign wouldn't be too bad if we are doing that already, it is still a bit of a mess ngl :D 18:10 <+bridge> [ddnet] a multithreaded ECS world 18:11 <+bridge> [ddnet] mhh i'd say i make it easier than it's actually is, but i'd love to see a rewrite 18:11 <+bridge> [ddnet] rewrites require lot of effort 18:12 <+bridge> [ddnet] and in ddnet u would need to reproduce the bugs safely 18:12 <+bridge> [ddnet] mhh i'd say u make it easier than it's actually is, but i'd love to see a rewrite 18:12 <+bridge> [ddnet] Ew forgot we aren't allowed to change anything anyway 18:13 <+bridge> [ddnet] if we were to rewrite the entirety of ddnet would it be possible to actually make some ground changes that wouldnt be possible in the current state of ddnet? 18:15 <+bridge> [ddnet] yes 18:15 <+bridge> [ddnet] specially if we can ignore the tw protocol 18:15 <+bridge> [ddnet] and build a new one 18:15 <+bridge> [ddnet] im sure we can do better than 2007 18:15 <+bridge> [ddnet] or 2012 18:16 <+bridge> [ddnet] first priority = moddable friendly 18:16 <+bridge> [ddnet] and thinking with forward compatiblity 18:16 <+bridge> [ddnet] thats what i would prioritize 18:16 <+bridge> [ddnet] Mh, everything is pretty much already possible without a rewrite, just need to drop vanilla compatibility 18:16 <+bridge> [ddnet] we are also bound by our own back com 18:16 <+bridge> [ddnet] comp 18:16 <+bridge> [ddnet] e.g we cant make a new map format 18:16 <+bridge> [ddnet] A rewrite would just make it more pleasent to work with 18:17 <+bridge> [ddnet] *without monkey patching code 18:17 <+bridge> [ddnet] Sure we can. We can send new map to new clients and old map to old clients 18:17 <+bridge> [ddnet] see 18:17 <+bridge> [ddnet] thats the stuff i dislike 18:17 <+bridge> [ddnet] and all code is cluttered with 18:17 <+bridge> [ddnet] i talked about this but itd be nice in the rewrite for entity arrangements to look different 18:18 <+bridge> [ddnet] u mean the pngs? 18:18 <+bridge> [ddnet] yes 18:18 <+bridge> [ddnet] a good idea would be to use json files 18:18 <+bridge> [ddnet] time cps take up too much space 18:18 <+bridge> [ddnet] describing the tiles in pngs 18:18 <+bridge> [ddnet] so we can rearrange 18:18 <+bridge> [ddnet] any time 18:18 <+bridge> [ddnet] mc does this kinda 18:18 <+bridge> [ddnet] Mmh, this is a recipe for json files mismatching pngs 18:18 <+bridge> [ddnet] but gives more flexibility 18:19 <+bridge> [ddnet] If I were to do something like that I'd probably have my own format that pairs a png with a json file just to make sure they never get split up 18:19 <+bridge> [ddnet] Like a zip with a special header probably 18:33 <+bridge> [ddnet] I was coding this and 3 people here called it useless and told me that I was wasting my time so I stopped working on it 18:58 <+bridge> [ddnet] @deen if you use `/timecp` command, should not also get your time in scoreboard get updated to the time of the requested player? Because with my last change it does show that time in the personal record text xD 18:58 <+bridge> [ddnet] @deen if you use `/timecp` command, should not also get your time in scoreboard get updated to the time of the requested player? 19:02 <+bridge> [ddnet] mh I see only the CPs are from the requested player... I think thats nice. I just thought there could be some kind of feedback, that the CPs got loaded 19:43 <+bridge> [ddnet] is it possible to interpolate inputs between ticks 19:43 <+bridge> [ddnet] so inputs arent bound to 50hz 19:45 <+bridge> [ddnet] not really 19:48 <+bridge> [ddnet] why not 19:49 <+bridge> [ddnet] like theoretically 19:50 <+bridge> [ddnet] if u dont care about physics change yes 19:55 <+bridge> [ddnet] i mean ye it will break things like dj in freeze and a lot more 19:56 <+bridge> [ddnet] it breaks the whole physics 19:57 <+bridge> [ddnet] real life physics does not rely on ticks 19:57 <+bridge> [ddnet] but on time 19:57 <+bridge> [ddnet] Interpolate in how many steps. This is just a computer 19:57 <+bridge> [ddnet] @c0d3d3v if you want me to submit my implementation of the freeze hud as a PR I can but I held off because kog servers don't send freezetick so it just uses ninja skin to determine if someone is frozen. But I guess it could just use freezetick on ddnet servers 19:58 <+bridge> [ddnet] @louis here 19:58 <+bridge> [ddnet] https://github.com/Jupeyy/ddnet/commit/ba0155c8686e3a3c8ce3c7b5767a0587530d7d85 19:58 <+bridge> [ddnet] 19:58 <+bridge> [ddnet] enjoy 200 ticks ddnet 19:58 <+bridge> [ddnet] thats not what i meant 19:58 <+bridge> [ddnet] i mean like 19:58 <+bridge> [ddnet] idk if interpolate is correct word 19:59 <+bridge> [ddnet] u dont increase ticks, just get inputs on a higher frequency (for example 500hz) 19:59 <+bridge> [ddnet] if a jump is done halfway between ticks, it will calculate the next position as so 19:59 <+bridge> [ddnet] instead of having it start on the next tick 19:59 <+bridge> [ddnet] physics are at 50hz but client smoothes it out iirc 19:59 <+bridge> [ddnet] intra tick stuff 19:59 <+bridge> [ddnet] mh its not that ez, how do you apply half gravity etc 20:00 <+bridge> [ddnet] it simply doesnt work on how the physics was build 20:00 <+bridge> [ddnet] gravity /= 2 :troll: 20:00 <+bridge> [ddnet] yeah but there is friction which is a multiplier 20:00 <+bridge> [ddnet] so at that point it would break the physics completly 20:02 <+bridge> [ddnet] Theoretically I guess you could send the server how many ms before the next tick you made the input and the server could do some magic, but it'd definitely break a lot of things 😄 20:08 <+bridge> [ddnet] I first of all wanted to open an issue so we can have a little discussion if it is useful. xD that KoG does not send freeze information, but only ninja weapon is also a problem that should be mentioned. 20:10 <+bridge> [ddnet] Yeah ninja weapon is an issue but its very rare on gores maps 20:11 <+bridge> [ddnet] Also I realize my implementation has like 10 configs because I was not concerned about minimizing them so that would need to be simplified 20:12 <+bridge> [ddnet] Also I realize my implementation has like 6 configs because I was not concerned about minimizing them so that would need to be simplified 20:15 <+bridge> [ddnet] Sry i would comment on the girhub post but I'm not at pc 20:15 <+bridge> [ddnet] Sry i would comment on the github post but I'm not at pc 20:20 <+bridge> [ddnet] i give you an example: 20:20 <+bridge> [ddnet] 20:20 <+bridge> [ddnet] u need to understand this: 20:20 <+bridge> [ddnet] first velocity is calculated, then the position is changed 20:20 <+bridge> [ddnet] 20:20 <+bridge> [ddnet] lets start with vel 0 in both cases 20:20 <+bridge> [ddnet] 20:20 <+bridge> [ddnet] v = (0 + gravity) * friction 20:20 <+bridge> [ddnet] p = p + v 20:20 <+bridge> [ddnet] 20:20 <+bridge> [ddnet] now lets form it to half of it 20:20 <+bridge> [ddnet] v = (0 + gravity / 2) * friction 20:21 <+bridge> [ddnet] p = p + v 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] if you want a similar result generally in a multiplication you need to take the x-root of friction 20:21 <+bridge> [ddnet] in this case the second root, bcs you apply it twice 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] (sqrt(friction) * sqrt(friction)) = friction 20:21 <+bridge> [ddnet] However, as much as you can make it "better" 20:21 <+bridge> [ddnet] u added the velocity to the position and would need to take the position into account to actually fix it 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] for a const like gravity what happens in real world(simplified) is: 20:21 <+bridge> [ddnet] v(t) = gravity * t + v0, where v0 is the start velocity 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] or depending on the old velocity 20:21 <+bridge> [ddnet] v(t) = v(last_t) + gravity * (t - last_t) 20:21 <+bridge> [ddnet] so basically the ellapsed time 20:21 <+bridge> [ddnet] 20:21 <+bridge> [ddnet] and on position side you do basically the same 20:21 <+bridge> [ddnet] pos(t) = gravity / 2 * t^2 + v0 * t + pos0 20:21 <+bridge> [ddnet] 20:25 <+bridge> [ddnet] gravity is not even constant around earth 20:25 <+bridge> [ddnet] :p 20:25 <+bridge> [ddnet] the constant is another thing 20:25 <+bridge> [ddnet] i forgot the name 20:26 <+bridge> [ddnet] gravitational constant G 20:26 <+bridge> [ddnet] https://en.wikipedia.org/wiki/Gravitational_constant 20:26 <+bridge> [ddnet] yeah changing tw physics in any way will break one thing or the other unfortunately 20:27 <+bridge> [ddnet] but maybe u could hard code a lot of edge cases or smth, but doubt it would ever work 20:27 <+bridge> [ddnet] gravity is a lie anyway 20:27 <+bridge> [ddnet] we just constantly bend space time 20:27 <+bridge> [ddnet] ez 20:29 <+bridge> [ddnet] https://youtu.be/wrwgIjBUYVc?t=400 21:03 <+bridge> [ddnet] Just to correct myself. The tangling of the velocity is only server side. 21:03 <+bridge> [ddnet] 21:03 <+bridge> [ddnet] @Learath2 21:03 <+bridge> [ddnet] But the Character is very second tick updated. xD I was lost, that is not because if the velocity. 21:03 <+bridge> [ddnet] It is m_Tick that is updated every tick. 21:03 <+bridge> [ddnet] I did a little debug code to figure that out, if someone wants to test it https://github.com/C0D3D3V/ddnet/tree/what_changes_in_netobj_character 21:03 <+bridge> [ddnet] 21:03 <+bridge> [ddnet] Looks like this: 21:03 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: CNetObj_Character changed 21:03 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: 0 35500 35502 21:03 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: CNetObj_Character changed 21:03 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: 0 35502 35504 21:03 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: CNetObj_Character changed 21:03 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: 0 35504 35506 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: CNetObj_Character changed 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: 0 35506 35508 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: CNetObj_Character changed 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: 0 35508 35510 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: CNetObj_Character changed 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: 0 35510 35512 21:04 <+bridge> [ddnet] Just to correct myself. The tangling of the velocity is only server side. 21:04 <+bridge> [ddnet] 21:04 <+bridge> [ddnet] @Learath2 21:04 <+bridge> [ddnet] But the Character is very second tick updated. xD I was lost, that is not because of the velocity. 21:04 <+bridge> [ddnet] It is m_Tick that is updated every tick. 21:04 <+bridge> [ddnet] I did a little debug code to figure that out, if someone wants to test it https://github.com/C0D3D3V/ddnet/tree/what_changes_in_netobj_character 21:04 <+bridge> [ddnet] 21:04 <+bridge> [ddnet] Looks like this: 21:04 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: CNetObj_Character changed 21:04 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: 0 35500 35502 21:04 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: CNetObj_Character changed 21:04 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: 0 35502 35504 21:04 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: CNetObj_Character changed 21:04 <+bridge> [ddnet] [2022-07-06 20:57:51][client]: 0 35504 35506 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: CNetObj_Character changed 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: 0 35506 35508 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: CNetObj_Character changed 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: 0 35508 35510 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: CNetObj_Character changed 21:04 <+bridge> [ddnet] [2022-07-06 20:57:52][client]: 0 35510 35512 21:05 <+bridge> [ddnet] I do not even think we would need that update. But I guess that was made to prevent package loss. 21:07 <+bridge> [ddnet] I don't see what this has to do with package loss 21:07 <+bridge> [ddnet] can you explain? 21:18 <+bridge> [ddnet] meh 21:18 <+bridge> [ddnet] why is rust so bloated 21:27 <+bridge> [ddnet] ``` 21:27 <+bridge> [ddnet] $ touch a.rs 21:27 <+bridge> [ddnet] $ rustc a.rs --crate-type staticlib -C opt-level=z 21:27 <+bridge> [ddnet] $ ls -lh liba.a 21:27 <+bridge> [ddnet] -rw-r--r-- 1 19M Jul 6 21:26 liba.a 21:27 <+bridge> [ddnet] ``` 21:31 <+bridge> [ddnet] static lib? 21:32 <+bridge> [ddnet] https://github.com/johnthagen/min-sized-rust 22:06 <+bridge> [ddnet] I thought maybe the character gets resend with new tick to prevent that a player did not get an old character snap... But I guess that is unnecessary because the client would request a resend anyway because of missing delta 22:06 <+bridge> [ddnet] maybe we could try not to send characters if nothing changes 22:07 <+bridge> [ddnet] except tick 22:08 <+bridge> [ddnet] or better keep the old tick, to keep the snap in the snapshot 22:08 <+bridge> [ddnet] so we could introduce a snapshot tick.... 22:08 <+bridge> [ddnet] so we could introduce a snapshot tick.... for characters 22:55 <+bridge> [ddnet] @Ryozuki yes, static lib 22:56 <+bridge> [ddnet] perhaps it's intrinsic in the static library format that I can't get it smaller? 22:59 <+bridge> [ddnet] did u strip it? 23:00 <+bridge> [ddnet] codegen-units = 1 may help too 23:00 <+bridge> [ddnet] basically the link i sent 23:00 <+bridge> [ddnet] I don't think so, but nothing is going to reduce an empty library from 20 MB to something sane 23:01 <+bridge> [ddnet] maybe 23:01 <+bridge> [ddnet] https://github.com/johnthagen/min-sized-rust#optimize-libstd-with-build-std 23:01 <+bridge> [ddnet] if u check this part 23:01 <+bridge> [ddnet] build using build-std 23:01 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/994347480915390505/unknown.png 23:01 <+bridge> [ddnet] after stripping, it's 'only' 10 MB 23:02 <+bridge> [ddnet] whats the comparision with say c++? 23:02 <+bridge> [ddnet] 1.1 KB 23:02 <+bridge> [ddnet] try doing what i sent u 23:02 <+bridge> [ddnet] it should remove unused parts of the std 23:03 <+bridge> [ddnet] I mean an empty library is an unfair comparison, I don't expect rust to go down to 1.1 KB 23:04 <+bridge> [ddnet] Why not? 23:04 <+bridge> [ddnet] or at least it's not important 23:04 <+bridge> [ddnet] Nothing is nothing, no matter the language 😛 23:04 <+bridge> [ddnet] but I was trying to generate a minimal example where the rust library is still that big 23:04 <+bridge> [ddnet] and that's where I ended up 23:04 <+bridge> [ddnet] I'll try the build-std thing 23:05 <+bridge> [ddnet] iirc 23:05 <+bridge> [ddnet] its definitly possible 23:06 <+bridge> [ddnet] ah, is the problem that I can't dynamically link rust and hence can't dynamically link the standard library (which would unfortunately not be present anyway), but libc++ is present on distributions? 23:06 <+bridge> [ddnet] what would that look like on windows? 23:07 <+bridge> [ddnet] How big is libc anyway? I doubt it's 10M 23:07 <+bridge> [ddnet] oh 23:07 <+bridge> [ddnet] But yes probably that is the issue, and the only way to go smaller is probably some sort of LTO 23:07 <+bridge> [ddnet] i thought u were statically linking the libstdc++ 23:07 <+bridge> [ddnet] for a fair comp 23:08 <+bridge> [ddnet] I'm going for a 'how much size will ddnet gain' comparison 23:08 <+bridge> [ddnet] @Learath2 20 MB, for that matter 😄 23:09 <+bridge> [ddnet] /usr/lib/libstdc++.so.6.0.30 23:09 <+bridge> [ddnet] Hm, having to have libstd in every module of rust we add sounds like a significantly bad deal, we'd have to go for a non modular approach for that to be remotely acceptable 23:09 <+bridge> [ddnet] u can dynamically link rust tho i think 23:09 <+bridge> [ddnet] its just not the norm 23:09 <+bridge> [ddnet] Like one big rust blob interacting with the one big C++ blob 23:12 <+bridge> [ddnet] I get 2.5 MiB for the stripped build-std build 23:12 <+bridge> [ddnet] Is that still an empty lib? 23:12 <+bridge> [ddnet] yes 23:13 <+bridge> [ddnet] What part of std is even being pulled in, that's so weird 23:13 <+bridge> [ddnet] perhaps the formatting stuff 23:13 <+bridge> [ddnet] did u remove 23:13 <+bridge> [ddnet] the panic 23:13 <+bridge> [ddnet] to abort 23:13 <+bridge> [ddnet] > Even if panic = "abort" is specified in Cargo.toml, rustc will still include panic strings and formatting code in final binary by default. An unstable panic_immediate_abort feature has been merged into the nightly rustc compiler to address this. 23:14 <+bridge> [ddnet] I can try that; removing the formatting code is probably a no-go for ddnet though 23:14 <+bridge> [ddnet] As long as we have a single copy of a 3ish MB libstd that sounds fine to me aswell, no need to make the panics ugly 23:14 <+bridge> [ddnet] and codegen-units = 1 ? 23:15 <+bridge> [ddnet] i mean 3mb is fine to me 23:15 <+bridge> [ddnet] we shouldnt sacrifice too much for it 23:15 <+bridge> [ddnet] otherwise jsut not use rust 23:15 <+bridge> [ddnet] xD 23:16 <+bridge> [ddnet] 3M is definitely acceptable, even up to 5M, but if we can't split libstd and link to that dynamically then we can't have rust "modules" we'll need to settle for a blob 23:25 <+bridge> [ddnet] ah, I accidentally produced a 14 KiB .so 23:37 <+bridge> [ddnet] okay, with `crate-type = ["cdylib"]` and `build-std`, I get < 32 KiB .sos 23:38 <+bridge> [ddnet] Hello, Is this channel only for server and client? I have idea/question about site 23:40 <+bridge> [ddnet] for everything dev related 23:40 <+bridge> [ddnet] this channel is about all development 23:40 <+bridge> [ddnet] web included 23:47 <+bridge> [ddnet] afaik client accepts any skin size, recently I found out uhd skins are added separately to db. wasn't simpler just update tee.js (the skin assembler) to make correct previews for uhd? 23:59 <+bridge> [ddnet] it'd be good to update tee.js if it doesn't work with higher definition skins