User avatar
φ @fiore@shrimptest.bedwetting.club
Admin
she/her cybervampire
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@rose regort
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@kopper there is no moral federation under activitypub
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@reia @yuriposting wait thatd be sick actually
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@reia @yuriposting OH MY GOD NO id be super cool n smoooooth
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@reia @yuriposting what is it implying ..
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@Aki isnt that a very common experience
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@kimapr @sodiboo @risc yeag it works now >.< thxxxxxx
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@sodiboo @risc is it a bad name . maybe its a bad name
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@sodiboo @risc no its an already decrypted tls stream . that s already handled , the data is ok
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@kimapr @sodiboo @risc yeag i mean the reader half
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@sodiboo @risc but like how else am i supposed to read until a newline character then :c
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@sodiboo @risc ooooo wait is it because reading to string is waiting untill the connection ends
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@sodiboo @risc ok i tried to make a basic example but that works normally so i must be doing smth weird ? is there anything thats escaping me here :P
tokio::spawn(async move {
    let mut buffer = String::new();
    tls_reader.read_to_string(&mut buffer).await?;
    for line in buffer.lines() {
        let line: MessageString = line.into();
        let mut tokens = toys::token::tokenize(&line);
        if let Ok(message) = Parser::parse_message(&mut tokens) {
            eprintln!("[ {} ] {:?}", "LOG".cyan(), message);
        };
        eprintln!("[  {}  ] {}", "<".blue(), line);
    }
    Ok(()) as anyhow::Result<()>
})
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@reia wha ?
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@sodiboo @risc nvm lol it still doesnt work

like . it prints , but i only get the output on screen after the connection is dropped (=> the task completes )

i dont understand why honestly , is this just how it is ?
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@risc yes !! i do think that i might turn to that , i just . kinda wanted to try out going w tokio first
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@sodiboo @risc it works but like not in real time .. it only prints after the task completes !! i made it work w a channel
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
bro how tf am i supposed to print to stdout from within a tokio task , is that just . not a thing without having to use tracing ?
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@sodiboo i mean im basically doing print debugging lol but with a bunch of pre formatted output types >.< but yeag makes sense !
User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
is premature logging a thing ? because im doin it