📜 ⬆️ ⬇️

Next programming language

“One evening Rutherford went to the laboratory. Although the time was later, in the laboratory one of his many students leaned over the instruments.
- What are you doing so late? - asked Rutherford.
“I work,” came the answer.
- What do you do during the day?
“I work, of course,” answered the student.
“Do you work early in the morning too?”
“Yes, professor, and in the morning I work,” the student confirmed, counting on praise from the mouth of a famous scientist.
Rutherford darkened and asked with irritation:
“Listen, and when do you think?”

I wanted to figure out the most likely possible direction for the development of programming.
  1. A brief history of programming languages
  2. Current Potential Capabilities
  3. Conclusions from the above


A brief history of programming languages.



I apologize for the text that is redundant for the majority, just such a statement seems to me more vivid, for further explanation.
')
With protoyazykami with some stretch can attract programming using conventional electrical switches. But this is too much for me ...

Therefore, for my own peace of mind, I will take for the first language - the machine code .
Hello World:
BB 11 01 B9 0D 00 B4 0E 8A 07 43 CD 10 E2 F9 CD 20 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 


Which subsequently led to at least a little readable form - assembler .
Hello World:
 CODE SEGMENT ASSUME CS:CODE, DS:CODE ORG 100h START: mov ah,9 mov dx,OFFSET Msg int 21h int 20h Msg DB 'Hello World',13,10,'$' CODE ENDS END START 


But the assembler is also not very simple and intuitive to read.
And after him come all sorts of FORTRAN, Pascal, C and others.
Hello World (Pascal):
 program HelloWorld; begin write('Hello, World!'); end. 


I think the trend is obvious.

Potential opportunities currently available.



Voice recognition For example - habrahabr.ru/post/157333

Text compilers (literary programming). For example - habrahabr.ru/post/72310

Machine translate. For example - habrahabr.ru/post/155675

Spellchecking. For example - habrahabr.ru/post/50137

PCS systems. For example - habrahabr.ru/post/139180

Of course, no significant part of the possibilities is indicated, but there are clearly quite a lot of them.

Conclusions from the above



From the history of programming languages, their approach to ordinary human speech is particularly noticeable.

And in the existing opportunities, one can see quite a serious readiness to implement something like this.
There is almost everything you need, except for a full compiler. To the extent that the basic version of the same Inform7, it turns out, you can create right now.

What should this compiler be?

As I understand it, if you receive a program in any of the top-level languages, for example C, as a result of compilation, then further compilation into machine code should not cause any special problems.
Rather, on the contrary, as a bonus, cross-platform will be provided.

And here it seems like 2 ways:
  1. To proceed from human speech, choosing commands for it
  2. Start from the programming language, choosing to him human phrases.


The option to build on human speech is certainly more interesting.

Something like this can be very helpful in determining the part of speech - habrahabr.ru/post/152799
And this is habrahabr.ru/post/148124

Noun - the name or part of a variable name
Adjective - the name or part of a variable name
The numeral is a constant, as a variant the name or part of the variable name, warning is possible with the specification of the programmer
Pronoun - the name or part of a variable name
Verb - command (in some cases the condition is possible)
Union, adverb, preposition, particle, interjection - his name is legion and each can be a condition, as well as a variable and a command and anything.

Moreover, the solution will obviously be:


And although for realization there is no task to achieve understanding of a person’s computer, but there is only a task to translate words into actions - this option is still more difficult.

What option to build on the commands of the compiler .

It seems easier now.
Add to the database the entire set of available commands and assign each team one or more voice analogs (synonyms). All that is missing from the database is considered as variables, constants, or garbage.

But this path is far from perfect.
You will have to memorize the existing set of phrases that correspond to the commands and only enter them into the microphone. Accordingly, the fatal control of speech, which can not stand all.

Although it is possible to expand the functionality, in the direction of merging with natural languages. But I do not think that it will be possible to raise the functionality so much.

And finally, a compromise option - movement in both directions at the same time.

Both the first and second options have an ultimate goal, a certain set of rules, according to which speech becomes a program. Table of correspondences of human phrases, words and their synonyms - commands or computer command sequences.
Accordingly, it is quite possible to assume that with the development of both directions, sooner or later they will converge into one integral system.

Although there are a lot of nuances. For example, if something like this really will be implemented - programmers with speech defects will not be easy.

Domestic programmers will need a separate entry corresponding to the mat, and not leading to attempts to program it. And then the Terminator can be accidentally obtained ...

But on the other hand, for me, only the possibility of programming, debugging and launching programs by phone, walking along the street, or waiting for an order at a cafe is worth it. I also like the fact that it will be possible to remotely turn off the stove at home, close the taps, turn on the kettle and warm the room to 28C before coming in the winter.
Although for those whose wife returns from work earlier - this is no longer so relevant.

“Another superstition of that time is known: the Man of the Book. On a certain shelf in a certain hexagon (people believed) there is a book containing the essence and summary of all the others: a certain librarian read it and became like God. In the language of these places one can see traces of the cult of this worker of remote times. Many made pilgrimages to find Him. Over the course of a century, there have been fruitless searches. ”
H.L. Borges "Babylon Library"

In general, there is something funny about it - for example, the ability to use a cassette recorder to store a piece of code. Well, first turn it off from Sinclair, and then store it. On cassettes TDK and BASF.

Source: https://habr.com/ru/post/158087/


All Articles