# Jamie Balfour'sPersonal blog

ZPE 1.9.7 (Galashiels) is one of the most solid updates yet. Many major bug fixes have been introduced, new performance gains and a new typing system (TYPO v2).

TYPO v2 is perhaps the biggest improvement to the whole ZPE Programming Environment in the last few months, and it changes the whole way that it works underneath. Instead of doing type checking at compile time and thus making starting and interpreting programs/scripts slower, it is now done at runtime. The impact here is actually slightly smaller and relies on the underlying implementation of variables to perform this check.

TYPO v2 also removes the STRONG_TYPED property from the properties list and allows side by side strongly typed, statically typed and weakly, dynamically typed variables to be declared side by side in a single program or script.

All ZPE/YASS documentation has been updated to reflect this new change, particularly the page on Assignment and variables.

ZPE 1.9.8 is looking to use more static hidden objects to improve both performance and lower memory usage. This might be another big update.

TYPO has been completely redesigned from the ground up to make it even better. Compared with the first version of TYPO, the new version uses late static type checking which is done during runtime rather than compilation time. This does add a slight performance penalty compared with untyped data, but it is far more stable than attempting it at compile time since so many functions may return multiple data types.

For example:

YASS
declare $i as number = 50 declare j as number = 32$i = "Test"


This would crash when it gets to setting $i from a number to a string. Previously this check was carried out by the compiler but it wasn't effective in comparison, whereas defining it this way ensures 100% efficiency in comparisons and although late typing often has performance penalties, in comparison to the previous iteration of TYPO so much has been improved that these penalties are actually minuscule. Another major change to TYPO is that is now always enabled and doesn't need to be set in the ZPE Properties file, and can be used in parallel with untyped YASS code for the first time. The formalised specification of the language has yet to be updated with this new information but will be sorted at some point over the next few days. With ZPE and YASS featuring more and more unit testing capabilities, I thought it was time for me to look into adding proper testing methods. ZPE unit testing will broaden and expand the current situation with unit testing to the point where specific unit testing scripts can be produced separately from any code. Unit testing, known as zUnit, will feature its own language parser, also built upon the Zenith Parsing Engine, of course. It will use a language different from YASS entirely and will also allow multiple tests to be carried out on code very quickly. Like when ZPE started out, it will likely begin as a very basic tool for testing but will expand to provide more and more features as time goes on. As a result of the sweeping new changes brought to unit testing so far, ZPE 1.9.6 is now available much earlier than I had originally planned for. Please also note that this version removes the new record structure as this is under redevelopment. ZPE 1.9.3 brings a really nice feature that I've wanted in YASS for a while. That's Python/JavaScript variable names. It's more like ES6 than it is Python but have a look for yourself: YASS let x = 10 print(x) //Or a lambda function let x = function() print("Hi") end function x()  This works by adding additional information into the compiler that allows it to distinguish variables from functions within the compiler. I'm pretty impressed since the only performance penalty from adding this is within the compiler which is almost minimal. ZPE 1.9.1 was officially released today marking the first of the 2021 versions of ZPE. ZPE 1.9.1, codenamed Kelso, comes in with a large number of new features and performance improvements and is recommended to all users. Version 1.9.1 finally fixes undefined comparisons, improves the LAME parser, adds support for empty associative arrays to the JSON parser, fixes a parameters issue, and fixes negative numbers in the binary calculator by cutting them to the appropriate number of bits (this was tricky to implement but I figured a way to do it as I always do). But, the big feature is the match construct. This is the first new construct in a while as well (it's actually an expression but since ZPE doesn't have expressions in the documentation and it flows like an inline construct I'm calling it a construct). The match construct is now fully in the documentation and it's a pretty powerful construct. Did I mention that ZPE 1.9.1 is actually smaller than ZPE 1.8.13 too? One of the new features that's been recently added to PHP 8 which I'm also excited about is that of union types. ZPE has actually had union types for a while, but it was never formalised in the YASS language and therefore never actually enabled. In the next few versions, I will bring union types to ZPE. There are other plans for ZPE in terms of types actually, since it was suggested that untyped and typed code should be mixable. Thus, in the next few versions, I will bring the ability to mix and match hard typing and soft typing in the code. ZPE 1.8.11 is now available and is another small update in terms of the number of features but big in what the new features bring. The first big new feature is support for infinite parameters. This is done within the definition with the double dot notation such as function x($y, $z ..). There is more in the documentation. Reference functions have been completely redesigned, as have objects. With objects, there is a 2x performance increase whilst with reference functions, there is a much larger performance increase as well as a stability improvement. Reference functions can now be chained to each other much easier and this change requires much less code to do it. ZPE 1.9.1 might be over three months away following the version/year release cycle that I developed for it, but nonetheless, it is a good time for me to explain the new codename system chosen for this cycle of ZPE versions. After much debating with my brother over this one, I have decided to name them after places in the Scottish Borders. I thought I'd start off with a few version names: • 1.9.1 - Kelso • 1.9.2 - Selkirk • 1.9.3 - Hawick • 1.9.4 - Peebles • 1.9.5 - Melrose • 1.9.6 - St Boswells • 1.9.7 - Galashiels • 1.9.8 - Chirnside • 1.9.9 - Duns • 1.9.10 - Lauder • 1.9.11 - Earlston • 1.9.12 - Roxburgh • 1.9.13 - Allanton There may be more names in the future but that's all of them for now. You may also note that I am no longer starting on minor version 0, e.g. 1.9.0, but starting on version 1, e.g. 1.9.1. This is a change that makes sense to me when developing. zpe codenames ZPE 1.8.10 is another big improvement with the new security sandbox being improved considerably. It also adds big new features to the ZPEClient and ZPEServer modes that allow SSH-like commands to be executed as well as SFTP-like commands. I have also added in my own file system management tools to assist in correctly parsing file pathnames such as ../ on Windows systems as well as all other platforms for a consistent file management system. The new logo has also been added to the GUI and I've improved the debug mode. Once again, ZPE 1.8.10 is a big update like its predecessors were. It's now available for download from my website in the usual place. SFTP is an amazing protocol. I've been using it for a good 7 or 8 years now and it's been one of the most useful tools I have ever used. SFTP features commands like get and put. Well ZPE 1.8.7 added the send> command to the ZPEClient which allows sending a file to a ZENServer. Prior to this, I had been ensuring that all data between the client and server is secured using my own encryption system. Well, without hesitation, I knew that this had to come to file transfer too. So now ZPE can send and receive files that are encrypted and decrypted within the client and server. This breakthrough is a compelling reason to use ZPE since it offers a very strong alternative to SFTP. Further to this, to make it even more powerful the client now offers the ls (list files locally) command and the rls (remotely list files) commands. zpe secure files Past versions of ZPE have often contained flawed features such as the LAMP evaluator or minor things like performance glitches. This is often the case with any project. But any project will have flaws in it somewhere. ZPE is no different. However, the stability of ZPE has got to the point where I believe that most of the flaws and errors that stop it being usable have been ironed out. Over the last few months, ZPE 1.8.x has been removing old code and has cut down over 10,000 lines of code from both the runtime and compiler to make it more streamlined but also to improve stability. Further to this, features from very early versions have been revisited and revised to ensure much better performance and reliability - writing a programming language, compiler and runtime is quite tricky you know! Most of the issues actually come from the runtime, since I spent a lot of time in 2016 improving the compiler whereas the runtime just got a small bit of TLC. Another major issue that often occurs is when new compiler features are added that actually could interfere with another feature. Now I spend a lot of time drawing up the ideas so don't get me wrong, I actually do plan. But sometimes it's difficult to see these potential collisions from the offset. For example, the move to the fat arrow syntax for lambda functions caused all sorts of issues until I decided to merge functions with lambda functions (that in itself caused further issues). More recently I discovered after going through the compiler that the generate_parameters function would allow values to be added in a function declaration's parameters: e.g. function foo ($x, 10) { print(\$x) } because the generate_parameters function was designed for both formal parameters and actual parameters. This has been fixed by separating these into generate_parameters and generate_arguments.

If you are writing programs using ZPE and compiling them, make sure to recompile them with the latest versions as soon as they are available as byte codes are constantly changing and being added. A new feature I'm adding into the runtime is to check which version compiled the program before attempting to run it since old versions may have different byte codes.

Since ZPE 1.8.8 was released as a fix for a bug in ZPE 1.8.7, ZPE 1.8.9 will be released on 05/08/2020.