Fuck C

Fuck C

Attached: images.jpg (230x219, 6K)

Other urls found in this thread:

queue.acm.org/detail.cfm?id=3212479
github.com/facebook/zstd)
docs.oracle.com/cd/E19455-01/806-3773/instructionset-18/index.html
bytes.com/topic/c/answers/811548-accessing-flags
twitter.com/SFWRedditGifs

Attached: 1538845690005.gif (290x218, 1.03M)

>t. brainlet who just realized they were too stupid to do low-level programming.

>everything compiles in seconds
>single binaries for the most part
>fast
>easy to configure
nah fuck you

Implying low-level anything is worth shit
zoccerborg never wrote one line of c in his life and he's richer than you'll ever be
he built a fucking empire on a site made in php.

>comparing webdev shit to low-level

Attached: nigger.jpg (1128x780, 182K)

>Brainlet detected

Way to shift the goalposts there, buddy.

kill yourself just4kicks nigger

Fuck U

True High Level (Lisp Haskell)
False High Level (Python Ruby JS)
Low Level (C ASM)

Only one of these has the majority of their composition in brainlet grey matter.

>c
>low level

C can be used for low-level programming, but it's not a low-level language entirely.

Low level programming doesn't require you to be smart in any sense.

Attached: 2560px-Directed_acyclic_graph_2.svg.png (2560x2056, 135K)

More so than high-level programming certainly.

desu i would actually like low level programming if it wouldnt be done with c/c++.these two languages are the worst pieces of fucking shit languages to walk the earth.if rust would be popular that would be amazing

No, not really. Smart people spend their time in things smarter than allocating and freeing memory like a peanut brain low level monkey.

Attached: slide_6.jpg (960x720, 68K)

yeah bruh/sis, fuck C and that shit we love JavaScript here!

I know this is bait but I'll bite:

People who think this shit in real life are insufferable faggots who have 0 concept of how much abstraction there already is between them programming in "real" languages bare metal. The amount of abstraction that's achieved by going from logic gates to C is fucking astronomical, and you could probably never achieve writing a C compiler from bare metal in your entire life if it weren't for the work of hundreds of years of mathematicians working all this shit out for you. Comparatively, the jump from C to Python is minuscule in the grand scheme of things. Sure it might abstract away a few data structures and make things nicer to use, but it's nothing compared to carefully organizing bits of sand together in such a way that they perform actual computation.

Computer science and abstraction are tied together at the hip. Losers who can't understand that the continuous abstraction of mathematics is the very essence of computing are the most obnoxious fucking faggots in the world. The losers who can't understand that it's actually harder to think abstractly are the funniest of them all. Sure you can do the equivalent of hand-holding a modern abacus. You're not accomplishing anything by reinventing the wheel for the thousandth time, you're just doing it because someone needs some retarded shit to be fast, but you're not furthering the field of computer-science. You're not developing new fucking algorithms in C, you're implementing something that someone (far smarter than you) has already thought of in a slightly different flavor just so you can get a paycheck.

Actually Faceberg uses plenty of C/C++, more than that actually
they literally do VLSI just to increase the speed some network operations occur
In it's server backend
Where the real shit happens
And you'd never know

Ditto this for you senpai, you should see what low level really means.

For smart people, allocating and freeing memory isn't a problem

Actual smart people realize that there is no virtue nor advantage in managing memory manually, and thus avoid it.

no Fuck U

Exactly

Attached: LALR.png (980x1172, 143K)

>Comparatively, the jump from C to Python is minuscule
No, it isn't, it's the difference between "bare metal" and not. Everything is an object = internally, everything is a pointer to some kind of struct = zero cache locality. On top of that you have the Python VM jumping through memory to handle these objects, meaning even less locality. If you actually think cache locality is insignificant, you're retarded. There's things you simply can't even abstract away, as they're fundamental to CS.
If abstraction were as you say, CS would be taught as "press button, things happen", and when students questioned what happens underneath the button, they'd be ridiculed for "trying to reinvent the wheel" and told "smart people" have already abstracted away the bottom internals for them and all they need to do is press it. Retard.

