To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you consent to the use of functional cookies. For more information read this page.

Jamie Balfour'sPersonal blog

ZPE is now available in native format!

Unlike previous operating-specific versions, these are not bundles but are actual binaries. They are compiled from the original JAR using GraalVM and native-image to improve performance. As a result, they are considerably larger files but also faster than the previous versions. A Linux version will also be available very soon. The JAR version will continue to be available and will remain as the primary version for those wanting the easiest of the installations.

As for Windows, I'm not sure when it will be available, since I only have one machine running Windows and I don't intend to turn it on to solely compile ZPE.

BalfBar version 1.5 is a massive update, making performance improvements, changing the way it works underneath, and adding features that make it much easier to set up and more stable than previous versions.

Version 1.5's headline feature is that it removes animations from JavaScript and moves them solely to CSS. The other feature that is now completely departing is the hover class that is added to items. This was added to help support older browsers but also was used in the older versions to decide whether to keep the menu open or not. BalfBar now also adds a new menu_open class to the main BalfBar item which is added when a menu is opened. 

I have already deployed the updated version to my website, so take a look to see what I mean.

Posted by jamiebalfour04 in BalfBar
balfbar
wisp

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.

This morning I began thinking about how to make certain posts stand out from others. I call some of my posts personal treasures, for example, nobody is really interested in what I did on my birthday this year, but I want to treasure that moment forever and where better than my personal blog that has now been running for 12 years. 

So to make that post stand out as a treasure I wanted to make it stand out. I did this by applying my glow effect to it, giving it a gradient border as I have used across my website. 

With the latest minor update to DASH, this is now fully possible with the new classes option.

I turned 31 today at 10.30. It's been a really nice day, mostly, except for the fact that getting my new shed delivered resulted in my outdoor lights - which are less than a week old - getting broken. 

The day was generally lovely though. For starters, my mum took me to Costa for breakfast which was really nice and unexpected. We then went back to my place and enjoyed the weather from my garden for an hour or so and then my mum headed home. Mid afternoon my mum and my aunt came across to have tea and enjoy my garden with me before heading down to the Longniddry Inn for birthday dinner, which again was really nice.

And that was it, my 31st birthday! 

I miss my nana very much having lost her now 13 years ago. She was a remarkable lady who felt like an unstoppable force and was my inspiration for a lot of reasons. I miss her very much and I've never done a tribute like this to her. 

For the longest time, I have enjoyed the fantastic Samsung SmartThings. Still, with concerns over speed, cloud access, reliability and of course longevity of the service, I have opted to move away.

Today, I received a USB to Zigbee adapter which I inserted into one of the USB ports on my Ubuntu home server. I also got Home Assistant installed (I am already using Homebridge). To my amazement, the USB Zigbee adapter was recognised by Home Assistant immediately (I mean Linux is often a pain with drivers so I was worried about having to spend precisely 9.23 days trying to get this working but not this time). I got started and found that the installation of my Zigbee devices away from SmartThings and into my new Home Assistant was incredibly easy - in fact, better than SmartThings. 

I say better because SmartThings requires a cloud connection no matter what, even if the connection is local. This meant that things were slower and with SmartThings unifying my whole home, this meant that simple things weren't quick. I also say better because things like my Xenon power strip can now be recognised as four different plugs - not one. This has allowed me to remove one of my WiFi-powered power strips and replace it with the Xenon one (at last). 

Since Home Assistant also works locally, I decided to turn off my internet connection for a short period to test it. And voila, it switches on and off without the need for an internet connection absolutely perfectly - and fast.

As well as Alexa devices, Home Assistant also integrates with Apple devices easily by acting as a bridge. Now I plan, at present, to supplement my Home Assistant with Homebridge since it is also fantastic and it actually runs on the same server. Further to all of this, my Alexa devices now integrate entirely with my Home Assistant, allowing for much quicker control. 

My whole stack is much cleaner and much better designed with the performance that makes it so much more reliable and less reliant on third parties. I plan to install more Zigbee control devices around the house in the next few months too and I'm looking into installing touch screens across the house with control for each device to make things even easier than they are now.

The new version of ZPE is out now in beta stages, and it's pretty awesome, to say the least.

ZPE 1.10.7, aka Hasty Hyena, is quite symbolic since it now features symlink features. 

The three new functions, which currently remain undocumented, are able to add symbolic links, check if a file is a link, and the best one, replace a part of a link. 

The last function here is the most interesting and useful. I came up with the idea since I often need to update links on my Linux-based systems and must delete the whole link and then relink it. This function takes in the original link, figures out the exact path it points to, converts the path to a string and replaces the search term with the new replacement, moves the old link and then writes the new link to the old link path. This is something that will save me time on my server for sure.

It also brings the new run_in function, another extremely useful function that runs a function (or a lambda function) in a certain number of milliseconds, either continuously or just once. 

Finally, create_cron_job is another new function coming to ZPE later this month, as well as a new command line that's also coming along. This will allow you to schedule cron jobs that ZPE will handle. The command line is designed to be run through the -x mode and will continue running in the background. ZPE aims to simplify the whole process of creating cron jobs, and will also store the actual commands in JSON files that make it easier to modify them later.

Newbattle High School, where I've been working for the last two years, has been to date my favourite job. I've met some amazing people, kids and teachers, that have made my time there the most enjoyable two years of my life. But it's time for me to move on.

As a posted in a previous blog post, I have for a long time wanted to get a job at a specific school and now I've got it. I've been waiting for a position at that school to come up and it's taken a long time (8 years I've been watching for the job to come up), but now that I've secure it I'm moving onto my next chapter in my life.

Today is the first step towards that - at 12.56 today I was no longer a teacher at Newbattle High School. It was a very sad moment to leave such a great place with so many great teachers and kids wishing me good luck for the future. Throughout that time I was reminded by many members of staff how great a relationship I've got with many pupils, which is also very clear from all the cards I've had telling me I've been the best teacher they could have ever had. I tried my best to catch everyone that I could to say a final goodbye and I've just been in tears most of the afternoon. 

Newbattle not only was an amazing place to work, but it was also the job that allowed me to buy my house, I passed my driving test whilst there and it was my first job as a Fully Qualified Teacher. It will always have a special place in my heart.

But onwards and forwards, my next school will hopefully be just as exciting a journey for me and hopefully I can continue to build good relationships with staff and pupils just as I've done at Newbattle, push digital more and more, and continue on this upward trend.

Powered by DASH 2.0 (beta)
Code previewClose