Final Solution to the C question

So how do we solve the C problem, Sup Forums?

New security holes keep appearing because of it.

Other urls found in this thread:

rust-lang.org/en-US/friends.html
dlang.org/ctod.html
dlang.org/cpptod.html
code.dlang.org/
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=go
twitter.com/NSFWRedditGif

Just stop talking about it.

We solve the C problem by euthanizing retard shills like you.

I'm reading K&R so I can contribute to the C problem.

You find languages that are better in each possible use case.

Good fucking luck.

Revive the Ivory processor, throw away braindamaged C machines.

Rust

Fucking retards...

Why can't we just ban every language but Java? Making only one programming language allowed makes programming more accessible as students only have to learn one language. Java is the most commercially viable language so we should just stick to it.

They appear because it's used in critical shit.

Start using your favorite meme language instead and suddenly there'll be security holes too. Actually it will probably be even worse, because C has been around for so long, and thoroughly inspected many times, that its compilers are among the most reliable software on the planet.

And then maybe you'll realize C isn't the problem. The most secure language is the one no one uses. So if your meme language has no bugs, maybe start asking yourself the right questions.

Die in fucking hell pajeet

A language is useful in some way, but not universal. Some projects needs OOP, others fucking doesn't.

When you learn algorithm and system behaviors, it's easy to learn the majority of programming language.

But if you are a fucking tech illiterate, yes it's hard to learn.

Tech illiterate like you must be ban.

Really activated your almonds, havent I?

>i was pretending to be retard, joke on you haha

>What is english?

Java was a step in the right direction but it has it's issues.

Rust is a leap in the right direction

I meant it, rust is better than C

>talk about programming language
>don't know how to english
you got me

Replacing C's horrible pile of legacy codes with Rust's structured, well defined and package managed modules is the biggest challenge. The only reason why a trash like C is alive is because there are already so much written in this fucking trash.

report spam anti-c threads

C is trash, I don't feel like defending it anymore

Fucking codemonkey, I don't know the first thing about software development. I just know that Sup Forums hates Java and gets asspained about it since apparently being good with it is crucial to get a job. Thanks for the (you).

nobody is interested in your C+ bastard child.

rust-lang.org/en-US/friends.html
>dropbox
>canonical
>mozilla

>They used our code to make one line of code
>FIRENDRS OF RUST

Nobody cares and I fucking mean, NOBODY

>one line of code
severely doubt that they would ADD THEMSELVES to the list if they had written >one line of code
where the fuck did you even come up with that gimmick? is this how low one must go to defend C and C++, languages that are fundamentally unsafe and enable catastrophes like cloudscare?
>they should have checked the parser
rust wouldn't have let them overrun the buffer, even in unsafe blocks.

1. Shame every C developer for being a danger to security
2. Uninstall Linux, install redox
3. Start a petition for banning C code, fining companies who use C code, taking down repos with C code etc.

C is god's chosen language CIA nigger

this

literally tons in every of them

then we should only allow JS. it can be OOP, functional, imperative, basically anything

C and assembly are the only good languages, everything else is vulnerable NSA code monkey abstraction

This. Even ancient machines like the Burrough B5000 got this right. Security from the ground up, NO EXCUSES.

Its a slow, needlessly complex language that hides everything behind a black box. It will never take off.

No it doesn't you fucking memer

Great argument, you really got me there buddy. Maybe all you've used is Java so you think Rust abstractions are typical.

>1 hour 24 minutes response time
The Rust Evangelism Strikeforce is getting slow.

>needlessly complex language that hides everything behind a black box
t. C toddler

Note:

Most of dropbox is written in Go. They replaced one part with Rust to improve it's memory consumption.

Most of canonical is written in C. No idea what they use rust for

Most of mozilla is written in C++. Only their research browser is written in rust and some minor parts of firefox.

The fact that 3 companies use this language in such a minor role is not evidence that this language is superior. Come back to me when millions of people are using critical infrastructure software written entirely in Rust.

>So how do we solve the C problem, Sup Forums?

Only let professionals write mission-critical C code.
Pajeets, "code academy" trash, "code artisans" and people straight outta those graudate meme images should find something else to program it.

