All Projects → itssamuelrowe → Zen

itssamuelrowe / Zen

Licence: other
Zen is a general purpose programming language designed to build simple, reliable and efficient programs.

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to Zen

openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,973 (+12287.5%)
Mutual labels:  virtual-machine, garbage-collector
Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+11575%)
Mutual labels:  virtual-machine, garbage-collector
JTK
JTK is a library designed for writing applications and libraries in C. It provides core utilities such as collections, unit testing, I/O streams, threads and much more.
Stars: ✭ 25 (+4.17%)
Mutual labels:  zen, jtk
jingle
🔔 Jingle is a dynamically-typed, multi-paradigm programming language designed for humans and machines.
Stars: ✭ 34 (+41.67%)
Mutual labels:  virtual-machine, object-oriented-programming
llvm-statepoint-utils
Runtime support for LLVM's GC Statepoints
Stars: ✭ 35 (+45.83%)
Mutual labels:  garbage-collector
zen-of-fortran-talk
a path to discover Modern Fortran, a poor, informal talk for newbies Fortraners
Stars: ✭ 16 (-33.33%)
Mutual labels:  zen
docker-garby
Just another Docker maintenance script, managing garbage collection of Docker containers and images.
Stars: ✭ 36 (+50%)
Mutual labels:  garbage-collector
jaws
Jaws is an invisible programming language! Inject invisible code into other languages and files! Created for security research -- see blog post
Stars: ✭ 204 (+750%)
Mutual labels:  virtual-machine
zen archived
TLS integration and more!
Stars: ✭ 133 (+454.17%)
Mutual labels:  zen
PhantasmaChain
Blockchain with native storage and smart contract integration.
Stars: ✭ 74 (+208.33%)
Mutual labels:  virtual-machine
Lubuntu-VirtualBox
Lubuntu Bionic 18.04.5 Minimal and Full virtual machines. VirtualBox OVA files less than 400 MB and 1GB respectively
Stars: ✭ 25 (+4.17%)
Mutual labels:  virtual-machine
hematita
A memory safe Lua interpreter
Stars: ✭ 118 (+391.67%)
Mutual labels:  virtual-machine
birsh
virsh replacement in bash
Stars: ✭ 14 (-41.67%)
Mutual labels:  virtual-machine
The-Java-Workshop
A New, Interactive Approach to Learning Java
Stars: ✭ 65 (+170.83%)
Mutual labels:  object-oriented-programming
virtnbdbackup
Backup utiliy for Libvirt / qemu / kvm supporting incremental and differencial backups.
Stars: ✭ 62 (+158.33%)
Mutual labels:  virtual-machine
X11Basic
X11-Basic BASIC programming language.
Stars: ✭ 42 (+75%)
Mutual labels:  virtual-machine
Windows-11-VPS
😎😘 Free Windows 11 VPS for 4 Hours ! Easy Method!
Stars: ✭ 70 (+191.67%)
Mutual labels:  virtual-machine
lust
A parser, compiler, and virtual machine evaluator for a minimal subset of Lua; written from scratch in Rust.
Stars: ✭ 120 (+400%)
Mutual labels:  virtual-machine
OOP-Design-Patterns
MET CS665 - OOP Design Patterns Code Examples
Stars: ✭ 74 (+208.33%)
Mutual labels:  object-oriented-programming
nolimix86
LLVM-based x86 emulator with support for unlimited virtual registers, used before the register allocation pass
Stars: ✭ 19 (-20.83%)
Mutual labels:  virtual-machine

Zen

Zen is a general purpose programming language designed to build simple, reliable and efficient programs.

Zen is currently under development. Please contact the author, Samuel Rowe ([email protected]), to contribute.

Visit the official website to learn more about the language, tools, getting started, and more.

This repository contains the reference implementation of the Zen compiler. Please explore the following links to find other relevant resources.

Example 1

function factorial(n)
    return n <= 1 ? 1 : n * factorial(n - 1)

