# Jamie Balfour'sPersonal blog

For the first time in however many years, I have been spending a lot of time on working on making ZPE talk to my website and web server. As a result, I have been working on making a shared community that will allow users to save their work to the cloud.

The cloud will be powered by my own website engine that allows the posting and getting of user contributed content. This will not only be very good for clients who would like to access scripts elsewhere, but it will also allow sharing of code.

This is no where near finished, but it's got some traction already. You can find out more here.

zpe
online
1.7.4

ZPE 1.7.3 which is another major update to ZPE, is available from today. Major changes include the way that arrays work in ZPE, along with ordered associative arrays. Binary, octal and hexadecimal values have changed (see the changelog to find out more), structures are now less like standard objects where values can be set on them (see the previous post) and there's now several new documentation styles (@author, @date and @doc).

Also the update changes the parse_json, parse_csv and parse_xml functions to json_decode, csv_decode and xml_decode and there is now a new csv_encode function.

Overall, the tweaks made should make development even simpler than before.

zpe
1.7.3
update

ZPE 1.7.3 now brings a big change to the way in which structures work in ZPE. Originally, objects were extensions to the design of structures but as time went on it actually became structures that were extensions to objects.

Now, the object has become such a major part of YASS that the language itself has become largely object oriented. As direct result, structures have formed a major part of the design with much of the language being developed to take advantage of them. Now, with ZPE 1.7.3, structures differ from objects for the first time.

Structures were always blueprints or templates of objects that were yet to be defined, much like in an E-R diagram and entity is a description of a record that has yet to be implemented. But structure instances always allowed you to add properties like in JavaScript which in my opinion was plain silly.

So:

YASS
structure tester

$name = ""$dob = "1970-01-01"

end structure

$person = new tester() print($person->$name)$person->$test = 10  This was valid in ZPE as it is in JavaScript where a previously undefined property (in this case$test) can be defined at runtime. Not any longer. ZPE 1.7.3 changes this an enforces the structure on the user. Another major update that comes with this is the new class keyword that can be used instead of structure.

There have also been significant changes to the standard library that is now available on ZULE too. This update to the library makes it no longer backward compatible with ZPE version 1.6.x and before but it makes it better for the newer versions.

zpe
structure
class

Constants have existed in ZPE since 1.2.01 of BlackRabbit Script, and were actually added as one of the first defined features. They've always had one problem since the beginning. They were interpreted, not compiled. With ZPE 1.7.2 some 5 years later, constants are moved to the compiler where they should be. They no longer have a syntax of #x = 10 but now require the define keyword in front of them:

YASS
define Jamie = "Jamie Balfour"
print(Jamie)
print(Jamie & Jamie)


Further improvements will make the LAME evaluator faster than version 1.7.1's LAME evaluator that completely redesigned the way evaluation works.

zpe
1.7.2
constants

Starting every post about ZPE with using something along the lines of "without a doubt, the best version" is something that's pretty tricky, but since each version of ZPE is incrementally better than the previous, it makes sense. However, as great as the latest fixes and additions are, I'm not going to start the post with this line - you be the judge of that.

Anyway, I'm happy to announce ZPE 1.7.1, Kasba Lake, is now available for download.

Kasba Lake brings a huge improvement to the ZenithParser that was a complete rewrite of the basics of the parser to make it faster and more flexible and functional. The new parser offers the ability to include bound characters, return whitespaces and much more. The ZenithParser also compiles CSV, JSON and XML much faster than before which can be useful to people who want a fast parser in the native language of Java. As well as that, the new ZenithParser allows the programmer to define custom whitespace. Overall, the new parser is 10% faster than before, all while being far more memory efficient too.

Kasba Lake also brings by reference variables! This is a useful feature that has existed for a long time but not been fully implemented until now. By reference allows methods to modify an original variable, not a copy.

1.7.1 is also monumental for development by changing the core of the compiler and interpreter. When ZPE started in 2015 it was developed as the Zenith Engine. Since then things have changed and not only has the parser become publicly available, but the Zenith Engine has some exposed methods. Well since that all changed, the Zenith Engine no longer exists as one thing. Instead there is a completely separate compiler and interpreter (or runtime). This is more efficient and the new version runs much faster as a result of this. In 2015 since ZPE was only some 5,000 lines of code, the single design was easy to manage too, but even since late 2017 ZPE has over 30,000 lines of code, making management of the compiler and runtime tough. I had always planned to separate them but never got round to it.

Another huge change is that of the new LAME or Logic And Math Evaluator that replaces the LAMP or Logic And Math Parser which now carries out both the operation of parser and evaluation in one go. This is up to 3x faster in tests I have run than the original LAMP that it replaces but is 100% accurate compared.

ZPE 1.7.1 also finally includes a web server. The ZPEWebServer is now ready for use and can act in the same way as PHP, performing very quickly. It's currently in the beta stages but all ZPE functions will work in it.

One last thing, ZPE 1.7.1 is about 15KB bigger than ZPE 1.7.0 because it has the original LAMP and the new LAME included. ZPE 1.7.1 can be seen as a hybrid between LAMP and LAME. LAMP will disappear in the near future and is now considered deprecated. You can currently use the LAMP parser if you wish by adding a setting to the properties file called use_lamp and setting it to true (ensure you lowercase both options).

zpe
1.7.1
kasba
lake

It's about time. ZPE finally has a web server. A few years ago I added a communication server to ZPE (I think it was added in version 1.5.x) that allowed two or more ZPE programs to communicate using XML requests. It was great and it was reasonably fast.