How do people become professionals if they're never allowed to write C? You just made C-developers extinct gg.

>You just made C-developers extinct
That's the goal. C must die.

C stands for cancer and it needs to die.

Almost all cases of security exploits found in Linux's code there is always some retarded mistakes that could have been prevented in Rust as the compiler checks thorough typesafety.

>The fact that 3 companies use this language in such a minor role is not evidence that this language is superior.
the fact that it is a language that lies at the same level and speed as C and C++ yet is memory safe, concurrency safe and affords facilities usually seen in higher level languages

Damage status
>Controlled

> Let's destroy C in order to create more shitty brainlet devs which doesn't give a shit about what is really going on BECUZ MUH SAFETY XDDDD

Fucking faggots.

What the fuck are you even trying to say with that nonsense, you autistic trash?

>shitty brainlet devs
Rust is not a beginner friendly language, if you are new to programming choose Python or C

>Only let professionals write mission-critical C code.
>mission-critical C code.


basically: practice is small projects, typical programming challenges, made-for-yourself C programs and userspace programs, mainstream kernels, cryptography libraries or compilers.

As Linus said "learn to program in C, not just bash your keyboard until it compiles (with warnings)".

Ok lets have some real talk, what the fuck is wrong with C on a realistic level no memes allowed?

Also as a C noobie, I don't understand why there are so many broken functions in the std lib, seriously, I keep hearing conflicting arguments from everywhere saying that shit like scanf is broken malloc should never be used or whatever just lots of bullshit from both ends ("C is perfect" vs "C is fucking retarded")

My mind is full of fuck SOMEONE TELL ME THE TRUTH

C is broken and it actually is full of undefined behaviors.

C is neither perfect nor fucking retarded. It is simply obsolete.
Use D.

>NOT mainstream kernels, cryptography libraries or compilers.

I starting to believe that FF trims my posts.

Ex D fag here, D is certainly a better choice than C. However it followed some traits of C and inherited some unspecified behavior.

Thanks to C. I can even give you a proof right now right off my memory if you want to

ok pajeet

FUCK RUST

"Maybe insulting Rust's target market will work"
Horrible strategy shill.

Please do.

C stands for cancer.

C.ucks will defend this

Sorry buddy, but no.

I dont understand, is this going to be changed in the C2xx release or whatever? why the FFUCK has no one changed this problem if its so big?

Stable release released 16 feb >2017

surely this programming language is full of fuck since its literally in its infancy? Why is it better than everything else supposedly? Not much on wikipedia

import std.stdio;
void main(){
int n=99;
while (n!=2){
writeln("\n", n, " bottles of beer on the wall, ",
n, " bottles of beer.\n", "Take one down and pass it around, ",
--n, " bottles on the wall."); //

It hasn't changed for the last 30 years, it will never change. For the years to come, newer concepts of computing will be introduced, newer security designs will be introduced but C will forever be stuck in the 80's

If you notice, n-- and --n varies with compilers.

Please do not post anymore. Rust is not even decent.
The fact that you unironically advocate for Java over Fortran, C, and Caml is proof that Rust users can't be trusted.

So what the fuck does it mean, will it be eventually obsolete when devs say "fuck it no more of this bullshit" and system code/database shit will be written in another language?

And to fucking think that I bothered to start trying to get back into C in more depth

Fucking hell why cant there just be one programming language everything is fucking turing complete isnt it FUCK.

Every fucking language except for python seems like a meme but python is too FUCKING slow


AAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHH

>C _isn't_ code monkey abstraction
>LLVM IR _is_ code monkey abstraction
I wouldn't be surprised if you've never even touched assembly, you underage faggot.

The only reason it is still alive is legacy kernel codes are already written in it and nobody wants to touch that horrible pile of shit.

Why do you think Linux gets drivers later than windows?
Because Linus is a C purists and working with obsolete languages is fucking pain in the ass, specially if it's just not meant for modern programs.

But for now I would actually suggest that you learn a language that teaches you the basics of programming.

C is a good beginners' language. But if you hate C, D has a good book on programming and it's somewhat more decent than C.

Python is nice but you trade your performance with it. D is almost as much as productive.

top kek. Not even Java has this problem.

Binary expressions and function arguments are evaluated in strictly left-to-right order. This is similar to Java but different to C and C++, where the evaluation order is unspecified.

C.uck BTFO

I am actually a senior for my CS degree, I know how to 'problem solve' but its pretty funny because we haven't actually coded in a while now that I think of it, mainly my classes are all theory and shit, hardly done any programming since my first year.

I don't hate C or D, I acutally like the idea behind them because you can control things in fine detail. What I don't like is that theres so much broken shit so I see it as a piece of shit (ironically I don't know the language that well but the fact that people can argue over scanf being broken or not already pisses me the fuck off)

How good is D? Is it a meme or can I finally rest with no bullshit over broken subroutines such as scanf or whatever.

Jesus christ what a shit show. Tbh thinking of sticking with python and telling everything to fuck off cause I can't be fucked dealing with this

that's not ambiguos, she's just sleepy.

stuff like scanf is inferior to D's readf, it's got some sort of sanitizing iirc. D is comfy as fuck but you always have to deal with a mental dissatisfaction that it's still chained to C trash.

Rust is not a panacea to all the broken mess that C gives you. However it's just better ootb with no fucking around.

This is how bad you have to struggle with C if you are making a mission critical C program.

I'm not even scaring you, it's just reality. You trade your time and productivity with a few milliseconds of performance boost in C

#include
#include
#include
#include

extern int errno;
extern FILE *stdout;

int main(int argc, char** argv)
{
errno = 0;

int err = printf("Hello World\n");

if (err < 0) {
return EXIT_FAILURE;
}

err = fflush(stdout);

if (err < 0 || errno != 0) {
return EXIT_FAILURE;
} else {
return EXIT_SUCCESS;
}
}

>C grade simplicity

How come no one has just stopped the bullshit and just made a new language from scratch that isn't super focused on a single thing.

Like I don't even know what the fuck to do anymore, I have autism when it comes to this type of shit so I need to pick the "perfect" language but I know well enough that no such thing exists and languages should be picked for the task at hand, but I have autism.

I would like to pick one language to "main", like I know the back of my hand, was planning on choosing C but to be honest learning it is a piece of fuck, K&R is supposedly garbage, language has stayed the same for 30 years as a person pointed out

what the fuck?

And now D has a basis of C

Why can no one just stop this madness and create something that has fine details like C but not complete fuck?

Im so angry right now

They already did that. That language is C. If you made another bare metal language that's portable to every computer architecture, it would be exactly like C.

Why is C faster than other languages? Doesn't it all just become 1 and 0s? What makes it faster than python for example?

Usually, I'm defending Java, but what you're suggesting is downright retarded.

Compared to C, D is pretty based (picture related), see also: dlang.org/ctod.html
One more thing I love about it, is that chars (and as an extension of that, strings) are inherently UTF-8.

Sure, it's not perfect, but in my opinion preferable to C by lightyears. It might be more broken than I make it out to be, but as long as you don't use C functionality from the core.stdc modules you should be golden, at least library-wise.

...

- No garbage collection
- No array bounds checks
- No runtime type checks
- No OOP
- All control flow statements compile to raw machine instructions

Forgot picture desu
And if you don't have a C++ background instead of a C background, also take a look at this: dlang.org/cpptod.html

I'll admit thats fucking beautiful especially comparing it to what the bullshit would be in the C equivalent (which doesn't provide any useful information for it being 10x more complicated).

How are the compilers for D though? Is it optimized real well? How would you benchmark it against C?

Garbage collection?

Don't know anything about D

from ARMv5E to present day has had an optional memory guard feature. it's literally a two extra instructions per alloc to completely mitigate overruns yet I'm yet to see a single OS utilize it.

"As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub."

I pay my bills and live comfortably, and most of what I write is in CML, OCaml, Haskell, and Idris. Maybe I'm in an echo chamber, but it's a hundred thousand dollar a year echo chamber that doesn't involve me having to write or work with shit languages that I hate, so whatever.

Most benchmark collections put rust as a bit slower than Go, desu. Certainly not as fast as C except in a small minority of cases.

For 1 bottle of beer, it returns 'no more bottles of bear'. Not to get anal over one character being off, but ffs, that's why we're programmers.

Get your shit together. A person can read this and realize that it should say "beer" instead of "bear", but that's not how a fucking compiler or interpreter works, so get your shit together. I bet this shit took forever for you to debug, you sloppy bitch.

D is a fantastic language, what is lacks is proper static type checking, memory safety is skin deep(you often end up using native pointers which can explode and wreck your shit just like C) and most importantly there are no fucking libraries, you need to reinvent the universe every time.

tbqh family, Go is the most fun alternative right now. What it lacks is bare metal access, it's too safe, but that safety is what also makes it so versatile for everything but low level programming.

Gonna be honest, as someone who writes C every damn day, that C program is the stuff I dream of seeing every time I open some shitter's "C" library from shithub.

To this day, I've never seen code like that in the wild.

In before some ML/FP advocate chimps the fuck out because you implied Go was safe despite the fact that you can bypass its type system.

Better do the syscalls manually then you fucking faggot, lest you want someone to inject a phone home routine in your libc's malloc.
Or link a telemetry shared library like MS did with MSVC. Or just handle it on processor firmware.

I never understood what the importance of static type checking was besides making it easier for the programming to sort out errors.

After a while don't you just get used to doing the correct thing? I come from a python background but I can still keep track in my head what variables are what type, making python statically typed wouldn't even make a difference to me besides having to punch a few more letters

>Go

Isn't that the google made programming language or some shit? What is it actually used for mostly? I don't want to use something produced by pure evil(Google)

It's true that the libraries are lacking, but it's very easy in my experience to integrate with c/c++ libraries so there is at least some comfort to be found.

>you often end up using native pointers which can explode and wreck your shit just like C
Can't confirm (but it's just my experience)

>there are no fucking libraries
There's a whole repository of libraries and useful utilities: code.dlang.org/

Well D's type checking is enough in my opinion, D also has crazy powerful and highly usable metaprogramming facilities.

Not that guy, but I'm an unashamed Go faggot

Go is good for quickly putting together webservers or services, and that's what it's mostly used for in industry. I'd also say it's great for manipulating binary data (easily better than C/C++, at least), but I doubt many people other than me use it for that very often. Also, it's compiled to native code, has great cross compilation support, and is statically linked, so it's really easy to deploy a Go program.

As for Google, at least Go is totally open source, so you can make sure the Go compiler doesn't add anything evil if you're autistic enough

benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=go
seriously?

Static type checking is useful because it makes the memory layout for any given type, fixed. With a dynamic type system, any type casting is done at runtime, which means things get very complex when trying to debug why some value isn't what you expected it to be. In the case of static typing, the compiler can setup any casts as a fixed path that has predictable results and guarantees, also if any two types are incompatible you program wont compile and the tool(compiler) with a full map of the program can give you very clear messages as to why it wont work.

>Go
It was suppose to be a systems programming language like D, but it's now it's own class of "services language", it has very good networking libraries and concurrency primitives. Read up on channels if you want to try something new*(It's not a new concept at all but it's the least shit lang to try out green threads on).
thanks, haven't used D in years btw

Hey, faggot, have fun trying to do anything with dependent typing when you just "bypass the type system". Look, if you can get shit done in Go, and your job requires it, then by all means, do it in Go and enjoy the fact that you're a shit programmer with a shit job that encourages you to do shit that is shit.

Trying to break the type system is a fun little jack-offy thing to do with newer, type-heavy languages, but shouldn't be something you're doing commercially. That just means your language is shit.

Go is fucking gay, and anything that you can't write as a proof in Coq or B Specification is pleb-tier.

...

>you can make sure the Go compiler doesn't add anything evil if you're autistic enough

Okay, but nobody in OpenBSD realized that there were FBI backdoors until someone who got paid to put one in pointed it out, even though it's open source.

Chromium faggots may disagree, but none of them have manually parsed the whole code, because it'd take all day every day for like a year straight. If the source is huge enough, and the tomfoolery is obfuscated enough, nobody is going to notice. That's sort of the point of obfuscated code, and it isn't just a hobby.

Don't blame C, blame retaded programmers like you