Skip to content

Repository files navigation

Lakshayati

Lakshayati is a minimalistic programming language that executes strings as code. The name derives from the Sanskrit word लक्षय् meaning "to define". I made this project in high school with less than one year of coding experience. I am happy with how much I could accomplish given the knowledge I had. However, at the time, I was unaware of some core principles of programming etiquette. I reflect best coding practices much better in my later work, as I have learned more about programming etiquette in the four years of programming classes I have taken since.

At the beginning of this project, I wondered how small a language can be, if its grammar must allow speakers to express any idea. Such a language would likely have the ability to define new words, join characters into words and words into sentences, and to use the words defined. With the grammar limited to only these features, how powerful could such a language be?

Lakshayati was created to model this idea. It is an esoteric programming language whose only object type is mutable strings. For any who are unfamiliar with the term, strings are essentially any form of text on your computer. Lakshayati can perform three operations with these strings:

  • assigning or reassigning string values to variables (defining a new word)
  • concatenating strings (joining characters and words together)
  • executing strings as code

The role of string execution is more complex. By executing strings, programmers not only define new concepts, but can use them freely. It is similar to defining new functions in other programming languages, only Lakshayati structures these functions as strings.

With these three operations, I have proven Lakshayati is Turing-complete (i.e. it can theoretically perform any computable function). And, while I lack the linguistic expertise to show as much, this fact may suggest human beings can technically communicate any idea with little more than the building blocks of linguistics. In any case, I feel that Lakshayati is a unique programming language its own right, which is why I would like to document its features here.

If you would like to test out the language for yourself, you can find an online interpreter at https://maxdobbs32.github.io/Lakshayati/

If you like, you can download Lakshayati.jar to have an interpreter on your computer. In addition to running programs, this Java application is capable of opening and saving programs as .txt files. Lakshayati.jar can be run with the "java -jar Lakshayati.jar" command. Or, if your setting for opening jar files is properly configured, you can simply click the file to run it. Lakshayati.java contains the source code for this application.

Make sure you agree with the MIT License attached before using either interpreter. If there are any issues, feel free to contact me.

About

A minimalistic programming language that executes strings as code

Resources

Stars

5 stars

Watchers

1 watching

Forks

Contributors

Languages