📜 ⬆️ ⬇️

Esoteric programming languages ​​Folders and Groot

Programs can be written with the folder structure or with the sayings of the Vin Diesel character


Esoteric programming languages ​​are a cross between a joke in the software industry, art, and the study of the limits of human knowledge. As a rule, Brainfuck and something popular, for example, ArdnoldC , are not known to be samples outside of narrow circles of geeks, but samples that are mathematical proofs. New examples of esoteric languages ​​appear quite often.

Daniel Temkin created the esoteric programming language Folders . This is the first language created specifically for his blog esoteric.codes . As the name implies, programming in this language does not require files, you only need a folder tree of the file system, the structure of which determines the code. An example of Hello World in Folders is on the left.

In his work, Temkin was inspired by Whitespace , an esoteric language in which programming is usually carried out by symbols that do not play a large role: a space, a tab, and a line feed. Temkin wondered what was even more empty than the file, having opened that, the user would see nothing, and came to the conclusion that it could be empty folders. As a rule, folders organize files, and the structure of folders, which contains only other folders and no files, is usually completely useless and only takes up disk space.

Another feature of file system directories is that hierarchical attachments of one folder to another look like a structured abstract tree. In this case, the top directory is the name of the program.
')

99 bottles of beer

The code is read in alphabetical order. Numbers in front of commands are ignored, they can be used as line numbers. In this case, the first folder in the while and if cycles defines the condition, and all subsequent folders define the condition. Also the files inside the folders and the words - Copy , - Copy (2) and so on at the end of the names are completely ignored. To comply with the principles of the language, data and variables are stored in the Application Data folder of the current user, also in the form of a folder structure, which is not deleted after launch, while remaining in the form of an illustration of what happened. Some keywords can (but not necessarily) be replaced with externally common folder names.

TeamAlternate name
ifNew folder
whileTemp
declareImages
letDownloads
printSetup
inputLogs

Type ofAlternate name
intVacation photos
floatLang
stringImg
doubleUser

At the moment, Folders is available only for Windows, the compiler can be found in the repository on GitHub .

Groot is another esoteric language that has recently appeared on the Web. To understand his idea, you need to remember the Marvel comics or the film “Guardians of the Galaxy”, which was rolled out in Russia last summer. The language of one of the characters is complex, but it seems to everyone else that he repeats the same phrase - “I am Grute”. Only over time, people in contact with Groot begin to understand the intonations expressed.

Groot - Brainfakopodobny language that repeats the principles of communication of the character. Eight teams are defined as follows:

PhraseValue
i am grootincrease the value in the current cell
I am grootdecrease the value in the current cell
I AM GROOOTprint the value from the current cell
I AM GROOTmove to the next cell
I am grootgo to previous cell
I am grootenter value from outside
I'm grootif the value of the current cell is zero, go forward in the program text to the cell following the corresponding We're Groot
We are grootif the value of the current cell is not zero, go back through the program text to I'm Groot

This is how Hello World looks in Groot:
Hidden text
I AM GROOT
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
I'm groot
I am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
I AM GROOT
I am groot
We are groot
I am groot
I AM GROOOT
I AM GROOT
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
I'm groot
I am groot
i am groot
i am groot
i am groot
i am groot
I AM GROOT
I am groot
We are groot
I am groot
i am groot
I AM GROOOT
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
I AM GROOOT
I AM GROOOT
i am groot
i am groot
i am groot
I AM GROOOT
I AM GROOT
I AM GROOT
I AM GROOT
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
I'm groot
I am groot
i am groot
i am groot
i am groot
i am groot
I AM GROOT
I am groot
We are groot
I am groot
I AM GROOOT
I AM GROOT
I AM GROOT
I AM GROOT
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
I'm groot
I am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
i am groot
I AM GROOT
I am groot
We are groot
I am groot
I am groot
I am groot
I am groot
I AM GROOOT
I am groot
I am groot
I am groot
I am groot
I AM GROOOT
i am groot
i am groot
i am groot
I AM GROOOT
I am groot
I am groot
I am groot
I am groot
I am groot
I am groot
I AM GROOOT
I am groot
I am groot
I am groot
I am groot
I am groot
I am groot
I am groot
I am groot
I AM GROOOT
I AM GROOT
I AM GROOT
i am groot
I AM GROOOT

More information can be found in the official repository of the project .

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


All Articles