Honestly, what's the point of learning a programming language other than x86 assembly...

Honestly, what's the point of learning a programming language other than x86 assembly? C is just an abstraction for people so they don't have to actually learn assembly. Assembly has just as much potential as C considering you could still use libraries of unassembled and preassembled code.
>inb4 lol no ur dum xd
I'm being completely serious and not baiting either. The only reason programming languages other than assembly exist is because people can't be bothered to learn it.

It all boils down to productivity.

humans are shit at utilizing hardware with programs

this

That includes readability, maintainability and portability.

How so? Is it because it is complicated?

hardware is not single core memory->registers or memory->single cache->registers anymore

there is a shitton of parallelism and layers of caches and hardware-specific details that you just can not really take advantage of without becoming a full time autist

the people who have to do other things than implement programs like research etc do not have time for that

and even autists are incredibly likely to fuck it up worse than a compiler would

Yes. Even if you have a guy who's an assembly god he's still more prone to introduce bugs and errors writing in assembly than in some other high level language. A business would spend more time debugging assembly code than higher level code and that means spending more money. Not to mention that one of the main points of higher level languages is being able to compile across platforms. x86 isn't the only prevalent architecture out there today.

> i am not baiting

A portable android app with native code has to be compiled to mips, arm and x86.

You'd have to port everything two times.

True, but couldn't there still be some kind of include file with subroutines for tasks like drawing on the screen or playing a sound? I guess I don't understand because I've already become full time autist.

For the cross compiling issue, couldn't there just be a standardized assembly syntax that is able to be turned into machine code for multiple architectures using an assembler that can read said syntax?

If you have nothing to contribute to the discussion, please leave.

>couldn't there just be a standardized assembly syntax
Then you defeat your purpose of developing against the original hardware. Why not just turn high level code into machine code across platforms?

Why not just write the machine instructions with 0's and 1's, since assembly is an abstraction over that?

>standardized assembly syntax

Nooo, you can't just unify all architectures.
Some have a lot of instructions that you can use (x86), and some have a very minimal set of them (mips). There's many situations when you want to target both of them ().

Good point with the original hardware, as for writing in binary, I was thinking assembly since it is the lowest abstraction of human readable code.

Assembly is not human readable.

But you can tell that MOV 0x7000, 15 would move 15 to memory address 0x7000, right? Or that JMP 0x8000 would jump to memory address 0x8000?

>For the cross compiling issue, couldn't there just be a standardized assembly syntax that is able to be turned into machine code for multiple architectures using an assembler that can read said syntax?
But there is.

>The only reason programming languages other than assembly exist is because people can't be bothered to learn it.

Assembly was not the first language, so this makes no sense. The only reason assembly exists is because people are too stupid to use combinatory logic or lambda calculus for everything.

If you want to do literally anything actually useful within a deadline. Modern C compilers are so good that performance is basically not an argument. C is cross architecture, faster to write, and a million times more readable.

PS this is bait even if you say it isn't

Unfortunately no, this is not bait but I do see what you are saying about C.

I accept that I was wrong and I'm glad we could all have a civil discussion. I understand now that C is the superior language based on readability and productivity.

>For the cross compiling issue, couldn't there just be a standardized assembly syntax that is able to be turned into machine code for multiple architectures using an assembler that can read said syntax?

It's called C.

>would move 15 to memory address 0x7000, right?
what 15? the byte, the word?

>performance is basically not an argument
yeah, right

>couldn't there just be a standardized assembly syntax
LLVM

>I'm being completely serious and not baiting either
sure.

If you want some retarded optimisation you can have inline ass embley in C anyway

1. Portability. It is not difficult to write a C program that will run the same on many platforms. Aside from being able to port to different operating systems, one also has the ability to port to different instruction sets. I'm not sure if you are aware of this, but ARM is a pretty damn popular platform, and many people would like their software to run on x86 and ARM, preferably with the same codebase. Same goes for Windows vs Linux, given that even on x86, there's different register calling conventions, and different methods of making a system call.

2. Performance. Simply put, most humans suck at writing assembly, and a C compiler can do it better. Even if they are good, however, time constraints might lead them to write some rather sloppy assembly code.

3. Security. If you think C is full of bad vulnerabilities waiting to happen, wait until you write assembly.

4. Productivity. It is just damned faster to write C than assembly, even if you're good at assembly. And you don't really lose anything except for a few edge cases that only make sense in kernel code anyways.

>hey im only gonna program in assembly!
>boy I sure am typing the same things over and over again every time I try to create an if loop! I better simplify this!
>boy it sure would be nice if I could make my programs more readable! I know! I'll replace instructions with words from the english language!
>boy it sure would be nice if I didn't have manually store every variable in a register in order to manipulate it! I know! I'll make variable declaration generic and hide all the register stuff behind more human-readable words and symbols!
>Uh-oh! I invented C!

I am writing some ARM64 assembly right now and desu I find it even easier than writing C because they have shortcuts like
cmp x0, x0 //set zero flag if equal
cbz function //jump to function if zero flag is on

this would take more to write in C
you also have ways to make vector and floating operations much much faster using the coprocessors this way

>you can have inline
nope

>we write software to make computers useful and easy
>but we can't make programming language / compilers to make programming useful and easy
mfw

in 2016 its more like
>fuck optimizations and leaving resources for other programs hardware is cheap and i dont wanna do work xd

The problem is you can't deal with a certain amount of complexity in Assembly. C and Fortran were answers on the first "software crisis" in the late 60s, when CPUs became so powerfull, that devellopers simply couldn't provide code that used the possibilities of such power and stays maintainable. Back then a lot of software projects simply failed, because at some point a tiny failure could bring the whole system down.

In 1980, NORAD reported that the US was under missile attack. The problem was caused by a faulty circuit. In 1983, a Soviet satellite reported incoming US missiles, but the officer in charge decided to follow his gut feeling that it was a false alarm and decided to do nothing.

In both cases, the human mankind was close to extinction. If the russian officer wouldn't have used it's common sense (tellign him that a full scale nuclear attack of the US was highly unlikely) and followed his orders, we would all be dead by now.


Programming is not about "making the fastest programm". Speed is one point and most of the time it's not even an important one. A faster programm is always better, but a fast programm that doesn't run correctly is good for nothing.

Also develloper time costs lots of money. Computing power is ridicullously cheap nowadays. It's just not worth to dick arround with a small scale instruction set, even if we COULD write programms with the given complexity.

Let's write a program that adds the numbers from 1 to 10 together and print out the result: 1 + 2 + ... + 10 = 55

Compare this:

00110001 00000000 00000000
00110001 00000001 00000001
00110011 00000001 00000010
01010001 00001011 00000010
00100010 00000010 00001000
01000011 00000001 00000000
01000001 00000001 00000001
00010000 00000010 00000000
01100010 00000000 00000000


To this:

sum = 0
for i in range(11): sum += i
print(sum)


Don't you see the advantages?

>2016
>not doing webdev in assembly