Look I made an online compiler

Usually I try to make posts that will be useful to other people, but this is not one of them. Compilers is a class that is an important class, but also an ego stroke class, which is why probably why I signed up for it. Compilers is also something 99% of CS majors will never have to work on in their professional careers.

Anyways I took a compiler class and the class got quite confusing and hairy pretty quickly. Our first assignment was learn Pascal. We had to write a non-trivial program in pascal that did some text processing and output a report, but we could not use Strings… It is quite a pain to use arrays with null termination to process a text file, but that was the “easy assignment”.

Fast Forward to about 2 months and we had learned everything we needed to know about compiler to build our own language. I choose to loosely design the language based on Type Script, because I wanted to know what the hype was about and thought it would give me an opportunity to learn the language that the Overlords at Microsoft had designed.

My team of 4 had to design and implement a compiler from scratch. Our end goal was to have all the basics of the language we chose, be able to copy paste a sample from that language and execute it.

I would probably say that Compilers was one of the hardest classes you can take as a CS student. There were many times I thought that it was impossible to complete the project on time.

In the end we did end up with a pretty “decent” compiler and my ego was duly stroked…but not enough. One thing I hated about my compiler was that it was only runnable in eclipse. I could not show the world this thing I had made. My project was going to live out its miserable life on my SSD drive and probably never run again after the semester was over. After some research and Node.js hackery I decided to put it online. It was pretty fun trying to figure out how to get things to compiler async with some bash scripts, but nothing compared to writing the damn thing. Now without further adieu I present compiler.q-apps.io the worlds most pointless compiler.

Steve Yegg’s article put me on to this compiler stuff. My only regret is doing this in Java and not C++. If you get a chance to take a compiler class please do, it is actually kinda fun. Now I wait for Rust to mature so I can write another compiler that is in a lower level language…I think it might be the addiction Yegg warned about. Now time to go take a typing class.