But since then, ZPE has become so fast that I decided to write a server. This server uses ZPE as the main syntax for everything and because it's parser has been improved so much it's fast (maybe not as fast as PHP or C based applications, but it's good overall).

YASS
<!doctype html>

This is  here.



ZPE has always been aiming to get to the point of doing this, since I consider myself more a web developer than software developer nowadays, I wanted to get something like this.

ZPE's main advantage is it's library of features, plus the ability to write extremely fast functions into the language  and it's already existing standard library.

To be clear version 1.6.x added the web parser to ZPE (the -w ZAC), but it wasn't fast enough for me until I updated the parser to version 1.3.

zpe
web
parser
server

I'm extremely happy to announce after a lot of thinking and redesigning, ZenithParser 1.3 is now included in version 1.7.1 of ZPE and later. The new version of the parsing engine offers much faster and more efficient parser than ever before.

The results are in:

ZPE 1.7.1 with the old parser (version 1.2.1):

real 0m0.668s
user 0m1.390s
sys 0m0.152s

Compared with ZPE 1.7.1 with the new parser (version 1.3.0):

real 0m0.595s
user 0m1.270s
sys 0m0.136s

This may only be a 10% increase overall, but in reality this is big news. Minor improvements for the standard library run and compile but for interpreting JSON, CSV and XML files amongst other file types, this is an incredible amount of speed.

As mentioned over and over, the parser is by far the fastest part of the compilation process since the ZenithParser has been the main focus for years within ZPE.

Another major improvement in the ZenithParser 1.3 is it's ability to handle whitespace better and allow the compiler to re-add whitespace later. This has had incredible use within the ZPE web parser.

zpe
1.7.1
zenithparser
1.3

ZPE's implementation of by reference variables was a tricky one since the underlying Java does not give access to such a powerful tool.

Since version 1.7.0 Reindeer Lake, which was officially released yesterday, ZPE has supported by reference variables and will continue to make them more powerful. As these are new, there is currently no documentation on them. I will add some soon. In the meantime, I thought it might be a good idea to use my blog to explain these in more detail.

ZPE/YASS by reference is achieved with a ZPEVariableReference object which points to an actual ZPEVariable. Changes can be made to overwrite these in functions or to overwrite just their value. A change to the value will change the original value. Let's see it with code:

YASS
function main()

$y = 5 j(&$y)
print($y) end function function j($y)

$v =$y + 10
print($v) &$y = 10
print(&$y) end function  Notice the changes between using &$ and just $. If using the$ syntax in an assignment, it will destroy the reference. Also note, the parameter name is still just $y, even though it contains a pointer. To access the parameter$y as though it were a pointer, it is simple enough to just put an & in front of it as shown on line 14.

That's all there is to ZPE by reference variables so far. I will continue to improve them over the next few versions so keep an eye out!

zpe
byref
by
reference
variables
1.7.0
1.7.1

Over 2018, ZPE has improved more than ever. Here is just a sample of the new language features brought through the year 2018:

• Performance is better than ever.
• The syntax is cleaner than ever.
• Its name is now a recursive acronym and much easier to say.
• It's more object-oriented than ever before. Object inheritance was added. Objects performance has been improved.
• TYPO was finally brought to the language.
• Native methods for objects were brought to the language.
• Pre-increment and pre-decrement syntaxes were changed to be in line with other languages such as PHP - this was one of the most requested features back in the early days of ZPE.
• A new FOR LOOP, the FOR EACH IN LOOP was added.
• The circumflex (^) for representing the power value, e.g. 5^2 is now part of the syntax
• More syntactic sugar was added to the compiler, such as the IF...THEN statements. The fat arrow syntax for lambda functions was added. elseif can now be written as else if as well.
• Value caching with the cache_value and read_cache allow programs to save information for later.
• If statements can have values assigned within them. E.g. if((\$v = 10) == 10)
• Python-style fixed arrays have now been added
• The interactive interpreter has been improved by miles - it performs better and doesn't stop when it has an error.
• Further refinement to 'everything is a function' strategy where the whole program runs within a function has been furthered.
• The internal updater has now been added

What's still left for development in 2019 then? Well, the answer is that there is a ton of stuff still to be done. For a start, I'd like to improve the performance of the LAMP parser considerably. There is definitely scope for improvement there. It will be a drop in replacement for the current LAMP parser too since the LAMP parser implements the ZPELAMP interface.

ZPE will also get the automatic update feature brought to it, so it will inform users when there is an update. The GUI object is also going to be one of the main focuses for the next version of ZPE. As well as that, ZPE will move further to becoming an object-oriented language by furthering the number of object-based methods within the language. 2018 also added a Python transpiler, I will continue to work on that and hopefully finish that.

## What happened to ZPE 2.0?

ZPE 2.0, the C++ compiler, interpreter and runtime that was designed to replace ZPE 1.x was going to take too long to develop and I'm quite happy to work on ZPE 1.x for now as my main project. In the future I will possibly continue to work on ZPE 2.0 again.

zpe
2018
january
2019
review
lookback

A long-awaited feature in the ZPE was the request for an updater built-in to the interpreter and parser. So now with ZPE 1.6.8.1 you can, although a minor update, it is actually a big update for it.

This is a long awaited feature and it's very easy to do. ZPE 1.6.8.1 is now also available to download from my website as of today. To run the update, simply type:

zpe --update

By reference-style variables have yet to be fully implemented and are partially implemented in ZPE 1.6.8.x. They've been disabled within the release versions.

With 2019 just around the corner, ZPE 1.7.0 is also just about ready to be started and readied for release. ZPE 1.7.0 is bringing some performance improvements and one or two new syntax features that aim to make ZPE even better. ZPE 1.7.0 will also bring an automatic updater, expanding on what ZPE 1.6.8.1 brought. Unfortunately, ZPE 1.6.9 which I had hoped to bring out before the end of the year, has been scraped due to the lack of time.

zpe
1.6.8.1
1.6.9
1.7.0
1.7
january
2019
december
2018