Why would you want more than machine language?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
trident
Member
Member
Posts: 50
Joined: Tue Nov 18, 2014 10:02 am

Why would you want more than machine language?

Post by trident »

http://worrydream.com/dbx/ wrote: Reactions to SOAP and Fortran
Richard Hamming -- The Art of Doing Science and Engineering, p25 (pdf book)

In the beginning we programmed in absolute binary... Finally, a Symbolic Assembly Program was devised -- after more years than you are apt to believe during which most programmers continued their heroic absolute binary programming. At the time [the assembler] first appeared I would guess about 1% of the older programmers were interested in it -- using [assembly] was "sissy stuff", and a real programmer would not stoop to wasting machine capacity to do the assembly.

Yes! Programmers wanted no part of it, though when pressed they had to admit their old methods used more machine time in locating and fixing up errors than the [assembler] ever used. One of the main complaints was when using a symbolic system you do not know where anything was in storage -- though in the early days we supplied a mapping of symbolic to actual storage, and believe it or not they later lovingly pored over such sheets rather than realize they did not need to know that information if they stuck to operating within the system -- no! When correcting errors they preferred to do it in absolute binary.

FORTRAN was proposed by Backus and friends, and again was opposed by almost all programmers. First, it was said it could not be done. Second, if it could be done, it would be too wasteful of machine time and capacity. Third, even if it did work, no respectable programmer would use it -- it was only for sissies!


John von Neumann's reaction to assembly language and Fortran
John A.N. Lee, Virginia Polytechnical Institute

John von Neumann, when he first heard about FORTRAN in 1954, was unimpressed and asked "why would you want more than machine language?" One of von Neumann's students at Princeton recalled that graduate students were being used to hand assemble programs into binary for their early machine. This student took time out to build an assembler, but when von Neumann found out about it he was very angry, saying that it was a waste of a valuable scientific computing instrument to use it to do clerical work.
Is true that a real programmer would not stoop to wasting machine capacity to do the assembly?

If is true that a real programmer would not stoop to wasting machine capacity to do the assembly, is an unfortunate fact the real programmers do use to wasting machine capacity to do the assembly, compilers...
User avatar
max
Member
Member
Posts: 616
Joined: Mon Mar 05, 2012 11:23 am
Libera.chat IRC: maxdev
Location: Germany
Contact:

Re: Why would you want more than machine language?

Post by max »

Reminds me of this: http://www.catb.org/jargon/html/story-of-mel.html

It might have made sense back when compilers where stupid. But nowadays, its much more efficient to use a compiler than *anything* else.
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Re: Why would you want more than machine language?

Post by mathematician »

Real programmers use whatever language is the most convenient for the job in hand. If you had a new processor, for which no compiler or assembler yet existed, that might even be machine code.

Von Neumann might have been talking at a time when computers cost £6 million a piece, needed a small power station to keep them going, and graduate student time cost peanuts.
The continuous image of a connected set is connected.
trident
Member
Member
Posts: 50
Joined: Tue Nov 18, 2014 10:02 am

Re: Why would you want more than machine language?

Post by trident »

If anyone is interested to answer me through of private message, please, don´t hesitate to send me private messages, I ask this because I am very interested about this subject.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Why would you want more than machine language?

Post by iansjack »

You've already raised this topic in a previous post.
User avatar
Arto
Member
Member
Posts: 44
Joined: Wed May 15, 2013 5:49 pm
Location: Berlin
Contact:

Re: Why would you want more than machine language?

Post by Arto »

This notion of "real programmers" has more than a passing resemblance to the "No true Scotsman" fallacy:
https://en.wikipedia.org/wiki/No_true_Scotsman wrote:No true Scotsman is an informal fallacy, an ad hoc attempt to retain an unreasoned assertion. When faced with a counterexample to a universal claim ("no Scotsman would do such a thing"), rather than denying the counterexample or rejecting the original universal claim, this fallacy modifies the subject of the assertion to exclude the specific case or others like it by rhetoric, without reference to any specific objective rule ("no true Scotsman would do such a thing").
Developer of libc11
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Why would you want more than machine language?

Post by DavidCooper »

