As part of my continuous dedication to ZPE as of recent, I'm now happy to announce ZPE 1.6.3 which brings a major change across the system but also removes some things.
For example, the way that the negation worked in ZPE has totally changed. The previous version of ZPE would negate using the not
command which was aliased by the !
command (or it might have been the other way around). ZPE now treats negation as a symbol it must acknowledge now as an actual negation symbol. What I mean by this is that it no longer compiles a function call from this (which is slower too) but simply negates the value. Again, this should have a small impact on performance. The LAMP Parser has been improved too, minor bits of code reuse have now been put in place of chunks of code, so it should be a bit faster too.
Another change is the way in which errors are now handled. An error in ZPE previously was a low level based error and whilst that same core principle still applies, errors can be handled a bit better now and are now an actual ZPE type.
However, the most important change is something no one will actually see (unless I've broken something in the process of building it) and that's the way in which chained functions work. Chained functions (such as a get
call on a list) are now compiled completely different, so if you use compiled code, make sure to compile it again using ZPE -c. It's so important that after any update all code is recompiled anyway, this makes sure that all byte codes stay in line with compiled work - I always recompile the standard library for the ZULE archive to ensure it is up to date.
I look forward to bringing new features to ZPE 1.6.4 but I'm going to be bold and say that since adding the index brackets e.g. [0] I feel that ZPE is really on a role to looking like a proper syntax. I have also begun to update the formal specification of ZPE as this is so important. At some point, I also want to finally split the compiler and interpreter into different classes. This was something I have envisioned for a very long time but it's such a big job it's not been possible yet.
This is by far the fastest release of a new version of ZPE since ZPE 1.6.1 was only released some four or so days ago but I'm very happy to announce ZPE 1.6.2. It fixes a ton of stuff and it's a lot better designed under the compiler hood than 1.6.1 was. The VARIABLE_INDEX
is now more functional than ever so that there is more stability when using the following:
$v = [44, 55, 66] $x = $v[2]
As well as adding more stability to the compiler, ZPE now will not crash if you access an undefined index, instead it will return !undefined
which means it can be much, much easier to check for an undefined index. Also, if an index that currently doesn't exist is assigned a value, e.g. in the above list index 6 does not exist, ZPE will now pad the array until it reaches index 6 with a bunch of nulls.
As well as this, the oldest method in ZPE got a big refurbishment. The is_set, unset and global functions are better designed to handle errors and in general are much better designed. As part of this, the is_set function can also determine if an index is set or not. E.g.
$v = [44, 55, 66] print(is_set($v[6]))
Finally, ZPE's argument parsing system has been improved again. Arguments are now even easier to use than ever before and they are parsed far faster. As well as this, in the main/default ZPE ZAC (that's actually when no ZAC is specified but instead a file is put in it's place) program arguments now simply follow behind the file. For example, when running ZPE:
zpe test.zex "Hello" "World"
Both Hello and World will be recognised as individual arguments automatically, no need to put the args value in front any more.
I've been really focusing entirely on Dash and neglecting the other project I care about and letting ZPE receive no major updates since January. Well that's really because ZPE is pretty good as it is, but it's also because I've been busy with work and with Dash as of recent.
But ZPE 1.6.1 is now available to download from my Download Center. It brings a few major fixes as well as a few new built in functionalities. On top of that, the stdLib has been recompiled, so the ZULE repo only contains the version 1.6.1 version (of course, you can recompile the source code for old versions of ZPE, almost all of which have been made available through the Download Center on my website).
The most crucial bug fix in 1.6.1 is the way in which values are compared. For instance, in version 1.5.x and 1.6.0 there was a glitch with comparison so:
1 + "1" = true
In version 1.6.1:
1 + "1" = false
This is essential for direct comparison. As well as this, assuming $x is undefined, in version 1.5.x and 1.6.0:
$x == "!undefined" = true
But as of version 1.6.1:
$x == "!undefined" = false
One should be careful when testing for undefined values by using the is_set
method.
A new name
Finally, after 3 and a bit years of development, ZPE is getting a new name. It's a big change and I've decided to rename it from the Zenith Parsing Engine to:
ZPE Programing Environment