# Jamie Balfour'sPersonal blog

My seven-year-old MacBook Pro finally decided enough was enough and has begun shutting down when it feels like it. Whilst I do intend to try and get it repaired, I'm also saving for my own house.

As a result of my penny-pinching, I have converted temporarily to using a Windows-based system. Yuck! Everything about the whole experience of Windows feels sluggish and very poorly put together but as it's my only alternative, I'm stuck with it. For everyday things like the command line, Windows is slowly getting better, but it's not there yet and the Windows Terminal app is great but not perfected. I miss my Dock from macOS and can't stand the alternatives that are available for Windows.

Generally, Atom and Eclipse are fine, but there are just things that make me unhappy about the feel of Windows. And in comparison to my MacBook Pro I'm so used to, this HP ProBook 640 G4 is like something from the past.

I am considering a new MacBook Pro at the moment, but I'm unsure which one would best suit me since I liked the size of my 15" MacBook Pro compared with my previous 13" model but then I have to add in dedicated graphics again which is something I never used and simply was there when I needed to warm myself up with a blast from the fans trying to cool it.

But Jamie, what about Linux, you might ask. Well, Linux is fine if you've got hardware that supports it, unfortunately, this machine I'm using is the most comfortable typing experience after my MacBook Pro that I own and I'm afraid this machine is used for stuff for Jambour Digital and is therefore not mine to run Linux on. My Razer Blade Stealth on the other hand has a very comfortable typing experience but cannot run Linux. Therefore I'm stuck with this pile of junk that is Windows for a short while until I decide what I'm going to do with my MacBook Pro (which was working beautifully a few weeks ago).

Good quality products like the MacBook Pro I owned tend to break just like that. They don't tend to show degradation over time and just go when the time is right. This was the case with my Corsair HX850 power supply unit in my desktop PC, it had a 10-year guarantee and it lasted 10 years and 3 days before just popping and giving up. It does however show that the build quality of my seven-year-old MacBook Pro (late 2013) is not as good as my older (late 2011) MacBook Pro that I sold to my brother which is running beautifully after replacing a SATA cable inside it.

Posted by jamiebalfour04 in Life
macos
windows

ZPE 1.8.7 is a broken build, the first in a long time. ZPE 1.8.7 was intending to modularise the software by turning from using duplicated code across Velocity and ZPE into one JAR file that could easily be used by either. Unfortunately, this caused more issues than it fixed. As a result of this, I have simply reverted back to the original code design.

I will admit that over the last few months my testing has been quite lax and undisciplined. As a result, I simply felt that I didn't need to test this in all platforms (which is stupid since the new modularisation should have meant all platform testing should have been done right away) and as a result only tested on a few devices (by the way, in ZPE 1.8.7 is fully working on JDKs with JavaFX including macOS versions).

## ZPE 1.8.8

ZPE 1.8.8 is actually awesome. It now includes its own FTP server within the server mode that means that you can transfer a file to the server from the client. This exciting new feature was going to get more information as it developed but the pressing issue of dealing with 1.8.7's catastrophe meant that I needed to focus on that.

Further to that, ZPE 1.8.8 fixes a long-standing issue of negative exponents and is built straight into the Zenith Parsing Engine itself and is supported by my CSV, JSON and XML parsers too.

ZPE 1.8.9 will continue to work on the performance improvements ZPE 1.8.8 has laid out as well as continuing the development of ZPEKit.

ZPE has for a long time been able to compile and password protect compiled applications. Now with ZPE comes SecureCode (codenamed Diamond Peak). SecureCode is a built-in part of the ZPE package that secures code using a special algorithm. Code can be decrypted by the engine and then run directly from it. Secure code has been in development for months, only to finally come to fruition now.

This new form of security adds layers of protection to applications that make ZPE even more secure. The built-in decryption engine will be included within the up and coming YASS Executable specification.

In a nutshell, the encryption and decryption algorithms use the password as the initialisation vector but since the password is not stored as plain text and can only be verified by encrypting a users input and comparing it against the encrypted password, there is no way to decrypt the code. Further, the compiler applies the encryption algorithm a number of times to strengthen the security of the file.

YASS
function main(){

print("Hello world")

}


When compiled, the file would like:

