Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Jamie Balfour'sPersonal blog

ZPE 1.10.8 is even faster than before! With new performance improvements and new features including TYPO v2.1 and typing within function declarations, ZPE 1.10.8 is set to be a big release. Data types have been added now to the stdLib to the functions that support it, but it became very apparent that multiple return types should be a bigger update than 1.10.7 was! 

How can we keep the performance high and yet add typing? Admittedly, every time a new feature is added, or a new check is required, performance takes a little dip. That is definitely true with anything. But performance can be made up elsewhere, and one of the areas where I have identified a performance gain is with the LAME evaluator and so I will continue to look into improving the LAME evaluator to make up for this.

Even without these improvements, or compiler optimisations, ZPE's standard library compiles and executes exceptionally fast, taking just 80ms to compile and run - that's very fast! 

Future plans for 1.10.8 also include auto prepending compiled files to make execution even faster. I will publish the next version of ZPE, which although will not be the finished version of ZPE 1.10.8, will allow you to test it out and I'll publish that today.

The ZPE/YASS compiler has featured support for typing of parameters for a long time, except it doesn't do anything. One could write something like the example below:

YASS
function test(number $s) {
  print($s)
}

test("Hello world")

And yet nothing will happen when it is given a string value instead of a number value. This is because, although it compiles correctly and is a well-formed ZPE expression, ZPE's runtime doesn't actually know what to do with it. 

Looking back, the way in which ZPE's function calls are made by placing parameters in an ordered set has barely changed and has stayed about the same since ZPE 1.3 when functions were properly introduced. 

ZPE also doesn't support return types. But it will very soon and the syntax has been decided (and included) already:

YASS
function test(number $s) : number {
  return $s + 5
}

Since the original method of generating parameters has been in ZPE and barely changed since 2015, it will be a rather big job to update this but it'll be worth it in the continuing move to making ZPE and YASS strongly typed. However, from ZPE 1.10.8 onwards, it will be possible to write programs that use strongly typed parameters and provide return types, they just will not do anything.

Simply put, I've got a new job at a place I have wanted to work since first working there in 2016! 

Continuing as a teacher or going back to the industry has been something I have thought about in the past but I have always come back to it because teaching is too darn enjoyable! Put it this way, I get real job satisfaction from what I do.

This is actually the second Tuesday in a row that I've had some good news! Last Tuesday I was celebrating passing my driving test and now it's a new job!

Anyway, since starting teaching back in 2015 and qualifying as a teacher in 2019, I have wanted to work at the school I now have a position at! Where I am at present has been great and I know I've left an impact on the school so I'm hoping to bring some of that enthusiasm and my skills to my new school! 

Recently I have found that some of the DIG tools out there are just too raw in their results and they've not been sanitised correctly, or provide too much information. So I've developed a new DIG tool on my website in the Dev Toolkit to help with this. You can find it below.

DIG Tool

Two years to the week after opening my jamiebalfour.scot domain for the first time I have decided it's time for a completely new domain.

My brother and I have been speaking about having one domain which we share but each have subdomains on, so without further ado, let me introduce the balfour.scot domain and the jamie.balfour.scot subdomain. jamiebalfour.scot will now redirect to my new domain automatically. This process will take a while to complete so you'll have to bear with me whilst this happens.

Further, my new email is just jamie@balfour.scot which is much cleaner.

As of today, you can download ZPE 1.10.4 from my website. This version includes passing by reference and by value and not just one or the other. Although there are not a ton of features in this version, the by reference and by value update is one of the most significant updates yet!

CSS Tricks, one of my favourite websites for non-standard CSS ideas, is now going to be acquired by DigitalOcean. I mean this is big news, I've been using DigitalOcean since about late 2017 and they've been amazing. It's actually good that it's DigitalOcean and not some other company that couldn't be trusted to make a good job of it.

You can read more on the CSS Tricks website here.

Exceptional Elephant brings a big new feature that really makes the new version more powerful than ever. 

ZPE had for a long time relied heavily on using by value passing of variables to functions, both internal and externally, and this became even more confusing when the new reference types came to ZPE (aka ZPETypes). For example, the list_add_element function would actually modify the original list passed into it, whereas other functions would simply copy the list and change it. No longer do any of these predefined functions copy the value passed but will always modify the version passed to it.

So, passing by reference is very important. But then so is passing by value. Now you can specify this by running list_add_element(&$l) to pass by reference, passing the original list through or by value by simply writing list_add_element($l). It's also important to note that with any programming language and runtime, and not just YASS, that passing by reference is considerably faster.

I've been wanting to this feature into ZPE for a good few years but it was tricky. Since ZPETypes have been included it's been much clearer to me that it was easy enough to do.

Over the last six or seven years, many of my followers will know that I have been developing ZPE and its accompanying YASS language. They've come a long way since the beginning both in terms of speed and performance. ZPE is 50x faster than it was when I first developed it (version 1.2), and 10x faster than it was five years ago. These are crazy stats when you think about it. But on top of all of that, hundreds of features being added makes it bigger and bigger.

ZPE and YASS functions work on many operating systems. They are inherently designed in the underlying implementation to work on each operating system (and yes, I do have to build separate ones for each operating system) which of course requires a lot of testing.

At the end of 2020, I separated the Windows library from the main ZPE package, thus taking away the Windows operating system elements from ZPE. This included writing to the registry, a different beep function compared with Linux and macOS, as well as things like Windows Jump Lists. Generally, the move has made sense. 

So without further ado, I'm really pleased to announce there will now be three separate libraries for each of the main operating systems that ZPE is designed for:

  • lib_windows
  • lib_macos
  • lib_linux

What this means is that these libraries will directly overwrite parts of the ZPE package, such as for Windows the beep function, on macOS the menu bar will be able to switch to the macOS system menu and on Linux there will be more support for Linux command line. These libraries are going to be developed bit by bit over the next few months to make ZPE even more specific to the operating system.

Last night I finished working on ZPE 1.10.2, the latest version of ZPE. ZPE has been the centre of focus for me recently due to the need to redevelop the editor from scratch. I say this because the editor used JavaFX and since the decision to remove JavaFX from the JRE in the latest versions, I decided to make things easier and go for a simple Swing interface. 

Swing didn't work too well the last time I used it to build the editor, in fact, download an old version to see what I mean. But the new version is so much better. There are still one or two features missing from ZPE's editor that were featured previously but they will come soon.

Powered by DASH 2.0