In the
first part of our story about esoteric languages, we tried to classify them according to different parameters - from literary and cinematic "references" embedded in the syntax to Turing completeness. Today is about the purpose of esoteric programming languages.
In the end, understanding the goals that the creator of a particular language sets for itself can at least give rise to thoughts for those programmers who themselves want to do something similar in the future and develop their own unique language.
Photo by hackNY.org CC BY')
A little philosophy
It is
believed that one of the reasons for the emergence of esoteric languages ​​was the very history of programming. Since its inception, this area has gone the way of a kind of “desacralization”: development has gradually ceased to be a closed and very specific area of ​​knowledge.
Moreover, more and more “related areas” appeared, within the framework of which programming ceased to be an end in itself and became a way of solving one or another profile task.
In this case, programming turns into a purely applied tool, and esoteric languages ​​in some way return to programming a halo of “secret knowledge”: at first glance, most of them look completely unreadable.
Here, perhaps,
Malbolge and other “black boxes” languages ​​are especially noteworthy - perhaps, they solve this “culturological” task in the best way.
Charge for the mind
Another task (which the creators of esoteric languages ​​most often set for themselves) is to stimulate non-standard thinking, an attempt to solve certain issues in a non-trivial way. In fact, creating an esoteric language and writing programs on it may simply be a “puzzle”, but it is also a great
opportunity to better understand how the Turing machine “works”, to practice understanding the
theory of computability and the theory of algorithms.
In addition, it is a good way to briefly distract from the "serious" programming. For this purpose, comic esoteric languages ​​are usually created. In the end, according to Arne Martin Aurlin (Arne Martin Aurlien), a developer from Norway, speaking (
video ) with this topic at the JSConf EU, "in many of us there is a befunge programmer who is waiting for the moment to break free."
Code as art
Esoteric programming languages ​​are often
compared with works of art - like literature or music, they are less associated with "pure functionality" and much more - with the expression of thoughts and original ideas of their authors. Just as “traditional art” they are impractical, therefore they carry a different value - for example, they illustrate the essential differences between human thinking and “machine-based” logic or, on the contrary, offer unique ways of communicating with the machine. That is, as Apifonica put it, “they represent programming in its most abstract form,” allowing developers to show creativity beyond frameworks and conventions.
This is good, but are esoteric languages ​​used in practice?
There are opposite opinions regarding the goals and “applicability” of esoteric programming languages. Someone believes that "practical applicability" and "esoteric languages" are incompatible concepts. In this case, esoteric programming languages ​​are nothing more than “experiments” that exist for the same reason that crossword puzzles and puzzles are made to “stretch brains”.
On the other hand, esoteric languages, despite the complexity of practical application, can still be useful. For example, they have learning and illustrative functions. They allow you to submit an idea in a hypertrophied form - and at the same time as clearly as possible. For example, they help to illustrate how Turing completeness may be accompanied by weak “expressive capabilities of PL” - using the example of any
Turing quagmire .
However, there are cases of quite real practical use of esoteric languages. For example, the mini-game Lost Kingdom on Brainfuck.
According to its author, John Ripley (Jon Ripley), Lost Kingdom is most likely the largest program written in this language.
The case, of course, rare, but not unique. In a Quora themed
thread, users share case studies with esoteric languages. Sometimes they are, for example, used for educational purposes. In these cases, useful qualities are “puzzling” and a certain degree of abstraction, which allows you to select certain characteristics.
Of course, almost no one has to deal with “real” esoteric programming languages ​​“by profession”. When it comes to work, esoteric languages ​​are understood as rather rare and unusual, the syntax of which is very different from the popular PL - it is definitely not about the most famous esoteric PL created for entertainment.
Tikhon Jelvis, a leading data expert at Target,
says that he used the ArrayForth development environment - and the experience of working with it seems to him to be the most “esoteric” in his practice. For example, the color in ArrayForth is also an element of syntax.
True, ArrayForth is really used for quite serious purposes - as a development environment for GreenArrays processors. This, however, does not deprive his mass of the features peculiar to more unusual brethren. By the way, he even has an “official esoteric” relative - the language of BogusForth.
“Programming in ArrayForth is like falling into another dimension. This technology, which separated from the "ordinary" languages ​​about 40 years ago. Since then, it has been developing on its own way around its small - but surprisingly devotee - community. ”Why do we need such languages, and why is it not always an “exercise for the sake of exercise”? If we consider language as a limited system providing the interaction between man and machine, it can be argued that esoteric language is a kind of opportunity to expand our understanding of the properties and potential possibilities of such interaction. The strange syntax, the “crazy” logic just gives us another example of how the work with the machine can be built.
Some of these languages ​​can serve not only as an illustration, but also as an example of what will happen if a particular concept is brought to the point of absurdity, another part implements quite specific, though not always practically useful (for most) goals and objectives, some more. esoteric languages ​​is pure art. Which (like any work of art) can and should be studied - including in order to try to go beyond the usual programming.
The list on the
Esolang wiki portal has 1236 existing esoteric languages ​​- and new ones continue to appear every year. Perhaps, as Mitchell Johnson from Atomic Object
writes in his essay, we should ask less: “Why do esoteric programming languages ​​appear?”. The answer to it, most often, is: "Because ... why not."
What else do we write on Habré: