Skip to content

Magayaga/xenly

Repository files navigation

Xenly programming language

Dense, multiverse, and the successor of the C programming language

Xenly (formerly known as Xenon) is a free and open-source compiled high-level, multi-paradigm, general-purpose programming language designed primarily for command-line interfaces, web servers, and applications. It was originally written in C, Go, and Rust programming languages.

Xenly programming language should be command-line interfaces, web servers, and desktop applications. It is static and dynamic typing, readability, usability, and flexibility.

Introduction to Xenly

Major implementations

  • Xenly — Xenly can be an interpreter and package manager.
  • XVM — Xenly can be a virtual machine because the source code is into the bytecode like a class-based programming language.
  • Xenlyc — Xenly can be a compiler and package manager. It is the compiler front end for the Xenly programming language.
  • XenlyXI — Xenly can be an interpreter.

Examples

Hello, World! program

The following shows how a "Hello, World!" program is written in Xenly programming language:

  • print (v0.1.0-preview0 - v0.1.0-preview8)

    // “Hello, World!” program
    print("Hello, World!")
  • nota (v0.1.0-preview9 - present). nota is the Latin word for "print" and "note".

    // “Hello, World!” program
    nota("Hello, World!")

A Xenly variable is created the moment you first assign a value to it.

// "var" variable to nota()
var hi = "Hello, World!"
nota(hi)

I know all high-level programming languages like Python, Ruby, Lua, and Julia were initially written in C programming language.

The following shows how a "Hello, World!" program is written in Hyzero programming language:

# “Hello, World!” program
write("Hello, World!")

Here is the Hyzero programming language that was initially written in Python programming language like interpreter, high-level, and functional.

Getting Started

1. Download the Xenly's source code

You can download the git clone of the xenly programming language. It is the available for the Windows and Linux operating systems.

# Download the Xenly's source code
$ git clone https://github.com/xenly
$ xenly

2. Install the Xenly's source code

You can run the program makefile for Linux, make.bat for Windows, and main.sh for both Windows and Linux.

# Run the program (makefile, bash script, or batchfile)
$ make
$ bash main.sh
$ ./make.bat

# Run the binary code
$ ./xenly

3. Set the Library paths (Linux)

Make sure the shared library path is correctly set so that the system can find the libraries. Set the LD_LIBRARY_PATH environment variable to include the directory containing libraries (math.so, graphics.so, and more).

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.

4. Check permissions and paths (Linux)

Ensure that the libraries has the correct permissions and is in the directory where xenly expects to find it. Ensure the library is readable and executable:

$ chmod +rx <libraries>

For example,

$ chmod +rx math.so

Confirm that math.so is in the same directory as xenly or in a directory listed in LD_LIBRARY_PATH.

5. Testing programs

# Xenly's version information
./xenly -v

# Running xenly's examples
./xenly examples/print/main.xe

Source Code Organization

The Xenly source code is organized as follows:

Directory Contents
assets/ Types of files for the Xenly programming language
doc/ Documentation for the Xenly programming language
docs/ Official website for the Xenly programming language
examples/ Example code for the Xenly programming language
src/ Source code for the Xenly programming language

If you are new to the Xenly, you may want to check out these additional resources.

Copyright

Copyright (c) 2023-2024 Cyril John Magayaga. All rights reserved.

Licensed under the MIT license.

About

The Xenly programming language

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published