Skip to main content

CubeLang

CubeLang is a strongly and statically typed domain-specific procedural programming language created for solving twisting cube puzzles like Rubik's cubes.


Installation

CubeLang requires Python 3.6 or newer to functions. For the information on how to install Python, please refer to the download page.

The easiest way to install CubeLang is by using pip. On how to install pip please refer to the manual.

pip install CubeLang

After the installation, cubelang and cubelang-scramble command-line utilities will be available.

Development

For the development of CubeLang clone this repository and install dependencies.

git clone https://github.com/poletaevvlad/CubeLang.git
cd CubeLang
pip install lark-parser termcolor
pip install -r test_requirements.txt

Tests for the interpreter are located in the test directory, tests for the example programs are in the test_examples directory. CubeLang uses pytest for testing.

Examples

There are two example programs written in CubeLang. They are located in the examples directory of the GitHub repository.

The results of executing example programs are shown below.

Beginner's method (3×3×3 cube) @ examples/beginner

Pocket cube (2×2×2 cube) @ examples/pocket-cube

Documentation

You can find the language documentation in the docs directory in the root of this repository.

Documentation consists of the following sections:

Usage @ docs/usage.md
Describes the command line arguments for the interpreter and scrambler utility application.

Variables and types @ docs/types.md
Describes how to define a variable, determine it's scope. Lists data types, supported by CubeLang.

Operators @ docs/operators.md
Lists binary and unary operators supported by CubeLang.

Conditions and loops @ docs/statements.md
Shows the syntax of most execution controlling operators: conditions, loops, and orient operator.

Cube turns and rotations @ docs/actions.md
Shows the syntax of cube turning and rotating commands used by the language and some of the interpreter's command line arguments.

Indexing @ docs/indexing.md
Describes how to access sticker colors of a cube.

Standard library @ docs/stdlib.md
A reference for all functions and constants included in the standard library.

License

This software is licensed under MIT license. Please refer to LICENSE file of this repository for more information.

Copyright © Vlad Poletaev, 2019, 2020

Metadata

Release files for CubeLang 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CubeLang 0.1.4
File Size Uploaded
CubeLang-0.1.4.tar.gz 41.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CubeLang 0.1.4
File Interpreter ABI Platform
CubeLang-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 159.3 kB

Release files / CubeLang-0.1.4.tar.gz

Download URL CubeLang-0.1.4.tar.gz
Size 41.1 kB
Tags Source
SHA-256 checksum
How to use checksums
54c915f2f827e61a9b714431ee3e72d686c78bf8f4d4aba0ca7f04dc43ae7ac9
BLAKE2b-256 checksum
How to use checksums
469796eac6889407ebbe91d4b0a4998395411a12bf4af4ec205e8903b940c52c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / CubeLang-0.1.4-py3-none-any.whl

Download URL CubeLang-0.1.4-py3-none-any.whl
Size 118.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60b296ca3939e44cbb1e73c9326d157940c19747c06864fc918e9542e97a71f8
BLAKE2b-256 checksum
How to use checksums
a3e5230e7e9fa8117ac61787a52affcb523792acb19948f0389517774ff47122
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

1 release file

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page