Is Rust really the only memory-safe, thread-safe low-level, high-performance systems programming language?

Is Rust really the only memory-safe, thread-safe low-level, high-performance systems programming language?

If so, it's basically guaranteed to carve out a good niche in the industry, right? Since it has literally no competition, and there's such a high demand for the security it can provide.

Other urls found in this thread:

tedunangst.com/flak/post/heartbleed-in-rust
davidmcneil.github.io/the-rusty-web/
github.com/jameysharp/corrode
stackoverflow.com/a/200277
doc.rust-lang.org/book/patterns.html
rust-lang.github.io/book/second-edition/ch06-00-enums.html
rust-lang.github.io/book/second-edition/ch18-00-patterns.html
rust-lang.github.io/book/
ww1.microchip.com/downloads/cn/AppNotes/cn_00914a.pdf
wiki.c2.com/?FizzBuzzTest
css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/
amazon.com/exec/obidos/ASIN/0321193679/codihorr-20
rust-lang.org/en-US/faq.html
blog.mozilla.org/blog/2014/04/05/faq-on-ceo-resignation/
notlaura.com/
rust-lang.org/en-US/conduct.html
blogs.msdn.microsoft.com/oldnewthing/20140627-00/?p=633
people.csail.mit.edu/nickolai/papers/wang-undef-2012-08-21.pdf
blog.regehr.org/archives/213
en.wikipedia.org/wiki/Vesna_Vulović
twitter.com/NSFWRedditGif

"All I can say is my gut says maybe."

Just based from what I've read about it, it's plausible. Unlike every other language that tries competing with C and fails, the people behind Rust seem to care if an abstraction has a run-time cost or not.

dude its like you dont even know about ada. you learn ada you make uber dosh for real man. anything defense and they get their panties wet if you know ada. language designed to be safe like if it fails people die man. dude i had to sage you because you really should know about ada. smh tbh dude.

Rust does not launch people to the ISS and back.
Rust does not autopilot billion-dollar aircraft.
Rust doesn't do much of anything besides provide a logo conveniently shaped like a circle to circlejerk around for the reddit-using mouth breathing wankers who shill it like they shill their aids-infected lifestyle at mardi gras.

This is not an argument.

Sounds like someone's upset about his deprecated language.

ada is not thread safe.
also not memory safe, it's just easier to use less heap in Ada, and there are some runtime checks by default also.

Coding with memory-safe meme-language.

How many non-SJW people are actually using Rust to implement non-toy software?

please read my OP, where I said:
Nothing you said responded to this question.


You compare it to training wheels, but it actually makes Rust programming more complex in many ways, which I have seen a lot of people complain about. The fact is, even the best C or C++ programs (such as the Linux kernel) will always have memory vulns because the language allows them to happen. This is a disaster in the face of modern threats.


Ada looks like it has some advantages over C languages, but isn't as safe as Rust. Also, I don't want to build bombs for ZOG.

AAAAHAHAHAHAHAHAHHAHAHAHAH

We need more safespaces for safe coding in a safe non-offensive environment!!!

ada is safer with memory than c, provides greater flexibility than rust, provides entire suite of features geared towards safety, reliability, and avoiding runtime errors. rust-fags always get pissy about this because their language got cucked 30 years ago. the moment you lead with "not memory safe" i know you know nothing about ada. if you did you'd know "safety-critical" is so much more than memory safety.
also, "i don't want to build bombs for zog" isn't an argument. try again.

k. i will continue to use rust as will the sanfran hipsters

C exists.

that's just shitposting.


yes, it is just as low-level as c++. and it has an added advantage of not being OOPshit.


Ada is good, especially for how old it is. But Rust does take safety further. It's also getting big adopters in mainstream and open source tech, which does matter for its future.

I was just responding to the guy bragging how Ada is used in a bunch of shitty jets and bombs that are draining trillions of dollars from our federal budget.

you mssed that part

tedunangst.com/flak/post/heartbleed-in-rust

what are you trying to say?

nice sage. now kill yourself.

I can't wait for the year to be over already so all the faggots who jump on the bandwagon of every fad language fuck off back to webshit again.

That, it does. And it's all artificial complexity designed to hinder the programmer. And while you learn about the many intricacies of the "borrow checker", you're not learning about the underlying machine model. Clearly, anyone whose first "low level" language is rust will be at a disadvantage when he inevitably needs to do "unsafe" things.

anti-sage

it is actually extremely simple. only retarded pajeets wouldn't understand it.

just triggering hn idiots

k

Sage is not a downvote, retard.

>It's more complex in many ways!

>It's so extremely simple!

It's actually just annoying.

I still laugh Holla Forums doesnt understand sage
if i only knew moon
does it wrong all the time
insulting a post
your post is not worthy
insulting yourself
spamming the board
want to use sage but cant
etc

i know that sage is not a downvote
i just have given up on Holla Forums. it is filled with larping retards. you can't actually have a proper discussion here because most of you fags have actually no idea about cs.
so i am just shitposting and doing my part in shitting this board up tbh.

Who's the retard here?

i don't hate Holla Forums. it is fun.

davidmcneil.github.io/the-rusty-web/

ok kid

H-haskell is thread-safe and memory-safe.

It's also slow and cumbersome to use for mutable data algorithms.

that's doable
by your definition of "good"?
this is compiler's job and Rust is very close to that
this is a meme
all that's really needed for that is fast&effective serialization and Rust has it

I can write memory-unsafe, thread-unsafe code in Rust just as well as I write memory-safe, thread-safe code in C. What matters is our plan how the developer writes the code. Locking down the user to prevent them from fucking themselves over will never be enough, for some Pajeet will somehow shit Rust diarrhea in such a way that it completely bypasses your "safety" shit.

In Rust, you have to write "unsafe" before being able to fuck up. In C, putting the wrong variable in the wrong place can cause a catastrophe, or what's worse, using some standard library features the "wrong" way can do the same as well.

What am I in for? Will soon be learning/writing Ada on some defense technology. I thought of switching job since I signed up for C++, not Ada.

you are contradicting yourself faggot

Yep, you sure are a rustfaggot.

...

Yes, and I'm really cautiously excited about it. I keep trying to find things wrong, but so far the architects are being rational, open-minded, and do their best to listen to any complaints/issues people have with it.

I'd say be cautiously optimistic about it. It'll take maybe another 5 years before it has a stable enough ecosystem to start rolling large, but so far it just doesn't stop moving in the right direction.

github.com/jameysharp/corrode

Wow, I wonder what's going on here...

you mean every language with a gc?

Been happening for decades, retard. Since the 60s, really. Pascal and C++ are very safety-oriented. So are most every higher-level language like all LISPs. You'd have to be a kid to think safety is a new trend in programming.

Look at Redox OS, it's incredible, but nobody uses it. It's not going to go anywhere.

Why do you faggots even exist?

it has incredibly bad code quality

I don't know if Rust will be able to replace C. C is fairly simple language thus is easy to port to new architectures. Most embedded applications use C for this reason and because it provides easy access to hardware, besides why do I need to care about memory safety if I allocate all my memory statically (at least that's what you do in embedded applications, might not always be possible in application programming)?
Also they just seem to be reinventing the wheel. Take for example this code from Rust homepage:// This code is editable and runnable!fn main() { // A simple integer calculator: // `+` or `-` means add or subtract by 1 // `*` or `/` means multiply or divide by 2 let program = "+ + * - /"; let mut accumulator = 0; for token in program.chars() { match token { '+' => accumulator += 1, '-' => accumulator -= 1, '*' => accumulator *= 2, '/' => accumulator /= 2, _ => { /* ignore everything else */ } } } println!("The program \"{}\" calculates the value {}", program, accumulator);} What exactly is the bennefit of the mentioned code compared to: #include int main() { char program[] = "+ + * - /"; int accumulator = 0; int i; for (i = 0; i < sizeof(program); i++) { switch (program[i]) { case '+': accumulator += 1; break; case '-': accumulator -= 1; break; case '*': accumulator *= 2; break; case '/': accumulator /= 2; break; default: break; } } printf("The program %s calculates the value %d\n", program, accumulator); return 0; } Can someone who has more experience with programming explain to me why is Rust code better than the C example. Why is some confusing pattern matching functionality more desired than simple switch statement?