If you really think all low level is just memory management, then stay in the world of the abstractions built for you. If it were up to you, the hardware would never improve, and neither would the software, at least after a certain point

It's critical for performance in memory-heavy tasks. Enjoy your cache misses thanks to GC and other abstractions.

Not him but are you purposefully going to deny the fact that the jump from hardware to C is much, much bigger than C to ?

>i have zero reading comprehension - the post

Manual garbage collection is still garbage collection.

>that the jump from hardware to C is much
C actually maps quite well to assembly instructions.

>implying i ever said all low level is memory management
God Jow Forums is retarded.
You can't write code that will perform faster than well written C++ with proper destructors, all of which doesn't have you bother with "manual memory management". But you are going to deny this anyway and keep wanking to your precious malloc and free.

Yeah you could easily hand compile C to Assembly
The lexing and parsing done by the compilers of both something like C and Python (or at least if Python was meant to be compiled) are largely the same operations.

Attached: the-fox-and-the-grapes.jpg (530x1104, 400K)

Memory management was indeed the only subject you addressed
no pun intended

What would be the "grape" in this case?

>logic gates == assembly
Please stop embarrassing yourselves. Machine instructions themselves are already an abstraction, and so is C.

Yeah, not to binary. Shut the fuck up clueless mongrel.

There no opportunity for a programming language to go any "lower" than machine code. Talking about microcode or even fucking transistors is stupid.

"Binary" is not a language, you dumb fuck.
What you're referring to is machine code, which (in principle, but not necessarily in practice) maps 1-to-1 with assembly.
Assembly is just a human-readable form of it.

I never said that, but I mean, you can step through an MMU's logic to reach the correct output of the machine, granted physics does this for you normally. So the only benefit is in the design rather than an example of doing it by hand

Assembly Instructions, ideally, do map directly to a string of "binary" data.

Rare copypasta

>There no opportunity for a programming language to go any "lower" than machine code.
False. Microcontroller firmware often deals with microinstructions.
>Talking about microcode or even fucking transistors is stupid
Not at all, since we are talking about abstractions. Saying that "high level" languages are "not close to the metal" is what is actually stupid, since assembly, and C even more so, is already a pretty fucking huge abstraction.

>brainlet retard finally discovers programming languages are way up in abstraction form the metal
lmao
>C maps near 1:1 to asm (which is false, of course)
>machine code maps 1:1 to asm (which again, is false)
Following your logic, do you mean to say C maps near 1:1 with machine code?

This

>>C maps near 1:1 to asm (which is false, of course)
Nobody said that.

Then fuck off with your myth of "C mapping to asm instructions quite well"

If you aren't programming in raw hexadecimal; you're a brainlet.

Nobody actually talking about why C is shit baka. There is too much to talk about though. There are so many critical design flaws in C it is literally impossible to write a single line of C without getting fucked by one.

I'm not denying anything. Programming is an abstraction over hardware, yes. But even then, you can understand exactly what makes C more performant than something like Python. You can, say, model speculative execution in C with a simple conditional statement and notice that by removing the statement, performance doesn't increase. So it's very close to hardware despite being an abstraction. Python is too far removed. The abstraction Python offers (it's literally a runtime VM) over C is significant and will always be so. There's no amount of abstraction that will change the fundamentals. That retard literally argues that because someone "smarter" than you has done something using a low-level concept, you shouldn't ever go that low and only ever use ever-growing abstractions. Except there's a baseline that will never change.

1. I have no idea how you got
> finally discovers programming languages are way up in abstraction form the metal
from my post, of course there is a difference
but abstraction is not something measured concretely, so your post makes no sense anyways
2. Machine code does, ideally, map 1:1 with asm, because for each assembly operation, there is a single operation performed by the machine

so yes, C maps NEAR 1:1 with machine code under most conditions, the actual output of the compiler can vary wildly, but operations such as the arithmetic and memory operators are directly mappable to assembly instructions (in most machines)

>not programming in base-2 ascii binary

>it is literally impossible to write a single line of C without getting fucked by one
Wrong. The theoretical safety of C is 100% safe. You can fuzz every single instruction, guaranteeing every single line of compiled C does what it should.
Complex programs and logic is what's unsafe, with too many corner cases to fully cover.

Without delving deep into its intrinsic flaws, I myself don't like C because there is almost no reason to use it for a new project anymore. There is almost always a better language for any use case.

>Microcontroller firmware often deals with microinstructions
This is a strawman. Comparing literal CPU firmware to a normal program is dumb.
>Saying that "high level" languages are "not close to the metal" is what is actually stupid
"Close to the metal" is referring to the lowest level you can go, which is machine-code and assembly. If you want to go lower level, go buy an FPGA, but that certainly is not a general-purpose CPU.
Knowing your retarded ass, you're going to start bringing up sand.

Every basic C "instruction" is something can be done very easily in assembly. Compiling C (before optimisations) should give a relatively predictable/unsurprising output in assembly.
Nothing C will do will cause a surprising amount of assembly to be generated.

>Not using the switches on the front panel of your computer to toggle bits
tsk

C is not a low level language

queue.acm.org/detail.cfm?id=3212479

python is significantly JIT'ed these days, I wouldn't be surprised if in come cases their performance is similar, or even if python beats C. Many python libraries are implemented in C anyways.

>C maps NEAR 1:1 with machine code under most conditions
Cool, can you show me how to change the direction flag in C? You can't?

high level (c, lisp, js, haskell, ruby)
low level (asm)

Your projects are useless garbage, then. Tell me, why would FB write its shiny new compression algorithm reference implementation in C if there's better languages? (github.com/facebook/zstd)

>It doesn't count if my argument fails
You sweet child

>almost no reason to use it for a new project anymore
- Performance is important
- ABI stability is important
- Portability is important
- You want to tap into the large pool of skilled C developers who can potentially contribute to your project
- You don't want to waste your time with the flavour-of-the-month memelang and waste a shitload of your time an effort, when it will become irrelevant in 6 months

>not mapping dance-dance-revolution mats to CPU registers in GDB

Dude
docs.oracle.com/cd/E19455-01/806-3773/instructionset-18/index.html

>large pool of skilled C developers
ahahah

>cpython is jit compiled
>python beats C
This is a new level of retardation.

Attached: 1424859285172.jpg (250x250, 8K)

based

C is hardly low level.

C is a nonstarter if you have to do anything abstract. Need unicode strings? Nope. Need threading where the api doesn't make you cast function pointers or other insane horrible shit? Nope. Need numbers >64 bits? Nope. Need anything web related? Nope. Need a complex hierarchy of data? Nope. Need a data structure other than an array of pointers? Nope.

C is pointless for anything that isn't extremely low level or resource constrained.

>Get told to do something in C because C is literally asm 1:1
>posts an asm reference
lol
Yes, it can actually beat C if not achieve similar performance.
I know

Linus Torvalds published a study that demonstrated C keeps retards away.

Anything remotely interesting is resource constrained

Sorry, wrong link
There are a few suggestions here
bytes.com/topic/c/answers/811548-accessing-flags
Alternatively, you can use inline asm, which is supported by GCC

Looks like it attracts a lot of clueless retards, reading this thread.

use BASIC

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

>bytes.com/topic/c/answers/811548-accessing-flags
>first post
>"There is no standard way of doing that in C"
ahahah
>Alternatively, you can use inline asm, which is supported by GCC
>Can't do it in C so you have to write asm
So C isn't 1:1 with asm? Who the fuck knew?
you FUCKING mongrel

True High Level (Prolog Coq)
False High Level (Lisp Haskell)

>Yes, it can actually beat C if not achieve similar performance
No, it cannot, stop spewing nonsense. The only thing that outperforms C is hand-written assembly.

