Nzym: A simple, object-oriented, interpreted, imperative, multiplatform, high-performance, multithreaded, and dynamic language.

Many programming language systems use a set of standard keywords that characterize them, set forth according to their paradigms, typing discipline, and the problems which the language aims to solve. We use these keywords, which here we are referring to as buzzwords, to describe Nzym and introduce the core founding heart of its structure and ecosystem.

Sadomba-Mahari Computers (Private) Limited (or simply SM), the company behind the development of Nzym, entered the web development industry in 2010, about a few months since they had been registered, as well as dabbled in the making of specialized software for the local film industry in Zimbabwe. About a few years later, they also began to develop mobile applications targeted at higher-end mobile phones on the Android, Windows Phone, and iOS platforms. The indented italicized portions below seek to give a narrative of the issues faced by SM and to give examples of the keywords of Nzym presented.

Simple 

One of the main tenants with the development of Nzym was that there was the need for systems that could be programmed easily without the need for a lot of training, bearing some similarities to concepts that came before, but having a more simplified touch that would attract even the most beginners in programming. The most common programming languages taught during the time of Nzym’s development were those similar to C++ syntax, including C++, C#, Java, and Python. These programming languages are also object-oriented. While C++ came with some levels of complexity that the others mentioned did not have, such as lack of memory management and the concept of pointers and operator overloading, the others tried to improve on those concepts but still there remained a steep learning curve for programmers to master them with additional overheads and concepts such as garbage collection, multiple inheritance and extensive automatic coercions.

Nzym focuses on the object and completely removes the need for braces and many bracket types or even quotations. For every statement in Nzym, usually, there are two to three parts mainly in the form of:

Type nameOfType = value;
nameOfType.MethodOfType = value2;
Class NameOfClass = InheritFrom;
Function NameOfFx = ReturnType;
Method NameOfMethod = ReturnType;

Removing the rarely used, poorly understood, confusing features of C++ and removing the sometimes-confusing aspects of the C type syntax, which for many has been the cause of a lot of pain and grief, a simpler language was born.

In the beginning, SM employed only three full-time programmers, two of whom were interns hired from the university. The greatest challenge that was presented to them was to be able to create and replicate static websites, tailor-made for various types of clients but narrowing down production time. Obviously, stylesheets were going to be different from project to project but there were elements that were going to exist in every project and that would exist in all projects especially navigation, footer widgets, the home page, contact page, an about page, and a page for highlighting products and showing portfolios. A simpler way to prototype and produce needed to be possible…

Another aspect of being simple is visually portable. One of the goals of Nzym is to enable the creation of media applications that can run on any platform and maintain their visual look and appeal. The use of cascading stylesheets and web technology elements to create standard visual displays became a core target feature for Nzym development. The way a screen looks in a browser, in a mobile application, and in a desktop application will be the same or, at the very least, will be uniform in look and feel across all platforms.

Object-Oriented 

Arguably one of the most overused buzzwords when it comes to describing a programming language but is actually a key concept in describing Nzym. Object-oriented programming as a programming paradigm is based on objects made of data and code. In Nzym, data is in the form of the types which make up the various properties of an object, and then the code is stored in the methods (which are the procedures). Nzym makes use of object-oriented design due to the way it facilitates the clean definition of interfaces and makes it possible to provide reusable elements.

The object-oriented facilities of Nzym are essentially those of most C-type languages that came before it but with a different syntax and much more relaxed rules. Nzym script files are the key objects of a Nzym project and within them, they can contain classes that are treated as objects as well.

When working on a website, the team at SM knew they were always going to need to recreate common elements like the contact form or a drop-down menu but with some modifications as requested by the client. As they dealt mostly with creating static websites, it seemed to be a good idea if there was a way in which they could group these common elements into separate files for easy importing into a project, as and when they were needed, with minor modifications for the client. For example, changes in color, addition or removal of certain fields from a form, or the inclusion of icons on the menu.

Interpreted 

Nzym script files are interpreted by means of the Nzym Builder interpreter (which is called Elephant) and the output can be a whole website to a nzym file that works as a library to use in other Nzym projects or a ctlyst file that is Nzym bytecode which can be run using an implementation of Nzym Console on any device or machine. While Nzym Console now exists for most operating systems, more implementations are being developed, which will allow for the running of a compiled Nzym program on any device. However, if a Nzym program is interpreted to a website, the output would immediately be available to port to any device or a server to host, usually as a static website.

The team at SM would use Bootstrap or an in-house boilerplate that existed at the time to recreate and generate different types of websites. However, these code blocks had a lot of disadvantages, especially when displaying on different devices and older browsers.

A key goal of the process of interpretation for Nzym has also been to create products that work on any device, across any platform, not only maintaining visual portability, but the same functionality and performance as well.

Imperative 

Nzym uses statements to change the state of the program, and hence in this case it is an imperative programming language, describing how the program operates at every step. Nzym may also follow the tenets of procedural programming in the sense that a program can be built from one or more procedures, via the use of functions, which can localize the state changes to specific methods.

One difficulty in the work of the team at SM was having to pinpoint where to put elements they were reusing in every project. One website would have a menu system located at the top of the page above the header, and another would have a menu below the header. Sometimes the menu would be placed in the header, among other header elements and at times it was apart. Knowing where to position the clump of code with the menus was then a task that required a lot of care and if one walked away for a while from their project, it was always difficult to resume. It was equally jarring if someone needed to take over an ongoing project from another person, not being able to tell where the project was going and what had been done just at a glance.

