`LML

From Esolang
Jump to: navigation, search

ABOUT `LML

`LML pronounced as 'elemel' is an esoteric programming language made by Saketh Suresh (User:sane_theinsane) in 2018.The language uses 8 commands.

HOW IT WORKS

`LML works with a list called LI and a variable called X having a default value of 0. Out of the 8 commands, 2 are for modifying X, 3 for adding elements to LI, 1 for input, 1 for reseting X and the last one for printing the elements in LI.

THE COMMANDS

the 8 commands used in `LML are:

COMMAND DESCRIPTION
+ adds 1 to X
- subtracts 1 from X
< pushes in the current value of X into LI ie. if X = 8 then 8 is added to LI
( pushes in the current value of X into LI in the form of a character ie. if X = 0 then ' ' is added to LI and if X = 1 'a' is added to LI
[ does the same thing like ( except the characters added to LI are in capitals
 : takes input as a string or integer and adds it to LI
 ; joins all the elements of LI together and prints it
R resets the value of X to 0

TO BE NOTED

In `LML you can write the code in separate lines(any other commands except the the ones in the table are ignored)

EXAMPLE PROGRAMS

A program that prints 6 abb:
+++ +++< sets the value of X to 6 and adds 6 to LI
R( resets the value of X and adds ' ' to LI
+( sets X to 1 and adds 'a' to LI
+((; sets X to 2 and adds 'b'to LI 2 times and then joins the elements and prints them

Hello World (no comments and is done in one line guess what it does yourself):
++++++++[---(+++++++((+++(R(+++++++++++++++++++++++[--------(+++(------(--------(;
A program that takes your name and prints hi before it (with comments):
++++ ++++[ sets X to 8 and adds 'H' to LI
+( sets X to 9 and adds 'i' to LI
R( resets X to 0 and adds ' ' to LI

: ; takes input in this case your name and adds it to LI then joins the elements and prints them

When the same code is written in one line:++++++++[+(R(:;we see it is very small and that is cool.

That's basically `LML.