[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: file.png (85 KB, 512x512)
85 KB
85 KB PNG
Here is my first Rust code;

fn main()

{

println!("Hello World! I am happy to code in Rust.")

}
>>
>>107528975
based.
now learn how to use code blocks, newfag.
>>
>>107528975
Reddit spacing?
>>
This is the kind of hello world program an Indian writes
>>
>>107529034
So 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?
>>
>>107528975
When do you start HRT?
>>
File: image.jpg (3.46 MB, 3024x4032)
3.46 MB
3.46 MB JPG
>>107529289
just now
>>
File: 1765445133673625.png (194 KB, 1055x607)
194 KB
194 KB PNG
>>107528975
Plebbit spotted in 4k
>>
>>107529064
#include <stdio.h>
int main() {
puts("Hello World");
return 0;
}
>>
>>107529064
>>107531100
C is the great replacement of programming languages.
>>
>>107531100
Classic Cnile creating bugs in hello world software, here's the correct code:
#include <stdio.h>
int main() {
return puts("Hello World") == EOF;
}
>>
what a fucking useless thread
imagine unironically discussing hello world
all fields
>>
>>107531249
why so mad lil bro
>>
>>107531230
"Curly braces are for comments." - a blond-haired blue-eyed milk-gargling Aryan
>>
>>107531317
to 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
>>
>>107530230
I still can't believe people are actually stupid enough to do this.
>>
>>107528975
So 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.
>>
>>107528983
NTA, 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 variables
variable 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::drift
this is why rustroons never make anything great
>>
>>107531100
>>107531230
"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<()>;
>>
>>107531891
what's wrong with this?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.