C is obsolete

gitlab.freedesktop.org/polkit/polkit/issues/74

Yet another security issue due to C's lack of type-safety. C doesn't have sumtypes unless you implement yourself with unions (even if you do, you have to make everyone else to agree to use your implementation of sumtypes which is not possible), C++'s std::optional and Rusts Option is a more type-safe alternative to traditional sentinel value. D has Nullable!T that does the same thing too.

There's no reason for polkit to be written in C while superior languages like C++, Rust and D exist. C is old, obsolete and not even self hosted these days.

Attached: 1539959093749.png (1834x1200, 639K)

Other urls found in this thread:

pastebin.com/YywvunQN
en.wikipedia.org/wiki/Basic4GL
twitter.com/SFWRedditGifs

It's another "bug means x is obsolete" edition.

Protip: there are still assembly developers out there that are paid upwards of a quarter million for their expertise

doing what?

>he thinks software that isn't baby proofed for his stubby diabetic hands makes it "obsolete"
Please throw yourself into a fire.

C is not a software, niggy

Not that guy, but software is anything that isn't hardware. Yes, that includes languages, otherwise what the fuck is a compiler?

Language, whatever. You're still a moron who thinks it's a good idea to baby proof things because you are literally incapable of doing things correctly in the first place.

>C++
>superior language

Attached: J.gif (154x171, 19K)

>doesn't know what he's talking about
>y-YOuRe sTiLl a mOrOn
lol get the fuck out of my thread, faggot

The bug is fucking hilarious. There is an assert checking if the input is valid. The assert triggers but freedesktop retardheads let it to execute with invalid parameters anyway.

Uhhh, writing assembly?

Jow Forumskit BTFO

>t. I'm too retarded to program please put in safety guards so I feel better

oooh, you must be one fuckin badass nerd for not needing any type-safety lmao

how long until a decent OS is written in rust?

am I wasting my time fucking around with C? I spent years on high level languages like ruby, clojure, erlang etc but recently have wanted to learn more about linux's internals and bootloaders and all that shit.

Should I just skip to rust? I know the fundamentals of C but I'm trying to actually get up to speed on idioms, the whole ecosystem and build tools etc.

you want training wheels, got it.

...

>am I wasting my time fucking around with C?
Yes. Move to C++.

doesn't C++ have all the same issues?

No, I'm just smart enough not to make retarded mistakes because I actually understand what shit compiles to, instead of just spamming compile like a literal code monkey.

Modern C++ is actually better. Just avoid using legacy pointers and C libraries.
Use STL, unique_ptr, shared_ptr etc and you are fine.

The only bad thing about C++ is that it sucks major balls in parsing or working with uni-codes and ranges.

So what am I supposed to use to write embedded firmware and other low level shit?

>having to type unique_ptr instead of *
absolutely disgusting

>because I actually understand what shit compiles to
What would this result to?
int x;
int y;
x = 4;
y = 10;
puts(++x + y - --x + y - !y * x++ + ++y*--y );

C++

Those two are different things

Shit like this is why I will never use Rust.

>*cricket noises*

Why would you even try to compile code with UB

So you don't know what your code compiles to?

I was going to disagree with you on that argument, then I realized OP is literally saying C is too simple and therefore obsolete. Yeah, simple things aren't going away any time soon. C, however, certainly isn't the optimal.

>pedantry
Fuck the big J, but I agree with you, C++ can't be called "superior" to C. It's a different language.

It's undefined behaviour, you fucking retard.
The compiler is free to output whatever the fuck it wants in the case of undefined behaviour.

all this shit prodused by people who cannot code buy love to learn something, but anyway cannot code

Attached: 8QUEENS_SCRIPTBASIC.png (556x504, 21K)

>It's undefined behaviour,
Just like 90% C codebase

The point here is that C is for lower level things. No one, not even (you) can really grok how the compiler works in everyday usage. It's too complex, from hardware to language extensions, to use effectively. For this reason, higher level languages are useful and should be used for everyday tasks so we don't make a giant heap of garbage all the time. However, C will never be replaced by these because more complex "safe" languages can't take its place.

same like wide spred of sexual deviations of people who cannot jist f-ck a girl

Attached: ___.png (256x56, 5K)

just use BASIC

C produces garbage too, you collect it by yourself, whereas C++, Rust and even D has RAII.

same like wide spred of sexual deviations of people who cannot just f-ck a girl

Attached: ZX_Spectrum_character_set.png (128x56, 1K)

Just because you samefag like a literal autist, doesn't mean everyone else is too. Also like a dumbfuck, you thought you were printing the summation of those values to output when you really are outputting the address of some random as fuck memory address, which will (in all likelihood) result in an exception occurring. However, I will operate on the false assumption that puts actually sends a string value to output instead for the sake of argument. Even when doing that though, you should note that your still outputting garbage.
pastebin.com/YywvunQN

>No one, not even (you) can really grok how the compiler works in everyday usage
Well yes, I can, because I've written my own basic one; as well as produce macros to be used with an assembler for outputing various Windows and Linux image file formats.

>RAII
i nned control initialisation and make it in propper time
cose it take time and anoing user

>string switches
>more knowledge than comparing C strings

That's a long way of spelling "No".

That's literally the assembly equivalent of your retarded as fuck broken and janky C++ code, you faggot.

No, not really, it isn't. Read the code again.

Nope still no reason to use Rust.
Just another good reason to not use systemd.

