The compiler for GammaLang was originally started in C, however after getting the initial parser completed, progress slowed way down. At first, I thought that I was losing interest in the project, but after realizing that I was still working on the project the same amount of time, and constantly thinking about it. I have come to the conclusion that it is actually C that is slowing down my development progress. The added complexity of memory management & data structure implementation in C was consuming lots of brain cycles and hours of development. Thus the need to move to Python.
Enter the Python
Over the last year, I find myself drawn to the Python programming language and ecosystem. I know that it produces much slower execution times than other options, but what it lacks in execution speed, it makes up for in just about every other aspect. The simplicity of the syntax, the speed of development, the expressiveness of the language is amazing. Features such as List comprehension, which also works with Dictionary (HashMap) objects.
My first thought on this was along the lines of "If I am targeting C source output for Gamma, why shouldn't I code the compiler in C?" Now, I have the answer; it is too time-consuming. While C is extremely fast during execution, the speed of development is horrible. Furthermore, I am actually planning on completely rewriting the compiler in Gamma once it is mature enough to do so. Why then, should I spend an extraordinary amount of time developing what is essentially a throwaway (stepping stone) project.
The discovery of Arpeggio.
During the development of Diadosi & QLisp, I discovered the Arpeggio Library for Python. It is a breath of fresh air in PEG-based Parsers. It being written in Python is a huge bonus to the dynamic nature of the parsing problem. Parsing is actually the easy part, but still, it is nice when there is a library taking care of the tedious details, while also allowing you to attack the problem in a different manner. While not wildly fast during execution, it is crazy flexible and great to work with on the coding side. I will most likely be making a clone of this library directly into the Gamma Standard Library (GSL) to facilitate the development of the Gamma hosted Gamma Lang compiler.
Something that I have never really liked doing in development was thinking of my code a disposable. One of your goals as a developer is to maximize code reusability and minimize the amount of time you take do develop solutions. Hopefully while minimizing the number of bugs you introduce into an application as well. Working with python and in particular on this project, has forced me to come to grips with this fact, "There are times when it is necessary to create a program in which you know will be thrown".