because it is pattern matching

POSIX threads cannot be safe by design. Anyone who claims otherwise is a Bay Area Degenerate who thinks bootstrap is code.

Pattern matching is not a switch block.
You can't use type constructors for example.

Ah, c does not have type algebraic data types anyway...

s/have\ type/have/

Why is there a thread about Rust at least once a month that pozzes up the board and contains a bunch of fags that ass lick, and finger bang each other over how "absolutely great" Rust is? Not even the C-Wennies are this bad. Holy fucking shit.

...

it's shit and has a classcuck license

In Ada you are not using posix threads directly, maybe in the background depending on the implementation.
If the language provides protected objects and atomic operations and synchronization, what more can you need?
Or am I missing something here?

these threads are just as bad as those, retard.

Wrong board, retard.

Both those examples are shit because both languages are shit. But the top example has one slight advantage that break statements aren't necessary and so you can't inadvertantly create bugs by forgetting them.

stackoverflow.com/a/200277
doc.rust-lang.org/book/patterns.html
rust-lang.github.io/book/second-edition/ch06-00-enums.html
rust-lang.github.io/book/second-edition/ch18-00-patterns.html
educate yourself

No, because rust isn't a systems programming language.

It's a meme.

where is your proof?

Save my post, put it somewhere safe. Open it in 10 years and look at it. There's the proof.

what is a systems programming language then?
Assembler?

Yes, but do I really need to point out the obvious? Come on, you know the answer. The language every real system that isn't a meme is programmed in?

this is not the obvious point, looks more like a horse shit

Google translate from Hindi is not your friend.

What are some good resources for learning how to write production ready Rust code?

rust-lang.github.io/book/

You don't. You go on forums, imageboards and irc channels and sperg out how things should be rewritten in Rust. Actual programming is for plebs.

Ada has Spark which can prove a complete absence of runtime errors and determine memory usage limits, using theorem provers, and is used in software that people's lives depend on.

Ada has good numerical types. Fixed point types can eliminate floating point bugs and simplify code compared to using integers and manually scaling. Modular types and range types can guarantee that out of bounds indexing won't happen. They don't have to be related to bit sizes. You can have mod 360 or mod 12345 if you want. Overflows of non-modular types are always checked unless you deliberately turn them off.

Ada also has aliases like Long_Integer if you want to use machine-specific types.

Ada has multi-dimensional arrays and bounds can be any discrete type, not just integers. Monday..Friday, 'A'..'Z', and -1000..1000 can be array bounds.

Ada is bloated

Thank you user.
That helped me a lot in creating my first Rust program.

Fortunately there's plenty of unused space in your head to go learn it :)

what?
ww1.microchip.com/downloads/cn/AppNotes/cn_00914a.pdf

You do realize plenty of embedded applications utilize chips far more powerful than a PIC.

Not even joking, a friend of mine who happens to be a C fanboy said some of these. He is quite good at embedded programming, but he didn't know about the strcopy thing. Yeah, the last one is paraphrased

It baffles me how can people act like segfaults are the worst thing that could happen with C. Segfaults are actually your OS doing its work and protecting you from your own stupidity.

Writing out of bounds on a heap address won't fuck you in the ass, but in the stack, you open yourself to stack smashing, which is catastrophically dangerous. Not like heap memory manipulation is safe, though.

What are your favorite crates, Holla Forums?

I keep hearing this and I had yet to learn what it was so I looked it up
wiki.c2.com/?FizzBuzzTest
so as I understand it it goes something like this FOR or WHILE for 100IF NUMBER whatever is divisible by 3 print FIZZIF NUMBER whatever is divisible by 5 print BUZZprint NUMBER

keeping in mind that I left out the elif, else and any terminators because of the way in which languages vary is that really all there is to it?

are there people that cant handle that?

Fizzbuzz is a meme more than anything else these days.

but, am I portraying it accurately?

css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/

0.


They have a better grasp than you do. Most of the people here are good at noticing when something is cancer.

