Jamie Balfour BSc

Welcome to my personal website!

Technology enthusiast

I am very interested in technology, particularly relating to computer science. I am most interested in web design and development.

My main hobby is programming. One of my most well known products from this is ZPE. I also am the sole creator of BalfBlog, BalfBar and BalfSlider.

A little bit about me

In 1997, when I was six years of age, I got my very first computer. I was always very interested in the ins and outs of it and dismantled it to see how it worked.

Years later, in 2016 I received my BSc (with honours) in Computer Science, obtaining a First class degree.

I'd like to welcome you to my website and hope you enjoy using it as much as I have enjoyed building it!

Google Plus
Jamie Balfour BSc
Full stack developer

Personal Blog

ZPE 1.5.2 is now available to download from my website. It is a huge update that brings so much (and removes so much). ZPE 1.5.2 is known by it's code name Pelegosto.

Let's start with what's being removed:

  • string_concatenate - added in version 1.3.0, deprecated in version 1.5.0 and now removed in version 1.5.2
  • open_remote_client - added in version 1.5.0, deprecated in version 1.5.1 and now removed in version 1.5.2.
  • open_remote_server - added in version 1.5.0, deprecated in version 1.5.1 and now removed in version 1.5.2.

Now for what's new:

  • Serialisation and deserialisation of objects and structures: objects and structures can now be saved to disk and retrieved later. This feature is a particular favourite of mine.
  • Custom keywords: finally you can customise the compiler with your own keywords and how they are interpreted. This feature is in it's early days, but it works as expected.
  • Constructors for structures: now you can instantiate a structure with a set of parameters. This feature was requested by one of the original testers of ZPE, wondering why it was you couldn't do this. Well now I've done it.
  • General improvements that fix a few bugs
  • Performance improvements, particularly with mathematics
  • The jget ZAC, based on CURL. This ZAC is designed to download a file from the central repository of ZPE tools and features. For instance running zpe -jget stdLib.zex will download the compiled standard library (now over 400 lines long). 

ZPE 1.5.3 is already underway and it's main focuses are on better structures and ZPEObjects as well as a much better compiler. So far in ZPE 1.5.3 the new -l argument for the compiler. This allows you to compile an application into a library, meaning the main function will not be included for efficiency.

ZPE 1.5.0 brought a ton of new features that make it better than it ever was. But version 1.5.1 has brought about even more. Now version 1.5.1 which recently was released to beta users has been improved further. It's main focus has been on improving the back-end compiler, and it seriously has. The compiler now follows a different path to the interpreter, something planned for a long time. This update changed ZenEx and how it works compared with before and will mean that you will need to recompile any applications written in ZenLang.

On top of this it has received some Java-based TLC. Users who develop Java applications will have a much easier time accessing what they need, when they need it. Everything is now packaged up in to a bunch of very neat little packages and classes, rather than all residing within the ZPE package. For instance, you can now find GUI based stuff in:


And the core is now found in:


Easier by a long shot.

Also, the public methods class called PublicMethods is now found at:


This was added in version 1.5.1 and it adds many new methods that are there for developers to take advantage of. One such example now opens all internal functions to Java developers, no longer limiting them in to using ZenLang to access these (prior to this the plan was to use the public Execute function to get a result). 

I consistently release a new version of ZPE each year. This year version 1.5 has been released.

