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.

Personal Blog

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.
  • Error objects were added.
  • Pre-increment and pre-decrement syntaxes were changes 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

First off, as a result of this new discovery, I have updated Girder and BalfBar.

I have recently been working on a new client website when I discovered what I'd say was glitch. This affects every website, every thing that I have worked on in the past few years and all my major projects and it's now fixed.

Every website I have ever created has been responsive since about 2012. As a result CSS media queries are a big thing in the design of these sites. However, it only came to me today that the way that these media queries work is not brilliant. Most crucially, this affected Girder and BalfBar on any website, but also affected my own website. Let's take a look at what this is.

The media gap

The two main methods of using media queries is using the min and max queries:

  • @media only screen and (max-width: 768px)
  • @media only screen and (min-width: 769px)

Combine these two queries to have a media query for mobile devices and a media query for desktop devices. All fine there. Except, there's a gap. If you can already see it then great, but if not let me explain.

First off, take a look at this graph. This what our media query would look like: left of the red bar is the mobile section and anything to the right of the red bar would be our desktop portion. But what about the red bar itself? This is where we have the issue, albeit a small issue, a complex issue to deal with at first.

It only struck me this afternoon that there are small gaps in the media queries developed for production that cause issues with this. The media queries do not specify what happens for the infinitely many real numbers that come between 768 and 769 such as 768.1, 768.2 or 768.35.

An important thing to note is that these media query issues only occur if there are two media queries back to back - one min and one max. Another thing to note is that > 768 and >= 769 are not the same here - this bit is key. This causes issues with things where the JavaScript and CSS are trying to achieve something at the same time.

A fix

A small fix I would suggest is adding granularity. For this example, a fix could be achieved with:

  • @media only screen and (max-width: 768px)
  • @media only screen and (min-width: 768.01px)

Another fix is to use just one media query here and stack changes in it. For instance, develop the mobile site then have a single min-width media query for all the changes applied to the desktop site. This is not ideal but it works and there's no need for the granularity with this type of query.

Why is this an issue?

The issue occurs with some browsers (such as Firefox) making some websites 767.200 pixels wide as opposed to a rounded number. There needs to be a better way to fix this issue.

Posted by J B Balfour in Web design
css
media
queries
issues
size
width
height
max
min

Version 1.3 of BalfBar is now available to download and brings a general set of improvements and new features. I'm still working on the tidy up of BalfBar as a major project but that's for another update still to come which I'm looking forward to 🤪 . The joys of being a software developer all over again 😂.

The new version of BalfBar brings in a new kind of menu which is known as the mobile pushmenu. You can see this below:

As you can see, this pushes the whole document across to the right. At present, much like the sidebar, it only comes from the left hand side.

Posted by J B Balfour in BalfBar
balfbar
pushmenu
version
1.3

Recently after an amount of thought, I have decided to finally make the switch from a sans font to a serif font. I am keeping the Roboto font on my website for things like the site links and masthead, but for the content, I have finally made the switch to Roboto Slab.

This is not necessarily going to stay, the thoughts of the readers and viewers are what determines what I do on my website, and whilst some have already expressed that they preferred the sans font, I am on the mindset that a serif font can also do the job well here.

I will revert this if the survey results do not show that people think this works well on my website.

Posted by J B Balfour in Website news
sans
serif
font
roboto
slab
website

I mentioned the other day that I would be updating Dash with the removal of Google Plus in the next few days. I will be doing this today, as well as improving several other dashboard features. I'm specifically interested in getting the poll system started so that you will be able to create polls - connecting them to posts and then accepting user input from them will come later.

Suggestions are greatly welcomed too, so if you've got an idea, use the contact form on my website to let me know what you think I could do to improve Dash.

dash
update
google
plus

ZPE has very recently made objects a staple part of the language. But did you know that all variables within an object are actually references? What I mean is that if you change a variable (property) within an object in ZPE it will actually update the object.

YASS
$o = {$x : 10}
//Will print 10
print($o->$x)
$o->$x = 50
//Will print 50
print($o->$x)

So what does this mean and just how can it be brought further into ZPE? Well this exact concept will be used in ZPE 1.6.8 (December 2018) to bring forward by reference variables. These variables have sort of existed since some version 1.5.x but have found very little use. They work on a different system to ordinary variables however and a system of trust between the function itself returning what is necessary.

Whether or not ZPE 1.6.8 completely adds support for by reference or not is dependent on how much I manage to get done with regards to it, but I can say for a fact that it will be very useful as both a learning tool and as a feature of the language when it is done.

zpe
1.6.8
by
reference

The announcement by Google that Google+ will finally being getting shutdown is music to some peoples' ears - certainly to mine. But it also means a bit of work for me as Dash had added some integration with Google+. If you are using this integration, please be aware that by the end of the next version release cycle, Dash will remove this feature.

The next version of Dash will hopefully be out in December of this year.

google
plus
dash

ZPE 1.6.7 is definitely set to make an uproar in comparison to many of it's predecessors. That's because of the fact that it adds more than 5 new major features ranging from the TYPO system to quick lambda functions and changes to the way references expressions work.

But now another new feature has been added - a feature that will benefit the TYPO engine considerably but has also been requested since the early days of the language development. The addition of these new types of lists has had considerable implications on the language itself too, fixed size lists are often faster to work with.

The syntax for writing one of these new lists, let's say of type string and one of type integer, each with five elements, would be:

YASS
$strings = [""] * 5
$ints = [0] * 5
zpe
1.6.7
lists
arrays
fixed

All of my existing tutorials are being updated over the next few weeks with some small but very nice changes.

These changes are all inspired by my own experience of teaching. Firstly, all articles within tutorials will now have learning outcomes - what you are expected to know by the end of the article. Secondly, I am adding an "Over to you" section to many tutorials that allows you to try out some tasks based on what has been covered in the article. Thirdly I am now working on actively adding downloadable versions of all code samples across my website - this will include tutorials as well as pages like ZPE. This, again, will take a while for me to finish.

Posted by J B Balfour in Website news
site
update
tutorials