For an extremely long time, ZPE has relied on native Object types for return values. I never wanted to keep this because it meant a lot of type casting, type inference, potential bugs, a lack of security regarding what was passed around ZPE, and also a lot of type checking. This slowed down ZPE and meant it didn't feel particularly stable.
As of version 1.12.9, ZPE is now fully locked down to the ZPEType return type, which includes ZPEStrings, ZPENumbers, ZPEBooleans, ZPEObjects, ZPEFunctions, ZPERecords, ZPETuples, ZPELists, ZPEArrays, ZPEMaps, and ZPEOrderedMaps. This reduces ZPE's flexibility, making the Core much more stable.
As I say, this is one of the biggest updates to ZPE in a long time and it paves the way to further updates that will strengthen this.
What's really cool about this update, nothing has changed in the compiler so no scripts that have been compiled need to be changed, and in fact, nothing needs to be changed in any existing scripts.
ZPE 1.12.9 features a few major changes and improvements, but one stands out more than the others: the introduction of explicit variable declaration.
Explicit variable declaration means that variables must be declared before they are used, either in an assignment or for anything else. For example, if a variable $x isn't defined first, the compiler will detect this and throw an error.
$x = 15
will throw an error, whereas
number $x = 0
$x = 15
will not.
In addition, ZPE gets closer to having all underlying data types as ZPETypes. This will enforce the fact that things like plugins can only return types that ZPE itself controls, which will lead to better type safety. As of ZPE 1.12.9, we now have the ZPENumber data type underneath. It took me a whopping 8 hours to bring it to ZPE, and the implementation isn't complete yet. Further, I aim to improve the way the ZPEString is managed so that fewer checks need to be done with them as well.
ZPE 1.12.7 brought many of the biggest updates to ZPE in a long time including bundling a YASS-based standard library that is compiled on start up, changing the way imports work and breakpoints.
Now ZPE 1.12.8 is just about ready for launch and it brings many big new features and changes.
The new features of ZPE 1.12.8 are:
- Namespaces have finally been added to ZPE
- Much better error handling
- The new -h bytes will list all byte codes available in ZPE and their representation, great for development
- New Javadoc based documentation is being added, a considerable amount has already been added to ZPE 1.12.8.
- Return types on functions can now be stated with
->
as well as:
- Several new exceptions have been added to ZPE (this version is known as the 'exception version' as a result)
- Short anonymous functions () => {} now support typed parameters.
- Static functions and static function calls are now available too (they will soon support namespaces too)
The big changes in ZPE 1.12.8 are:
- The cache values file is now stored in the ZPE folder, rather than where ZPE is executed. It makes much more sense this way.
- ZPE introduced a new ZPERandomizer engine in July
- Log files have been changed so they no longer take up too much space on disk and they rotate more efficiently
- ZPE Online files are now compiled when they download to ZPE
- The JSON parser now supports the null value
- Regexps have been improved to reduce the time they require to compile and test
- The main introduction is more detailed than ever before, making it easier to find out about a ZAC than before
- std_out prints to the same line
match
statements now only support one else statement and it must be the last condition of the statement
There have been several bug fixes too:
- ZPE no longer keeps asking to install the standard library if you said no
- Shell return values are now ZPEStrings making them comply with the ZPE data type list
- The --man option stated that all functions return an object on all instances due to a bug, this has been fixed.
- The rate and voice parameters in the speak command were not optional and this has now been fixed (as has the manual heading)
There are two breaking changes which include the new syntax of the match statement has now changed and the copyof keyword has been dropped. Both of these lead to YASS 24.7. Make sure you read the changelog to understand what it is that has changed.
Today is my birthday. Today, I'm 33 years old. 32 was a very cool number, but 33 is also a cool number. I don't feel 33.
That's all.
My amazing nana would have been 99 years old today. Born on July 12, 1925, she was one of the most inspirational people in my life. She supported me and shaped me into what I am today. Although she was very tough on me when I was a teenager, this was solely for my good, and it changed me from being soft into a much more resilient person.
Tomorrow, I'll be 33; my mum is 66 years old, so I'm now half her age. But also, I'll be a third of what my nana's age would have been if she was still here.
May of this marked 15 years since we lost her. The last 15 years have flown by, and I still miss her very much.
Namespaces are finally here with ZPE 1.12.8! They are essential for organising libraries and structures throughout programs. Look at the code below to see how they work:
structure HTMLBuilder namespace jsmith/packages /* * Functions go here * ... */ end structure $builder = new jsmith/packages/HTMLBuilder()
I'm delighted with my new photo sorting tool, which I developed to help me organise over 20,000 photos from the last six or so years.
Today, I sorted just over 900 photos and videos in just over an hour. This would have taken a lot longer in the past and required a bit more thinking with the drag-and-drop process of moving files and previewing each image or video. Although this only runs on my MacBook and is pretty fixed to a folder, I've written it so that it could indeed be changed.
It's also been a really easy application to write and only requires a few lines of code, all of which are embedded into one PHP file. It does require a web server to run and knowledge of how to use symb links.
Once I'm done with it, I'll post the source code to my GitHub.
After losing (or potentially being picked up by someone) my previous AirPods (first-generation Pros, bought in 2020), I constantly debated between purchasing new ones or attempting to find my existing ones. AirPods serve one purpose: to listen to audio.
It's simply not exciting to buy new AirPods like it is with a new MacBook or, on occasion, an iPhone. That meant there seemed to be more value in finding my old AirPods over buying new ones and dropping £250 on something that does mostly the same as the previous ones. That said, I've been using other earphones for the time being, and the difference between them and the AirPods they are covering for is phenomenal. I have seriously missed them.
Almost two months have passed since I first noticed I couldn't find them, and I must admit, it's been not easy without them. Going on runs or walks without them and using poor-quality earphones has been awful. Switching between my MacBook and my iPhone or Apple Watch has been a bit of a nightmare, but worst of all, I cannot watch films in my bedroom late at night with my windows open because my wireless earphones will not connect to my TV as my AirPods do. These are just small things, and I do get it, but I never like perpetually looking for something, and at some point, you do need to declare enough is enough and buy replacement ones - they just weren't going to show up.
So I did just that. I took my advice and opted to drop £230 on new ones to replace something that may eventually turn up.
How these change my technological lifestyle
These AirPods have resulted in a significant milestone in my technological life. The 2nd generation AirPods Pro now features USB-C charging, a game changer for me. One of my childhood 'dreams', I guess, was that one day, we would have one connector for everything. USB attempted this, but it didn't quite do it as it didn't support everything (such as video streams over the connector), so it wasn't really the right connector for everything. That's where USB-C changed everything, as I said back in 2015 when discussing Thunderbolt 3.
Now, my AirPods mean I no longer need a Lightning cable in my backpack. USB-C charges everything, and while I use my MagSafe connector with my MacBook Pro more than any other, at least my MacBook Pro can be charged with USB-C if that was all I had.
Finally, one connector that does it all.