In 2015 version 1.3 was released which brought the most changes to ZPE since it began in 2014. Version 1.3 added so much including the very basic compiler that version 1.2 started. Over 50 functions were added in this version. This version added if statements, for loops, while loops, functions, structures (although they didn't work properly until 1.4), RMM (Real Math Mode), plugins, libraries, lists, associative arrays, constants, variables, incrementing and decrementing, built in converters (and for a while one example did even exist that converted ZPE code to Java), image functions and of course, my favourite feature of ZPE, anonymous/lambda functions.

In 2016 version 1.4 was released and it brought a huge shake up of changes, but it's main focus was consistency between internal functions and imported ones. It also brought structures that are similar to those used in other languages such as function(){ } instead of function() end function. As well as this it brought the LAMP interpreter, lazy evaluation, function chaining, the object type, a better hashing of variables and functions, the internal manual for information on built in functions. Version 1.4 also brought support for many other new things, including octal and hexadecimal without the need for a function.

In 2017 version 1.5 was first released. This version currently adds one major new feature, Remote ZPE. Remote ZPE allows a system running ZPE to act as either a client to another ZPE installation or to act as a server that other ZPE Clients can utilise. The purpose of this is for smaller, much less capable machines such as the Raspberry Pi to be able to quickly take advantage of the processing power of a more capable machine. This was developed because I use ZPE remotely on my Raspberry Pi through SSH to do things, but what I'd really like is ZPE to work on my MacBook and send the result to my Pi (so it goes like this Mac connect to Pi through SSH which then uses ZPE Remote to do processing on Mac which returns the result to Pi which shows on my Mac, this way I can process scripts stored on my Pi and utilise them on my Pi).

The future of ZPE 1.5 however is very clear. 2017 will bring the following major features to ZPE:

  • JSON parsing (already done and available in all versions of ZPE)
  • Remote ZPE: Client and Server (already done and available in all versions of ZPE)
  • Multi-threading: Currently this project is underway and it's easy to test with ZPE version 1.5.1 (currently beta users only) using the following:
    $v = threaded function() { for ($i = 0; $i < 100000; $i++) print($i) end for }. It's easy to do and I'm sure it makes sense.
  • Interfaces for objects: allowing programmers to define interfaces
  • GUI builder: a way to develop graphical interfaces in applications (not sure if I will include this by default in all installations and might just include it as a library)
  • Conversion methods: New built in methods to make conversion plugins easier to write
  • Plugins will gain access to internal functions: A method of accessing built in functions from plugin functions
  • Typo: The new Typo typing system will finally come to version 1.5.x
  • Includes: Inclusion techniques to include non compiled code in the non compiled version of the code. Much like the C and PHP include methods.
  • Include imported functions: The import function will be changed to be a part of the compiler and will change the way it is run.
  • Ordered associative arrays: associative arrays currently store just one key and do not follow an order, this will allow associative arrays to be ordered
  • ZPE JSON: Improve JSON parsing and drop the use of GSON (the JSON functions will all work identically to how they work with GSON, it's just the wrapper functions on the top that will change).
  • Improved compiler: the compiler currently flows within the compiler-interpreter cycle whereby the compiler generates the input for the interpreter. This is fine for simply using the -i tool, but when running applications it means that one more step still needs to be run - transform the AST to something meaningful. With the latest update I aim to change this and put the compiler in a different place. The basics of the compiler will remain the same, but one more step will be added when compiling to a compiled program. This will improve the speed of the ZPE Runtime when applied to a compiled application (it will have no effect on the interpreter).
  • Power to the objects: objects, and as a side-effect structures, will be getting more powerful. It will soon be possible to declare a function within an object using lambda functions. As well as this objects will be getting more support in the LAMP parser. 
  • Passing parameters by reference: just as it says. I aim to have this feature in version 1.5.3. This would mean functions like list_dequeue would no longer need to be reassigned to the variable.

I am highlighting in green the features as they get added and highlighting in orange features that are partially added, so keep an eye on this post for updates.

There are several more but they will be put here once I have decided whether or not they are feasible or not.

This is a very tall order, and Typo and the conversion functions are currently at the bottom of the stack and although they have been suggested for this version and they were originally planned for version 1.4, I still may need to delay them to version 1.6.

Also, with the release of version 1.5, support for any version 1.4 iterations of the software has now ended, I encourage you to upgrade to the latest version of ZPE.

Since I started ZPE a year and a half ago it's come a very long way. From time to time I've put development in the background of my life, but I've begun working solid on it again. Now in January 2017 there are a whopping 155 built in functionalities plus a standard library designed to supplement the core functionalities with additional ones including sorting functions and much more.

When I launched ZPE publicly for the first time in July 2015 there were just 30 odd functions in the core. I was struggling to get even to 50 after months of development but suggestions kept flowing in from friends and people who used it. 6 functions have since been removed in favour of compiler based changes (the add, subtract, divide, multiply, modulo and concatenate functions, because all of them have since been replaced by a compiler change called LAMP).

The result of all of this is a much more efficient parser and interpreter but also a much more functional one. Who wants to write their code full of add functions rather than write a simple plus sign for instance? Adding LAMP was one of the biggest changes, and the latest update to it was made in November and it made a huge change that improved it overall. 

I continue to develop ZPE as a major project of my own, but I also use it for things now, and for that it's awesome. I know people do download it but feedback has since become less frequent. 

I've finally brought JSON support to ZPE. 

ZPE 1.5.0 will bring JSON support and will also focus on adding XML parsing tools to the mix. Currently version 1.5.0 uses the GSON library to add JSON parsing capabilities but I do intend to replace it with my own JSON parsing application at some point, since GSON brings the size of ZPE up to 500KB from just 300KB and I can't justify this. However, the change will only be a back end change when it comes and all applications will perform the same way if they are written to use the JSON functions currently provided. Consider GSON a placeholder.

Here's a small sample that takes the JSON from my own http://code.jamiebalfour.com/balfblog/info.json file that I use to share updates to BalfBlog:

$json_string = '[ {"name" : "BalfBlog", "version" : "2.2.1", "version_name" : "Klebb", "last_update" : "12-2016" } ]'
$map = json_to_map($json_string) $name = $map.get("name") print($name)

If we now look at what is output we should get the word BalfBlog. 

I'm very (to the power of one million) happy to say that after a couple of weeks of not working on ZPE after feeling very despondent about it after spending a long time searching for a bug, I'm glad to say that I have finally fixed it and it only took me a few minutes tonight.

The issue affects all of version 1.4 from version 1.4.2 onward due to the bug being in the LAMP parser. This bug was down to the fact that if a single variable was part of an expression it would attempt to look at the variable as a value, not as an ID. This fix is marked as being crucial to the success of any version of ZPE, so please ensure you do not use version 1.4.5 any longer and update to version 1.5.0. 

There are still things needing done in version 1.5.0 to make it work perfectly, but I'm getting there now.

Note as of tonight, the following needs to considered:

$v = 12
$x = 10
print($x * $v + 12)

This will not give 132 as expected. However, the following will:

print(12 + $x * $v)
print(($x * $v) + 12)

Future versions of ZPE are fixing a lot of these bugs, but I will be adding the Typo system to the next major version of ZPE as well.

I have since fixed this bug and I am testing it with a lot of use cases at the moment. You can try the latest version of ZPE from the Dropbox page and if you find any issues with this please let me know via the contact form on my website.

ZPE 1.5.0 is finally just about ready. The main changes in this version focus on backend (compiler) side things. In particular, the way in which the return function is compiled, evaluated and allocated a byte code has completely changed. For a start, it is no longer considered as a function but as an actual language token. This means that it is also allocated a byte code when translated to byte codes.

As well as this, recursion has been made more efficient than before and the call stack has been expanded. Overall, this is the best release of ZPE to date. I hope you find it useful too.

Unfortunately this update will be delayed due to circumstances to do with my job. I expect to release this version once things calm down again, maybe into the new year.

In the next few weeks I'm going to begin work on ZPE again. I'm focusing in on improvements to the actual compiler and I am looking at new things like function inlining and so on to improve performance. I'm also going to be quite daring and look at parameter optimisation for static parameters, since I do believe this can be achieved in ZenLang.

The next version will also add even more functionality in other areas such as the GUI mode.

Also, currently recursion is not working perfectly due to changes made to make it more efficient. If you bare with me I will be working on this at some point in the near future again.

ZPE production has currently stopped as I have decided to focus on my other projects a bit more at the moment. These projects currently include BalfBlog and my PhD. As a result ZPE production has currently been halted. This is a decision that has been made since ZPE is currently pretty stable and is already very impressive. 

ZPE was never meant to be just another programming language, simply a little project I've been working on, and one that's given me a great insight into building a compiler and a language, as well as given me a lot of fun and something I can actually use to do some tasks.

The primary focus for me now is on the improvement of BalfBlog which is currently pretty stable too. BalfBlog needs new features added to it to make it more powerful and useful, but as I say it's pretty much done now anyway. 

Whilst I did release version 1.4.3 last week officially, I have been updating it with new features and have been updating the download file as I do this. Since finding a small flaw I have been working on fixing it leisurely since finding and solving the problem was not too difficult. I've not been updating the version number of these versions since I've released version 1.4.3 as an beta version so far. None the less, version 1.4.3 is not really finished. 

Anyway, the improvement I have added today is the long awaited break() command. This function is void, meaning no return value, but it will break you out of a loop you've entered pretty quickly - much faster than the return statement. So go on, give it a try, it's pretty good!

1.4.3 also removed the XOR statement from the logic parser. I'd like to remind you though that there is now the xor function to do the exact same thing. 

1.4.3 is by far the cleanest version to date, and it definetly tidies up a lot of the mess left from version 1.4.1 and 1.3.7 which were the hacked-together versions. 

Also, you are probably wondering about the name of this post since it talks about Isla de Muerta. Isla de Muerta is the name of the fictional island in the Pirates of the Caribbean films where the Black Pearl (aka the Wicked Wench) anchored and is the name of version ZPE 1.4.3. The name was chosen because I'm a huge fan of the films and Johnny Depp in particular, and because I've been watching them all very recently. I plan to name the next versions after things related to these films rather than after lochs of Scotland for now (I did name versions of my Data Project application after Scottish lochs for sometime too but since I dropped support for it I decided to continue the naming over to ZPE when it began).

Site accessibility

A lot of the original functionalities that once existed here have been removed.

This page was generated in 0.33 seconds using 2097152 bytes. Slow? Let me know.

To use project mode, the window must be greater than 920 pixels in width.
Click here to disable Project Mode.
This site uses cookies to deliver its services, to personalise ads, to store preferences and to analyse traffic. Information about your use of this site is shared with other companies. By using this site, you agree to its use of cookies.
Contact me
Contact Jamie Balfour

Get in touch with me via this form.