trident wrote:If anyone is interested to answer me through of private message, please, don´t hesitate to send me private messages, I ask this because I am very interested about this subject.
I don't quite understand what your interest in this is. There are many different ways to write computer code, but all of them involve taking a high-level program (at the level of thought and similar to natural language) devised in the head of the programmer and then converting it into a form that can run either directly or indirectly (i.e. after further convertion) on a processor. With one exception, writing the code is the easy part of the process regardless of the programming language used - it's coming up with the original high-level version of the program that's hardest. The exception to this is the case where you're working directly in machine code without any system for automating the process at all - that would be an insane way to work if you're trying to build anything big because you'd have to spend almost all your time mending broken links every time you make little edits to your code which push other code out of position.

In the early days, machine code was the only option, but that changed once assemblers were written. I program directly in machine code, but the first thing I did was write code to create an indexing system so that whenever I move code around all the links are adjusted automatically each time to keep it all working - this provides me with similar efficiency to working through assembler, and the indexes also make it easy to link up modules of code and to relocate them in machine memory. Most programmers don't want to work at that low level though, and it has nothing to do with them not being able to hack it - they simply want their code to be more portable, easier for other people to understand (someone else may have to maintain their code after they've moved on from a project) and they also like some of the features of high-level programming languages that prevent them from making mistakes. Compilers tend to produce bloated code, but it runs fast without needing to be carefully crafted by the programmer, and all of that saves astronomical amounts of time and money.

The portability issue is the one that should concern you the most, because it might only take one new innovation to render your favourite instruction set extinct, and that will destroy your project unless you have an efficient way of converting all your code to run on a new processor. For this reason, almost all programmers should use machine code or assembler as little as possible. The main exceptions are programmers who are writing the first tools for a new processor, probably starting by writing an assembler and then using that to write a compiler.

In my case, I'm using machine code for a different reason - I'm using it to build a system which will be capable of porting itself to other platforms by rewriting itself in the machine code of any other processor (and even if x86 processors become extinct, existing machines will be around for long enough for me to get to this point without ever having to port a byte of code myself). Importantly though, the process when porting it to a different kind of machine will not be to start from the existing machine code and to translate that (because that would create a mess), but to work from the high-level version of the program from which the existing machine code was generated in the first place, and that essentially means working from a precise natural language description of what the program does. So, even though I appear to be doing all my work in machine code, I'm actually visualising the final system working at a higher level than existing high-level programming languages. My initial aim is to create an operating system (or AGI system) intelligent enough to be able to take natural language instructions and turn them into machine code programs, initially to run on x86 processors, but later it will learn how to do the same for any other platform. I don't want the system to take long, bulky diversions through intermediate programming languages, but for it to write machine code directly, and that's why I originally chose to work directly with machine code - I wanted to write code the same way that the intelligent system will as that would give me a better idea of what it is that I need to program the intelligent system to do. What I have discovered along the way is that programming in machine code is both efficient and comfortable once you have the right tools to support it, but unless you have a radical escape route planned for a time when you have to port your code to other platforms, you risk painting yourself into a corner and sidelining yourself from the action for a long time.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Why would you want more than machine language?

Post by Brendan »

Hi,
trident wrote:Is true that a real programmer would not stoop to wasting machine capacity to do the assembly?
Once upon a time, computers were massive things that filled rooms and were built with vacuum tubes. Vacuum tubes have high failure rates and you needed thousands of them; which means it took a whole lot of time and money just to keep a computer running (e.g. the cost of lost work when a tube fails in the middle of something, the cost of someone finding that failed tube and the cost of the replacement).

If it cost you an average of $1 per instruction (adjusted for inflation), would you spend $10000 just to run an assembler?


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
trident
Member
Member
Posts: 50
Joined: Tue Nov 18, 2014 10:02 am

Re: Why would you want more than machine language?

Post by trident »

http://worrydream.com/dbx/ wrote:
Reactions to SOAP and Fortran
Richard Hamming -- The Art of Doing Science and Engineering, p25 (pdf book)

In the beginning we programmed in absolute binary... Finally, a Symbolic Assembly Program was devised -- after more years than you are apt to believe during which most programmers continued their heroic absolute binary programming. At the time [the assembler] first appeared I would guess about 1% of the older programmers were interested in it -- using [assembly] was "sissy stuff", and a real programmer would not stoop to wasting machine capacity to do the assembly.[/quote]


Richard Hamming changed his mind about Assembly?


http://worrydream.com/dbx/ wrote:
John von Neumann's reaction to assembly language and Fortran
John A.N. Lee, Virginia Polytechnical Institute

John von Neumann, when he first heard about FORTRAN in 1954, was unimpressed and asked "why would you want more than machine language?" One of von Neumann's students at Princeton recalled that graduate students were being used to hand assemble programs into binary for their early machine. This student took time out to build an assembler, but when von Neumann found out about it he was very angry, saying that it was a waste of a valuable scientific computing instrument to use it to do clerical work.[/quote]

