Lakshayati

From Esolang
Jump to navigation Jump to search

Lakshayati is an esoteric programming language created in 2020 with only three operations. Its only data type is strings, and the language relies heavily on executing strings as code.

Language overview

Lakshayati has three operations:

  • assigning string values to variables
  • concatenating strings
  • executing strings as code

If a line begins with a variable, it assigns said variable to the value to the right.
ex: Assigns string "hello world" to variable

variable "hello world"

In Lakshayati, if a line begins with a string OR only contains a variable, it will execute the string (or string contained in the variable) as code.
ex: Executes the string "variable 'hello world'", which assigns "hello world" to variable

new_variable "variable 'hello world'"
new_variable

To display a string to the screen, assign said string to the variable / (or alternatively )
ex: Displays "hello world" to the screen

/ "hello world"

Lakshayati variables can use any Unicode characters that aren't quotes or white-space. It also accepts quotes from different languages to form strings. As such, Lakshayati can be typed on nearly any keyboard, regardless of language or writing system. More specific information can be found here.

Turing completeness

Lakshayati is Turing complete. A proof of this can be shown through a Lakshayati implementation of Smallfuck (with infinite memory), which can be found here.

Example programs

Prime or Composite

Quine (program that prints itself)

line_1 '''single_quote "'"'''
line_2 """double_quote '"'"""
line_3 "
/ 'line_1 '    single_quote single_quote single_quote    line_1    single_quote single_quote single_quote '
line_2 '       double_quote double_quote double_quote    line_2    double_quote double_quote double_quote '
line_3 '       double_quote    line_3    double_quote '
' '
' '
' line_1 '
' line_2 '
' line_3"


single_quote "'"
double_quote '"'

/ 'line_1 '    single_quote single_quote single_quote    line_1    single_quote single_quote single_quote '
line_2 '       double_quote double_quote double_quote    line_2    double_quote double_quote double_quote '
line_3 '       double_quote    line_3    double_quote '
' '
' '
' line_1 '
' line_2 '
' line_3

External resources

GitHub page for Lakshayati
Online interpreter for Lakshayati