00:18 < bridge> #10732 is now ready 😎 00:18 < bridge> Thank you for solving the blocker Robyt :deen_star: 00:18 < bridge> https://github.com/ddnet/ddnet/pull/10732 03:34 < bridge> https://cdn.discordapp.com/attachments/1409565579139879047/1409669037876707400/image.png?ex=68ae3819&is=68ace699&hm=752b20e6d77b46c6828530d75d5a4d38810dc5a9d9be9f2b195e4d5354ad8bc0& 03:34 < bridge> https://cdn.discordapp.com/attachments/1141990897156886600/1407198351899889745/image.png?ex=68a53b17&is=68a3e997&hm=e3c6725f33e44d8776b159d26f97505e987cb74d686497b3f42e406b0fdb0f8f& 03:34 < bridge> https://cdn.discordapp.com/attachments/1141990897156886600/1407198367494307892/image.png?ex=68a53b1b&is=68a3e99b&hm=310f286db2b545dfb46f6e67064ebb33b360a4c56de2f29ecf517b843006f75f& 03:34 < bridge> https://cdn.discordapp.com/attachments/1141990897156886600/1407198388818153512/image.png?ex=68a53b20&is=68a3e9a0&hm=ea8a1525f2ef469cf0bbd649694827cd9e3113f3375607937a5365d5278607d5& @everyone 08:18 < bridge> morning fellas 08:20 < bridge> gm 08:20 < bridge> 4070 ti super in the mail 08:20 < bridge> to my address for my computer 09:01 < bridge> i said a day ago or smth about a CoreLocal structure 09:01 < bridge> i decided to do something better 09:02 < bridge> ```rust 09:02 < bridge> #[repr(C)] 09:02 < bridge> pub struct PerCpuData { 09:02 < bridge> pub tss: TaskStateSegment, 09:02 < bridge> // Since we use those after heap is done, we can store pointers to the heap allocations. 09:02 < bridge> pub lapic: *mut LocalApic, 09:02 < bridge> pub scheduler: *mut Scheduler, 09:02 < bridge> } 09:02 < bridge> 09:02 < bridge> #[used] 09:02 < bridge> #[unsafe(link_section = ".percpu")] 09:02 < bridge> static mut PERCPU_TEMPLATE: PerCpuData = PerCpuData { 09:02 < bridge> lapic: core::ptr::null_mut(), 09:02 < bridge> tss: TaskStateSegment::new(), 09:02 < bridge> scheduler: core::ptr::null_mut(), 09:02 < bridge> }; 09:02 < bridge> 09:02 < bridge> unsafe extern "C" { 09:02 < bridge> static __percpu_start: u8; 09:02 < bridge> static __percpu_size: usize; 09:02 < bridge> } 09:02 < bridge> 09:02 < bridge> pub fn get_percpu_data() -> &'static mut PerCpuData { 09:02 < bridge> let cpu_id = get_current_cpu_id(); 09:02 < bridge> unsafe { 09:02 < bridge> let base = &__percpu_start as *const u8 as usize; 09:02 < bridge> let offset = cpu_id * (&__percpu_size as *const usize as usize); 09:02 < bridge> &mut *((base + offset) as *mut PerCpuData) 09:03 < bridge> } 09:03 < bridge> } 09:03 < bridge> 09:05 < bridge> gumo 09:05 < bridge> gumo 09:05 < bridge> gomen 09:06 < bridge> i woke up at 6 09:06 < bridge> i love your posted code-snippets, they make me google funny words and learn funny things 09:06 < bridge> maybe i have a problem 09:06 < bridge> xd 09:07 < ws-client> **** @filoqcus these are all masters i could find https://paste.zillyhuhn.com/IB 09:07 < ws-client> **** not sure if ddnet servers these days even still use udp masters for but the ddnet master you need to allow tcp in your firewall to master1.ddnet.org 09:08 < bridge> ```rust 09:08 < bridge> #[unsafe(naked)] 09:08 < bridge> #[unsafe(no_mangle)] 09:08 < bridge> pub unsafe extern "C" fn timer_interrupt_handler() { 09:08 < bridge> naked_asm!( 09:08 < bridge> // CPU has already pushed SS, RSP, RFLAGS, CS, RIP 09:08 < bridge> // Save all general purpose registers 09:08 < bridge> "push rax", 09:08 < bridge> "push rcx", 09:08 < bridge> "push rdx", 09:08 < bridge> "push rbx", 09:08 < bridge> "push rbp", 09:08 < bridge> "push rsi", 09:08 < bridge> "push rdi", 09:08 < bridge> "push r8", 09:08 < bridge> "push r9", 09:09 < bridge> "push r10", 09:09 < bridge> "push r11", 09:09 < bridge> "push r12", 09:09 < bridge> "push r13", 09:09 < bridge> "push r14", 09:09 < bridge> "push r15", 09:09 < bridge> 09:09 < bridge> // At this point, RSP points to the saved context 09:09 < bridge> // Pass it as first argument to timer_schedule 09:09 < bridge> "mov rdi, rsp", 09:09 < bridge> 09:09 < bridge> // Ensure stack is 16-byte aligned before call 09:09 < bridge> // The push operations above pushed 15 registers (8 bytes each = 120 bytes) 09:09 < bridge> // CPU pushed 5 values (40 bytes) 09:09 < bridge> // Total: 160 bytes, which is divisible by 16, so we're aligned 09:09 < bridge> do u have edos as an edlang compiler target 09:09 < bridge> edlang is a bit abandoned 09:09 < bridge> if u have a proper OS i will want to make lot of user land apps 09:10 < bridge> a compiler would be nice too 09:10 < bridge> my dream is to make my own walled garden of software 09:10 < bridge> sounds like it 09:10 < bridge> like some sort of pure state where u made everything and can say u made all the software in this running system 09:10 < bridge> i would then only need to learn hardware engineering 09:10 < bridge> which probs will not happen 09:11 < bridge> u never know 09:12 < bridge> @mpft im so excited about making my own os that now making normal software feels boring 09:12 < bridge> its weird 09:12 < bridge> at work im thinking about edos 09:12 < bridge> xd 09:13 < bridge> https://edgl.dev/blog/creating-a-kernel-p2/ 09:13 < bridge> part 2 of the kernel blog 09:13 < bridge> this one is just serial debug 09:17 < ws-client> **** @filoqcus untested 🀷 https://gist.github.com/ChillerDragon/51b4f4fe771b2a68ca4132173d4aaaf6 09:21 < ws-client> **** @filoqcus tbh not sure if this even works. What you are planning to do is probably illegal. Servers listed in the master should be real game servers that can also be joined. 09:22 < ws-client> **** i think the master also tests the connection so you have to allow that too but then you are kinda tricking the system 09:23 < ws-client> **** @filoqcus you should just share the ip of your server to your friends or tell them to add it to favorites then it also shows in the server browser 09:32 < bridge> damn I need a project 09:40 < bridge> The master server will do a heartbeat from an undisclosed ip, you need to be able to answer that. Your best bet is to just allow chal packets from any ip 09:44 < ws-client> **** @learath2 isnt that illegal master registration then? 09:45 < ws-client> **** ddnet admin giving advice on how to bypass master challenge hrhrhrhr 09:45 < ws-client> **** @learath2 omg lerato nobody commented on our epic rcon draft!!!!!!! they will never do it, will they? .-. 09:45 < bridge> Hm, idk if the rules cover it very well, but that's how most ddos protected servers work, no? 09:46 < ws-client> **** @learath2 idk if he is planning to ddos protect the way i understood it he wants a private server 09:46 < bridge> We also let password protected servers exist, so not every server has to be accessible to the public I guess 09:47 < ws-client> **** ok but they have password icon 09:47 < ws-client> **** and can be filtered 09:47 < bridge> Let me stare at the masterserver rules a bit 09:47 < ws-client> **** i think its too late 09:47 < ws-client> **** you are going to jail 09:47 < ws-client> **** i will tell minus 10:04 < ws-client> **** @learath2 can i technically push straight to master without branch and pr? (asking for a friend) 10:05 < bridge> We were talking about protecting the master branch. Idk if we did though 10:05 < ws-client> **** scary 10:05 < ws-client> **** so if i clone ddnet/ddnet on my vps and accidentally push on master the ddnet repo gets my nudes straight on master? 10:05 < ws-client> **** gg 10:05 < bridge> :omo: 10:06 < ws-client> **** @learath2 i in fact have already accidentally pushed to ddnet/ddnet master before. Before i was maintainer. Could you by any chance double check this ._. 10:07 < bridge> I did it, I only need 3 IP addresses 10:07 < ws-client> **** pro @filoqcus 10:07 < ws-client> **** now you are going to jail too @filoqcus 10:07 < bridge> Nooo:justatest: 10:07 < bridge> Do not share with the class what ip you had to whitelist 10:07 < ws-client> **** xd 10:08 < ws-client> **** lawyer josspit, am i in trouble? because of "beihilfe"? 10:08 < bridge> Oh btw afaict it rotates every once in a while 10:09 < ws-client> **** i will delete this gist before it spreads 10:10 < bridge> @learath2 As I understand it, these 3 IPs are needed 10:10 < bridge> 10:10 < bridge> 1. 49.12.97.180 10:10 < bridge> 2. 154.21.95.54 10:10 < bridge> 3. 193.32.248.189 10:10 < ws-client> **** bru xd 10:10 < bridge> XD 10:10 < ws-client> **** either he is troll or its language barrier 10:10 < bridge> is that ur ip 10:11 < ws-client> **** @filoqcus he said "Do **not** share" xxxD 10:11 < bridge> D: 10:11 < ws-client> **** big jail <:banhammer:392813948858269696> 10:11 < bridge> its in irc log 10:11 < ws-client> **** was it deleted? xd 10:11 < bridge> But why 10:11 < ws-client> **** you are doing shady shenanigans 10:12 < ws-client> **** the master server is supposed to list playable servers 10:12 < bridge> Master servers 10:12 < ws-client> **** your server is not playable if it has a whitelist 10:12 < bridge> hmm 10:12 < bridge> πŸ₯² 10:12 < ws-client> **** just psst 10:12 < ws-client> **** heinrich is afk anyways 10:12 < ws-client> **** and lerato is gangster admin 10:12 < ws-client> **** nobody nows what shady stuff u do here 10:13 < bridge> I understood what consequences this could have, so I won't) 10:13 < bridge> :omo: 10:13 < ws-client> **** JAIL 10:13 < bridge> Yea 10:14 < ws-client> **** @learath2 remember when heinrich almost deleted entire kog from masters because they required login to play? 10:14 < ws-client> **** and ddnet essentially did ban kog 10:15 < ws-client> **** there is the filter by needs auth and its on by default 10:15 < ws-client> **** the average player thinks kog has like 3 game servers 10:16 < ws-client> **** its is also kinda cool tbh because you can really feel that there is a different set of players in these underground servers with the entry barrier 10:16 < ws-client> **** no tiktok Linear andys with 3 week play time will be found there, veterans only 10:21 < bridge> StGB Β§ 27 10:21 < bridge> 10:21 < bridge> you're cooked 10:25 < bridge> what 11:06 < bridge> > discourage the use of std::optional in the entire code base. 11:06 < bridge> :pepeRage: 11:15 < ws-client> **** @ryozuki Strafgesetzbuch! 🍺 11:16 < ws-client> **** there is jail time waiting for me if i touch german soil again. Because i helped bypass master server laws. 11:16 < ws-client> **** @Assa <:nouis:745612528834445313> 11:16 < ws-client> **** rust > std::optional 11:18 < ws-client> **** my efforts of 69 pr goal have officially failed 11:18 < ws-client> **** worst maintainer ever 11:21 < bridge> Hello. will there be any more updates? 11:23 < ws-client> **** lol 11:23 < ws-client> **** i guess it has been a while since last release 11:23 < ws-client> **** @tails290 yes there is still dev activity. Where do you play? Windows? Steam? 11:24 < bridge> Steam 11:24 < ws-client> **** you can select nightly on steam 11:24 < ws-client> **** then you get dailyish updates (currently broken lmao) 11:24 < bridge> You can switch to the Steam beta version in the settings to use the latest features 11:24 < ws-client> **** deen right now: <:justatest:572499997178986510> 11:24 < bridge> I assume the next release was already around the corner but #10763 blocks it 11:24 < bridge> https://github.com/ddnet/ddnet/issues/10763 11:24 < ws-client> **** latest removed features you mean @robyt3 ? xd 11:25 < bridge> Bro if it doesn't work, why did you write 11:25 < ws-client> **** because it will be fixed eventually 11:26 < ws-client> **** a task force is working on it 11:26 < ws-client> **** depending on which release you use right now it still might be newer 11:26 < bridge> The latest nightly is from 2025-08-22 according to the build log 11:27 < ws-client> **** bleedingly edge 11:27 < ws-client> **** @tails290 if you are bored you can also check out https://tclient.app/ 11:28 < bridge> Okay thank you.I thought it had been abandoned for a long time 11:29 < ws-client> **** ddnet? no lol 11:30 < ws-client> **** teeworlds was abandoned :c 11:30 < ws-client> **** @tails290 what made you think its abandoned? <:tee_thinking:478629518358085653> 11:31 < bridge> In 2024 there were more videos about him on YouTube and TikTok 11:31 < bridge> tiktok propaganda 11:31 < ws-client> **** developer activity is not stricly tied to social media presence 11:32 < bridge> What 11:32 < ws-client> **** @tails290 then its on you to make new videos now!!!! 11:33 < bridge> videos about pull requests? 11:33 < ws-client> **** .-. 11:33 < ws-client> **** about da game 11:34 < ws-client> **** @Patiga twmap-py has no other docs than `help()` right? not some big file i can search in or something? 11:34 < bridge> when https://github.com/ddnet/ddnet-accounts 11:34 < bridge> :kek: 11:34 < ws-client> **** this winter 11:34 < bridge> rlly? 11:34 < ws-client> **** no xd 11:34 < ws-client> **** idk 11:34 < bridge> bruh 11:34 < bridge> D: 11:34 < ws-client> **** hrhrhrhr 11:35 < bridge> How do you communicate via webhook, or what is it? Do you use your own Discord client? What does it look like? 11:35 < bridge> twmap-py is a wrapper around the rust implementation, isnt api the same? 11:35 < bridge> xd 11:35 < bridge> https://chat.zillyhuhn.com/ 11:36 < bridge> :poggers2: 11:36 < ws-client> **** @kollpotato yea i was thinking the same, so i should read the rust docs? on crates.io? 11:36 < ws-client> **** wait not crates xd 11:36 < ws-client> **** docs.rs 11:36 < ws-client> **** rust nob detected 11:36 < ws-client> **** https://docs.rs/twmap/0.13.3/twmap/ 11:37 < ws-client> **** @filoqcus ye looks like dis: 11:37 < ws-client> **** https://zillyhuhn.com/cs/.3fb30e1c-6ed5-40b1-87d0-c69d4aaf4d3b.png 11:37 < ws-client> **** signup token is "nimrocks" 11:38 < ws-client> **** oops my taskbar got leaked 11:38 < bridge> gnome detected 11:38 < ws-client> **** gnomer 11:38 < bridge> gooner 11:38 < bridge> @chillerdragon how did your 69 PRs fail? 11:38 < ws-client> **** @Assa its been weeks and its 80 11:38 < bridge> it's 79 now 11:38 < bridge> there's still hope 11:38 < ws-client> **** that changes everything! 11:38 < ws-client> **** xd 11:39 < bridge> yes 11:39 < bridge> give me ur account credentials and i go merge 10 random prs 11:39 < bridge> i will take no responsibility 11:39 < ws-client> **** you can use !merge for that @kollpotato 11:40 < ws-client> **** !merge 11:40 < chillerbot12> usage: merge [pr id] - to merge ddnet pr using chiler maintainer credentials 11:40 < bridge> @chillerdragon don't give up, it'll be a hard and sweaty path, but it'll be worth it :greenthing: 11:41 < ws-client> **** ur complicated render prs are basically the evil villain in this story smh 11:41 < bridge> !merge 10732 11:41 < chillerbot12> using chilors github maintainer credentials to automatically merge https://github.com/ddnet/ddnet/pull/10732 ... 11:41 < ws-client> **** <:justatest:572499997178986510> 11:42 < bridge> it's the last complicated one, I promise 11:43 < bridge> All followups (besides editor :justatest: ) are just cleanups and smaller things :justatest: 11:43 < ws-client> **** go cleanup fat skins hrhrhrh 11:43 < ws-client> **** road to 0 features 11:43 < bridge> okay maybe one more which is a tad more complicated πŸ™ˆ 11:43 < ws-client> **** pf 11:44 < ws-client> **** enjoy stale pr then 11:44 < bridge> gm 11:44 < ws-client> **** teerowo 11:44 < bridge> 2 features on my list for rendering 11:44 < bridge> - Zoom optimization (very small) 11:44 < bridge> - Rotation clipping 11:45 < bridge> both have huge benefits 11:45 < bridge> :happy: 11:46 < bridge> this is not how you get to 69 PRs 11:47 < bridge> > **** enjoy stale pr then 11:47 < bridge> this is not how you get to 69 PRs 11:55 < bridge> 2 features on my list for rendering 11:55 < bridge> - Zoom optimization (very small in terms of code size) 11:55 < bridge> - Rotation clipping 11:56 < bridge> both have huge benefits and are based on quad clusters 12:46 < ws-client> **** @robyt3 lez merge #10785 before the end of my shift 12:46 < chillerbot12> https://github.com/ddnet/ddnet/issues/10785 12:49 < bridge> Updated 12:49 < ws-client> **** πŸš€ 12:53 < ws-client> **** @robyt3 wat dis do? https://github.com/ddnet/ddnet/pull/10785/files#diff-9bc2378398eb6b7e1ab70a095b206eccef287f58209d704b1aff0650ea3cf426R598 12:53 < bridge> look at linked issue 12:53 < bridge> u have 12:53 < bridge> y u is confuzzled 13:01 < bridge> Maximum chat message length plus some extra because the log contains `Chat: ` as prefix 13:02 < ws-client> **** i wish we had https://github.com/ddnet/ddnet/pull/10712 then you could do ``char m_aDescription[256 + str_length("Chat: ")];`` 13:05 < bridge> chillerdragon: no docs apart from `help` and your type hints (also failed ping) 13:05 < bridge> you can ofc also always ask here :) 13:06 < ws-client> **** ye i was 60% sure ur lowercased 13:07 < ws-client> **** but then i decided to not use twmap at all hrhrhrhr 13:07 < ws-client> **** i was trying to figure out how to dump map settings didnt find it in the rust docs <:tee_thinking:478629518358085653> 13:07 < ws-client> **** when with C++ `config_retrieve` then 13:07 < bridge> map.info.settings 13:08 < ws-client> **** https://zillyhuhn.com/cs/.2a8b6382-8c1e-4d13-b0ba-b918bae975a5.png 13:08 < ws-client> **** this looks like map details to me 13:08 < ws-client> **** not the ddnet config thingy 13:08 < ws-client> **** called "server settings" in editor i think 13:08 < bridge> same thing actually 13:08 < ws-client> **** watfak 13:08 < ws-client> **** ah 13:08 < ws-client> **** ` pub settings: Vec,` 13:08 < ws-client> **** dis i assume 13:09 < bridge> yup πŸ‘ 13:09 < ws-client> **** yea thats not obvious somehow when skimming the docs 13:09 < ws-client> **** as someone who uses the editor and doesnt speak the datafile protocol fluently i assume an entire different thing smh 13:09 < ws-client> **** could maybe use some doc comment and example value idk 13:09 < bridge> would you have found it, if `settings` was an attribute of the `Map` struct directly? 13:10 < ws-client> **** i found this very page 13:10 < ws-client> **** and closed it instantly because i realized thats a different thing 13:10 < bridge> very fair, that is rather datafile/internal terminology, not editor speak 13:10 < ws-client> **** i assume they are represented in the file together? 13:11 < ws-client> **** because datafile is extendable smh 13:11 < ws-client> **** i rly never looked into that file at all ever 13:11 < bridge> wdym? 13:11 < ws-client> **** in the editor UI those are two things 13:11 < ws-client> **** and you mixed them together 13:11 < ws-client> **** i assume that has a low level reason 13:11 < bridge> yea they are in the same map item 13:11 < ws-client> **** yep 13:11 < bridge> (in the info item) 13:12 < bridge> never really gave that more thought xd 13:12 < ws-client> **** thats obvious to you the datafile hacker 13:12 < ws-client> **** i am editor andy 13:12 < ws-client> **** if i read author, version, cred .. my brain goes off and sees only this 13:12 < ws-client> **** https://zillyhuhn.com/cs/.d1770d08-d612-4db2-ac96-60cf2759559a.png 13:13 < bridge> do you think improved docs would be sufficient, or do you think we need some relocation/renaming? 13:13 < ws-client> **** dis is entire different section in my head 13:13 < ws-client> **** https://zillyhuhn.com/cs/.7bcaa9d1-14b9-487d-ae46-66fab8f93cd8.png 13:13 < ws-client> **** can you put images in docs.rs? xd 13:14 < bridge> I don't think so 13:14 < ws-client> **** i think improved docs are enuff 13:14 < ws-client> **** https://docs.rs/image-rs/latest/image_rs/ 13:14 < ws-client> **** they have images in docs 13:14 < bridge> o tru 13:14 < bridge> ig possible 13:14 < ws-client> **** i assume readme ah syntax markdown `![text](url)` 13:15 < ws-client> **** or url then text idk i always mess order up 13:15 < ws-client> **** if these docs showed both my screens i would have never clicked away xd 13:15 < bridge> https://docs.rs/image/latest/image/imageops/enum.FilterType.html (also reminded me of this) 13:15 < ws-client> **** but its up to you 13:15 < ws-client> **** maybe some text comment and some example string of `sv_deepfly 1` somewhere also works 13:16 < bridge> wanted to ask exactly that 13:16 < bridge> I think I'd try that first 13:16 < ws-client> **** its just the last thing in the list and looks so generic 13:16 < ws-client> **** it doesnt even have the editor exposed name "server settings" 13:16 < bridge> if you like you can ofc do a pull request, otherwise I'd also do that in a while 13:16 < ws-client> **** my brain doesnt even see it 13:17 < ws-client> **** ye i thought about it but i think im too lazy sry xd 13:17 < bridge> kinda expected that ^^ 13:17 < bridge> I think that might be the first naming issue I hit with twmap 13:22 < ws-client> **** wdym naming issue? xd @patiga 13:23 < ws-client> **** you mean that the name "settings" is named wrong? and so far everything had a perfect name? 13:24 < ws-client> **** not sure if that is really a naming issue. 13:25 < ws-client> **** i guess one comment above the field might be enough so that the search in docs.rs for "server settings" gets a hit 13:28 < bridge> perfect is exaggerated, I just meant I haven't heard about another misunderstanding like this before 13:34 < bridge> sizeof("Chat: ") 13:35 < bridge> [galaxybrain](https://cdn.discordapp.com/emojis/632454743951671296.webp?size=48&name=galaxybrain) 13:35 < bridge> thats just 4 right 13:35 < bridge> doesnt work 13:38 < bridge> sizeof - 1 13:39 < bridge> i think it gets instantly cast to a ptr 13:39 < bridge> or not 13:39 < bridge> yeah - 1 13:40 < bridge> idk what ptr but sizeof counts null terminator 13:40 < bridge> strlen doesnt 13:40 < bridge> "asdasdas" -> char* 13:40 < bridge> instead of char[] 13:40 < bridge> but sizeof doesnt make that happen 13:40 < bridge> cuz its not a function 13:42 < ChillerDragon> oh yea sizeof - 1 works i used such strlen macro already 13:42 < ChillerDragon> but then it might not be power of 2 aligned which is bad for cpu speed 13:43 < ChillerDragon> i guess a simple comment like `// "Chat: " prefix` should also do 13:44 < ChillerDragon> https://zillyhuhn.com/cs/.bc6cf6f3-6a5f-49ba-abde-5c5050a374f7.png 13:45 < ChillerDragon> for pointer u need pointer ... duh 13:45 < ChillerDragon> https://zillyhuhn.com/cs/.4c855b51-e1bc-4d1f-8da6-e198da33f27e.png 13:56 < bridge> @chillerdragon i cant make it compatible with original teesmash since it has more than 10 levels of health 13:56 < bridge> and also the default configs are horrible 13:57 < bridge> and its all pretty borked 14:09 < bridge> @chillerdragon 14:09 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1411321808883552256/image.png?ex=68b43b5c&is=68b2e9dc&hm=39d690955c28cc22a9de8c7cbc4b866593bcf174cdeb36ed601cfbc4e77382ca& 14:09 < bridge> can i use the gun and hammer pickup here for the pickups? 15:08 < ws-client> **** wat gun for wat pickups 15:09 < bridge> i just had a grand realization 15:09 < bridge> the default branch name to be trunk 15:09 < bridge> makes a lot of sense 15:09 < bridge> and u dont get woke anti slavery guys 15:09 < bridge> and u dont surrender to main 15:09 < bridge> and branches from a trunk 15:09 < bridge> it just makes sense 15:09 < ws-client> **** why was trunk even replaced by master 15:09 < bridge> idk 15:09 < bridge> apparently Linus hates svn and svn used trunk as default 15:10 < bridge> and so he didnt use trunk (?) 15:10 < bridge> when making git 15:10 < ws-client> **** be careful discussing that 15:10 < bridge> afaik tw used trunk 15:10 < bridge> cuz svn 15:10 < bridge> why 15:10 < ws-client> **** last time i got 3 weeks ban for discussing branch names in here 15:10 < bridge> ?? xd 15:10 < bridge> Bcs chiller is boomer 15:10 < bridge> Main 15:10 < ws-client> **** im not kidding 15:11 < bridge> im now a pro trunk 15:11 < bridge> make trunk great again 15:11 < bridge> And Main alone 15:11 < bridge> https://www.vinnie.work/blog/2020-10-08-git-master-main-trunk 15:12 < bridge> > The most common reason I've seen for going to main is that its popular, short, to the point, and doesn't "interrupt muscle memory" (which sounds like a C coder's comment). My personal experience with revision control is deeply seeded in using subversion. In subversion you have trunk, branches, and tags. Trunk in this context refers to the fact that revision control commonly creates tree structures from graph theory. In my opinion, other than Linu 15:12 < bridge> xdd 15:13 < bridge> Wrong 15:13 < bridge> It's the main branch. Not the trunk branch 15:13 < bridge> It makes most sense 15:14 < bridge> if u think of git as a tree 15:14 < bridge> it makes sense 15:14 < bridge> It also makes sense with main 15:14 < bridge> :deen_star: 15:14 < bridge> lets stop cuz discussding this has no intellectual merit actually xd 15:14 < bridge> i achieved clean kernel threads on edos v2 15:14 < bridge> The real question is 15:15 < bridge> ``` 15:15 < bridge> [9.986945] Next id (kernel = true): 0 15:15 < bridge> [9.987044] hi from kthread 15:15 < bridge> [10.985461] Context switch from kernel 15:15 < bridge> [10.985574] Next id (kernel = true): 1 15:15 < bridge> [10.985681] hi from kthread2, 206 15:15 < bridge> [11.984080] Context switch from kernel 15:15 < bridge> [11.984170] Next id (kernel = true): 2 15:15 < bridge> [11.984253] hi from kthread3, 3 15:15 < bridge> [12.982708] Context switch from kernel 15:15 < bridge> [12.982819] Next id (kernel = true): 0 15:15 < bridge> [12.982911] hi from kthread 15:15 < bridge> [13.981330] Context switch from kernel 15:15 < bridge> [13.981446] Next id (kernel = true): 1 15:15 < bridge> [13.981550] hi from kthread2, 208 15:15 < bridge> [14.979952] Context switch from kernel 15:15 < bridge> [14.980038] Next id (kernel = true): 2 15:15 < bridge> [14.980114] hi from kthread3, 4 15:15 < bridge> [15.978579] Context switch from kernel 15:15 < bridge> [15.978663] Next id (kernel = true): 0 15:15 < bridge> [15.978733] hi from kthread 15:15 < bridge> ``` 15:15 < bridge> Why fork 15:15 < bridge> why spoon 15:15 < bridge> im context swithcing every 1 second more or less to see logs 15:15 < bridge> i also added dmesg style logging 15:15 < bridge> to see the time it takes 15:15 < bridge> u can see the small drift in 1 second 15:16 < bridge> cuz my calibration is not exact 15:16 < bridge> ``` 15:16 < bridge> [0.000000] APIC Timer Calibration Results: 15:16 < bridge> [0.000000] Calibration time: 35ms 15:16 < bridge> [0.000000] APIC ticks elapsed: 35002472 15:16 < bridge> [0.000000] APIC frequency: 1000070628 Hz (1000) MHz 15:16 < bridge> [0.000000] TSC frequency: 4406088342 Hz (4.41) GHz 15:16 < bridge> [0.000000] Ticks per microsecond: 1000 15:16 < bridge> ``` 15:16 < bridge> oh this time it got it perfect 15:16 < bridge> qemu apic runs at 1ghz 15:16 < bridge> sometimes my calbiration says 999 15:17 < bridge> there is also a HPET that has femtosecond precision i think 15:18 < bridge> but im not using it 15:18 < bridge> https://wiki.osdev.org/HPET 15:18 < bridge> HPET, or High Precision Event Timer, is a piece of hardware designed by Intel and Microsoft to replace older PIT and RTC. It consists of (usually 64-bit) main counter (which counts up), as well as from 3 to 32 32-bit or 64-bit wide comparators. HPET is programmed using memory mapped IO, and the base address of HPET can be found using ACPI. 15:18 < bridge> im using the pit to calibrate 15:20 < bridge> You already have a terminal app? 15:26 < bridge> on edos v2 no 15:26 < bridge> im going slow to have a really good base 15:26 < bridge> on v1 yes and i could run programs 15:27 < bridge> rendering is actually easy so im not doing it now 15:27 < bridge> (rendering with framebuffer) 15:33 < bridge> i tried mixing rust async in edos v1 15:33 < bridge> im going full separated threads 15:33 < bridge> now 15:33 < bridge> no async 15:53 < bridge> why are all chat commands also registered in rcon? Is there any specific reason as to why or just because 15:57 < bridge> @qxdfox: I assume because of the shared structure. They use the same arg parser and cmdlist concept and so on 15:58 < bridge> Them being accessible in rcon also to the user might be convinient for admins. Also it helps with speed. Because rcon has no ratelimit but chat has even for authed players 17:33 < bridge> @chillerdragon https://github.com/ddnet-insta/ddnet-insta/pull/416/files 17:33 < bridge> @chillerdragon 17:38 < bridge> @chillerdragon warmup seems to not work 18:04 < bridge> I hate warmup 18:04 < bridge> I have ptsd from that code 21:32 < bridge> pip list gives this 21:32 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1411433406885265569/image.png?ex=68b4a34b&is=68b351cb&hm=f2e871544734417ac636100170ee387b951f011fdde87922d380cb3dc0a70062& 21:32 < bridge> and pip install does nothing 21:33 < bridge> unless theres a special pip update command i dont know of 21:33 < bridge> try `pip install --upgrade matplotlib` 21:34 < bridge> ah now it does stuff 21:34 < bridge> πŸŽ‰ 21:34 < bridge> its 3.10.6 now 21:34 < bridge> nice, hopefully the script also runs now 21:34 < bridge> nope 21:34 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1411434035774755000/image.png?ex=68b4a3e1&is=68b35261&hm=85fa2c984283194a8500aaf47a0c856f863082c8015bf18ce19f58b5d8108897& 21:35 < bridge> how do i delete stuff with pip now 21:35 < bridge> ah oh god 21:35 < bridge> or actually 21:35 < bridge> you are on linux 21:35 < bridge> i dont recall ever doing pip install matplotlib 21:36 < bridge> ouch 21:36 < bridge> so its system i presume 21:36 < bridge> then you'll need to update it with your system package manager 21:36 < bridge> (which distro you on btw?) 21:36 < bridge> mint 21.3 21:37 < bridge> i dont see any python related stuff in update manager 21:37 < bridge> ill update anyway 21:37 < bridge> did pip give you a warning before it let you install kaitaistruct? 21:37 < bridge> i dont think so 21:38 < bridge> i closed that terminal so i cant check either 21:38 < bridge> but if it did give me an error it just continued on 21:39 < bridge> we only see a warning here, the script might've still run to the end 21:40 < bridge> hah im just blind :kek: 21:40 < bridge> though your python dependency management might've just gotten a little more complicated. I'm not familiar with mint and pip usually warns you before something goes wrong 21:40 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1411435445392379985/output.png?ex=68b4a531&is=68b353b1&hm=215c71717a53b607c8ed1293d56bf5c89881a1803a1f5ccb18d152ff060a697d& 21:40 < bridge> update manager was covering the folder 21:40 < bridge> so i couldnt see it 21:40 < bridge> ty 21:40 < bridge> yw! 22:05 < bridge> night question: how many stacks needs a user thread 22:08 < bridge> 2? 22:10 < bridge> i call 1 22:11 < bridge> at least one user stack and one os stack afaik 22:11 < bridge> i think the OS itself determines additionals for ops 22:13 < bridge> 2 stacks, because one is needed in the TSS when doing a privilege level change 22:13 < bridge> tss? 22:13 < bridge> task state segment 22:13 < bridge> when ur in ring 3 (user) and get an interrupt 22:14 < bridge> cpu looks at TSS for the stack to use on ring 0 for the kernel 22:14 < bridge> that stack needs to be separate for each ring 3 thread 22:14 < bridge> yea thats the one I thought of I think 22:14 < bridge> so no corruption happens 22:14 < bridge> and it uses the stack in the interrupt handler 22:15 < bridge> its called RSP0 22:15 < bridge> https://en.wikipedia.org/wiki/Task_state_segment#Inner-level_stack_pointers 22:15 < bridge> > The TSS contains 6 fields for specifying the new stack pointer when a privilege level change happens. The field SS0 contains the stack segment selector for CPL=0, and the field ESP0/RSP0 contains the new ESP/RSP value for CPL=0. When an interrupt happens in protected (32-bit) mode, the x86 CPU will look in the TSS for SS0 and ESP0 and load their values into SS and ESP respectively. This allows for the kernel to use a different stack than the user 22:16 < bridge> u also need to use a different stack for double fault handlers 22:18 < bridge> yo ryo do you know how much faster syscalls can be generally? I mean they are hella slow compared to anything else in programming so I wondered if there was a way to speed them up. Might be a silly question. 22:19 < bridge> yes, in a fully cooperative kernel they can be way faster, because if u cooperate by yielding at known points, you can only save the state you need, instead of all the registers and x87 state, for example, rust async is fully cooperative, rust creates a state machine where at yield points (.awaits) a new variant in the enum state machine is made, saving only the stat needed, for example it may be as little as one u64 22:19 < bridge> most real world kernels need to preempt non cooperatively because user programs need to be stoppepd at any point 22:19 < bridge> so you need to save all info 22:20 < bridge> yes, in a fully cooperative kernel they can be way faster, because if u cooperate by yielding at known points, you can only save the state you need, instead of all the registers and x87 state, for example, rust async is fully cooperative, rust creates a state machine where at yield points (.awaits) a new variant in the enum state machine is made, saving only the state needed, for example it may be as little as one u64 22:20 < bridge> i havent looked into RTOS but maybe they do that 22:20 < bridge> thanks, good to know :D 22:21 < bridge> (btw im no expert i just learnt this when making OSes xD) 22:22 < bridge> if ur curios, right now this is how i save in a context switch: 22:22 < bridge> 22:22 < bridge> ```rust 22:22 < bridge> #[unsafe(naked)] 22:22 < bridge> #[unsafe(no_mangle)] 22:22 < bridge> pub unsafe extern "C" fn timer_interrupt_handler() { 22:22 < bridge> naked_asm!( 22:22 < bridge> // CPU has already pushed SS, RSP, RFLAGS, CS, RIP 22:22 < bridge> // Save all general purpose registers 22:22 < bridge> "push rax", 22:22 < bridge> "push rcx", 22:22 < bridge> "push rdx", 22:22 < bridge> "push rbx", 22:22 < bridge> "push rbp", 22:22 < bridge> "push rsi", 22:22 < bridge> "push rdi", 22:22 < bridge> "push r8", 22:22 < bridge> "push r9", 22:23 < bridge> "push r10", 22:23 < bridge> "push r11", 22:23 < bridge> "push r12", 22:23 < bridge> "push r13", 22:23 < bridge> "push r14", 22:23 < bridge> "push r15", 22:23 < bridge> 22:23 < bridge> // At this point, RSP points to the saved context 22:23 < bridge> // Pass it as first argument to timer_schedule 22:23 < bridge> "mov rdi, rsp", 22:23 < bridge> 22:23 < bridge> // Ensure stack is 16-byte aligned before call 22:23 < bridge> // The push operations above pushed 15 registers (8 bytes each = 120 bytes) 22:23 < bridge> i dont save x87 yet cuz i didnt enable it 22:23 < bridge> but thats 512 bytes afaik 22:23 < bridge> on a syscall u have to do the same as the interrupt handler more or less 22:23 < bridge> well maybe u can just save callee saved regs 22:24 < bridge> (im not sure now) 22:24 < bridge> @teero777 btw linux has an optimization for some syscalls 22:24 < bridge> its called the vdso 22:24 < bridge> https://man7.org/linux/man-pages/man7/vdso.7.html 22:24 < bridge> interesting read 22:24 < bridge> I haven't gotten into OS/kernel dev at all although I'm planning for it once I finish my ongoing project 22:25 < bridge> nice, did u get inspired by me or u already wanted? :D 22:25 < bridge> https://tenor.com/view/burger-eating-frieren-frieren-beyond-journey%27s-end-sousou-no-frieren-gif-13425073513713719938 22:25 < bridge> lot of things make sense to me now 22:26 < bridge> I wanted to do it for some time but then I saw your sexy screenshots here and got back the motivation 22:26 < bridge> its dope and if u use C its easier cuz more examples 22:26 < bridge> im using rust cuz i dont wanna use C 22:26 < bridge> anyway if u do start and have doubts feel free to ask 22:27 < bridge> yea, will, thx :owo: 22:29 < bridge> btw i tried to look at C inline asm but the syntax was weird xD 22:29 < bridge> what is this prejudice😭 22:29 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1411447831574876342/Screenshot_20250830-222922.png?ex=68b4b0ba&is=68b35f3a&hm=5dd308598b4835094e1cd45332492133eefe289e1f31620bfc5b21ab57c581a2& 22:31 < bridge> Yea I looked into it for optimization things but tbh it's useless most of the time, clang does a pretty good job. It's really hard to find anything worth doing inline asm for. 22:31 < bridge> Ofc your use case is different 22:34 < bridge> It was like 22:34 < bridge> 1. spend an hour understanding things 22:34 < bridge> 2. oh, it's slower than what the compiler did... 22:35 < bridge> xD 22:36 < bridge> yeah i think asm is only useful for constant time (cryptography) and maybe codecs 22:36 < bridge> and for stuff that breaks out of standards (something non system v compliant) 22:36 < bridge> for example the interrupt handler u cant do it with rust or C code 22:36 < bridge> u need to use asm 22:37 < bridge> @nikhard whatch u writing 22:37 < bridge> can your car run out of blinker fluid yet 22:37 < bridge> :justatest: 22:38 < bridge> I'm fighting the code 22:38 < bridge> gdb is assisting me 22:38 < bridge> :peepoSpreadsheet: 22:38 < bridge> that I know of 22:38 < bridge> did you ask AI yet 22:39 < bridge> AI doesn't take my 3700loc and if it does it spews bs xd 22:39 < bridge> 😒 22:39 < bridge> I even tried to give it some telemetry data but nope, and after a single prompt it's rate limited anyways xd 22:40 < bridge> sad letter about my helplessness and crying for help :( 22:40 < bridge> but for real want help with modifying ninja weapon animation, it's not moving 22:42 < bridge> if its not code this isnt the place probs 22:43 < bridge> well, #questions ? 22:43 < bridge> ah, wait, yea, it's code 22:47 < bridge> Maybe you know where does weapon animations stores? 22:47 < bridge> Like where coded weapons recoil movement and it's rotation, animations. Not `datasrc/content.py`, it's not wery helping with my problem 22:49 < bridge> `content.py` is indeed the right place, but it is used to generate other files 22:49 < bridge> not sure if you have to execute it manually/something different 22:49 < bridge> Did you know about descriptor structs in c? Or whatever they are called. 22:49 < bridge> it's pwetty 22:50 < bridge> googling doesn't even bring anything up wow 22:51 < bridge> descriptor strucs as in 22:51 < bridge> 22:51 < bridge> ```c 22:51 < bridge> struct myStruct { 22:51 < bridge> int something; 22:51 < bridge> uint16_t somethingmore; 22:51 < bridge> char *somethingevenharder; 22:51 < bridge> }; 22:51 < bridge> ``` 22:51 < bridge> ? 22:52 < bridge> i guess its just a defined interface to describe the data structure 22:53 < bridge> Well my problem exactly is in that file generates `Animation` for *ninja_swing* and after attaching `anim.attach.frames.Add(AnimKeyframe(0.20, 32, 0, 0))`, the **x** and **y** value does nothing in game. With hammer, feet, body - works, but not with ninja. 22:53 < bridge> So I assume there is some cut for ninja exactly, but not in that file. maybe) 22:55 < bridge> descriptor structs as in you have 2 structs instead of one, one of them is a suffixed with `descriptor` or `desc` and holds all data that won't be changed past initialization. And the *real* struct that holds data that may change at any time has the descriptor structs inside of it to get the *static* data out of 22:55 < bridge> oh so it is an interface 22:55 < bridge> kinda, depends on what you mean with an interface xd 22:56 < bridge> well an interface in the broad sense to me is just defining mutable data which can be inherited and changed, but it can also hold immutable structs 22:57 < bridge> i guess i see interfaces more like templates 22:57 < bridge> xd 22:57 < bridge> I'm restructuring and kinda redoing the whole vehicle simulation thing so I wanted to try doing this and it's been working out great. 22:57 < bridge> have a few commits laying on local cuz it's not at the level it was before 22:57 < bridge> if you change something in the file, does compiling again do smth or is it immediately finished? 22:58 < bridge> @blaiszephyr anyways today is early sleepy so gn 22:58 < bridge> Doing. Updating 123 entries πŸ’€ 22:58 < bridge> gn :> 22:59 < bridge> gn Teeto <3 22:59 < bridge> then change something drastic in the animation to verify that actually nothing is changing 22:59 < bridge> like remove all keyframes or smth 23:00 < bridge> already 23:00 < bridge> i make foot moving when ninja animates and commented ninja's anim, it stops in vertical position 23:03 < bridge> ah, so stuff is indeed changing 23:06 < bridge> I don't know why the position doesn't change, it *should* afaict 23:14 < bridge> im going sleep too 23:16 < bridge> gm 23:22 < bridge> well i make myself a unicorn, worth enough 23:22 < bridge> muzzleoffset and offset are working tough 23:22 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1411461173093601340/image.png?ex=68b4bd27&is=68b36ba7&hm=ccb35d62850889fde2870fd98c35963a3c968e543182997cb15d140e4c202012&