Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

ZPE Programming Environment

ZPE is a complete programming environment for YASS: a parser, compiler, interpreter and runtime written in Java. It can run YASS directly, compile projects, power embedded scripting, serve web applications and translate code into other languages.

PE
1.14

About ZPE

The ZPE Programming Environment is the home of YASS, or Yet Another Simple Syntax. YASS is a general-purpose language designed to remain approachable without placing artificial limits on what larger programs can do.

ZPE includes a command-line runtime, an interactive interpreter, a graphical editor, a debugger, project compilation, a web parser, networking through ZEN, database access and a broad standard collection of predefined functions and objects. ZPEKit also allows other Java applications to embed the compiler and runtime through a supported public interface.

YASS supports procedural, functional and object-oriented styles. Functions are first-class values, structures support inheritance, TYPO provides optional strong typing, and modules organise static members and reusable code. The language is deliberately flexible: familiar C-like braces and keyword-based endings can often be used to express the same program.

One language, flexible syntax

This loop uses a compact, C-inspired form:

YASS
for ($i = 0; $i < 10; $i++) {
    print($i)
}

The same idea can use YASS's keyword-based syntax:

YASS
for $i = 0 to 9
    print($i)
end for

Both forms compile into the same internal representation. The choice exists to make the language comfortable for learners coming from different programming backgrounds.

Why ZPE?

ZPE began as a personal programming-language project, but its purpose developed into something broader: make useful programs quick to express, keep syntax readable and give learners room to progress without immediately moving to another language.

Approachable

YASS favours readable constructs, helpful built-in operations and multiple familiar syntax styles. The interactive interpreter makes experimentation immediate.

Capable

Objects, inheritance, lambdas, modules, typing, web applications, databases, networking and project compilation support programs well beyond first examples.

Embeddable

ZPEKit, libraries, native plugins and custom language extensions allow ZPE to work inside other Java applications as well as on its own.

Cross-platform

Because ZPE is built on Java, the same language and runtime work across macOS, Windows and Linux while still supporting carefully integrated platform features.

How ZPE works

Source code is tokenised by the Zenith Parsing Engine and compiled into ZPE's intermediate representation. The YASS compiler builds the executable syntax tree, applies the relevant analysis and optimisation, and passes the result to the runtime. The same tree can instead be stored as a compiled program or supplied to a transpiler.

The parser, compiler and runtime are separate components. This separation has allowed each part to become faster and more reusable: the Zenith Parsing Engine also underpins formats such as ZPE's JSON parser, while ZPEKit exposes supported compiler and runtime operations to other applications.

How ZPE works with plugins and libraries

How ZPE works with plugins and libraries

History

ZPE's story begins before ZPE itself. The project originally codenamed Foghorn was my plan to integrate an extensible macro scripting engine into applications including Painter Pro, Cobweb and Wonderword. The underlying system was known as BBMSIL and used an interpreter to turn simple script commands into operations carried out through C# and the .NET Framework. That work evolved into BlackRabbit and BlackRabbit Script, the first programming language I worked on, when I was around 16 or 17.

BlackRabbit is the direct ancestor of ZPE, and BlackRabbit Script is the ancestor of YASS. Its original goal was practical: let people add readable macros and commands to documents, images and other projects without rewriting the applications themselves. The language was deliberately intended to read more simply than the C# code behind it.

By May 2011 BlackRabbit contained at least 50 commands and address lines. A Platform Preview and the BlackRabbit 2011 Editor were demonstrated in July 2011, allowing early users to create, run and debug scripts. That July preview was described at the time as my first major software milestone. By July 2012 the system had reached 100 commands and was being tested by a wider group of users.

BlackRabbit Script was built with C# and .NET and was largely tied to Windows. While developing a spell checker for Wonderword, I learned much more about grammars, parsing and reducing backtracking. Those ideas made a faster, reusable successor possible in Java.

Work on the new project began in January 2015 under codenames including Shifting Sands and Stratosphere. By May 2015 it had been redesigned around the new Zenith Parsing Engine. The project carried that name until July 2018, when it became the ZPE Programming Environment—a recursive acronym reflecting that it had grown far beyond a parser.

ZPE was originally pronounced by its individual letters. In late 2015 it became “Zippy”, a simpler pronunciation borrowed from the nickname of our hamster Henry. Many of my projects have similarly personal names behind them.

The project has since passed through several defining eras: lambdas and objects transformed the language; the parser and compiler became separate projects; LAMP, LAME and LAME X2 changed expression evaluation; TYPO brought optional strong typing; the compiler and runtime separated; and the entire runtime value model was eventually unified around ZPEType.

The complete story is available through the ZPE milestones, release highlights and full changelog.

The ZPE ecosystem

  • ZPE Editor provides editing, syntax assistance, execution and breakpoint debugging.
  • ZPEKit is the supported Java-facing interface for embedding ZPE.
  • ZEN Client and ZEN Server provide remote execution and file-management capabilities.
  • ZPE Online supports storing, sharing and retrieving YASS programs.
  • ZULE installs native plugins and libraries from the public repository.
  • ZPE PM and project compilation support organised application workflows.
  • YWP and web routing support server-side YASS applications.
  • ZEQL and native database drivers support data-driven applications.

Download ZPE Read the documentation

What's good about ZPE?

ZPE is designed to shorten the distance between an idea and a working program. Its standard functions handle common work directly, while the language remains consistent enough for those operations to compose naturally.

It is a learning language that grows with you

YASS can introduce programming through readable loops, functions and immediate interactive execution. The same language also offers first-class functions, objects, inheritance, modules, optional typing, databases and web development.

It is open to extension

YASS libraries can be written in YASS itself. Native plugins can add Java-backed functions and objects, while compiler extensions and transpilers can work with the language's parsed structure.

It handles useful values intelligently

Lists, maps, strings, numbers, objects and functions share a consistent runtime model. Printing and processing compound values is intended to produce useful results without requiring a special diagnostic function for every type.

It works across platforms

ZPE runs on macOS, Windows and Linux through Java, while retaining platform-aware behaviour where it improves the native experience.

It can work remotely

ZEN allows a client to submit work to a ZPE server, control the remote environment and transfer files. This can place demanding work on a more powerful machine or provide a lightweight way to automate another computer.

Contributions

ZPE has benefited from external libraries, testing, suggestions and the wider open-source Java ecosystem throughout its history.

People

  • Julian Merlin Ertel—a major external tester from approximately ZPE 1.3 to 1.5 whose extensive testing made a significant contribution to the language's development.

Software and components

  • Google Gson powered ZPE's first JSON support in version 1.5.0. It was replaced in ZPE 1.5.3 by ZPE's own JSON parser built on the newly separated ZenithParser.
  • Balfour's class and helper libraries have supplied shared interface, platform and utility components at different points in ZPE's history.

Suggestions and testing remain welcome. The core is maintained by Jamie Balfour, while YASS libraries and native extensions allow other developers to build on the environment without changing it.

Comments

There are no comments on this page.

New comment

Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days. Your email address is stored so that replies can be sent to your email address.

Comments powered by BalfComment