Johnny von Neumann changed his mind about FORTRAN, assembler and machine language?
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Why would you want more than machine language?

Post by Brendan »

Hi,
trident wrote:http://worrydream.com/dbx/ wrote:
Reactions to SOAP and Fortran
Richard Hamming -- The Art of Doing Science and Engineering, p25 (pdf book)

In the beginning we programmed in absolute binary... Finally, a Symbolic Assembly Program was devised -- after more years than you are apt to believe during which most programmers continued their heroic absolute binary programming. At the time [the assembler] first appeared I would guess about 1% of the older programmers were interested in it -- using [assembly] was "sissy stuff", and a real programmer would not stoop to wasting machine capacity to do the assembly.
Richard Hamming changed his mind about Assembly?
I'm not sure if he originally thought symbolic assembly was a bad idea and then changed his mind; or if he thought symbolic assembly was a good idea when he first heard the idea.

Here's another excerpt from the PDF version of the book Richard Hamming wrote:

"I once spent a full year, with the help of a lady programmer from Bell Telephone Laboratories, on one big
problem coding in absolute binary for the IBM 701, which used all the 32K registers then available. After
that experience I vowed never again would I ask anyone to do such labor. Having heard about a symbolic
system from Poughkeepsie, IBM, I ask her to send for it and to use it on the next problem, which she did.
"

trident wrote:http://worrydream.com/dbx/ wrote:
John von Neumann's reaction to assembly language and Fortran
John A.N. Lee, Virginia Polytechnical Institute

John von Neumann, when he first heard about FORTRAN in 1954, was unimpressed and asked "why would you want more than machine language?" One of von Neumann's students at Princeton recalled that graduate students were being used to hand assemble programs into binary for their early machine. This student took time out to build an assembler, but when von Neumann found out about it he was very angry, saying that it was a waste of a valuable scientific computing instrument to use it to do clerical work.
Johnny von Neumann changed his mind about FORTRAN, assembler and machine language?
John von Neumann died in 1955, and I doubt the cost of computation had improved enough between 1954 and 1955 to make assemblers/compilers cheaper than getting students to do it for him for free.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
trident
Member
Member
Posts: 50
Joined: Tue Nov 18, 2014 10:02 am

Re: Why would you want more than machine language?

Post by trident »

Brendan wrote:Hi,
trident wrote:http://worrydream.com/dbx/ wrote:
Reactions to SOAP and Fortran
Richard Hamming -- The Art of Doing Science and Engineering, p25 (pdf book)

In the beginning we programmed in absolute binary... Finally, a Symbolic Assembly Program was devised -- after more years than you are apt to believe during which most programmers continued their heroic absolute binary programming. At the time [the assembler] first appeared I would guess about 1% of the older programmers were interested in it -- using [assembly] was "sissy stuff", and a real programmer would not stoop to wasting machine capacity to do the assembly.
Richard Hamming changed his mind about Assembly?
I'm not sure if he originally thought symbolic assembly was a bad idea and then changed his mind; or if he thought symbolic assembly was a good idea when he first heard the idea.

Here's another excerpt from the PDF version of the book Richard Hamming wrote:

"I once spent a full year, with the help of a lady programmer from Bell Telephone Laboratories, on one big
problem coding in absolute binary for the IBM 701, which used all the 32K registers then available. After
that experience I vowed never again would I ask anyone to do such labor. Having heard about a symbolic
system from Poughkeepsie, IBM, I ask her to send for it and to use it on the next problem, which she did.
"

trident wrote:http://worrydream.com/dbx/ wrote:
John von Neumann's reaction to assembly language and Fortran
John A.N. Lee, Virginia Polytechnical Institute

John von Neumann, when he first heard about FORTRAN in 1954, was unimpressed and asked "why would you want more than machine language?" One of von Neumann's students at Princeton recalled that graduate students were being used to hand assemble programs into binary for their early machine. This student took time out to build an assembler, but when von Neumann found out about it he was very angry, saying that it was a waste of a valuable scientific computing instrument to use it to do clerical work.
Johnny von Neumann changed his mind about FORTRAN, assembler and machine language?
John von Neumann died in 1955, and I doubt the cost of computation had improved enough between 1954 and 1955 to make assemblers/compilers cheaper than getting students to do it for him for free.


Cheers,

Brendan

