I was not able to complete the changes that I wanted to back in June and July due to family issues and also my own personal health issues. Right now, I am very busy with class work and am unable to put much coding effort into the interpreter. With the little free time I do have, I've been working on designs and learning how to effectively use the C library. During the winter break, I plan on trying to write as much of the interpreter in C instead of C++. I am also focusing the scope of the language to more of a scripting language. I feel I have been trying to make the language too broad for an interpreted language. I will leave general purpose computing to the compiled and just-in-time compiled languages.
I have been working on redesigning the Fermion interpreter to support all the features I would like to have without hopefully sacrificing speed and efficiency. The new design is completely different from the original. The original design uses static variables, so any variable can be accessed from in a C++ program. The new design moves towards a data stack system which expands and contracts as functions are called and returned. The new design allows for recursive calls to maintain their own local variables. The new design also uses a Heap stack and pointers for class objects and dynamic array sizing. Classes have also been redesigned to keep a single definition of a class method and use a pointer to access the correct variables.... read more
Fermion 0.72 is released. Fermion is still in alpha stage as many features are still incompleted or not started. Fermion 0.72 change log is below:
-Interpreter now runs statements as they are loaded
-New fixed array declaration: var aFixedArray[arraySize]
-Dynamic arrays can also be declared with var aDynamicArray[]
-Added exception for array index out of bounds
-Foreach now allows object to be modified
-Added new Macro type for time and random
-Fixed bug where functions and arrays did not work in expressions
-Fixed bug where values could not be pushed into a dynamic array
The Fermion 0.71 interpreter has been released to the public. The 0.71 release fixes negative number support, changes the inheritance syntax for classes, and modifies the conditional statement functions to increase efficiency. The upcoming 0.72 release will focus on changing the interpreter's type system to increase flexibility.
I don't know why I didn't add this sooner, but finally negative numerical values are supported. The AddSpaces function used by the Statements was modified to know when a - sign came after another operator or not. Then, I added in a clause for the IsNumber and IsInteger functions in the TypeCheck header to allow the - sign in values. The update is on the SVN. After some more testing, I will release the new conditional handler, inheritance handler, and negative number support as 0.71.... read more
I have never been a fan of changing syntax enough to break backwards compatibility, but I did not like the old syntax for inheritance. Instead of having an inherit keyword used inside a class declaration, Fermion will begin using the extends keyword in the declaration much like Java, for example: "Class myDerived extends myBase." The new syntax has already been added into the SVN for testing.... read more
I modified the functions that handle logical condition statements to use one less for loop. The new code has been posted into the SVN for those who wish to test the new handler out. The increase in efficiency was about 7 thousandths of a second for a program running a while loop 1000 times. The improvements are dependent on the size of the statement. For instance a small statement such as "x == 5" would not see a large increase, but a larger statement such as "(myFunction(5,2) + 5) % 2 == 1" would see more of an improvement when ran multiple times. My next goal is to allow parenthesis to be used in a condition statement.