And hence your pseudocode does not produce the desired output. Sorry, you failed fizzbuzz.

#include int main(void){printf("the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.");}

git on Fizbuz level

fucking lol.

jesus fucking christ

OHHHHHHH
I also left out setting x to 0 and adding +1 to x when using FOR

is that C or C++
I would like to learn C for sure but I only know some python

Most of Holla Forums can't even program.

I can program in python, not even hard just time consuming
and a bitch because 2.x 3.x nonsense

Flamewars are still fun.

That is why Holla Forums is shit.

been reading some shit thanks to the fizzbuzz article

what do you guys think of this book?
amazon.com/exec/obidos/ASIN/0321193679/codihorr-20

For someone who wrote something as big as SO Jeff has remarkebly bad taste in general.

this is a rust thread. fuck off and die with your meme book.

There is only one statement which Mozilla and all their projects are earning. Found that on a page which i visited a while ago:

>rust-lang.org/en-US/faq.html

Most of Mozilla actually supported Brendan Eich during that drama. They wanted him to continue his role as CEO of Mozilla.

Source?

blog.mozilla.org/blog/2014/04/05/faq-on-ceo-resignation/

Can we permaban all Rust shills now that they're confirmed for turbotrolls?

Don't waste your time. The shitposters, the shills and the Holla Forumstards will keep spreading lies about Mozilla and Eich.

kill yourself

FUCKING FUCK THIS MADE MY BLOOD BOIL
KILL YOURSELF YOU WORTHLESS PIECE OF SHIT WHORE
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

This has got to be ironic shitposting. I refuse to believe people like this exist.

Also, I should mention that most companies will generally prefer people with a broader skillset over specialists. When I was applying for my current position (at an international NGO), I was apparently the only one that didn't have higher education. I could do what was in the job description, but the others were more qualified. However, I was the only one that spoke four languages, and they picked me. A skill is a skill, regardless of how irrelavant it seems at first.

>The following is a guest post by Lara Schenck. I heard her tell this story at a CodePen Meetup in New York
>notlaura.com/
Not surprised anymore.

I'm glad these retards got turned down at least.

Can we please talk about Rust in Rust thread?

Systems guy here. Rust is a disaster and we don't even consider it or think it will ever become useful. Everyone expects to still be writing C/C++ when they retire.

Why is Rust a disaster?

How dare you ask such questions

kek

Because he says so

Bump for best programming language.

...

The Rust Code of Conduct
rust-lang.org/en-US/conduct.html

So what's your point?

If C is considered an unsafe language, then assembly is the least safe of all.

Assembly is much, much safer than C.

blogs.msdn.microsoft.com/oldnewthing/20140627-00/?p=633
people.csail.mit.edu/nickolai/papers/wang-undef-2012-08-21.pdf
blog.regehr.org/archives/213

None of that shows why assembly is much safer than C. None of that says anything about assembly.

It's sad and funny to see that 20+ years ago people were happy to have this kind of abstraction.
But now we are going backwards because of the dystopian nightmare that we live in.

It says a lot about assembly. If you write checks in assembly, the assembler won't remove them. Assembly makes it a lot easier to test for overflow too.

What part of that shows that assembly is safer than C?

If I write checks in C, the assembler won't remove them. It's easy to test for overflows in C. The difference is that C abstracts over many details which means it's easier to write correct code. In assembly, you're forced to write more logic which means a far bigger mental cognition in writing programs.

...

It shows that C compilers remove reachable code. Assemblers don't.

The assembler doesn't remove them, the C compiler does.

The test in assembly is usually just a conditional jump.

That depends on the computer architecture. Some make it easier to work with strings than C does. All of them make it easier to work with multiple-precision arithmetic than C does.

...

You sound just like CNN.
Let me guess, american?

Are you fucking retarded?

Scared of real programming?
Go back to "coding" your CSS website, cuck.

not an argument

...

C/C++ also allows to write memory safe software

But hes not wrong

In the same way as aircraft seat allows to land safely in the event of a mid-air crash.
But, unlike human-written safe code in C/C++, this actually happened with en.wikipedia.org/wiki/Vesna_Vulović