5-minute guide to esoteric programming languages: why are they needed

    In the first part of our story about esoteric languages, we tried to classify them according to various parameters - from literary and cinematic "references" embedded in the syntax, to Turing completeness. Today, the purpose of esoteric programming languages.

    In the end, an understanding of the goals set by the creator of a particular language can at least give some thought to those programmers who themselves want to do something similar in the future and develop their own unique language.

    Photo hackNY.org CC BY

    A bit of philosophy


    There is an opinion that one of the reasons for the emergence of esoteric languages ​​was the history of programming itself. 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” have appeared, within the framework of which programming has ceased to be an end in itself and has become a way of solving a particular profile problem.

    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 is especially noteworthy. and other languages ​​“black boxes” - perhaps they solve this “culturological” problem in the best way.

    Charging for the mind


    Another task (which is most often posed by the creators of esoteric languages) is the stimulation of non-standard thinking, an attempt to solve certain issues in a non-trivial way. In fact, creating an esoteric language and writing programs in it can be just a "puzzle", but it is also a great opportunity to better understand how the Turing machine "works", in practice, to understand computability theory and theory of algorithms.

    In addition, this is a good way to escape for a while from “serious” programming. It is for this purpose that comic esoteric languages ​​are usually created. After all, as Arne Martin Aurlien, a Norwegian developer speaking ( video ), says) with this topic at JSConf EU, "a befunge programmer is sitting in many of us who is waiting for the moment to break free."

    Code as an Art


    Esoteric programming languages ​​are often compared to 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. In the same way as “traditional art” they are impractical, therefore they have a different value in themselves - for example, they illustrate the essential differences between human thinking and “machine” logic or, on the contrary, offer unique ways of communicating with a machine. That is, as expressed in Apifonica, «are programming in its most abstract form," allowing developers to show creativity and outside the convention.

    This is good, but are esoteric languages ​​used in practice?


    There are directly 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 crosswords and puzzles are released - to "stretch your brains."

    On the other hand, esoteric languages, despite the complexity of practical application, can still be useful. For example, they carry educational and illustrative functions. They allow you to present this or that idea in a hypertrophied form - and at the same time as clearly as possible. For example, they help to illustrate how weak “expressive possibilities of PL” can accompany completeness according to Turing - for example, anyTuring quagmire .

    However, there are cases of a very real practical use of esoteric languages. For example, the Lost Kingdom mini-game on Brainfuck. According to its author, Jon Ripley, Lost Kingdom is most likely the largest program written in this language.

    The case, of course, is rare, but not unique. In the Quora theme thread, users share esoteric language case studies. Sometimes they, for example, are used for educational purposes. In these cases, “puzzles” and a certain degree of abstraction, which allows one to distinguish certain characteristics, are useful qualities.

    Of course, practically no one has to deal with “real” esoteric programming languages ​​“by profession”. When it comes to work, esoteric languages ​​are understood to be rather rare and unusual, the syntax of which is very different from the popular YP - we are definitely not talking about the most famous esoteric YP created for entertainment.

    Tikhon Jelvis, a leading data specialist at Target, says he used the ArrayForth development environment — and his experience with it seems to be the most “esoteric” in his practice. For example, color in ArrayForth is also a syntax element.

    True, ArrayForth is really used for quite serious purposes - as a development environment for GreenArrays processors. This, however, does not deprive him of a mass of features characteristic of more unusual brothers. By the way, he even has an “official esoteric” relative - the BogusForth language.

    “Programming in ArrayForth is like getting into another dimension. This is a technology that separated from “ordinary” languages ​​about 40 years ago. Since then, he has been developing in his own way around his small - but surprisingly devoted - community ”

    Why are such languages ​​needed, and why is this not always “exercise for the sake of exercise”? If we consider language as a limited system that provides interaction between a person and a 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. Strange syntax, “crazy" logic just give us another example of how work with a 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 this or that concept is brought to the point of absurdity, another part implements quite specific, albeit not always practically useful (for the majority) goals and objectives, some more Esoteric languages ​​are 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 wiki portal Esolang has 1236 existing esoteric languages - and new ones continue to appear each year. Perhaps as he writesAtomic Object's Mitchell Johnson (Mitchell Johnson) in his essay, we should less ask the question “Why do esoteric programming languages ​​appear?”. The answer to it, most often, sounds like this: "Because ... why not."

    About what else we write on Habré:

    Only registered users can participate in the survey. Please come in.

    Have you ever used esoteric YP?


    Also popular now: