A beginner's guide to the thulium esolang.

javacode7

JavaCode7

Posted on March 29, 2021

A beginner's guide to the thulium esolang.

Sometimes, humans just like things being incredibly difficult. That is one of the two reasons I created thulium version 1. It is a strange language with all commands written in binary. Then I remembered that I actually had a heart and decided to make thulium 2.

Now, you probably have absolutely no idea what I am talking about and that is why I am writing this guide. So kick up you feet and get a cup of coffee because you are reading a beginner's guide to the thulium esolang. Enjoy!

So what exactly is thulium?

Well, thulium is a programming language that I made to learn typescript and that makes bf look like candy floss. It has 3 times the number of commands and is much more esoteric. Plus the former has conditionals while the latter's aren't fully implemented as of the latest version (v2.0.3). Thulium is in the bf family however.

So when did this all begin?

I made thulium 1 three months ago and from what I remember, it wasn't really the most pleasant experience. I actually made it so that I could learn typescript. I succeeded. Using that knowledge, I set out to learn another language (lua, to be exact) and thulium 2 was born.

Credits

Of course, it wouldn't be right to talk about thulium without mentioning the language from which it was inspired. At the time, I
had absolutely no idea what bf was so that wasn't what inspired
thulium. What did was an esoteric language by the name of
jellyscript. Check it out!

How do you actually code in thulium?

The docs are in the readme but I will give you a quick brief on how it works.

In a nutshell, thulium is divided into 3 parts:

  1. 1 million normal cells arranged in a 1000x1000 square that can each hold one number. At the start of the program they are all set to 0.
  2. 1 memory cell that can hold one value.
  3. 5 special cells that can update to do simple arithmetic.

All 19 commands either alter one of these "registers", show you the value of the current cell or move the current cell in each register.

The 19 commands are as follows:

  • mov_right -- this command moves right in the grid
  • mov_left -- left in the grid
  • mov_up -- up (grid)
  • mov_down -- down (grid)
  • spec_right -- forward in special cells
  • spec_left -- backward in special cells
  • print -- prints the current cell to the console (with \n)
  • SP to M -- moves the current special cell value to the memory
  • M to C -- moves the memory to the current cell
  • C to M -- moves the current cell's value to the memory
  • add -- increases the current cell's value by 1
  • sub -- opposite of add
  • update -- updates the special cells
  • ascii_print -- prints the current cell's ascii value
  • input -- takes one byte as input and stores its ascii char code
  • print2 -- prints the current cell to the console (no \n)
  • cond_start -- same as brainf**k's '[' (coming soon)
  • cond_end -- same as brainf**k's ']' (coming soon)
  • end -- Used to denote the end of a program

Surely a Hello World program can't be that bad right?

Think again. Hello World in Thulium (depending on the way you do it) can take up 200 lines. But if you insist:

Hello World in thulium (v2.0.3)

add
add
add
add
add
add
add
add
add
add
mov_right
add
add
add
add
add
add
add
add
add
add
mov_left
update
spec_right
spec_right
SP to M
M to C
mov_right
M to C
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
ascii_print
mov_right
M to C
add
ascii_print
mov_right
M to C
add
add
add
add
add
add
add
add
ascii_print
ascii_print
mov_right
M to C
add
add
add
add
add
add
add
add
add
add
add
ascii_print
mov_right
M to C
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
ascii_print
mov_right
M to C
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
sub
ascii_print
mov_right
M to C
add
add
add
add
add
add
add
add
add
add
add
ascii_print
mov_right
M to C
add
add
add
add
add
add
add
add
add
add
add
add
add
add
ascii_print
mov_right
M to C
add
add
add
add
add
add
add
add
ascii_print
mov_right
M to C
ascii_print
end
Enter fullscreen mode Exit fullscreen mode

Well, you asked for it.

Conclusion

Is thulium a good language? See for yourself!

The thulium GitHub repository:

GitHub logo JavaCode7 / Thulium

A simple esoteric programming language written in TypeScript




Thulium

A simple esoteric programming language written in TypeScript, Lua and Python.

Finally! Thulium 2 is here!

Before reading this please check out Jellyscript. It's a great esolang and it will help you understand thulium 1 (version 2 is less esoteric as it is much more high-level) better.

Assets

  • 18 commands,
  • 5 special cells that update and do basic expressions,
  • 1000 by 1000 grid,
  • 1 permanent memory cell
  • High-level

Syntax

Thulium has 19 commands (numbered 0 - 18 or 00000 - 10010), each doing something simple and trivial but when combined, can actually have a decent function.

  • mov_right -- this command moves right in the grid
  • mov_left -- left in the grid
  • mov_up -- up (grid)
  • mov_down -- down (grid)
  • spec_right -- forward in special cells
  • spec_left -- backward in special cells
  • print -- prints the current cell to the console (with \n)
  • SP to M -- moves the…




💖 💪 🙅 🚩
javacode7
JavaCode7

Posted on March 29, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related