Here is my first Rust code;fn main(){println!("Hello World! I am happy to code in Rust.")}
>>107528975based.now learn how to use code blocks, newfag.
>>107528975Reddit spacing?
This is the kind of hello world program an Indian writes
>>107529034So how would a blond-haired blue-eyed milk-gargling Aryan write hello world?
and it only needs 4gb ram and 20 minutes to compile this in a slim 3MB binary
main.rs:5:1: error: could not resolve macro invocation 'println' [E0433] 5 | println!("Hello World! I am happy to code in Rust.") | ^~~~~~~Saaaars, how do I cargo add println! crate to my project?
main.rs:5:1: error: could not resolve macro invocation 'println' [E0433] 5 | println!("Hello World! I am happy to code in Rust.") | ^~~~~~~
>>107528975When do you start HRT?
>>107529289just now
>>107528975Plebbit spotted in 4k
>>107529064#include <stdio.h>int main() { puts("Hello World"); return 0;}
#include <stdio.h>int main() { puts("Hello World"); return 0;}
>>107529064>>107531100C is the great replacement of programming languages.
>>107531100Classic Cnile creating bugs in hello world software, here's the correct code:#include <stdio.h>int main() { return puts("Hello World") == EOF;}
#include <stdio.h>int main() { return puts("Hello World") == EOF;}
what a fucking useless threadimagine unironically discussing hello worldall fields
>>107531249why so mad lil bro
>>107531230"Curly braces are for comments." - a blond-haired blue-eyed milk-gargling Aryan
>>107531317to be desu if C wasn't an inconsistent piece of shit, curly braces for functions would be optional just like they are in control statements
>>107530230I still can't believe people are actually stupid enough to do this.
>>107528975So you only chopped the tip off. That makes you Jewish. It's the first step to becoming YNBAW.Congratulations on your journey.
I tried it yesterday and it is weird..all that stupid syntactic nonsense... why the fuck did they design a high level programming language (an abstraction) to be so weird and quirky?weird strings, no explicit return in functions, semi columns have a meaning, super weird ownership and borrowing shit where you can have the same name for multiple variables, lifetimes nonsense, methods with impl..what the fuck is this shit?is that the future?if so it is incredibly unreadable and weird.
>>107528983NTA, i've been on the site for 20 years something, only learnt about code blocks like 2m ago lol
>>107531413> where you can have the same name for multiple variablesvariable shadowing is awesome.not hard to get that a variable is limited to the scope it was declared in anyway.
Rust is a failed experiment, midwits write shitty code in this language too, there's probably more good C++ code than there's total rust code so maybe not a fair comparison, but rust has no good programmers.
>>107528975>fn main>not #[tokio::main]ngmi
>>107531585>tokio::main, not tokyo::driftthis is why rustroons never make anything great
>>107531100>>107531230"Hello Terry\n"; // HolyC Version
"Hello Terry\n"; // HolyC Version
Ok::<_, anyhow::Error>(())what the fuck is this? how am i supposed to understand this language. #[signal] async fn action_triggered( ctxt: &SignalContext<'_>, action: &str, value: f64, ) -> zbus::Result<()>;
Ok::<_, anyhow::Error>(())
#[signal] async fn action_triggered( ctxt: &SignalContext<'_>, action: &str, value: f64, ) -> zbus::Result<()>;
>>107531891what's wrong with this?