Why Richard Hamming vowed never again would I ask anyone to do such labor?

I asked to Schol-R-Lea put all or part of the private messages that he sent me about machine code and Assembly.
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: Why would you want more than machine language?

Post by Schol-R-LEA »

OK, I'll post some excerpts from the PM thread, I guess, but I am finding it hard to see why you are having so much trouble understanding the reasons why machine code programming fell out of favor. To be honest, I'm posting this more for the others on the board, mainly because I think most of them are beginning to suspect you are either trolling us, or are in fact actually a chatterbot hooked up to the forum :roll:

----------------------------------------------------------------------------------------------------------------------------------------
[T]here pretty much never is any reason to work in hex or octal representations of machine code directly - unless you choose to. It's always possible, but unless you have the sort of prodigious memory and endless patience of Real Programmers of old, such as the aforementioned Mel Kaye, trying to is likely to push you to the nut house.

Keep in mind that hex, octal, and even binary are just human readable representations of the actual electrical signals - they exist in the software, not the hardware (OK, sometimes they are in the ROM, but that's just software that can't be altered). Given that, and given that assembly language is (more or less) a direct analog of the machine code in a form far more easily read and remembered by humans, it makes little sense to use hex programming unless absolutely necessary - which as I said, should never be the case.

Now, if you were writing an assembler (as I am), you would have to at the very least know how the different opcode fields are encoded, in order to assemble the instructions into machine code, but even then, you wouldn't usually need to know the individual opcodes themselves - you'd have a table of them which the assembler would map to the different addressing modes or what have you.

Also, you may at times find it useful to use hex, octal, or binary representations of data when working in assembly language, but that's a separate issue entirely.

----------------------------------------------------------------------------------------------------------------------------------------
trident wrote:Oh Schol-R-LEA , I fell in love for history of Mel Kaye style hex coding!

What are the other stories of Real Programmers of old that developed in hex or octal representations of machine code directly?
Hmmn, I'm going to have to see what I can find. I do know that there is at least one OS developer on this board that works in machine code regularly, and developed his OS entirely in it with some specialized tools he crafted himself. I'm not sure who it is off hand, though. [NB: it apparently is DavidCooper, given his response above.]

----------------------------------------------------------------------------------------------------------------------------------------
trident wrote:Thank you very much.

The Real Programmers of currently develop in what language?

Please speak examples of names of Real Programmers of currently.
Eh? The term 'Real Programmer' is something of a joke, and at the same time something of a badge of honor - it means you were there in the old days when people actually did that kind of programming. There really aren't any current Real Programmers because that's not what the term is for.
----------------------------------------------------------------------------------------------------------------------------------------
trident wrote:The aforementioned Mel Kaye is also a joke?
Oh, no, at least not in the sense of it being made up. Mel Kaye was a real person, and the story that Nather related was very definitely true. When I say it was a joke, I mean that it is something which modern programmers talk about with a combination of awe and humor - sort of like the way someone might speak of a person who memorizes π to the 10,000th digit. I mean, it is an impressive feat, and one that leads to a certain amount of envy or admiration, but at the same time, why would you bother? Now, when Mel Kaye was around, the argument could be made for it - computers were slow, memories were small, and computer time precious enough that even running an assembler was often viewed as a costly move - but the situation today is very different indeed.

In 1954, one could argue, as Johnny von Neumann famously did with one of his students, that the computer time was more valuable than programmer time, and that even writing an assembler was wasteful - the MTBF for the machine was shorter than the assembly time for a long program:
http://worrydream.com/dbx/ wrote:John von Neumann, when he first heard about FORTRAN in 1954, was unimpressed and asked "why would you want more than machine language?" One of von Neumann's students at Princeton recalled that graduate students were being used to hand assemble programs into binary for their early machine. This student took time out to build an assembler, but when von Neumann found out about it he was very angry, saying that it was a waste of a valuable scientific computing instrument to use it to do clerical work.
That state of affairs did not last very long, though. Even by the mid-1960s, hand-coding machine code was becoming a lost art, and few regretted that fact. Today, even a moderately optimizing compiler can outperform most hand-coded assembly on a long program, simply because the compiler has a better memory and attention span than the human programmer does - while a talented assembly programmer can out-do a compiler in a small part of the program, humans can be forgetful, impatient and/or tired, which machines cannot.
----------------------------------------------------------------------------------------------------------------------------------------
trident wrote:This subject is irresistible to me,I like so much of this issue that get out tears out of my eyes.

