C IS THE BEST LANGUAGE

git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=657831ffc38e30092a2d5f03d385d710eb88b09a

Other urls found in this thread:

rust-lang.org/
lolcode.org/
quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why
news.ycombinator.com/item?id=14214110
doc.rust-lang.org/book/
youtube.com/watch?v=oCIo4MCO-_U
seclists.org/oss-sec/2017/q2/344
twitter.com/SFWRedditVideos

And how would your meme language prevent this, board slider?

You appear to know how to trivialize memory management problems in low-level OS code.
Since you are apparently a programming genius, please enlighten us.

rust-lang.org/

lolcode.org/

EBIN XDXDXDXDXDXD

At least when you find a vuln in C you can actually read the source code, instead of being presented with a thousand redundant keywords and ASCII soup. Rust is snake-oil.

for(;P("\n"),R--;P("|"))for(e=C;e--;P("_"+(*u++/8)%2))P("| "+(*u/4)%2);

This is what code of turbo-typing movie hackers must look like

oh wow you can write obfuscated code omg what a revelation

Nobody actually writes C like that you pissdrinker.

no

are there still literal retards on this board? almost every language made since 1970 prevents this problem.
but since this thread is really only
you wont see the slightest amount of brain use ITT

i would give an example but then you'd say something like
or

99% of you C slinging retards (and 100% of you fanbois who don't even use C) can't even make a pointer to a function that returns a 2d array, or a 2d array of function pointers

TempleOS wouldn't be able to do 4,000,000 task switches a second if it was written in Rust

None of those fags but:
int (*(*foo)())[WIDTH]int (*(*foo)[WIDTH])()

If you're doing anything significant in OS or embedded development, you simply can't get around the need to do "unsafe" things. Your hipster security theater language does nothing to help here; you just end up planting a bunch of "unsafe" blocks all over the place.

kill yourself

Stop being so idiotic. Even if that was true, that "minority" of unsafe code is the most important code in your rust codebase and is susceptible to the very same kinds of bugs as in C. Ultimately, I would prefer to use a language that compiles my medium-to-large sized programs in a reasonable amount of time.

You sound like a fag. How about writing a pointer to function returning function to pointer return pointer to 2d pointer to function array of 2d pointer of array of returning?

and the rest will be safe code which means you only have to worry about the stuff that means. with c on the other hand youre fucked.

This individual challenges you to prove your ability as a programmer of the ancient C language, because he does not engage in discussions with inferior people who are unworthy of his wisdom.
Of course every enlightened programmer knows that what truly proves the competence of a programmer is his knowledge of the intricacies of the syntax of a language.

But what's stopping me from writing necessary parts of program in C and call functions from another, higher level language which would make my code "safe"? Let me remind you that many languages before Rust have tried to replace C and have failed to do so every time. What makes you think that Rust will succeed?

He didn't write that code, he copied and pasted it like the stackoverflow-dependent pajeet he is

I would rather write the non-critical parts in a language that
- doesn't aggressively antagonize the programmer with a dumb "borrow checker"
- doesn't necessarily take an unreasonable amount of time to compile
- has a community I can rely upon when needed
In other words, not rust.

Go is a significantly less cancer Rust, even though it's full of SJWs the corporate framework keeps them functional.

lol are you butthurt that rustc yelled at you for writing memory unsafe code? go back to writing hello world in c.


lol no generics

Have you programmed in Rust? Because I have. I wouldn't recommend it at all yet, but all those points are completely false.

Are you morons just defining "memory unsafe code" as "whatever triggers the borrow checker, no matter what it is"? Sad.

sad.

This wouldn't have happened in Rust.

C is the worst programming language security-wise, thank you for the majority of all security vulnerabilities. Browse the master list of CVEs or even just the list of vulnerabilities / security advisories of OpenSSL alone: The majority are related to double freeing of memory, memory leaks, dangling pointers or other pointer mistakes like null pointer dereferences. These can only happen because of the programming language being used: C.

Rust offers clear benefits over C - Its ownership system is demonstratively able to prevent many of the common errors related to resource management, which often lead to security risks or total crashes.
It also offers a much nicer concurrency story, one that does not require you to pull your hair out and that is tied nicely to the ownership & borrowing system to prevent data races.
On top of that, it offers a healthy dose of abstraction and modelling power, as well as functional programming concepts, something C programmers have been denied thus far.

The slogan I've been using for Rust personally is: Confident, Productive Systems Programming. You can write fast code. You can write low-level code. You can do it with high productivity, thanks to the work on modern tooling and ergonomics. But most importantly, you can do all of this fearlessly, because the Rust compiler has your back.

lol but what about the borrow checker rejecting perfectly valid code? or what about the compile times? or what about the sjws? or what about the syntax? or what about the build system?
c is masterrace. get lost rustfaggot

Amazing. You have convinced me that Rust is superior language. How can I start programming in it?

But why bother with it in the context of, say, an OS or an embedded program?
Is it really? Have the creators of rust recently found a way to make all that pervasive compile-time checking into a free lunch?
Don't get me wrong, I'm sure they exist. You just have to continuously avoid the landmines.

Also, the syntax is ugly hipster shit.


Sad.


Cool copypaste from the second answer of
quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why
and the last paragraph of
news.ycombinator.com/item?id=14214110
You convinced me and I am now a #rustmissile

quality post m8. i am now a #cmissile

Indeed, my code is usually perfectly valid. Therefore: Borrow/lifetime errors are usually Rust compiler bugs. Typically, I will spend 20 minutes detailing the precise conditions of the bug, using language that understates my immense knowledge, while demonstrating sympathetic understanding of the pressures placed on a Rust compiler developer, who is also probably studying for several exams at the moment. The developer reading my bug report may not understand this stuff as well as I do, so I will carefully trace the lifetimes of each variable, where memory is allocated on the stack vs the heap, which struct or function owns a value at any point in time, where borrows begin and where they... oh yeah, actually that variable really doesn't live long enough.

Hm! Looks like the compiler was right all along!

That's being worked on. It will never compile as fast as C, that's not the goal here, C is such a bare-bones language it's hard to beat in that regard. C(ruft)++ on the other hand, we'll easily overtake. Watch & see.

Muh SJWs logical fallacy. Go back to /r/kotakuinaction, kiddo.

No problems here. Dumb niggers who can't even syntax should stay away.

As experienced programmer, who actually has experience with a multitude of languages, Cargo is among the best there is.
(also: Says the C tard. LoL CMake, LoL relying on OS package managers. Get fucked in dependency hell).


You can learn it here doc.rust-lang.org/book/

If you wish to join our crusade, over at #rust on Rizon IRC we always welcome new faces.

But it's true Rust's syntax is a pain in the ass. Enums sound really good until you have to decompose them member by member whenever you want to use them. No wonder why people have hacked them by using named structs instead of inlining them.

Please back up your statement with code examples for me to correct.

sounds like you're ready for Perl 6 :^)

Please don't be. You don't have to leave your hugbox.


Until it's not.
In other words, it will happen Soon™ (aka never, because there's no such thing as a free lunch).
Fixed.
Nasty looking crap. I wonder how much self-persuasion you need before you start believing rust's syntax looks fine.

youtube.com/watch?v=oCIo4MCO-_U
Literally C programmers.

amazingly well thought out arguments! rust truly sucks. i am a #cmissile now.

ebin :^))))

