That is extremely hilarious
That is extremely hilarious
Reinforcement learning my beloved ❤️
This looks great! Can’t wait for a Linux release.
Omg that would be peak 🥹
Edit: autocorrect :/
If it wasn’t a comparative argument, then what’s wrong with my original statement?
Edit: I think I understand what you’re coming from, but it still doesn’t make sense? They were self contained, and they didn’t just make those communities because they were defederated? It’s because there was demand. If some random instance with one user makes like 100s of communities, will it count in the graph?
Bro please…
When you say “It isn’t big”, you’re comparing it to reddit? That would basically dwarf all Lemmy instances combined lmao.
This post was comparing Lemmy instances with other Lemmy instances. Hexbear was its own website for a while, and only decided to start trying federation like a few months after the whole reddit thing. They’re fine on their own even, so I don’t know why people keep acting as if they necessarily want to be federated.
Hexbear was there before the reddit exodus, so this make no sense.
Please verify your claims before saying nonsense.
If I remember correctly, Hexbear was there before the exodus. So that wouldn’t make sense.
Yoooo peertube in russia???
Lmao what happens if you don’t pay?
Oh well. Time to post more questions on lemmy
Tried it out and it works! Thanks!
Yes, I am looking for a syntax highlighter for the terminal. The one I use is called Kitty.
Thanks a lot man! After debuggin for a while it worked!
I was also wondering, where do you learn that kind of stuff? I’m currently learning and would like to be as resourceful as possible.
Here’s the main function
fn main() {
let mut main_terminal = terminal::new_terminal(caps::Capabilities::new_from_env().unwrap()).unwrap();
terminal::Terminal::set_raw_mode(&mut main_terminal);
App::new()
.insert_non_send_resource(main_terminal)
.init_resource::<TextDuration>()
.add_systems(Startup, enter_name)
.run();
}
And here are the function enter name
and flush_sdin
fn enter_name(duration: Res<TextDuration>, main_terminal: NonSendMut<terminal::SystemTerminal>){
print_text(&duration, Speeds::Default, String::from("Please enter your name: "));
flush_stdin();
terminal::Terminal::set_cooked_mode(main_terminal.into_inner());
let mut name = String::new();
io::stdin().read_line(&mut name);
print_text(&duration, Speeds::Default, String::from(format!("Hello, {}!\n", name.trim().green())));
}
fn flush_stdin(){
let mut clean_buffer = [0; 4];
let _ =io::stdin().read(&mut clean_buffer[..]);
}
When I use flush_stdin, I have to press a key before submitting the actual input
Edit: I forgot to mention, the print_text
function is just something I used to make print_typed!
use different speeds and stuff. I haven’t finished the different speeds for now, but that’s not important
fn print_text(duration: &Res<TextDuration>, speed: Speeds, text: String){
match speed {
Speeds::Default => print_typed!((duration.default), "{}", text),
}
}
Took me a while to get it to work because of bevy stuff, but it works a lot better! Is there a way to flush stdin without requiring the user to press a key?
Thanks a lot!
Thanks! So far it kinda works, but since I’m using print_typewriter, the characters that I’m printing are printed one by one, and user input can slip in between them. I’m not sure how to prevent them from showing up in the first place, and not make them appear in stdin.
Or maybe in this case I shouldn’t use the terminal, right?
Awesome! I was looking for one to gift to my cousins