possibly the world's most simplest and restricted language.
Project description
NumberScript
possibly the world's most simplest and restricted language.
Installation
pip
pip install NumberScript
Features
- No spaces (Yup, you read that right)
- Comments
- Only 7 commands
- A shell and a runner
Docs
CLI and repl
To use the repl just run,
python -m NumberScript
To run a file just use this,
python -m NumberScript -f Path/To/File
commands
commands: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
comments: %
arithmetic: ^
Compare: = | ! | < | >
operations: + | - | * | / |
If-Else: ? :
NOTE: You can't have different arithmetic signs in a single ^ : so you can do this 1+1+2 but not 1+1*2 : Also NO SPACES.
syntax
A basic program
%Test.ns
0 %Starts %The %Program
3a:Hello %Sets %The %Variable %a %to %Hello
2a %Displays %a
?a=Hello:2a:2Bye %Check-A-If-Its-Hello-Then-Display-It-Else-Display-Bye
1 %Ends %The %program
You can also have that program like this
0 3a:Hello 2a 4a=Hello:2a:2Bye 1
Here is another program where it loops over digits to check if it's lucky
%Is-This-lucky:Checks-If-The-Number-Is-Lucky
0
3lucky_num:9
6n\10\?n=lucky_num:2n|2Is-The-Lucky-Number:2n|2Is-Not-The-Number
1
You can find more examples in the examples folder.
So, since there aren't any spaces what can we use instead of them? You can use _ or -.
To-Do
- Functions
- Possibly OOP
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file NumberScript-1.9.3.tar.gz
.
File metadata
- Download URL: NumberScript-1.9.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f849b2c5473ecc6f917df37c9bb67e5cfb9890d3dcc79f3c0195eb4941f91bc9 |
|
MD5 | 4c8c95598b17f5e727e8cff093e5caad |
|
BLAKE2b-256 | 76761febe08e6d1278f0d1201e423cc1898f71a3f161445d42b13b8dc2714cba |