Why that state of affairs did not last very long, though?
Because assembly language made it unnecessary, and made it clear how error-prone hand-assembling programs was. As high-level languages became available and effective, it also became clear that there were abstractions which, while certainly expressible in machine code, could not readily be used by someone trying to write in hex or octal directly.
trident wrote:
Schol-R-LEA wrote: Even by the mid-1960s, hand-coding machine code was becoming a lost art, and few regretted that fact.


Why few regretted that fact?
Seriously? Well, for one thing, because it made it possible for people of ordinary skill to write complex programs without needing an exceptional memory and monk-like patience to get very far. Machine code is simply a bad way for humans to express ideas, and having the computer do the drudgery of converting high-level abstractions into said machine code was only sensible.

Second, it separated the programmer from the details of the specific system they were writing code for, making it easier to reason about the programs and how they worked without always having to focus on which bit you have to set in order to turn on the disk drive read head. It made it possible to write programs that ran on different kinds machines, or even machines of the same type with a different configuration.

A third reason is simply that the computer is better at it than we are: [at this point I quoted what I'd said above about compilers not suffering from human weaknesses]

----------------------------------------------------------------------------------------------------------------------------------------
Schol-R-LEA wrote:
trident wrote:Johnny von Neumann changed his mind about FORTRAN, assembler and machine language?
Not as far as I know, but then he only lived to 1957. By the time he would have had a chance to see the newer languages, he was already terminally ill with cancer, so he probably never changed his opinion.
trident wrote:Because programmers become the machine code in a lost art?
Because assembly language made it unnecessary, and made it clear how error-prone hand-assembling programs was.
trident wrote:I can not understand.

You said that even by the mid-1960s, hand-coding machine code was becoming a lost art, and few regretted that fact.

Then you said that few regretted that fact because assembly language made it unnecessary, and made it clear how error-prone hand-assembling programs was.

How is can that few regretted that fact because even by the mid-1960s, hand-coding machine code was becoming a lost art and at the same time regretted that fact because assembly language made it unnecessary, and made it clear how error-prone hand-assembling programs was?

I understood that few lamented this fact because they continued believing that machine code and assembly language continued being necessary.
Sorry, the phrase 'few regretted the fact' is an English language colloquialism, with the emphasis on the word 'few'. It is in fact an example of understatement; it means, 'almost nobody regretted the fact except a handful of cranks'.

By 1965 or so, no one of any importance thought it was still necessary to write hand-coded machine code in hex or octal, and even assembly language was largely seen as unnecessary except for certain limited purposes. While assembly programming of applications lingered on into the early 1980s for the sake of efficiency, most programming was done in high-level languages, and as compilers got more efficient (and machines grew ever more powerful) regular use of assembly faded into history.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
trident
Member
Member
Posts: 50
Joined: Tue Nov 18, 2014 10:02 am

Re: Why would you want more than machine language?

Post by trident »

Schol-R-LEA wrote:OK, I'll post some excerpts from the PM thread, I guess, but I am finding it hard to see why you are having so much trouble understanding the reasons why machine code programming fell out of favor.
Schol-R-Lea

The difficulty that I have is that I suspect very that the real programming always was and continues to be the programming in machine code.

If Richard Hamming said the truth when he said that a real programmer would not stoop to wasting machine capacity to do the assembly, I suspect very that always been waste and continues to be wasting the machine capacity to do the assembly.
Reactions to SOAP and Fortran
Richard Hamming -- The Art of Doing Science and Engineering, p25 (pdf book)

At the time [the assembler] first appeared I would guess about 1% of the older programmers were interested in it -- using [assembly] was "sissy stuff", and a real programmer would not stoop to wasting machine capacity to do the assembly.
If John Von Neumann had reason when he asked " "why would you want more than machine language?" and when he was very angry, saying that it was a waste of a valuable scientific computing instrument to use assembler to do clerical work, I suspect very that the assembler and FORTRAN always was unnecessary and continues to be unnecessary.
John von Neumann's reaction to assembly language and Fortran
John A.N. Lee, Virginia Polytechnical Institute

John von Neumann, when he first heard about FORTRAN in 1954, was unimpressed and asked "why would you want more than machine language?" One of von Neumann's students at Princeton recalled that graduate students were being used to hand assemble programs into binary for their early machine. This student took time out to build an assembler, but when von Neumann found out about it he was very angry, saying that it was a waste of a valuable scientific computing instrument to use it to do clerical work.
If Mel Kaye had reason when he didn't approve of compilers and “optimizing assembler” to write in hex code , I suspect very that the compilers and “optimizing assemblers” always was unnecessary and continues to be unnecessary.
Mel didn't approve of compilers.

“If a program can't rewrite its own code”,
he asked, “what good is it?”

Mel had written,
in hexadecimal,
the most popular computer program the company owned.
It ran on the LGP-30
and played blackjack with potential customers
at computer shows.
Its effect was always dramatic.
The LGP-30 booth was packed at every show,
and the IBM salesmen stood around
talking to each other.
Whether or not this actually sold computers
was a question we never discussed.


Mel loved the RPC-4000
because he could optimize his code:
that is, locate instructions on the drum
so that just as one finished its job,
the next would be just arriving at the “read head”
and available for immediate execution.
There was a program to do that job,
an “optimizing assembler”,
but Mel refused to use it.

“You never know where it's going to put things”,
he explained, “so you'd have to use separate constants”. http://www.catb.org/jargon/html/story-of-mel.html
Why existed the reasons why machine code programming fell out of favor?



If I'm wrong, please correct me.

I did not want to disrupt the forum, I will not put in OSDev.org other topic about binary code.

Please sorry.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Why would you want more than machine language?

Post by Combuster »

trident wrote:... was unnecessary and continues to be unnecessary.
Therefore, you carry no metal, walk around in a piece of hide and have no house but a cave, because what was normal in the stone age continues to be best practice now.


That's the only argument you make, and you insist on repeating it.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: Why would you want more than machine language?

Post by Schol-R-LEA »

Again, this was originally from PM, but I figured it made sense to share it.
trident wrote:Because assembly language made it unnecessary, and made it clear how error-prone hand-assembling programs was?

Because by 1965 or so, no one of any importance thought it was still necessary to write hand-coded machine code in hex or octal?

Because even assembly language was largely seen as unnecessary except for certain limited purposes?


If you find better not answer, please at least tell me why you prefer not to answer.
The main answer is that machine code is just very difficult for humans to work in, compared to assembly, and is a poor medium for expressing abstract concepts because of its extremely tight coupling with the details of the CPU. Similarly, assembly language in turn is both harder and less expressive than higher-level languages.

Also, the cost of computer time and the cost of programmer time have changed over the years. When a computer cost several million dollars and had a MTBF of hours, running an assembler was an expensive proposition and one likely to fail outright if the hardware stopped working; it made sense to write out the assembly code on paper and then hand-assemble the code. However, hand-assembly is a time-consuming and error-prone proposition. As computers became less expensive, more common, and more reliable, the cost-benefit ratio changed. Using the computer to perform the assembly process now was more reliable, faster, less costly, and yes, more efficient than hand-assembling the code.

Furthermore, programming was becoming a skill that was in demand outside of the small circle of graduate students and professors, and the cost of programmer time rose steeply over the years. Any tool that reduced the time and effort of writing programs was desirable from a practical perspective.

Also, by removing the very low-level details of the system from the programming process, it became easier to express complex programs. Programs which wouldn't have been possible to write for the earlier systems due to limited memory and speed were becoming commonplace, but hand-assembly would have made this too difficult a process to be practical.

Finally, as assembly programs became common, coders learned how to write the assemblers themselves more efficiently, driving the cost down further.

A similar shift occurred with the introduction high-level languages like FORTRAN, COBOL and LISP (note that the all-caps was the appropriate naming for the time period, as the names were originally acronyms and few systems had lower-case lettering in any case, but that was generally dropped later). By allowing the programmer to write code in an abstract notation, and automatically convert that notation to machine code, the introduction of compilers and interpreters lowered the barriers to entry for programming, and made it possible to express ever-more complex programs in a fluent manner. Also, once again, the compilers were more reliable than the programmers, so the chances of writing buggy code... well, it didn't decrease, really, because the programs were more ambitious, but the level at which bugs occurred shifted.

Finally, as compiler technology improved, compilers got to the point where - over the long haul - they could produce more efficient code than a human programmer could for a program of similar size. While a very skilled human coder can outperform a compiler on small programs or for the bottlenecks in larger ones, the overall performance of compilers is higher than a human programmer can sustain, because compilers can perform brute-force analysis on a greater part of the program as a whole. While it is true that most compilers are not that efficent, an aggressively optimizing compiler such as Stalin or the Intel C compiler can optimize a program very thoroughly in ways that would be impossible (practically speaking) for a human coder.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Locked