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

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 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.

Posted in DASH Project
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.

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.

Posted in DASH Project
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

Some of my followers will know that the last two weeks have been my first two weeks as a teacher and I've got to say, I've had the best two weeks of my life!

I've never been in a job where every day I come in excited about what I'm going to do in the day and feeling like I want to go back in each and every day. I've also never had a job where my lunch break doesn't feel too short because I like going back to work afterward.

Nothing has ever excited me as much as being a teacher in secondary level education!

Posted in Life
teaching
job

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 in Website news
site
update
tutorials

TYPO is finally here in version 1.6.7 of ZPE. To be specific, TYPO has been in ZPE for a while but it's not been in use. Now ZPE is fully in support of TYPO. Take a look:

Variables can be declared (lines 8, 14, 17) using a type and then assigned with another value of that type (lines 11, 20). If you want to reuse the variable with a different type in it, you need to redeclare the variable (line 14). On top of that compilation errors are now thrown when a different type is assigned to a variable. Also, as seen on line 24, TYPO can evaluate internal methods for the return type and compare it to the type of the variable, hence why it will stop compiling at line 24.

This adds a bit more time to compilation, but helps in several ways:

  • From a learning/teaching perspective, TYPO encourages use of typing in programming
  • From a programmers view this is a good way to ensure that you are sticking to principles of programming

TYPO is by default turned off in all versions of ZPE but you can turn it on by changing the settings of the compiler. I recommend trying it out but do not suggest all programs written use typing! ZPE is primarily an untyped language and will likely always remain this way!

Categories have long been staple in Dash, even as far back as when it was called JBlogs. In BalfBlog 2.1 they got a major overhaul that meant that posts in categories could be easily located. Now in Dash 1.0 they've been promoted.

When I say promoted I mean they have gone from being just attached to a post to being a separate entity. Categories are now numbers and have names and now have their own table in the database. This doesn't mean a huge amount but it does mean you no longer add categories from the new post page but from the dedicated category management page. Overall this improves performance when listing all categories.

ZPE 1.6.6, the version which I never believed I'd ever finish working on, is now available for download. I don't often post the changelog straight onto my blog but here's a look at it:

-- Version 1.6.6 --

  • Fixed an issue with for loops
  • Added the circumflex syntax for power e.g. 5^2 is 25 (five squared) and 5^3 is 125
  • Added the variable mode to the -r ZAC. This mode is like single line mode except that variables and their values are persisted.
  • Removed the Program read mode and the Multi line read mode
  • Fixes with comments in the Zenith Parser
  • Fixed an issue in for loop with reading lists
  • Fixed an issue that caused negative numbers to convert to strings when parsed
  • Added binary parsing into the compiler e.g. $v = 0b0101. Binary values always start with a 0b
  • Added the to_decimal method to convert a string of binary, octal or hexadecimal characters to an integer
  • Command line arguments are now separated from program arguments using a -args command line
  • Added object inheritance
  • New if statement optional syntax using the THEN keyword: $x = 10 if $x == 11 then print("Yes") end if
  • Added the built-in object methods `inherit`, `serialise` and `get_definition`. Removed the general serialise and object_get_definition methods.
  • Fixed an issue where in the single line interpreter variable values were not actually retained properly
  • The single line interpreter no longer exits on an error but displays an error and continues.
  • Fixed an issue in which new ZPEObject would set their values and variables to the FRIENDLY only access
  • Added the optional 'code' parameter to the exit method
  • Small performance improvement with the LAMP parser
  • Added the cache_value and read_cache_value methods which read a value from a special secured file
  • Added the get_version method which obtains the version number of the ZPE instance it is running within
  • Added an option to disable methods from the runtime environment (using the properties file)
  • Added negation of variables such as -$v and improved the method of negative values being used
    Improved the way in which negative values are evaluated

It's quite extensive compared to other versions in terms of big features added. My favourite new feature is the improvement to the -r ZAC since it now uses the single line read mode but retains variable values between lines inlining it with interactive consoles in languages such as PHP. I also like the new power feature being a major part of the syntax and the new -args feature for the interpreter means that less time is spent figuring out what are ZPE command line arguments and what are program arguments making it run slightly faster (but also reducing the code base quite considerably). The to_decimal method is quite nice too, convert quickly between decimal and binary, octal and hex very quickly. Finally, I love the fact that it is now possible to quickly turn a positive value in a variable into a negative one with a simple - in front of the variable.

ZPE 1.6.6 will be the last version to use names from the Harry Potter universe, version 1.6.7 will be named Waverley after the railway station in Edinburgh and successive versions will take a similar approach being named after famous railway stations in Scotland.

Powered by DASH 2.0