When I first started programming, I was thrilled by the complex engineering of a programming language. Along the way, I came across several programming languages, C, Assembly, Python, JavaScript, MATLAB, and many more. But never did I think that I would be making one myself.

I started working with chaScript a few weeks ago. The whole thing is written in TypeScript, which itself was a new experience for me. I have worked with TypeScript before in Angular projects, but never in a standalone project. It mimics a LISP like-syntax and has features like math operations, variable declaration, conditional statement, and loop. Also, I got to make my first CLI app, which runs all the chaScript programs from the terminal.

It may sound daunting at first, but making a programming language, at least a simple one is not that hard. Once I got the hang of tokenizing, parsing, creating an abstract syntax tree (AST), and evaluating the AST, there’s nothing much to it. Also, shout-out to Steve Kinney’s dropbear, which was a constant inspiration along the way.

It may not have any practical use, but it was a fun and educative experience nonetheless.


P.S. While making this, I didn’t know there already exists something called chaScript. A friend of mine pointed it out after seeing the project.