Writing a Tiny Programming Language
Sooooo... I may have fallen down the language design rabbit hole and I'm here to show off some cool rocks I found that I think are maybe gems?

First, what is a programming language?
Basically we want a tool to create programs with, back in the days of teletype machines(basically a typewriter strapped to a computer), the most natural representation was text. You had a keyboard, you knew how to type words, what if we could convert those words into machine instructions?
Wait, what is a program?
Fundementally, a program is just a list of instructions for the computer to do. Like, literally a list.
get 'a'
get 'b'
multiply the last 2 things
number 1
add the last 2 things
set 'c' to the last thing
or, in traditional math notation:
c = (a * b) + 1
or in postfix notation, aka reverse polish notation (we'll be using this a lot later):
a b * 1 + set(z)
Traditionally, this is made of a text file (like a .c or .py file), which gets passed to a compiler (.exe) via the command line.
Let's break it down into Words, Numbers, and Symbols
Introduction to parsing
Parsing math expressions with 'Precedence Climbing'
Programs are lists of instructions.
struct magic {
};
| OpCode | C equivelant |
|---|---|
add a b | a + b |
sub a b | a - b |
mul a b | a * b |
div a b | a / b |
mod a b | a % b |
call arg-count func | func(a, b, c, etc..) |