function main(...arguments)
    printf('Enter an integer: ')
    var n = scanInteger()
    var result = factorial(n)
    print('%d! = %d', n, result)

The above example generates the following output:

Enter an integer: 5
5! = 120

Example 2

function main(...arguments)
    printf('What is your name? ')
    var name = scanLine()
    if name.isBlank()
        print('The specified name is blank.')
    else if name == 'Samuel Rowe'
        print('Hey! That is my name, too!')
    else
        print('Hi, %s!', name)

The above example generates the following output:

What is your name? Samuel Rowe
Hey! That is my name, too!

Example 3

function main(...arguments)
    var names = [
        'Samuel Rowe',
        'Joel E. Rego',
        'Bill Gates',
        'Linus Trovalds',
        'Abraham Lincoln',
        'Isaac Newton',
        'Albert Einstein',
        'Richard Feynman',
        'Christopher Nolan',
        'Benedict Cumberbatch'
    ]
    var key = 'Marshall Mathers'
    var result = null
    for var i in range(0, names.size)
        if key == names[i]
            result = i
            break

    if result != null
        print('Found the key "%s" at index %d.', key, result)
    else
        print('Could not find the key "%s" in the list.', key)

The above example generates the following output:

Could not find the key "Marshall Mathers" in the list.

Installation

Before you install Zen, you need to install JTK and pkg-config on your system.

JTK is a library designed for writing applications and libraries in C. It provides core utilities such as collections, unit testing, I/O streams, threads and much more. You can find the latest version of JTK here.

Compiling Zen on Windows

For compiling Zen on Windows, you first need to install MSYS2 or WSL. The steps required to install MSYS2 or WSL are beyond the scope of this documentation. Although you can find tutorials on installing them on the Internet.

Please follow the steps given below if you are compiling on MSYS2. If you are using WSL to compile Zen, please follow the steps described under the Linux section.

  1. Extract the source code to any directory of your choice, for the sake of this documentation we will refer this location as 'C:\zen'.

  2. Change the directory to 'C:\zen'.

    cd 'C:/zen'
    
  3. Create a temporary directory for compiling the source code. For the sake of this documentation we will refer to this directory as 'build'.

    mkdir build
    
  4. Change directory to the newly created directory.

    cd build
    
  5. Invoke CMake to generate make files. In this documentation, we show the commands to generate GNU Makefiles. You can easily generate other makefiles similarly.

    cmake .. -G 'MSYS Makefiles'
    
  6. Invoke the GNU Make program. The command may be different on your system, if you have not setup an alias.

    make
    

    This should compile the compiler, virtual machine, and all the other executables. Archives and executable files should be produced in your current working directory.

    As of this version, a plethora of warnings are generated. We are working to eradicate these warnings.

Compiling Zen on Linux and WSL

  1. For compiling Zen on Linux or WSL, you need CMake and GNU Make (or any other make utility that CMake is compatible with).

  2. Extract the source code to any directory of your choice, for the sake of this documentation we will refer this location as '/mnt/g/zen'.

  3. Change the directory to '/mnt/g/zen'.

    cd '/mnt/g/zen'
    
  4. Create a temporary directory for compiling the source code. For the sake of this documentation we will refer to this directory as 'build'.

    mkdir build
    
  5. Change directory to the newly created directory.

    cd build
    
  6. Invoke CMake to generate make files. In this documentation, we show the commands to generate the default Makefiles, on our system GNU Makefiles is the default target. You can easily generate other makefiles by specifying the target make files using the -G flag.

    cmake ..
    
  7. Invoke the GNU Make program.

    make
    

    This should compile the compiler, virtual machine, and all the other executables. Archives and executable files should be produced in your current working directory.

    As of this version, a plethora of warnings are generated. We are working to eradicate these warnings.

Contributing

We welcome all contributors.

Zen was created with a vision to help programmers, like you and I, write code better. With your contributions, we can get there sooner. We appreciate your help!

To contribute, please contact the original author Samuel Rowe ([email protected]).

License

Copyright 2017-2020 Samuel Rowe

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].