yeah c is the best! only bad programmers write unsafe code. but we are not bad programmers! my hello world and fizzbuzz programs are 100% memory safe

Fixed. Just making it clear what you really mean by "unsafe code".

shit! you got you! im not actually a #cmissile.

I don't have it right now with me, but basically, I had an enum with two possible types, each if which had was a struct. One of the types had inside more entities of that same enum in three vector fields, two of which were Option'd. The algorithm required peeking into the source enum and the target enum. Depending on the type of the source enum, and the type of the first member or only member (depending on the enum type), you had to do one thing or the other.

At it worst, I had 11 levels of indentation. I am sure you could have reduced it by one or by two with some cleever refactor, probably more if you didn't mind being redundant and repeating yourself over and over, but other than "cheating" by moving away code into single use functions or using throwaway variables, it would be pretty much impossible to make that readable.

oh gee rust sure sucks. in a sane programming language my shit code wouldnt be shit.
im a #cmissile now

This joker sounds like he tried to get a patch into the kernel but was told by Linus to fuck off, which hurt his wittle feewings and now he's latched on to a meme language just to spite him. Wew. Lad.

shit. you found me out again. im lennats poettering and i got triggered by linus. now im a #rustmissile

sage

Are you one of those retards who think Go is somehow acceptable as a C replacement yet Java 1.4 is not?

seclists.org/oss-sec/2017/q2/344
oh no a buffer overflow in c? must not have been a real programmer that wrote it. c is still the best language.

C++ has more megabytes in the code of its compiler so it is the best language.

Yes it could. TempleOS can do it because it ignores CPU rings among other design-specifics.

To get compiler-assisted memory safety where you can. Even in a kernel, most code doesn't need unsafe to be performant or to appease the borrow
checker.

As for embedded, stick with C. Programming microcontrollers with Rust is just C with additional constructs and a ghetto build toolchain (unless someone has already done the work for your device), so for simple applications it's better not to fight the vendor-provided SDK.


He's lying, it's still slow. However incremental compilation is in the works and it's serviceable enough as it is, just annoying.


Not really. They mostly behave. Even the antifa faggot that is Steve Klabnik manages to take the cock out of his mouth before speaking in a community setting.


Some of it sucks, some looks just unfamiliar because of the new concepts like lifetimes (that's probably the ugliest one). However it's mostly okay, really. Very ALGOL-like despite the ML influence.

I often wish they did away with some of the symbol verbosity bolted on to appease C programmers so we could have clearer code in things like enums (which are just algebraic data types); just compare them to the ADTs in OCaml or Haskell.

---
At the end of the day, there are things to improve in Rust, but really, when you compare it to C++ and C when it comes to making robust, performant software and doing it fast, it's just a ridiculous amount of value just waiting there to be exploited.

That's how you're supposed to deal with big algebraic data types. Splitting code into smaller, more readable units is not just for reusability, it's writing maintainable code.

The rat the cat the dog chased killed ate the malt.

That doesn't make sense because Rust syntax has fewer things in common with Algol than ML (OCaml and SML) does. Rust doesn't look anything like Algol. Rust uses symbols instead of words.

The single worst thing about C is it's creator. How could one single man fuck things up to this degree?

Python FTW.

ftfy

shit you rekt you. im a #cmissile now