HeLiiLii

From Esolang
Jump to navigation Jump to search

Full name: He+Li-I+Li-I (2+3-53+3-53)

About HeLiiLii

'''HeLiiLii''' (pronounced heh-lee-lee) is an esoteric programming language designed by User:Magnogen in 2021, although the idea behind it was devised way back in 2011, but I never got around to making it into a real thing.

HeLiiLii is based around using the chemical symbols of elements on the periodic table and performing mathematical-like rules on them to create words.

Mathematical operations on elements

All elements are defined by their atomic number (it's protons/electrons), Hydrogen (H) being 1, Helium being 2, etc.

This means that numbers don't work as you might think:

 8 does NOT equal 8
 8 -> oxygen = "o"

Also, negative numbers are treated as capitals:

 -8 -> OXYGEN = "O"

Because of this, the mathematical operations might seem a bit unintuitive, especially subtraction, so you can find them listed below

Addition

When adding two elements, you always join them together - think of them like strings.

 8+92+7 -> fluorine+uranium+nitrogen = "f"+"u"+"n" = "fun"

That might be an overstatement... But you get my point.

Subtraction

Subtraction works a little differently; if the first element contains the second, it removes the second from the first.

 22-53 -> titanium-iodine = "ti"-"i" = "t"

This can be used to obtain new characters that wouldn't be available otherwise, such as the letter "t" in the example.

Subtracting negative elements can be a little finicky, as they are interpreted as capitalization.

 -22-53 -> TITANIUM-iodine = "TI"-"i"

As you can see, "TI" doesn't contain "i" (it's case-sensitive), so it'll simply give an error. :)


I should also say that, although you usually won't need it, the subtraction order goes backwards, like so:

 76-14-53 = 76-(14-53) -> osmium-(silicon-iodine) = "os"-("si"-"i") = "os"-"s" = "o"

Yes, I just used 8 characters to make an "o", when I could just use Oxygen (8), which is one character. You really can obfuscate code with this technique. There's nothing stopping you from doing

 32-34-38-59-91-18-103-3-53 = ... = g

Multiplication

Multiplication duplicates the elements in a weird way, so I'd recommend not using this unless you absolutely need it.

 2*8 -> 2oxygens+8heliums = "o"+"o"+"he"+"he"+"he"+"he"+"he"+"he"+"he"+"he" = oohehehehehehehehe

The algorithm is laughing at you

If you really wanna multiply elements as you'd expect, I'd recommend using explicit numbers, which you can find in the next section.

Division

Division only takes one input, and that's the element to be divided. It technically reverses the element. Here's an example:

 /22 -> /titanium = /"ti" = "it"

Might be helpful, might not, you decide.

Okay yeah it is helpful for pretty much every conditional code you wanna do, as the primary keyword for this (goto) uses /118 (/og: go). Its better than using 118-8+8.

Examples

Here are some examples of code I made using HeLiiLii, I'll decode it and explain how it works too :)

The final translated code is very similar to pseudocode, if you need any help, DM me on discord (Magnogen#2500) and I'll explain it and make updates to this page.

Hello, World!

 8+92+22-53+94+90-1 -1+4-5+3-53+3-53+8+, -74+8+37-5+3-53+60-7+!;
   ->
 o+u+ti-i+pu+ti-i H+be-b+li-i+li-i+o+, W+o+rb-b+li-i+nd-n+!;
   ->
 o+u+t+pu+t H+e+l+l+o+, W+o+r+l+d+!;
   ->
 output Hello, World!;

Truth machine

 49+94+22-53 0%;
 53+9 0% 53+16 001 118-8+8+22-53+8 04;
 8+92+22-53+15+92+90-1 0%;
 16+43-6+8+15;
 8+92+22-53+15+92+90-1 001;
 /118+22-53+8 04;
   ->
 in+pu+ti-i 0%;
 i+f 0% i+s 1 og-o+o+ti-i+o 4;
 o+u+ti-i+p+u+th-h 0%;
 s+tc-c+o+p;
 o+u+ti-i+p+u+th-h 1;
 go+ti-i+o 4;
   ->
 in+pu+t 0%;
 i+f 0% i+s 1 g+o+t+o 4;
 o+u+t+p+u+t 0%;
 s+t+o+p;
 o+u+t+p+u+t 1;
 go+t+o 4;
   ->
 input 0%;
 if 0% is 1 goto 4;
 output 0%;
 stop;
 output 1;
 goto 4;