laitimes

I have completely found a way to program Chinese Chinese characters

author:Lonely Planet 2022

finally

I have completely found a way to Chinese Chinese character programming,

From 16 years to find, so many years, the source of the original fact is so simple and practical,

The process can be described simply in one sentence, [Stack language created with stack thinking]. Stack ideas can even rise to the philosophical realm.

Because the stack is plainly a container, there are too many containers in life that can be abstracted by the stack, as small as everything you see around you, most of the daily tools you usually use, as large as the universe,

Why did it take so many years, because I was stuck in the puzzle of the C language family, all the articles and posts that can be found on the Internet, tutorials, and even exchange communities and groups,

It's all C family content, which is since Fortran, including C++ Java Python Rust... Wait, that's all the code in this category anyway.

The barriers formed are unimaginably large, and the C language family is the most suitable for programming Chinese Chinese characters, which I have not discovered before.

It wasn't until I jumped out of this game that I understood, tried, and practiced the methods used by other language families such as lisp and forth to construct program logic.

I have discovered a new world,

At the same time, after comparing the differences with the C language family, I completely saw the essence of the C language puzzle.

The C language family is mainly based on midfix expressions, doped with a small number of prefix and suffix expressions, and chooses a similar formal calculus method like a mathematical formula.

Its characteristics are both far away from humans and computers, that is, both sides are not flattered, although biased towards mathematical formulas, but not completely, just imitate the shape of the formula,

In fact, it is a four-different, which is why it is so difficult to use and difficult to learn,

There must also be an abstract computation process - compiler, and a huge library to perfect its own flaws and deficiencies, so the C language family can be summarized as programming for functional libraries.

Its redundancy is also getting bigger and bigger, taking up more and more space, but there are not many functions that are implemented, just a few things, so the cache and storage space of the hardware are also developing larger and larger.

But most of it is repetitive,

Lisp, represented by prefix expressions, is completely free of this problem, because it does not have the concept of variables, or its variables are unchanged.

So there will be no redundancy, so there will be no huge storage space to express the logic of the implementation function.

lisp can be fully programmed Chinese Chinese characters, because it is based on S expressions, i.e. -symbolic expressions,

Symbols, as the name suggests, are the use of various symbols, which is not limited to mathematical symbols or natural language text symbols,

The only drawback is that there are parentheses that separate Chinese characters from the paragraphs of the word, of course, some people will think that this is structured,

So this is a matter of benevolence and wisdom.

The so-called midfix prefix suffix, this description corresponds to the position of opcodes and operands in formal logic,

There is also a mathematical expression Polish expression inverse Polish expression. In fact, these three are equal,

The midfix corresponds to a mathematical expression, that is, the opcode is in the middle and the operand is on both sides.

The prefix corresponds to the Polish expression, that is, the opcode is in front and the operand is all after.

The suffix corresponds to the inverse Polish expression, that is, the opcode is at the end and the operands are all in the front.

lisp chooses a prefix, brings a concise and elegant way to describe the logic of the program, and treats the program and data as one, which is the benefit of the Polish expression of the prefix,

forth is the suffix of the inverse Polish expression of the kind, it is more suitable for Chinese Chinese character programming, because it does not even have parentheses, it does not need parentheses at all to summarize the syntax of the programming language,

Because its opcode is behind the operand, which is almost the most natural expression for humans, you can think of the operand as the top of the stack, and the opcode as the bottom of the stack.

[What to do, prepare the material first, and then execute]. It's as simple as that, each subdivision of steps is the recursion of the sentence itself, it can be recursive down or up,

Some people think this is very anti-human, in fact, it is just not suitable for language or colloquial discourse, but it is very suitable for written expression, in fact, it is a weapon for engineering processing.

Moreover, it is also very suitable for the calculation of the instructional computer, even if the compiler of so many languages in the C family to the step of generating code, it is mostly implemented in the post-order iteration.

And then I changed the order to prefix and mid-suffix to generate machine code, and this redundancy is so redundant that it's all over the C family.

The computer it is naturally suitable for suffix expressions, the execution process of the processor, that is, to prepare the operands first, and then throw them to the opcode to execute, the first execution of the opcode needs to wait for the operands to be completed.

This kind of stack language is not suitable for C family thinking, it is suitable for using stack thinking to recognize,

Stack language it does not need to use different toolchains for each stage of computation like the C language family, that is, different programming languages to do a small thing.