C isn't even 1:1 with asm
Let alone logic gates. Stop conflating C with the so-called "bare metal"

I said NEAR 1:1
did I not?
And can you do pointer arithmetic as if the pointer were any other piece of data in a register, as you can in asm? Yes.
So you really just need to read what I wrote don't you?

>Performance is important
Modern C++ for general-purpose HPC and Fortran for scientific computing are superior choices.
>ABI stability is important
Technically, C has no de iure standard ABI, but I agree that there is one in practice, and that's the only valid reason to use C. Titanium is steadily improving, though.
>Portability is important
Writing truly portable C is not as easy as most people believe, but yes, a c compiler is usually easier to implement than most other languages. That doesn't mean one shouldn't implement another language as soon as he can.
>You want to tap into the large pool of skilled C developers who can potentially contribute to your project
You could say that for many other languages as well.
>You don't want to waste your time with the flavour-of-the-month memelang and waste a shitload of your time an effort, when it will become irrelevant in 6 months
Again, C is not the only language that can achieve this.

I read a study somewhere that also shows that using C leads to being CoC'd, but I can't find it right now...

Also, you could actually read more than just the first post of that form.

>You could say that for many other languages as well.
It's certainly not true for new memelangs like Rust or deadlangs like D.
Also, C++ programmers are literally the opposite of skilled. I don't want them near my projects.

>I said NEAR 1:1
Sounds like mental gymnastics to me.
The shitty fizzbuzz you write in C, is astronomically abstracted from hardware. Stop drowning in the pool of stupidity and read a book.
average C tard

>I don't want them near my projects.
Hate to break it to you buddy, but no one wants your LED flinging project

Lots of argument by obscurity and shitty analogy in this thread.

More like
High level (c, lisp, js haskell, ruby, forth)
Low level (asm, forth)

First off, you want to talk books?
I'll let you in on a secret one of the first textbooks on Assembly I ever read was about how Assembly interacts with Compilers, not just C++, but also Java.
And I'll tell you something else.
If you want to read a book you should go read the actual assembly docs for the x86
Have you? Because I have.
Have you ever needed to know what a packed word addition is? No. Can a comprable C program directly use it to replace a for loop of 4 words in a 64 bit system? Yes
So how about you suck my dick?

If you have a conditional branch in a tight loop in C, you typically don't need to address it as the CPU will perform speculative execution - any abstracted language that doesn't represent the same loop as a 1:1 branching pipeline will not see this code/CPU relationship. If you write a bit array in C, you will gain performance even despite increasing the number of instructions by needing to mask, as cache locality improves - the same can't be said for more abstracted languages that hide memory from the user. That C is so abstracted but still low-level enough to be this close to hardware is what people mean by "bare-metal".

True High Level (Prolog Coq)
False High Level (Lisp Haskell)

accommodating your childish tantrum (stemmed from your realization that you lack knowledge) is not a good use of my time.

What did he mean by this?

Not technically, bare metal refers to any program which has the ability to perform bootstrapping operations without the aid of an OS
C is the best language to express that bit fiddling, but other compiled languages can do it to.

Prolog is trivial to implement in Lisp, so that doesn't count.

If you like Coq I'm willing to allow it in the list.

3 words
reread my post
btw, I'm not starting arguments online
I'm finishing them

True High Level (Prolog Coq)
BASIC level (ruby, PHP, perl, JS)
CS tardness level (Lisp Haskell)

True High Level (Prolog Coq)
BASIC level (ruby, PHP, perl, JS, Python)
CS tardness level (Lisp Haskell)

Attached: KIDDY_SECRETS.jpg (1500x1069, 199K)

DO THIS WITH LATEX
BASED
FUCKING
C
LITERALLY COMPILING A DOCUMENT 10 FUCKING TIMES A SECOND. 600 FUCKING TIMES A MINUTE
NO FUCKING DEPENDENCIES
5MB BINARY

Attached: lout-2018-12-09_21.42.29.webm (1600x900, 1.54M)