Binary file
^@^Esr^@,jamiebalfour.zpe.core.YASSCompiledExecutable}N^P;<8A>^B^@^GZ^@^LexperimentalJ^@^DtimeL^@^Fauthort^@^RLjava/lang/String;L^@^Pcompiler_versionq^@~^@^AL^@^Dnameq^@~^@^AL^@^Hpasscodeq^@~^@^AL^@^Gprogramt^@^RLjava/lang/Object;xp^@^@^@^@^M^Xbt^@^Njamiebalfour04t^@^G1.8.8.0t^@^@t^@^@sr^@)jamiebalfour.zpe.core.YASSCompiledProgramP^E<9E> ^S<8F>^B^@^C[^@ functionst^@^][Ljamiebalfour/types/ZPEPair;[^@structuresq^@~^@        [^@     variablesq^@~^@ xpur^@^][Ljamiebalfour.types.ZPEPair;<82>}%LS^B^@^@xp^@^@^@^Asr^@^Zjamiebalfour.types.ZPEPairucÓœ^B^@^BL^@^Anq^@~^@^BL^@^Avq^@~^@^Bxpt^@^Dmainsr^@^Zjamiebalfour.zpe.core.FAST^@^@^@^@^@^@^@^A^B^@      B^@^Kreturn_typeB^@^EscopeB^@^DtypeL^@^Mdocumentationq^@~^@^BL^@^Bidq^@~^@^AL^@^Dleftt^@^Ljamiebalfour/zpe/core/FAST;L^@^Fmiddleq^@~^@^QL^@^Dnextq^@~^@^QL^@^Evalueq^@~^@^Bxp^@^@pq^@~^@^Oppsq^@~^@^P^@^@pq^@~^@^Osq^@~^@^P^@^@^Cpt^@^Eprintpppsq^@~^@^P^@^@pq^@~^@^Gpppsq^@~^@^P^@^@^Hpq^@~^@^Gpppt^@^KHello worldppsq^@~^@^P^@^@pq^@~^@^Gpppppuq^@~^@^K^@^@^@^@uq^@~^@^K^@^@^@^@


But when using SecureCode it looks like:

Binary file
^@^Esr^@,jamiebalfour.zpe.core.YASSCompiledExecutable}N^P;<8A>^B^@^GZ^@^LexperimentalJ^@^DtimeL^@^Fauthort^@^RLjava/lang/String;L^@^Pcompiler_versionq^@~^@^AL^@^Dnameq^@~^@^AL^@^Hpasscodeq^@~^@^AL^@^Gprogramt^@^RLjava/lang/Object;xp^@^@^@^Oryt^@^Njamiebalfour04t^@^G1.8.8.0t^@^@t^@<$2a$10$gKm.f.P6is/VObd9ZtnBreOj5Lu6fIhJ4P7snMp/VJzgdEL4aHUpiur^@^B[B^W^F^HT^B^@^@xp^@^@^Bp<99>^D(<84>E^G^?^?.MTy<8C>1c^LESCD<89>L"$= BB^Y<8C>^K#^T^F^N<85> gs<9E>=F   ESC-/^NÔ¶7^C|'^]<9F>^EÒwAQc3F<9B>K<84>^F<91>|'S<9F>^X+^^MY^O^BÚ‰^GAÍ¿_^D<9A>&^E<91>U*<98>o"s^TÆ­ÓÜ™-Jt^Y.^V<90>R^E^ZiZY^N<9D>s<8B>Æ²^U^TRi^?Vi<96>=c^NnÉ„iz^Xe-dr^\$)<9A>*^X    <0^V<87>N^?^DfT,n<95>k1-<90>*^L^VESC^_<8E>6^P<9D>u<Ls^O^Lio^NM<9D>^B <83><9B><83> '<88>^V^W^Q8ESC}m5q<91>Wp~<98>Q<9B>~<81><8A>Uo%,^V+g}<81><96>+<89>^V<95>^T,4+@qVESC]^_<8C>Ë¼<90>Ñ’o<U+0083>e{<91>v<93>wè™^Fn6E^BN       È±W^G^V^@3<8C>q^YMQH<80>.3Å»<8B>Gc3ôƒœB<9A>^MSOO^?P<9A>^R^@<87>^_<83>7q^RIF"<80>g@3zEhp^ m*<80>#,ESCzÜ˜Í“v<97><8C><82><9B>j^]N<91>b|j+E^N<9C>Ê¥RA8RTÖº<94>I[C^]<92>-%<81>^P^H<90>mt        K_*a<87><9D><91>Y^Z#PD^]:^L<96><84>'%Yao^SÓ·Q^U<84>B]^]Å¼<8A>c^H8^E^AlNwn9C<81>bnm2<93>=?Gg
`

Security and safety have always been paramount within ZPE since the release of version 1.5 with last year's version 1.7.x making the server and client system even more secure using a special public and private key encryption method. ZPE 1.8.x aims to bring further security features to the package in due time. SecureCode is expected later this month.

ZPE SecureCode

It was my birthday today and I turn 29 at 10.30 today. I have some big news that I'm keeping quiet for a little longer and then I will unveil it all. Stay tuned if you want to find out more.

Posted by jamiebalfour04 in Life

Today I am happy to announce the release of ZPE 1.8.7 known by its codename as Portman.

Portman brings many minor updates plus better support for my new Velocity Web Server. One of the most significant changes to ZPE is the removal of the ZPE prefix in front of internal object definitions. For example, the ZPEHTMLBuilder is now just the HTMLBuilder and the ZPEUI becomes UIBuilder. Speaking of objects, there is now a new Calculator object which uses a compiler to compile expressions into fast-to-execute mathematical formulae.

Further to that, ZPE 1.8.7 introduces ZPEKit (pronounced zippy kit), a new API for accessing the compiler, interpreter and runtime from a single interface. The introduction of this so far only accesses the compiler, but within the next few versions, ZPEKit will become the only way to access the compiler, interpreter and runtime.

ZPE 1.8.6 deprecated the ZPEWebServer and I expect ZPE 1.8.9 (James) will remove the ZPEWebServer entirely.

zpe 1.8.7
ZPEKit

I'm happy to announce that ZPE 1.8.7 will introduce ZPEKit. ZPEKit is a complete redesign of the infrastructure of the ZPE application and will make it even easier than before to access the functions that you might need as a developer.

The plugin interface will also be more accessible and I plan to bring more native function capabilities to the front end of the application.

Further to this, I am now developing an image editing program in Java that will use ZPE as the core of the application, so this move is really important to make it easier for me to develop this application.

zpe 1.8.7
ZPEKit

ZPE version 1.8.6 (Younis) is a big update.

One of the biggest changes to it is the deprecation of the built-in web server. This has been deprecated in favour of a much more streamlined way of working.

The reason for this. Well, there are a few reasons. The first is that it contradicts the Velocity Web Server (VWS) that I'm building. The ZPE web server was always slow compared with my new VWS which is designed to be compatible with a variety of languages and environments. VWS works with ZPE through what's called a Velocity Module hook now anyway.

For now the server remains in place but in the next few weeks I plan to remove it altogether and perhaps reimplement it using the basis of VWS.

zpe 1.8.6
zpe

I was reading through parts of my blog looking for one specific post and came across one of my favourite posts on my website. I'm referring to this one here. This post discussed a form of code optimisation that can be carried out before compilation in some languages including ZPE/YASS.

Specifically, this post discussed performance differences between using variables where a length value (in this case the number of items in a list) is stored in a variable versus inline function calls to check the size of that list each iteration of the loop. It is understandable that the former would have lower latency and indeed lower memory consumption.

After reading the post again, I thought I'd try it with the newest version of ZPE. At first, my thoughts were it was going to be slower because of the compilation time being increased to allow for compiler optimisation that the new ZPE offers. I was wrong.

ZPE 1.8.5 is considerably faster on both for loops provided in the example, performing only slightly better in the user optimised version.

Results for the first for loop in ZPE 1.8.5 were:

real 0m0.454s
user 0m1.016s
sys 0m0.118s

Compared with 2016's 1.4.2E, which got:

real 0m2.071s
user 0m2.914s
sys 0m0.455s

zpe
compiler
optimisations

It's taken a while for me to finally get here, but ZPE is finally adding further optimisations for mathematical and logical operations.

For logic, one optimisation that has been highlighted as a potential area for improvement is the use of nested if statements and optimising them with else ifs instead.

For mathematics, it will include an optimisation that compiles static operations such as 1 + 5, but it will also look to improve the performance through the use of variables within mathematics.

Since ZPE has begun to include optimisations since ZPE 1.7.8, it has been a major focus and major shift to improve the performance of compiled scripts. I am also looking to improve the performance of web-based scripts and adding in the ability to compile them too.

LAME2 is also under development, designed to improve performance of LAME which itself improved performance over LAMP this time last year. LAME2 will also embed its own optimisations.

Also, I thought I'd take this opportunity to inform you of my recent use cases for ZPE since it now responds to webhooks much more efficiently. My most recent ZPE project has been on the home Raspberry Pi, which is set up to respond to web requests and manage them accordingly. We are now using ZPE within our smart home setup and I'm very happy to show people how it works. If you are interested, please contact me via email.

zpe
compiler
optimisations

Hello folks, I hope everyone is okay and not as fed up as I am with everything going on in the world at present!

Today I was thinking about something that I use every day - switchable graphics. See in my MacBook Pro I have an Nvidia 750GT - a decent dedicated graphics card that can run some games well but has never been used for gaming. In fact, my dedicated card only gets used for graphic and video editing on my MacBook and therefore remains cool and quiet using the Intel Iris Pro graphics. The fact that my computer automatically switches without me even noticing (other than the notification I have setup) is quite truly amazing.

So, what about switchable memory? Have a low power implementation such as LPDDR3 and then high-performance DDR4 as the fast memory. It wouldn't be a particularly good idea in smaller laptops but in a laptop such as 15" machine such as my MacBook Pro it might be an excellent idea. Something like this could help a device such as the Nintendo Switch, a lower power RAM for on the move then a powerful implementation that would be activated when it is docked.

Of course, there are issues with this concept of switchable memory. The main one that comes to mind is how do you keep them in sync? If one memory is to be turned off, you need a fast bus or lane to transfer the data from one memory module or type to the other. This could also end up using a lot of power.

This is a just a thought...

Posted by jamiebalfour04 in Tech talk
ram