Skip to main content

Why I want to make a programming language

·486 words·3 mins
Author
Yap Jia Hong
“Nah, I’d win.”
Table of Contents
Moon - This article is part of a series.
Part 1: This Article

Lore drop
#

I’ve tried making rlox, the lox programming language featured in CraftingInterpreters but implemented in Rust instead of Java, ~3 years ago. Didn’t go well, I was really inexperienced and had no patience and would often skip to the next section to try and get the next part working without giving the earlier parts the bare minimum polish required like handling (at least a few) edge cases properly, too much code duplication, didn’t focus on one part and instead split my focus across multiple areas. All of this made it all the more difficult to pick up where I left off. It was this combined with the difficulty of the task and made it hard for me as I did not want to feel stupid.

I had stop working on it due to university, and if I’m being honest I didn’t work as hard as I could’ve. I lost a lot of time and wasn’t honest with how I used my time, I don’t even remember what I used my time on but I know it isn’t anything worth while. So, why would I want to go through it again after three years?

  1. I wanted to learn something. School is great, I did learn but it felt dead. I didn’t enjoy most of my classes and just cruised through most of it. I didn’t have an easy time, I just didn’t enoy the time. Things can be challenging and difficult.
  2. I wanted to make a complete project. Despite having multiple projects on GitHub none of them were every 80% complete. 60% at most.
  3. I want to make my thesis something more unique. Yes, I do intend on using developing a programming language as my thesis. I’m a second year degree student and the thesis is quite far away roughtly a years time. But, starting early is never a bad idea. Since during my third year I’ll have regular responsibilities like exams and assignments and my thesis on top of it. I won’t actually use Moon’s source for my final year project, as the school owns my code. I’ll instead develop Moon to a certain standard and use that snapshot as the end product for my thesis.
  4. Regaining my proactivity. In the beginning I wasn’t pushed away by how bad I was at programming and I took a lot of time and effort into learning it. Problem was I grew complacent, thankfully I joined a community and the people there are so much better than me that I felt it neccessary that I “catch up”. The thought process would go “This guy is so good. I should put in more effort.” It always hypes me up.

Goals
#

  1. It should be functional enough to perform basic operations such as saving values to variables and operating on them.
  2. Moon should be a compiled language.
  3. It should have an interactive repl.
  4. It should be developed in C.
Moon - This article is part of a series.
Part 1: This Article