Last night was one of the most significant landslide victories ever achieved by a party in the UK's history. Although not as substantial as Blair's or Thatcher's victories, the fact that the Conservative party has dropped so low is awe-inspiring.
Below is an interactive graph showing the number of seats gained graphically:
And here is another one showing the share of the vote achieved by each party, and it's not quite as red as the previous graph:
I'm most impressed by Ed Davey, who has drawn me back to the Liberal Democrats again.
Strangely, this is the first time I've had a new UK government since I started to vote 14 years ago.
This is an exciting time in politics personally as this represents the first change in a long time. Keir Starmer seems like an honest guy (he'd have to be to have worked in law beforehand), and I feel he's the right person to do the job. The Lib Dems have recovered very well from this election, too, and I'm not surprised with Ed at the helm.
Starmer seems to care for all four parts of the country too:
We clearly on Thursday got a mandate from all four nations. For the first time in 20 plus years we have a majority in England, in Scotland and in Wales and that is a clear mandate to govern for all four corners of the United Kingdom and therefore I shall set off tomorrow to be in all four nations.
I usually come up with codenames for the next version of ZPE quite far in advance, and this year is no exception.
For version 1.13, the following codenames have been decided:
- Petergate
- Micklegate
- Davygate
- Castlegate
- Monkgate
- Goodramgate
- Fossgate
- Colliergate
- Gillygate
- Walmgate
- Coppergate
- Stonegate
The inspiration for these codenames came from the City of York, where I recently had a short break.