After a weekend of looking at my whiteboard, this is what I've come up with.
I'm pleased to announce that after nearly ten years of using hash maps in ZPE, I've switched to using my new binary search tree implementation. This improves performance further than before since in some cases my hash map, which is some 8 years old, would lead to collisions that in turn presented a O(n) case. This was not good.
The worst case for a binary search tree is indeed O(n) also and it's best case is actually worse than that of a hash map, which is O(1), but I've been testing out a new binary search tree I've developed and it performs marginally better. What's really cool about the binary search tree implementation is that it is actually a drop in replacement for the hash map I've been using for the last few years with methods like put, get and so on.
Throughout the next few weeks I'll continue to assess this.
The latest version of ZPE is here. And it's met the original target set out. This might be a small update in terms of features, but the features are pretty big.
First of all, we've got the new ChatGPT model. This model allows for direct communication with ChatGPT using an API key. The setup is simple and is done within the properties file. It can be used to assist in the editor as well as can be using as an object in code.
Second, we've got two new parsers; TOML and INI. Both formats are similar but offer advantages. I like TOML as a format and have considered using it as the main form of property storage in ZPE. INI is simple and basic and less likely to find use with me but it's great to finally have two new data formats that can be decoded by ZPE.
ZPE 1.13.2 will be released very soon and I'm also planning for two releases in February. The first new features that will come to ZPE are the encoders for both TOML and INI files. I also want to release an XML encoder by the end of February as well.
ZPE has increased in file size however, and this is due to the inclusion of ChatGPT. It's worth it though.
Over the next few months I want to add more to ZenPy to make a more complete representation of Python from YASS.
As well as that, I intend on developing ZenLua and ZenPHP. Both of these are in early stages and will be fully open source and available on my GitHub.
ZenLua will transpile YASS to Lua. This is something I've been thinking about for a while now as I use Lua quite a bit. My plan is to make it very easy for myself to write Lua with a language I think is considerably easier to understand.
ZPE now has ChatGPT integrated. The new ChatGPT object is available within the language and requires you to set up your own API key.
I'm also working on the editor AI features, including AI Suggest, AI Assistant and AI Improve. All of these will connect to my webserver but will require a subscription.
I'm really happy with this being the first feature of 2025.
ZPE 1.12.12 is now available. Sadly, not everything I had planned to bring in managed to be brought in. However, this version paved the way for further performance improvements with ZPEC (ZPE Performance Enhanced Cache), which precompiles code before execution and can make a serious difference to the program's performance.
Another nice new feature is that aliases are now stored in a file that is read on startup, meaning you can easily add or remove aliases to ZPE.
ZPE 1.13.1 will be released in January, and one of the significant features to be added is additional data formats, including the INI file format, TOML and JBML. I also aim to improve the caching system further.
Some bugs still need to be ironed out, such as the popups in the editor on Windows.
Also, I'm no longer doing ZPE throughout the year posts as they are actually reflected in the history of ZPE anyway.
The next version of ZPE, version 1.12.12, will introduce the new ZPE Performance Enhanced Cache (ZPEC). ZPEC will improve the performance of applications run through the -r ZAC by precompiling the application's bytecodes into a small file. The cached version will be stored in the ZPE folder as an unoptimised compiled program to make it as similar as the code it is based on.
The next time the program is run, ZPE will perform a cache lookup and, if the file exists, run it. If a cache miss occurs, it will compile and store the file in the cache and then run it.
It then performs some hashing to decide if the compiled program needs to be updated.
ZPE nightly was introduced so that when a change to any version of ZPE was made, the download would automatically be the latest version. Ultimately, nightly was supposed to be the latest, but it was not necessarily the most stable version of ZPE. Alas, the plan to deliver this didn't really work as it relied on my laptop being on.
The good news is that now, ZPE nightly is the most up-to-date commit on my GitHub. Once I commit to GitHub, the nightly will always be the ZPE that's on there. This means you can try out the latest and greatest ZPE anytime. You can head to my Download Center to download the newest version right away.
My website's function information on ZPE isn't always up to date with the internal function information from ZPE.
Well, from now on, the function information string will be automatically updated to align with ZPE. This is a big update that should hopefully make it easier in the future for me to update ZPE.
The latest version of ZPE brings many changes that improve its performance while adding new and additional features to make the language even easier to work with.
Let's start with that, then. ZPE introduces function tooltips that allow you to hover over a function within the code and read a quick overview of that function, its parameters, and its return type(s).
The latest version also adds support for $-unbound parameters within function definitions, changes the way objects are passed across (they are always by reference, never copied), and changes the underlying ZPE class to the ZPEMain class and the ZPE class, separating logic from the startup features.
There's also a new internal object for Pairs and the function
keyword that has been used for declaring a function type is now separate and is fn
.
When I chilled out today, I realised that building multiple return values into ZPE would be easier than I thought.
That's because the new tuple syntax already works with that. So, without further ado, the latest version of YASS, YASS 24.10, supports the new multiple return values syntax:
function multiReturn() return 1, 3, 5 end function ($x, $y, $z) = multiReturn()
YASS 24.10 may be one of the final updates to the YASS language for a while. That's because its syntax is pretty perfect now.
I'm excited by what multiple return values brings to the YASS language.