05:26 < bridge> <_voxeldoesart> github is trying to shill their dumb ai thing while im trying to read code 05:26 < bridge> <_voxeldoesart> https://cdn.discordapp.com/attachments/293493549758939136/1152083024142409768/image.png 06:32 < bridge> doesn't look particulalry in the way 06:32 < bridge> doesn't look particularly in the way 06:33 < bridge> Copilot is actually quite useful 06:34 < bridge> Idk if you can call it an ai 06:35 < bridge> It works more like advanced autocomplete 07:36 < bridge> It is basically gpt 07:56 < bridge> morning 08:38 < bridge> morning 🍵 09:07 < bridge> aye eye 10:26 < bridge> @ryozuki i don't really have any good question sadly. So i ask a meta question: 10:26 < bridge> Are you sometimes split about your feelings while coding: Fck anything i just do it quick & ugly now. 10:26 < bridge> And then on the other side you remember how awesome it is, if you carefully planned everything and it works out.... 10:26 < bridge> in rust xd 10:28 < bridge> oh ye 10:28 < bridge> i love idiomatic over engineered rust 10:28 < bridge> thats why on advent of code i do it like that 10:28 < bridge> xd 10:28 < bridge> remember? 10:29 < bridge> i dunno, i dont follow advent of code xd 12:31 < bridge> ☕ 12:31 < bridge> imagine waking up and eating soup 12:33 < bridge> 12:33 < bridge> What exactly happened to unity? 12:33 < bridge> they changed their pricing 12:33 < bridge> im not gonna do a todr 12:34 < bridge> tldr 12:34 < bridge> google 12:34 < bridge> no. 12:34 < bridge> but they fcked up big 12:34 < bridge> thats it 12:34 < bridge> k 12:35 < bridge> Good thing ddnet doesn't use any game enginr 12:36 < bridge> it uses teengine 12:36 < bridge> its powered by slaving tees 12:47 < bridge> slavery 👍 12:50 < bridge> Did somebody call out my lifestyle 12:57 < bridge> Man i really need the access to teeuniverse GitHub organization xd. I want to use it to host mod code, and have a fancy fitting name 13:21 < bridge> i remembered i had ryocrater 13:22 < bridge> my vulkan program 13:22 < bridge> i feel the urge to make my game engine with it now 13:22 < bridge> so many urges, nothing finished 13:22 < bridge> such is life 13:22 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1152202879902416966/image.png 13:22 < bridge> i made this long ago 13:22 < bridge> with compute 13:25 < bridge> True. I'd live to do so much shit, but zero time 13:25 < bridge> And limits of human xd 13:25 < bridge> xd 13:26 < bridge> ```glsl 13:26 < bridge> #version 460 13:26 < bridge> 13:26 < bridge> layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in; 13:26 < bridge> 13:26 < bridge> layout(set = 0, binding = 0, rgba8) uniform writeonly image2D img; 13:26 < bridge> 13:26 < bridge> void main() { 13:26 < bridge> vec2 norm_coordinates = (gl_GlobalInvocationID.xy + vec2(0.5)) / vec2(imageSize(img)); 13:26 < bridge> vec2 c = (norm_coordinates - vec2(0.5)) * 2.0 - vec2(1.0, 0.0); 13:26 < bridge> 13:26 < bridge> vec2 z = vec2(0.0, 0.0); 13:26 < bridge> float i; 13:26 < bridge> for (i = 0.0; i < 1.0; i += 0.005) { 13:26 < bridge> z = vec2( 13:26 < bridge> z.x * z.x - z.y * z.y + c.x, 13:26 < bridge> z.y * z.x + z.x * z.y + c.y 13:26 < bridge> ); 13:26 < bridge> 13:26 < bridge> if (length(z) > 4.0) { 13:26 < bridge> break; 13:26 < bridge> } 13:26 < bridge> } 13:26 < bridge> 13:26 < bridge> vec4 to_write = vec4(vec3(i), 1.0); 13:26 < bridge> imageStore(img, ivec2(gl_GlobalInvocationID.xy), to_write); 13:26 < bridge> } 13:27 < bridge> ``` 13:36 < bridge> We have to fix that issue first then all the others should be doable 13:40 < bridge> Maybe it makes no fun anymore then xd 13:40 < bridge> Time for machines 15:23 < bridge> lmao 15:23 < bridge> i wanted to share my project on kog @jupeyy_keks 15:23 < bridge> but u cant send github links 15:23 < bridge> xd 15:27 < bridge> why not? 15:27 < bridge> xd 15:27 < bridge> closed source is king 15:28 < bridge> but maybe they have troubles with bots xd 15:28 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1152234444715999302/F5__1JvW4AAG4RQ.png 15:31 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1152235239284936714/image.png 15:32 < bridge> they're probably operating with a whitelist, but sad that github isn't on it yet 15:41 < bridge> i figured it 15:41 < bridge> i lacked perms 15:41 < bridge> xd 15:41 < bridge> Only confirmed members can send stuff 15:41 < bridge> 17:01 < bridge> @heinrich5991 Hey, I'm furo from #7181. I kinda have no clue how I would introduce the new server packet. Where would I start? 17:01 < bridge> https://github.com/ddnet/ddnet/pull/7181 17:02 < bridge> you can check datasrc/network.py 17:02 < bridge> add a message at the bottom, you can take a look at the existing messages 17:03 < bridge> I did take a look, could I extend the "Sv_VoteStatus" message? or should I create a new one? 17:03 < bridge> the messages that don't have a long name with an @ inside are not ours and shouldn't be extended 17:04 < bridge> you can either add a `Sv_VoteStatusEx` at the bottom that contains all these fields plus the one you want to add 17:04 < bridge> or just add a `Sv_YourVote` that contains just your vote 17:05 < bridge> I'm not sure entirely what's the better option 17:05 < bridge> intuitively, I'd guess it's the first one, but not sure 17:10 < bridge> ```python 17:10 < bridge> NetMessageEx("Sv_VoteStatusEx", "votestatus@netmsg.ddnet.tw", [ 17:10 < bridge> NetIntRange("m_Yes", 0, 'MAX_CLIENTS'), 17:10 < bridge> NetIntRange("m_No", 0, 'MAX_CLIENTS'), 17:10 < bridge> NetIntRange("m_Pass", 0, 'MAX_CLIENTS'), 17:10 < bridge> NetIntRange("m_Total", 0, 'MAX_CLIENTS'), 17:10 < bridge> NetIntRange("m_Voted", -1, 1), 17:10 < bridge> ]), 17:10 < bridge> ``` 17:10 < bridge> Kinda like this? 17:12 < bridge> yes 17:12 < bridge> make it `@netmsg.ddnet.org` though 17:12 < bridge> we changed domains 17:12 < bridge> sorry, no example of this in the file yet 17:16 < bridge> Sure, next step would be to generate the other files I assume? How would I do that? 17:17 < bridge> it happens as part of the build, you don't need to worry about it 17:19 < bridge> you can simply start using the message 17:23 < bridge> i recommend building to get autocomplete tho 17:58 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1152272329745895524/image.png 17:58 < bridge> @jupeyy_keks 18:00 < bridge> crab still sucks 😬 18:04 < bridge> @jupeyy_keks how to allocate in the host and give to guest 18:05 < bridge> ```rust 18:05 < bridge> #[repr(C)] 18:05 < bridge> struct Game { 18:05 < bridge> data: [u8; 32], 18:05 < bridge> } 18:05 < bridge> ``` 18:05 < bridge> ` mem.grow(&mut store, bytes(std::mem::size_of::()));` 18:05 < bridge> this? xD 18:07 < bridge> i guess u need to take the offset before growing 18:07 < bridge> so u know were to write? 18:08 < bridge> if u did this once, then always write to this offset 18:08 < bridge> where it grew 18:08 < bridge> ok 18:10 < bridge> I created `Sv_YourVote` instead, my question now is. How would I support servers that don't send this packet? Do I create a GameInfoFlag? 18:24 < bridge> Keep the first vote until you receive Sv_YourVote which can override it. 18:24 < bridge> Keep the first vote highlighted until you receive `Sv_YourVote` which can override it. 18:26 < bridge> Keep the first vote highlighted until you receive `Sv_YourVote` which can override it. The server can detect DDNet version to decide whether it should (accept re-votes and) send `Sv_YourVote`. 18:26 < bridge> A little issue here is that (maybe) you can receive `Sv_YourVote` from a previous vote. 18:26 < bridge> Keep the first vote highlighted until you receive `Sv_YourVote` which can override it. The server can check the client DDNet version to decide whether it should (accept re-votes and) send `Sv_YourVote`. 18:26 < bridge> A little issue here is that (maybe) you can receive `Sv_YourVote` from a previous vote. 18:26 < bridge> Keep the first vote highlighted until you receive `Sv_YourVote` which can override it. The server can check the client DDNet version to decide whether it should (accept re-votes and) send `Sv_YourVote`. 18:27 < bridge> Keep the first vote highlighted until you receive `Sv_YourVote` which can override it. This behavior is compatible all old and new servers. 18:27 < bridge> The server can check the client DDNet version to decide whether it should (accept re-votes and) send `Sv_YourVote`. 18:27 < bridge> Keep the first vote highlighted until you receive `Sv_YourVote` which can override it. This behavior is compatible old and new servers. 18:27 < bridge> The server can check the client DDNet version to decide whether it should (accept re-votes and) send `Sv_YourVote`. 18:32 < bridge> exactly what Kaffeine said 18:40 < bridge> Keep the first vote highlighted until you receive `Sv_YourVote` which can override it. This behavior is compatible with old and new servers. 18:40 < bridge> The server can check the client DDNet version to decide whether it should (accept re-votes and) send `Sv_YourVote`. 18:41 < bridge> @jupeyy_keks 18:41 < bridge> did u use ExternRef 18:43 < bridge> no, what does it do 18:43 < bridge> idk 18:43 < bridge> An opaque reference to some data. This reference can be passed through Wasm. 18:44 < bridge> i do it a bit different from what u learn in the examples anyway 18:44 < bridge> the thing is 18:45 < bridge> no examples for complex stuff 18:45 < bridge> such as calling a function passing a non copiable struct 18:45 < bridge> xd 18:45 < bridge> yeah.. it's pretty annoying 18:45 < bridge> to get into it 18:45 < bridge> in wasm guest 18:45 < bridge> u make the function accept a offset? 18:45 < bridge> and u convert it to a ptr? 18:45 < bridge> ? 18:45 < bridge> what i do here is 18:45 < bridge> i have struct X 18:45 < bridge> i turn this into a ptr u8 18:46 < bridge> and write it to wasm memory 18:46 < bridge> i know the offset 18:46 < bridge> now i have a guest function 18:46 < bridge> that i want to take this struct 18:46 < bridge> or a ptr that can be converted to it 18:46 < bridge> using the same layout 18:46 < bridge> is the ptr the offset? 18:46 < bridge> well that is probably the fastest way.. but i think it's a bit harder 18:46 < bridge> 18:46 < bridge> i do it differently: 18:46 < bridge> i prepare the memory inside the guest, and the guest tells me the ptr 18:46 < bridge> then i write into the wasm linear memory 18:46 < bridge> 18:46 < bridge> this way i can easily have multiple parameters growing independetly 18:47 < bridge> sadly this can cause troubles 18:47 < bridge> 1. 32bit 18:47 < bridge> 2. no guarantee from rust 18:47 < bridge> but for testing it's probably enough 18:47 < bridge> i use a serializer 18:48 < bridge> https://servo.org/blog/2023/09/15/upcoming-events-and-new-browser-ui/ 18:48 < bridge> well my struct is repr C and packed 18:48 < bridge> so u cant read uninit padding bytes 18:48 < bridge> which is ub in rust 18:48 < bridge> yeah but e.g. usize 18:49 < bridge> omg would be so cool if servo would be good 😄 18:50 < bridge> i actually just want their HTML + CSS engine xD 18:50 < bridge> xd 18:50 < bridge> yeah but the ptr aka offset is u32 anyway 18:50 < bridge> ima test 18:51 < bridge> ```rust 18:51 < bridge> #[derive(Debug, Clone)] 18:51 < bridge> #[repr(C, packed)] 18:51 < bridge> pub struct Game { 18:51 < bridge> pub data: [u8; 32], 18:51 < bridge> } 18:51 < bridge> 18:51 < bridge> ``` 18:51 < bridge> i have this in a middle crate "interface" 18:51 < bridge> ```rust 18:51 < bridge> let play_game = instance.exports.get_typed_function::(&store, "play_game")?; 18:51 < bridge> 18:51 < bridge> let pages: Pages = Bytes(std::mem::size_of::()).try_into().unwrap(); 18:51 < bridge> let offset_game = mem.grow(&mut store, pages)?.0; 18:51 < bridge> 18:51 < bridge> let game = Game { 18:51 < bridge> data: [1; 32], 18:51 < bridge> }; 18:51 < bridge> let game_ref = addr_of!(game) as *const u8; 18:51 < bridge> let game_ref = unsafe { 18:51 < bridge> std::slice::from_raw_parts(game_ref, std::mem::size_of::()) 18:51 < bridge> }; 18:51 < bridge> 18:51 < bridge> 18:51 < bridge> mem.view(&store).write(offset_game.into(), game_ref)?; 18:51 < bridge> 18:51 < bridge> let result = play_game.call(&mut store, offset_game)?; 18:51 < bridge> ``` 18:52 < bridge> my host code to setup the struct ref 18:52 < bridge> ```rust 18:52 < bridge> #[no_mangle] 18:52 < bridge> pub fn play_game(game: *const u8) -> u8 { 18:52 < bridge> assert!(!game.is_null()); 18:52 < bridge> let game: Game = unsafe { 18:52 < bridge> std::ptr::read(game as *const _) 18:52 < bridge> }; 18:52 < bridge> game.data[0] 18:52 < bridge> } 18:52 < bridge> ``` 18:52 < bridge> guest code 18:53 < bridge> ok wait 18:53 < bridge> my guest is wrong probs xd 18:56 < bridge> ```rust 18:56 < bridge> #[no_mangle] 18:56 < bridge> pub unsafe fn play_game(game: *const Game) -> u8 { 18:56 < bridge> assert!(!game.is_null()); 18:56 < bridge> (*game).data[0] 18:56 < bridge> } 18:56 < bridge> ``` 18:56 < bridge> ``` 18:56 < bridge> Running `target/debug/host target/wasm32-unknown-unknown/debug/guest.wasm` 18:56 < bridge> [host/src/main.rs:56] &result = 1 18:56 < bridge> ``` 18:57 < bridge> @jupeyy_keks omg 18:57 < bridge> it worked! 18:57 < bridge> epic gamer moment 18:57 < bridge> if i change data to 2 18:57 < bridge> it prints 2 18:57 < bridge> @jupeyy_keks but doesnt ur way make the wasm module allocate everytime its called 18:58 < bridge> i call resize on a vec 18:58 < bridge> 18:58 < bridge> so it allocates it only if the vec wasnt big enough yet 18:58 < bridge> hm 18:58 < bridge> it works with `game: &Game` 18:58 < bridge> too 18:58 < bridge> xd 18:58 < bridge> but idk if im in ub territory here 18:59 < bridge> a reference is a pointer 18:59 < bridge> yeah 18:59 < bridge> well u could say since u in a wasm module it's not UB xd 18:59 < bridge> well it would be ub if the host passes a null offset 18:59 < bridge> or smth that doesnt point to a valid game 19:00 < bridge> xd 19:00 < bridge> true 19:00 < bridge> wasm anti ub 19:01 < bridge> @jupeyy_keks the memory is not read only on the guest side right 19:01 < bridge> and no way to do that i guess 19:02 < bridge> if i would need to rewrite that memory pos every time i call it with the original to be safe 19:03 < bridge> yes u can modify it as u wish 19:03 < bridge> yeah 19:03 < bridge> im asking if there can be read only memory 19:03 < bridge> externalref sounds like read only memory xd 19:04 < bridge> but no i think there is no read only memory 19:04 < bridge> please send link, sounds fun :) 19:05 < bridge> 8 days left until summer is over.. where is cs2 19:07 < bridge> https://youtu.be/4gzO60GhmW8?si=_YTql2C3IyPtcqlk 19:09 < bridge> Well the projects still opens before he finishes 19:09 < bridge> But funny he makes this 19:10 < bridge> heh I thought you meant opening a medium to big project, hes creating a new project o.o 19:11 < bridge> Lmao would work even better 19:21 < bridge> @kaffeine0 @heinrich5991 Thanks for the help, I pushed my changes! :) 19:24 < bridge> Did the auto verification for ger10 break somehow? 19:24 < bridge> it's disabled if there is too much attack afaik 19:48 < bridge> hello, are there any people who can help me 19:48 < bridge> <_voxeldoesart> dont ask to ask 19:58 < bridge> @_voxeldoesart http://linuxmafia.com/ 19:59 < bridge> italian linux 19:59 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1152302780489416755/hugin.png 19:59 < bridge> the logo is cool 20:07 < bridge> <_voxeldoesart> and whats this supposed to be 20:11 < bridge> <_voxeldoesart> the Dept. of Web-Search Juice is just a giant propaganda page LOL 20:21 < bridge> xd 22:13 < bridge> lel 22:13 < bridge> glitchworld 22:43 < bridge> im faster :troll: