ZPE Programming Environment

Last updated
YASS
ZPE logo.png
ZPE logo
Paradigm Imperative, functional, object-oriented, procedural
Designed by Jamie Balfour
Developer Jamie Balfour
First appeared2015;9 years ago (2015) [1]
Stable release
1.12.11 [2] / November 1, 2024;45 days ago (2024-11-01)
Typing discipline Dynamic, static, weak, strong, gradual [3]
Implementation language Java, YASS
Platform Cross-platform
OS Unix-like, Windows, macOS
Filename extensions .yas .yex
Website https://www.jamiebalfour.scot/projects/zpe/
Influenced by
C, PHP, Java, JavaScript, VB.NET, C#, SML, Python [3]

ZPE Programming Environment (or simply ZPE), formerly the Zenith Parsing Engine is a general-purpose compiler, parser and runtime environment for the YASS language designed for educational use as well as for its general use. The language it interprets, YASS, is an interpreted, high-level, general-purpose programming language. YASS is largely built upon making the language easy to read and use, with optional support for syntaxes such as curly-bracket syntax. YASS supports dynamic typing or static typing, as well as strong typing and weak typing.

Contents

It was started in May 2015 as a planned university project but was later changed to be a replacement for another programming language developing at the time known as BlackRabbit Script, also built by Jamie Balfour. ZPE and YASS were designed to help with the automation of scripts by clearing up the inconsistent syntaxes of other scripting languages. [3] The Zenith Parsing Engine (formerly ZenithParser) powers the underlying parsers, including the CSV, JSON and XML parsers.

The ZPE Programming Environment is written in Java, making it cross-platform. As a side effect, specific plugins and built-in objects are entirely written in Java.

Whilst ZPE is closed source, all plugins, transpilers and additional tools are open-source. The Standard Algorithms library is also open-source and available on Balfour's GitHub page.

YASS

The language interpreted by the ZPE runtime is known as YASS or Yet Another Simple Syntax. [4] Several languages influenced the YASS syntax including C, PHP, Java, JavaScript, VB.NET, C#, SML and Python [3] which has remained largely the same since about version 1.5. ZPE/YASS can be used for general-purpose programming, support client and server communications, and server-side scripting. Some websites are already using ZPE alongside other languages such as PHP. [5]

YASS can also be transpiled to other languages such as Python and PHP. [6]

Features

ZPE features many built-in functions including functions that simplify mathematical problems such as the greater_than_all function, the to_binary, to_octal and to_hexadecimal functions as well as many functions to streamline processing of arrays such as list_process, list_find_duplicates and list_auto_populate. ZPE also features a parser known as the Zenith Parser Engine, which forms the foundation of the whole language processor and performs both lexical analysis and compiler optimisation on textual input.

A documentation section on the original subsite dedicated to ZPE documents all language constructs, internal functions and syntax. [4]

ZPE was initially built as a planned university project that never came to fruition. Ultimately, it was eventually used as the replacement for the BlackRabbit Script language that Balfour was developing at the time.

Syntax

Much like PHP and Perl, two languages that inspired YASS, variables start with a $ sign in YASS.

$x=10$x=$x+5print($x)

Later versions of ZPE and YASS support $-unbound variable declaration. ZPE and YASS also support a mix of strong typing and weak typing in the same script:

$x=10declareyasnumber=10print($x)print(y)

LAME

LAME, or Logical and Mathematical Evaluator, is a ZPE feature that can parse and evaluate expressions involving logic and mathematics. It was developed in 2019 to replace LAMP, which replaced RMM. ZPE originally had no mathematical parser, meaning functions were used for addition, subtraction, division and multiplication. An example of this early syntax that has existed since version 1.3:

$x=10$y=15$z=add($x,$y)print($z)

In late 2015, still in version 1.3.x of ZPE, the Real Math Mode (RMM) parser was added. Syntax changed so that it looked a lot more like other languages:

$x=10$y=15$z=$x+$yprint($z)

To improve performance, the Real Math Mode parser was replaced by the Logical And Mathematical Parser (LAMP) in 2016 and then the Logical And Mathematical Evaluator (LAME) in 2019. [7]

The latest version of LAMEX2 is up to two to five times faster than the first LAME, according to Balfour [8] .

YASS Unfold

YASS Unfold is a syntax analyser that can transform syntax into descriptions. YASS Unfold works based on the AST generated from the code to generate code descriptions. [9]

Transpilers

ZPE also added transpilers to convert YASS to other languages efficiently. These are distributed as plugins and are available on Balfour's GitHub and personal website.

The first transpiler built was the YASS to Python transpiler (known as ZenPy) due to similarities in how both languages work underneath.

Transpilers to convert YASS to PHP and Java also exist but are less mature than ZenPy. [10]

Libraries

ZPE/YASS rely on libraries being developed to extend functionality. The main reason behind this is to reduce the size of the main runtime package. Specific libraries are written in the YASS language itself and then compiled. They are then distributed via the ZULE network, which was added in 2018. [7]

Other libraries are written in native Java. For example, the zpe_mysql library adds MySQL functionalities to the language using a library around six times the size of the original runtime.

ZPE Native

In August 2022, an AArch64 build was compiled using the GraalVM compiler. This offered performance much better than the JRE version alone. ZPE Native can improve performance considerably but is not cross-platform and is only available on current platforms (this includes an EXE for Windows, a Linux-compatible binary, and the AArch build).

Related Research Articles

<span class="mw-page-title-main">Python (programming language)</span> General-purpose programming language

Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.

Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.

<span class="mw-page-title-main">KDevelop</span> Integrated development environment

KDevelop is a free and open-source integrated development environment (IDE) for Unix-like computer operating systems and Windows. It provides editing, navigation and debugging features for several programming languages, and integration with build automation and version-control systems, using a plugin-based architecture.

Programming languages can be grouped by the number and types of paradigms supported.

A programming tool or software development tool is a computer program that is used to develop another program. A tool provides a command line interface (CLI), a graphical user interface (GUI), or both. A CLI allows a tool to be used for automation such as for build or test.

In some programming languages, eval, short for evaluate, is a function which evaluates a string as though it were an expression in the language, and returns a result; in others, it executes multiple lines of code as though they had been included instead of the line including the eval. The input to eval is not necessarily a string; it may be structured representation of code, such as an abstract syntax tree, or of special type such as code. The analog for a statement is exec, which executes a string as if it were a statement; in some languages, such as Python, both are present, while in other languages only one of either eval or exec is.

In computer-based language recognition, ANTLR, or ANother Tool for Language Recognition, is a parser generator that uses a LL(*) algorithm for parsing. ANTLR is the successor to the Purdue Compiler Construction Tool Set (PCCTS), first developed in 1989, and is under active development. Its maintainer is Professor Terence Parr of the University of San Francisco.

Netscape Plugin Application Programming Interface (NPAPI) is a deprecated application programming interface (API) for web browser plugins, initially developed for Netscape Navigator 2.0 in 1995 and subsequently adopted by other browsers.

<span class="mw-page-title-main">Syntax (programming languages)</span> Set of rules defining correctly structured programs

In computer science, the syntax of a computer language is the rules that define the combinations of symbols that are considered to be correctly structured statements or expressions in that language. This applies both to programming languages, where the document represents source code, and to markup languages, where the document represents data.

A foreign function interface (FFI) is a mechanism by which a program written in one programming language can call routines or make use of services written or compiled in another one. An FFI is often used in contexts where calls are made into a binary dynamic-link library.

<span class="mw-page-title-main">Aptana</span> Text editor

Aptana, Inc. is a company that makes web application development tools for use with a variety of programming languages. Aptana's main products include Aptana Studio, Aptana Cloud and Aptana Jaxer.

In computer programming, an anonymous function is a function definition that is not bound to an identifier. Anonymous functions are often arguments being passed to higher-order functions or used for constructing the result of a higher-order function that needs to return a function. If the function is only used once, or a limited number of times, an anonymous function may be syntactically lighter than using a named function. Anonymous functions are ubiquitous in functional programming languages and other languages with first-class functions, where they fulfil the same role for the function type as literals do for other data types.

This comparison of programming languages compares the features of language syntax (format) for over 50 computer programming languages.

<span class="mw-page-title-main">Vala (programming language)</span> Programming language

Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system.

V8 is a JavaScript and WebAssembly engine developed by Google for its Chrome browser. V8 is free and open-source software that is part of the Chromium project and also used separately in non-browser contexts, notably the Node.js runtime system.

Dart is a programming language designed by Lars Bak and Kasper Lund and developed by Google. It can be used to develop web and mobile apps as well as server and desktop applications.

<span class="mw-page-title-main">COLT (software)</span> ActionScript and JavaScript livecoding tool

COLT is an ActionScript and JavaScript livecoding tool by Code Orchestra, available by subscription. As of 2019 it appears to be abandoned; the last activity in GitHub was 2015, and the domain name has been purchased by spammers.

<span class="mw-page-title-main">PureScript</span> Strongly-typed language that compiles to JavaScript

PureScript is a strongly-typed, purely-functional programming language that transpiles to JavaScript, C++11, Erlang, and Go. It can be used to develop web applications, server side apps, and also desktop applications with use of Electron or via C++11 and Go compilers with suitable libraries. Its syntax is mostly comparable to that of Haskell. In addition, it introduces row polymorphism and extensible records. Also, contrary to Haskell, the PureScript language is defined as having a strict evaluation strategy, although there are non-conforming back-ends which implement a lazy evaluation strategy.

References

  1. "ZPE Programming Environment information". ZPE Information. Retrieved 2019-02-02.
  2. "ZPE Changelog". ZPE Changelog. Retrieved 2024-11-12.
  3. 1 2 3 4 "What is ZPE?". ZPE Documentation. Retrieved 2019-02-02.
  4. 1 2 "ZPE Programming Environment documentation". ZPE Documentation. Retrieved 2019-02-02.
  5. "About this website". About this website. Retrieved 2020-07-24.
  6. "Jamie Balfour's Blog: YASS-Python Transpiler Progress". Jamie Balfour's Blog. Retrieved 2024-06-02.
  7. 1 2 "ZPE Changelog : ZPE Programming Environment Documentation :: jamiebalfour.scot". ZPE Documentation. Retrieved 2019-03-10.
  8. "LAME X2 :: jamiebalfour.scot". Jamie Balfour's Blog. Retrieved 2024-12-16.
  9. "Jamie Balfour's Blog: YASS Unfold". Jamie Balfour's Blog. Retrieved 2023-10-06.
  10. "Jamie Balfour's Blog: My Python transpiler for YASS is now ZenPy. :: jamiebalfour.scot". Jamie Balfour's Blog. Retrieved 2024-06-29.