Imperative programming for Nzym makes the language easy to learn as there is a clear control flow that can be displayed, giving the user more power to change modify and optimize the program. This also creates more efficiency in the sense that the programmer can tell the computer program exactly what to do. On the procedural side, there is the advantage of modularity as a program can be broken down into smaller reusable procedures, and these may also be reusable in other programs. Debugging is also much simpler because of the imperative paradigm.

Multiplatform 

Nzym was designed not only for the web but with multimedia applications in mind as a whole. When looking at multimedia applications, we are referring to interactive software which combines different types of media such as text, images, video, and audio, to convey information to an audience. These applications are the most dominant type of software found on various types of devices and hardware, spanning various operating systems, gaming consoles, and consumer devices like mobile phones and watches.

While the work on the websites was the bread and butter of SM, there was another big project of which SM became a part of, and that involved work on a multimedia software package called AVisPar (the African Visual Package). AVisPar was a set of software programs and tools for creating 3D visualizations, films, games, game assets, and visual effects. What was to be unique about AVisPar was its ability to make use of a graphics card to produce high-quality 3D renders and save them to disk almost in real-time. AVisPar was also developed to work, not only on the most common commercial desktop operating systems but also on some Linux distributions as well.

Since Nzym can generate websites with web assets, all-inclusive of HTML pages with JavaScript and CSS in them, it can be described as multiplatform. However, where Nzym generates a ctlyst file, it is possible to run the file on any platform which has an implementation of Nzym Console.

High Performance 

As concerns the ctlyst file format, the Nzym Console is designed to convert it directly into machine code for the particular CPU that the application is running on at runtime. The file format is so aptly named after the word catalyst which refers to that which speeds up a chemical reaction. In this case, however, Nzym Console runs the ctlyst file, enabling an environment for the program to run as any other application on the system.

The latest implementation of Nzym and Nzym Console was created using Rust and henceforth has inherited additional high-performance characteristics from the language since the Rust compiler was able to optimize the code for speed. Additionally, the Rust standard library provides a number of efficient algorithms and data structures that were used in the creation of the current build of Nzym. To give a brief outline of what this means for Nzym programs:

  • Memory safety: Rust's ownership system ensures that memory is always managed correctly, which can prevent memory leaks and crashes. This can lead to significant performance improvements, as Nzym does not have to spend time managing memory manually.
  • Efficiency: Rust's compiler is very good at optimizing code for speed. This means that Nzym Console is able to run as fast as possible, even on complex tasks.

Multithreaded 

To make an impressively powerful and interactive multimedia application it will usually mean that there will be a need to be able to handle interactive responsiveness in real-time and better synchronization amongst all elements involved. This will mean that the application will need to be able to handle multiple processes at the same time, implying multiple threads and simultaneous events that may occur at the same time.

AVisPar was a unique project for the team at SM to work on. It allowed for a lot of experimentation in terms of how to create the solutions involved but there was one huge problem that the team faced and that one was to do with handling simultaneous events. The initial code base of AVisPar had been written in C++ along with some libraries from other 3D game engines such as Irrlicht which were included. The 3D game engine Irrlicht in particular did have some multithreading functionality that was easy to use and adapt for running various processes on a single machine. However, running multiple threads on a network with various CPUs and graphics processing units involved, the threads became really difficult and complicated to handle.

C and C++ are conventionally single-threaded and using some libraries to achieve the creation of multiple threads results in the same disadvantages most programmers face when they use Java or Objective C to create multithreaded applications. Usually, problems arise from complexity in terms of needing to figure out how the threads interact, performance issues due to the operating system switching between threads if the design is not carefully done, and ultimately higher resource usage. Nzym on the other hand makes use of Rust’s async/await model for concurrent code when drawing on creating a ctlyst file. However, Nzym also has a fallback in terms of using Web Workers, much in the same way JavaScript does, in that multiple threads may be converted to JavaScript for website projects and then benefit from the improved performance, responsiveness, and scalability that JavaScript applications with multiple threads benefit from.

Dynamic 

Nzym is still under development and thus ever-evolving. It has been designed to adapt to an already ever-evolving technological landscape. With the continuous development and expansion of the Nzym Console and its implementations, Nzym can become the language of choice for creating applications for portable and mobile devices, including smartwatches and smartphones.

From the beginning of 2011, and all throughout the year until the end of 2012, SM experienced an increase in customers requiring their services to develop mobile applications for them. SM made use of Java in creating apps for smartphones of that time that supported Java, including Android phones that were gaining a lot of market share at that time. The problem became that the code for these platforms, although written in the same language, they were not and could not be the same. The visual presentation was not portable and the functionality greatly differed, as well as the libraries used in development.

Java was once the go-to language for developing mobile languages but has lost ground in recent years to newer languages, such as Kotlin and Swift. The main issues with Java were and remain

  • Performance: Java is not as performant as some of the newer languages, which can lead to slower apps.
  • Complexity: Java is a complex language, which can make it difficult to learn and use.
  • Fragmentation: There are many different versions of Java, which can make it difficult to develop apps that work on all devices.

While Java remains popular for developing mobile applications, due to its ecosystem of libraries and tools, support by many vendors, and its maturity, newer languages are gaining ground. With the initiative of Nzym to follow the path and make it easier, better, and faster to create and port applications to as many devices as possible with a single code base being the goal, Nzym is undoubtedly a language to watch as it fires towards this target.
[add]