> Kernel vulnerability breaks out another day that could easily be prevented with compile time type-safety
> Nope no reason to use better languages, just don't use Linux

What kind of faggot uses polkit?
And this has nothing to do with C being obsolete, it's some retard's fault.

web dev

C has compile time type-safety.
Rust is trash, and only for people who need training wheels.

C is a weak typed language and has little to no type safety. C is used by peanut brain boomers that are too retard for types and ultimately see their projects crumble down from easily preventable errors.
Like this one for example

It's cheap and deterministic

>Weak typed
It's ok to be afraid of pointers, just not everyone is. You have to understand that when you come crying to strangers on the internet.
>type safety
Types need to match, I don't think you know what this is.

This bug is easy to prevent by sanitizing external input, as you always should. I'm ok with you using Rust, you sound insecure enough in your abilities that I would be uncomfortable with you being anywhere near pid 0. Then again I could say the same thing about my goldfish.

>HURR JUST BE SMARTER
You cniles never learn.

smard program do
1. memory allocation
2. all annitialisations
3. say to user "am ready"
RAII is f-cking shit, you dump nigger

Template syntax is elegant compared to function pointer syntax in C.

You claim to be a C expert yet apparently you've never been handling numbers in C.

Smard program that know allocation ahead of time use placement new or static allocation.

Smard program that need new runtime objects use a object pool (like boost pool).

Smard program have no-leaks and not cluttered with goto fail/cleanup

STRINGS, VECTORS, STL, BOOST
all this shit slow as f-ck
INSTEAD OF USING NAMSPASES CREATE MUH OBJECTS
then use em for creating memory leaks everevere

>Smard program that know allocation ahead of time use placement new or static allocation.
QUAKE alocate 32mb at start
>Smard program that need new runtime objects use a object pool (like boost pool).
all "object" live in this 32mb
>Smard program have no-leaks and not cluttered with goto fail/cleanup
when QUAKE done 32mb deallokated

Rust and go are arguably better for most applications, but who wants to fund rewriting all of that code in a new language?

C++ do exactly this too with placement new and custom memory allocation. Also all program 1990's video game engine for specific video game with predictable memory usage.

Chrome from now on allocate 32gb at startup and free at close for "C" style simplicity.

Also memory management 99% of all codebase.

>32gb
32mb and 32gb, feel the difference

32gb due to C++ bloat. Chrome memory usage from binary size. Maybe you be smart grug and make QUAKE engine render html and interpret javascript in 32mb.

STRINGS, VECTORS, STL, BOOST
all this shit slow as f-ck
INSTEAD OF USING NAMSPASES CREATE MUH OBJECTS
then use em for creating memory leaks everevere

You're welcome to program embedded systems using anything but C or ASM.

We have at least two of these a day. Some retarded c++ programmer or jealous rust programmer or functional weeabo saying that C is bad. C is obsolete. Fuck C. C++ better than C, etc. etc. C came out in 1972, thats right nigger. It's 46 years older than you. If you are using a language that is younger than you you better be at least 47 years old, or you have to take into account this large span of time C has reigned king in embedded and OS while its compilers grew stronger.

is that supposed to be a gotcha?

just use BASIC if (You) retarded for C and ASM
at least BASIC is memory effective

where? literally nowhere to use BASIC these days. Can I use it to program games? Wheres OpenGL for Basic

>Can I use it to program games?
en.wikipedia.org/wiki/Basic4GL

The rust language itself offers nothing new and is poorly implemented. So what's left besides marketing wank and the community full of shills who harass everyone.

Why is polkit a thing in the first place? Fuck red hat and their shitware.

C++ works fine.

i would just limit uids to 32bit and not give a fuck about it. who the fucks need more than 4 billion users in a system? this is not webapp

shitposting on Jow Forums

STRINGS, VECTORS, STL, BOOST
all this shit slow as f-ck
INSTEAD OF USING NAMSPASES CREATE MUH OBJECTS
then use em for creating memory leaks everevere

Vectors are very fast, what are you talking about, if you need a variable length array you wouldn't write a faster one of you tried. There's also std::array, exactly what it says on the tin. Other STL algorithms are quite fast as well. C++ strings suck balls though, not gonna lie.

>strings and vectors are slow

Attached: 0cbpdjii3pa11.png (645x729, 105K)

not
all this shit upredictable and slow and make memory leaks everevere

it have speed same like BASIC strings

is that slow?
a string is just an array
it doesnt have a very subjective implementation

yes, strings and vectors are slow

in comparison to what? do you have a faster dynamic array implementation?

>a string is just an array
magicaly allocated in maguc memory of miracle land of magic

>Protip: there are still assembly developers out there that are paid upwards of a quarter million for their expertise
Correct. I used to do assembly programming for a living.

Often embedded stuff, including DSP.
Crazed compiler writers fail to realise a skilled assembly programmer writes way faster and far more compact code than compilers can.

>do you have a faster dynamic array implementation?
yes, it static array

>magicaly allocated in maguc memory of miracle land of magic
the definition of a string doesnt say anything about memory allocation

not the same thing

Ranjesh pls.

so it allocated in magic memory of miracle land of magic

where your string is allocated can be completely predictable or left to a memory allocator

ho many memory allocators (You) writed in (You)r live?

too many to count

liar

the difficulty of writing a memory manager discourages the use of strings

Don't ask a question if you can't handle the answer
It's a common task if you're writing game engines