It can be defined directly from machine language to high-level languages, or even human languages, which are determined by the logical nature of stack thinking.

First of all, the material we have is the logic gate composed of the circuit, the machine instruction composed of the logic gate, the machine instruction is expressed by the 01001100, of course, usually when we use it, we convert the 4-bit binary to the 1-bit hexadecimal to use.

Machine instructions composed of hexadecimal can construct more advanced morphemes, because Chinese characters can also be represented in hexadecimal, so at this time we can use hexadecimal stored Chinese characters to represent a single morpheme.

For example, punctuation is partial to the first point of horizontal and vertical skimming, or direct single Chinese character, of course, this is not arbitrary can be bound to machine instructions, we have to find semantic and instruction semantic equivalent to The Chinese character to bind,

For example true 1 false 0, and or non, addition, subtraction, multiplication and division, etc.,

Using different Chinese character binding opcodes and operands, according to the meaning of Chinese characters to achieve, we can get a set of basic expression logic,

On this basis, it can be combined into complex logic, and the meaning of a single word and a word must be different, but this can be accommodated in a stack language, so it is not that 35,000 commonly used Chinese characters cannot be expressed when they run out.

We can also define words and sentences to express complex logical concepts, and this can be accepted and executed by stack languages.

Why? You look at a book, and we have to read it to know the meaning of the whole thing, right? This is actually an abstract embodiment of stack thinking.

You look at the content of the chapters in the book is equivalent to storing them at the top of the stack one by one, and when you see the end of the book, the content increase is constantly pushed to the bottom of the stack.

When you finish reading it, the whole content is returned from the bottom of the stack, and you know what the content of the whole book is expressing after summarizing, how? Stack thinking can summarize this process,

Since it can be stated with stack thinking, it can be translated into program logic through the stack language, so you can use the stack language to define everything that machine language needs to describe from high-level language to human language.

And its principle is so simple, the expression of human beings and the expression of computers are perfectly integrated, the real road to simplicity,

//

The original functional programming can be achieved Chinese Chinese character programming, it is really nowhere to step on the iron shoe. And the stack language of forth can also be realized, which is nothing more than a small popularity and a pitiful ecology. Think about how many detours have been taken since 16 years of constantly looking for Chinese Chinese character programming path, and then hit the head and blood flow in the C language family, and was brainwashed by the monopolist of the C language family (learning valve / programming literati) PUA language violence, trying to distort my programming cognition, it is really the emperor who lives up to the painstaking people, and finally I broke through this layer of difficulties and barriers and barriers.

Functional programming based on S expression lisp, completely not limited to a single symbol of a single variety, S is symbol, symbol well, I think McCarthy in the design of lisp, should have taken into account early on that this symbol refers to all the symbols on the earth, all the symbols ever created by humans, not just limited to letters or mathematical symbols. The C language family is really a huge sinkhole,

It is really a step back from the sea and the sky, a road can not go through, immediately change the accuracy is not wrong.

I hope that Chinese chinese character programming enthusiasts will come to functional programming lisp to build an ecology, write various libraries with symbolic expressions, write with Chinese Chinese characters, and strengthen the Chinese programming ecology until the quantitative change triggers the qualitative change, and completely build from scratch to Chinese programming!

Because lisp based on symbolic expressions is completely all-inclusive from high-level language to machine language, it can have constructed primitives with machine instructions on bare metal, and then constantly iterated and self-lifted to improve the language itself, of course, it can also write the operating system from scratch on bare metal. I really expect that Chinese Chinese character programming ecology is strong enough to create a design lisp chip, directly fix the original language as a command in the circuit, then the speed of the program should be far beyond the C language family, and it is expected that this day will be realized as soon as possible.

Forgot to say, stack languages such as forth can also achieve the achievement of lisp, and there is no lisp brackets, the only drawback of lisp is that there are too many parentheses, and the stack language does not even need parentheses, and lisp has language characteristics, the stack language also includes, unfortunately, the stack language ecology is smaller than lisp, the development to today, the support for Chinese Chinese characters is not yet, mainly know the stack language people are too few, more do not understand its characteristics, And the stack language can start from the machine language to define the original language, from the zero writing operating system, the same can carry Chinese Chinese character programming, because the semantics of the stack language is highly abstract, it is not even limited to symbols, look forward to this good thing can be discovered by more people, to create our Chinese Chinese character programming ecology.