|Major implementations||Original Python interpreter|
Linguarcana is an esoteric programming language created by User:FrankPujo. Its aim is to create a source code that resembles an Ancient Latin text.
Sections, months and beginning
The code is divided in sections. Each section starts with a line which contains Mense followed by the name of a month, according to the Ancient Roman calendar attributed to Romulusat the ablative case (Martio, Aprile, Maio, Iunio, Quintili, Sextili, Septembre, Octobre, Novembre, Decembre). The order in each section is read and interpreted or compile isn't determined by their order in the source code, but rather by the month that holds the section.
The keyword Supertempore followed by the name of a month) runs the month's section and then gets back where it left in the code. This allows to create functions or visually separate sections, as explained in Standard practices.
Any code before the opening of the first section will be ignored. The first line is also suggested to contain De followed by the name of the file or a short description of it in Latin (in the ablative case as it is after de).
Linguarcana has some commands in common with Brainfuck, as it is created on a 64-cell array, on which the user can move a pointer and perferm operations. Each of these operations, though, can be performed multiple times in Linguarcana without repeating the same command. The words miliario and legione should be used in the plural forms when dealing with numbers greater than 1: miliariis and legionibus.
|>||Incedo I miliario|
|<||Retrocedo I miliario|
|+||Incedo I legione|
|-||Retrocedo I legione|
Additionally to the command shared with Brainfuck, Linguarcana provides more commands to perform various operations more quickly, such as:
- Gallia est omnis divisa in partes I to divide the current cell by a number;
- Hic est to store a temporary variable outside of the cell array;
- illo numero replacing any number uses the temporary variable;
- Verba volant, scripta manent to convert the current cell to a character (check the special conversion tables);
- Non loqui sed facere or Acta, non verba to convert the current cell to a number from character;
- Entia non sunt multiplicanda praeter I to multiply the current cell by a number;
- Quo fata ferunt to set the current cell to a random number;
- Nulla rem natam to set the current cell to 0;
Every line without recognized commands will be ignored, but lines with "partial" commands would still be read and therefore would cause an error. To avoid this it is possible to create comment lines starting them with Commentari, Commentarius or Commentarium followed by the comment content.
The program will stop running if it encounters the line "Memento Mori".
There are some handy practices that can be followed to make the file easily readable to everyone.
Making use of the months' sequence, Martio (first month) could be used as the container in which all the other months are called. In order Aprili could be the initialization or the setup, Maio the main function (Maio-Main) and other months could be used as simple functions to call. Using this setup, though, must mean that the month that calls the others (which in this case is Martio) must contain Memento mori at its end, so that the others month don't run after it as they would.
Interpreters and compilers
- Original Python interpreter by FrankPujo on GiHub