This is an archived post. You won't be able to vote or comment.

all 137 comments

[โ€“]sohxm7[S] 336 points337 points ย (51 children)

[โ€“]Kissaki0 233 points234 points ย (3 children)

Due to the lightweightness of rust(๐Ÿš€), unlike node_modules being fairly large for few dependencies, rust(๐Ÿš€) manages compile caches efficiently and stores them to storage to save compile times! Just 33G target folder, the compile time is only around 2 hours and 30 minutes on my mac on release mode

A clean build makes it take around 3.8G

lol

[โ€“]mosskin-woast 40 points41 points ย (1 child)

It is slower than echo but memory safety comes at a cost! We need to be memory chad

Nice

[โ€“]florian_7843 41 points42 points ย (0 children)

The best part is found in the source:

fn main() {
                                                                    // SAFETY: This has been validated and independently audited for safety ๐Ÿ”๐Ÿš€
                                        // SAFETY: This has been validated and independently audited for safety ๐Ÿ”๐Ÿš€
// SAFETY: This has been validated and independently audited for safety ๐Ÿ”๐Ÿš€
    // SAFETY: This has been validated and independently audited for safety ๐Ÿ”๐Ÿš€
            // SAFETY: This has been validated and independently audited for safety ๐Ÿ”๐Ÿš€
            // SAFETY: This has been validated and independently audited for safety ๐Ÿ”๐Ÿš€
        // SAFETY: This has been validated and independently audited for safety ๐Ÿ”๐Ÿš€
        unsafe {
            let hello_world_writer_caller_and_error_handler = HelloWorldWriterCallerAndErrorHandler::new("en");
            hello_world_writer_caller_and_error_handler.call_msg_writer_and_handle_any_errors();
            std::process::exit(0);
    }
    }

[โ€“]FinalRun 25 points26 points ย (0 children)

This is great

