Making an esolang

I have posted about esolangs a lot in the past. From good ones to mine to the esolist but never have I posted about making one.

In this article, I am going to go through a step by step procedure to make an esolang like loo. It is a simple language wit…

I have posted about esolangs a lot in the past. From good ones to mine to the esolist but never have I posted about making one.

In this article, I am going to go through a step by step procedure to make an esolang like loo. It is a simple language with only 4 commands. + to increment the value of the one variable it can hold, - to decrement, # to print out the value in ascii form (e.g. 97 would be the lowercase letter a) and finally ; stops the program. I will be making this in python but you can use any language you like.



Note

This is not the only way to create an esolang and it is not the only syntax for one. There are many types, each with their own peculiarities. I recommend looking at esolangs.org to see these.



Step 1: Accepting the code

This code takes in input from the user that should contain the loo code. It also sets up the variable for the value that loo holds.

value = 0
code = input("Enter your loo code here please > ")



Step 2: String to List

This block of code basically splits the loo code string into a list that will be iterated through later.

lexed = []
for i in code:
    lexed.append(i)



Step 3: Execution

Now we iterate through the lexed list and execute the code.

for j in lexed:
    if j == "+":
        value += 1
    elif j == "-":
        value -= 1
    elif j == "#":
        print(chr(value))
    elif j == ";"
        quit()

It is as simple as that! I hope you enjoyed this and hopefully I will post again soon.


Print Share Comment Cite Upload Translate
APA
JavaCode7 | Sciencx (2024-04-18T16:04:01+00:00) » Making an esolang. Retrieved from https://www.scien.cx/2021/06/01/making-an-esolang/.
MLA
" » Making an esolang." JavaCode7 | Sciencx - Tuesday June 1, 2021, https://www.scien.cx/2021/06/01/making-an-esolang/
HARVARD
JavaCode7 | Sciencx Tuesday June 1, 2021 » Making an esolang., viewed 2024-04-18T16:04:01+00:00,<https://www.scien.cx/2021/06/01/making-an-esolang/>
VANCOUVER
JavaCode7 | Sciencx - » Making an esolang. [Internet]. [Accessed 2024-04-18T16:04:01+00:00]. Available from: https://www.scien.cx/2021/06/01/making-an-esolang/
CHICAGO
" » Making an esolang." JavaCode7 | Sciencx - Accessed 2024-04-18T16:04:01+00:00. https://www.scien.cx/2021/06/01/making-an-esolang/
IEEE
" » Making an esolang." JavaCode7 | Sciencx [Online]. Available: https://www.scien.cx/2021/06/01/making-an-esolang/. [Accessed: 2024-04-18T16:04:01+00:00]
rf:citation
» Making an esolang | JavaCode7 | Sciencx | https://www.scien.cx/2021/06/01/making-an-esolang/ | 2024-04-18T16:04:01+00:00
https://github.com/addpipe/simple-recorderjs-demo