Skip to main content

A language with interpreter and compiler: silk flexibility with network level versatility!

Project description

Netbyte

Byte code, rope flexibility with versatile networking.

About

Netbyte is a compiled intermediary language, with a compiler and virtual machine, written for Python. It has a slightly Lisp-inspired syntax, with an Assembly/Batch-like statement flow logic, and is quite flexible. Most of the things you can do in Python, you can do with binary files and Netbyte.

Its flexibility comes from the fact it can store anything in two forms:

  • Python objects - Instruction, Operation, Function, etc.

  • Binary compiled code, the target of the compiler, and what the interpreter runs. This is what should be sent by sockets when sending instructions, not pickled Python objects.

It is not meant to be used as a direct language. Like Neko, it is meant to be used as a compilation target, but, unlike Neko, the compiled binary code is merely an architecture, so that you can make hierarchies out of it.

For example, we can have a Python dictionary; let's say it's just a list of functions used by specific objects (actors) or other functional attributes and items of a network game, where each entry has a key name, and its value is a list of Instructions, which compiled string — netbyte.Netbyte().compile(*instructions) — can be transferred around with TCP, and stored into other people's function lists using netbyte.Netbyte().read(binary_code), so that everyone knows what instructions to run if a certain function X is called on an object MyObject.

For more examples, check the Programs folder.

How to Use?

You will need Python 3 to be able to use Netbyte.

To install, run:

pip install -U git+https://github.com/Gustavo6046/Netbyte.git

To set up the Standard Library directory, run:

stdlibdir.bat

To compile a program, run:

python -m netbyte compile input.nbc [output.nbe]

To execute, run:

python -m netbyte run input.nbe [arguments - see Stdlib/args.nbc or Programs/printfile.nbc]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Netbyte, version 0.1.6.3
Filename, size File type Python version Upload date Hashes
Filename, size Netbyte-0.1.6.3-py3-none-any.whl (13.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size Netbyte-0.1.6.3.tar.gz (12.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page