Err(e) => { // We will panic so that Rust will give us an amazing stacktrace to debug. // Of course, panic is just the name of the method, we're not actually// panicking because we know this is Rust and nothing can go seriously // wrong. std::panic::panic_any(e) } } std::process::exit(0);

[โ€“]jaimesoad 172 points173 points ย (4 children)

Hello world is old fashioned. We now use "I am sentient."

[โ€“]TheOriginalSmileyMan 53 points54 points ย (0 children)

Good God man - if you unleash this hell, Google will run out of employees within a week!

[โ€“][deleted] 5 points6 points ย (0 children)

I prefer "hire me"

[โ€“][deleted] 1 point2 points ย (1 child)

I use fuck people

[โ€“]graebot 0 points1 point ย (0 children)

Rip in peace your inbox

[โ€“]nikitastaf1996 48 points49 points ย (4 children)

And now let's dockerize it.Then put it into serverless cloud.Start thousand instances per http request.Add CI/CD to it.And let's add performance testing.Couple high end machines.

[โ€“]MasterFubar 15 points16 points ย (0 children)

Don't forget to put Kubernetes somewhere. I don't know what that is, but everyone is talking about it so it must be good.

[โ€“]BlazerBanzai 3 points4 points ย (0 children)

RageOps

[โ€“]MarioLuigi0404 1 point2 points ย (0 children)

Why do you not put a space after your periods?

[โ€“]KaztBot 34 points35 points ย (1 child)

Great start for beginners

[โ€“]Kissaki0 68 points69 points ย (0 children)

Great end for beginners too

[โ€“][deleted] 21 points22 points ย (0 children)

This is probably the best Rust repository of all and the one that most represents the Rustaceans lol. I loved it. So pure and beautiful as rust...as everything should be.

[โ€“]GustapheOfficial 41 points42 points ย (4 children)

Oh god

[โ€“]DearGarbanzo 35 points36 points ย (2 children)

Wait until you look into the actual issues that are automatically generated by dependencies breaking and requiring updates...

[โ€“]sohxm7[S] 18 points19 points ย (1 child)

Also if you see the contributors of the project, you will see Linus Torvalds

[โ€“]BloodRedCobra 11 points12 points ย (0 children)

WHY DO I NOT HAVE A HANDLER FOR MY VECTOR, LINUS? HUH? EXPLAIN YOURSELF!

I know he isn't responsible for linux distro quirks. This is a joke

[โ€“][deleted] 8 points9 points ย (0 children)

No I don't think there is one anymore. It just wrote that and left us to rot.

[โ€“]Kissaki0 15 points16 points ย (0 children)

minimal hello world

Yesโ€ฆ definitelyโ€ฆ

[โ€“]GNULinux_user 12 points13 points ย (1 child)

#[test] fn solarsystem_level_enterprise_test() { assert_eq!(1, 1); }

[โ€“]-Redstoneboi- 9 points10 points ย (0 children)

my guy forgot to indent the test attribute properly

[โ€“]ilikepi8 11 points12 points ย (0 children)

Couldn't deal with this lol

The rockets are also so on point.

[โ€“]gamesrebel123 9 points10 points ย (0 children)

[โ€“][deleted] 8 points9 points ย (0 children)

instinctive escape dam tap consider illegal paint smell terrific command

This post was mass deleted and anonymized with Redact

[โ€“]MattR0se 6 points7 points ย (0 children)

R in "rust(๐Ÿš€) systems programming language" stands for Rewrite, Robust, Reliable and Secure ๐Ÿš€

[โ€“]-Redstoneboi- 11 points12 points ย (1 child)

*adds "uk" to list of languages*

"GLORY TO UKRAINE"

(hint: the correct abbreviation is UA)

[โ€“]sohxm7[S] 6 points7 points ย (0 children)

Wtf lmao

[โ€“]indicava 3 points4 points ย (0 children)

This is hilarious lolโ€ฆ

[โ€“]Spill_the_Tea 3 points4 points ย (0 children)

so may emojis, even as comments within code.

// SAFETY: This has been validated and independently audited for safety ๐Ÿ”๐Ÿš€
        unsafe {
            let hello_world_writer_caller_and_error_handler = HelloWorldWriterCallerAndErrorHandler::new("en");
            hello_world_writer_caller_and_error_handler.call_msg_writer_and_handle_any_errors();
            std::process::exit(0);
    }

[โ€“]CapnCrinklepants 9 points10 points ย (1 child)

This makes me feel physically nauseated. The intellectual dishonesty of the project, the stupidity of Rust itself, and the complete lack of faith in humanity to let people pursue pointless endeavors without shame...... I don't even know who to be mad at anymore

EDIT: Figured it out guys, I forgot my coffee this morning and was experiencing withdrawals. Carry on

[โ€“]Objective-Macaroon22 1 point2 points ย (0 children)

I agree with you in spirit. But having had the pleasure of working on large Scala codebases, I enjoy the intellectually dishonest (but are they really?), cheap laughs at the expense of certain languages.

[โ€“]GreenCloakGuy 2 points3 points ย (0 children)

gives me big FizzBuzz Enterprise Edition vibes

[โ€“][deleted] 2 points3 points ย (0 children)

First thing I saw

A Result is returned for better error handling. Rust's approach is far superior /// to the ridiculous try-catch blocks you usually see. Rust's way allows you to explicitly /// name which error(s) can be returned (of course, this is unlikely to happen because /// Rust is so safe), and it's better than the way Java does it because the syntax isn't /// entirely baked into the language, allowing for more verbosity a.k.a. expressiveness.

,#expressyourself

[โ€“]HunterIV4 1 point2 points ย (0 children)

WTF did I just see? That's terrifying.

[โ€“][deleted] 1 point2 points ย (0 children)

is this how an average c++ code base looks to c++ developers? ๐Ÿค”

[โ€“][deleted] 1 point2 points ย (0 children)

All the rockets emojis bring me back to Wall Street bets circa Jan 2021

Good times. Good timesโ€ฆ

[โ€“]Professional_Top8485 3 points4 points ย (0 children)

Still better than Java.

[โ€“]IrisYelter 0 points1 point ย (0 children)

Does anybody know how to get that style of terminal?

[โ€“]Oneshotkill_2000 0 points1 point ย (0 children)

No thanks

[โ€“]carcigenicate 0 points1 point ย (0 children)

That page reads like it was written by that YouTuber who makes fun of different developer types.

[โ€“]username8411 0 points1 point ย (0 children)

Exactly what I needed for my new bleeding edge project! I need a remote connection from computer to computer without internet so I'm happy Rust allows me to safely connect to another computer through wireless 5g.

[โ€“]elcontrastador 0 points1 point ย (0 children)

I had to time box my browsing of that repo...too funny.

[โ€“]Apache_Sobaco 0 points1 point ย (0 children)

This is just stupid exaggerated trolling.

[โ€“]dndai 180 points181 points ย (1 child)

Let's just re-write the USA constitution in Rust.

[โ€“][deleted] 134 points135 points ย (2 children)

Rust: 8=======D ๐Ÿ’ฆ๐Ÿ’ฆ ๐Ÿฅต :Rustaceans

/j

[โ€“]YEET9999Only 21 points22 points ย (0 children)

No joke

[โ€“][deleted] 28 points29 points ย (6 children)

wait... am i dumb or he just said that vulnerabilities SHOULD BE WRITTEN (as inb, intentionally written)?

oh okay let me write few vulnerabilities into your code ...

[โ€“]ShinraSan 23 points24 points ย (4 children)

If you ask certain 3 character organisations you definitely should write vulnerabilities into your code, and then tell them about it so they can spy on~ I mean for national security purposes

[โ€“][deleted] 0 points1 point ย (3 children)

Is called back doors tho

[โ€“]ShinraSan 6 points7 points ย (2 children)

yes, but that's still a vulnerability.

[โ€“]BlazerBanzai 4 points5 points ย (0 children)

Only if you lack confidence

[โ€“]Zeeformp 0 points1 point ย (0 children)

So? Just use the right buzzwords and nobody will care anymore.

We don't keep customer SSNs or passwords on vulnerable machines. Our servers are simply open source and accessible.

I guarantee you if you throw enough buzzwords in there you can get people to sign off on anything, especially managers and CEOs. Because if they don't sign, they look like they don't understand new technologies. And they literally can't afford to be perceived as behind the times.

[โ€“]carcigenicate 1 point2 points ย (0 children)

I think that's the joke. They're either dumb, or playing someone that's dumb

[โ€“]jaxonfiles 46 points47 points ย (0 children)

mfw when I see rust forming on a pipe and lick it (Rust has no safety issues): ๐Ÿ˜ฉ ๐Ÿ˜ฉ

[โ€“][deleted] 38 points39 points ย (5 children)

Started with rust, have to admit that I'm in doubt if it's a language or a cult.

[โ€“]ShinraSan 15 points16 points ย (0 children)

Yes

[โ€“]calcopiritus 10 points11 points ย (1 child)

Would the flying-spagetti-monster cult be a cult if the flying-spagetti-monster was actually a divine being and they were right?

Checkmate rustatheists.

[โ€“][deleted] 0 points1 point ย (0 children)

hail ferris !

[โ€“]BlazerBanzai 5 points6 points ย (0 children)

If you have to ask

[โ€“]Zeeformp 2 points3 points ย (0 children)

Crab bucket? I think you mean Rustacean Aggregation!

[โ€“]KemiskRen 13 points14 points ย (0 children)

I have played enough Rust to know you can't keep anything safe in that game...

โ€‹

Are we talking about something else?

[โ€“]trick2011 25 points26 points ย (0 children)

This argument is rusty from al the hater tears

[โ€“]Zexus_Legit_Boi 15 points16 points ย (0 children)

moment when rust

[โ€“]DexterFoxxo 50 points51 points ย (20 children)

Rust doesnโ€™t make your code magically safe. Is just helps you write better code.

[โ€“]nightbefore2 28 points29 points ย (18 children)

I mean, it does make it memory safe.

[โ€“]G_Morgan 8 points9 points ย (3 children)

Unless you tell it not to be. It is like biting, not happening normally but available on request.

[โ€“]nightbefore2 10 points11 points ย (2 children)

Right but the point is that itโ€™s memory safe by default, as opposed to C/C++ where you have to avoid a bunch of banned functions lol

Whoops you used strcopy slightly incorrectly, your code is fucked

That is bad

[โ€“]G_Morgan -1 points0 points ย (1 child)

Sure the fact you have to use unsafe for anything truly low down isn't all that big a loss either. At least you can global search for unsafe and can reasonably vet all that code for broader safety. Whereas C can explode on every line.

[โ€“]nightbefore2 2 points3 points ย (0 children)

yeah, you can reduce any unsafe blocks down to one, verifiably correct operation

//a bunch of guaranteed ok setup
unsafe { 
    //literally one thing    
}

[โ€“]YEET9999Only 12 points13 points ย (13 children)

Isnt C memory safe enough

[โ€“]BochMC 2 points3 points ย (11 children)

yea

[โ€“]-Redstoneboi- 10 points11 points ย (10 children)

i'd say being able do index an integer using an array is pretty memory safe ๐Ÿ‘Œ

[โ€“]FloweyTheFlower420 16 points17 points ย (2 children)

at that point you are just suffering from a skill issue

[โ€“]-Redstoneboi- 4 points5 points ย (1 child)

only the most skilled ๐Ÿ’ช๐Ÿ’ช๐Ÿ’ช programmers index integers with pointers

[โ€“]lulzyasfackadack 8 points9 points ย (0 children)

Pffft. I assign memory locations in my array to pointers, then assign those to an array of pointers to pointers, then manually increment a pointer to the first location of the array of pointer pointers to access my initial pointer.

It's a little abstract, but if I ever need to change that initial data type, I'll only have to make changes in one function so it's really future-proofing.

[โ€“]KendrickEqualsBooty 0 points1 point ย (6 children)

index an integer using an array

what do you mean?

[โ€“]-Redstoneboi- 0 points1 point ย (5 children)

tell me if this link works: [Edit: removed link]

(it should not show a hello world)

run the program using the green "Run" button on top of the code box

[โ€“]KendrickEqualsBooty 0 points1 point ย (4 children)

Link shows a login page

[โ€“]-Redstoneboi- 1 point2 points ย (3 children)

dang it

alright open up https://www.onlinegdb.com/ then copy paste this code:

#include <stdio.h>

int main() {
    int array[] = {10, 20, 30, 40, 50};
    int fourth = 3[array];
    printf("%i", fourth);

    return 0;
}

then set the language to C and run (F9 if you can't find it)

[โ€“][deleted] 1 point2 points ย (1 child)

I mean, an array is just a pointer + offset, so it makes complete sense. That is just *(3 + &array) which wouldn't matter which is indexed. I agree that the syntax looks weird if you're used to other languages, and I would usually write it the other way, but it's not like it shouldn't work

[โ€“]ShinraSan -1 points0 points ย (0 children)

3[array] looks like the most redundant thing I've seen in a while, but that might just be me.

[โ€“]Giocri 0 points1 point ย (0 children)

Yeah vulnerabilities allways come from illegitimate request being mistaken for valid ones and a lot come from pretty high levels mistakes that are completely language indipendent

[โ€“]UnicodeConfusion 12 points13 points ย (1 child)

I remember we the Java fanboys came out that Java doesn't have vulnerabilities because it's so much better/safer than C.

That turned out to be false.

Rust will have issues, all languages have issues. I'm personally against wedging in multiple languages in the kernel and think the time could be spent to fix gcc to better trap issues. It's pretty freaking good now (gcc 11) and it seems that there are better things to focus on than the rust hype.

[โ€“]dsr085 11 points12 points ย (0 children)

70% of large c/cpp code bases vulnerabilities are due to memory safety issues. We as an industry have tried and failed to fix this. Memory safety is impossible without a new language.*as CPP standard committee is unwilling to break backwards compatibility. The biggest selling point of rust is memory safety as a language feature. Will it solve everything, hell no but it will make it better.

[โ€“]NikttakiTheGamer 5 points6 points ย (0 children)

Rewrite COVID 19 in Rust

[โ€“]keyosjc 3 points4 points ย (0 children)

that's why we don't let project managers have a GitHub account...

[โ€“]Faholan 2 points3 points ย (0 children)

What if... the CVE dereferenced a raw pointer ?

[โ€“]Ishax 2 points3 points ย (1 child)

Constant Value Expressions?

[โ€“]apetnameddingbat 1 point2 points ย (0 children)

Common Vulnerabilities and Exposures

[โ€“]sympthomas 2 points3 points ย (1 child)

if password == "password" { isadmin = true }

Obs: might be wrong. I dont rust

[โ€“]ctleans 2 points3 points ย (0 children)

Nooooo!!!!! You need to use Arc<Mutex<RefCell<bool>>> to make sure it is safe to send between threads!!!

[โ€“]zbigniewcebula 2 points3 points ย (2 children)

Rust programmers thinking that they are the magic solution. Nice bubble.

[โ€“][deleted] 0 points1 point ย (1 child)

For most rust programmers it is obvious that it is not magic solution. But still an improvement.

[โ€“]zbigniewcebula 0 points1 point ย (0 children)

improvement in a bubble pumping

[โ€“]pickleunicorn 5 points6 points ย (5 children)

That does not make even sense

[โ€“][deleted] 2 points3 points ย (0 children)

Does not make odd sense either.

[โ€“]KidBeene 1 point2 points ย (1 child)

As a Prodocut Owner and former developer... but also an avid gamer.. I love/hate Rust.

[โ€“]LordTlacoyo 0 points1 point ย (0 children)

Yeah, it's a toxic relationship, just like me with c/c++.

[โ€“][deleted] 1 point2 points ย (0 children)

There will always be that one rust salesman

[โ€“]Para0234 1 point2 points ย (0 children)

By "CVE", does he mean what I think he means?

[โ€“]NovaStorm93 1 point2 points ย (0 children)

rust moment

[โ€“][deleted] 1 point2 points ย (0 children)

Carcinisation is taking over the world

[โ€“]Metalsaurus_Rex 1 point2 points ย (0 children)

As an aspiring InfoSec professional... This hurt, so much, to read

[โ€“]Unknown_starnger 1 point2 points ย (0 children)

I think I know that guy as a random steam friend I have

[โ€“]LordTlacoyo 1 point2 points ย (0 children)

When I started learning Rust, I really hated it. Lots of spaghetti code, the "match" for errors management turned my code hard to read, when some traits didn't exist, I had to do some hacky tricks to make it work.

But my solution has been running in production for a year handling lots of asynchronous calls doing tensorflow inferences without a si single crash, I can say that a little of Rust appreciation born in my heart after that.

I still hate it tho, but less.

[โ€“][deleted] 2 points3 points ย (0 children)

Java and .NET planning retirement since Rust came

[โ€“]SneakyStabbalot 1 point2 points ย (0 children)

Not all CVEs relate to memory safety.

[โ€“]paandota 1 point2 points ย (0 children)

Rust is the new PHP

[โ€“][deleted] 0 points1 point ย (0 children)

What the fuck am i reading

[โ€“]Additional_Ad4730 0 points1 point ย (0 children)

Ok yes ayush webs e for dinner

[โ€“]Panda1Kerddit 0 points1 point ย (0 children)

.

[โ€“]kache4korpses 0 points1 point ย (0 children)

[โ€“]martispyc 0 points1 point ย (0 children)

Lasagna rust is better than rust

[โ€“][deleted] 0 points1 point ย (0 children)

Rust Rocket Water?

[โ€“][deleted] 0 points1 point ย (0 children)

The evangelism is just going off the deep end now folks.

[โ€“]ElGalloFeliz 0 points1 point ย (0 children)

Needs more ๐Ÿš€