Numerus - An Esoteric Stack-based Programming Language (Esolang) by TeaserLang
Project description
Numerus
Numerus is an Esoteric Stack-based Programming Language (Esolang). It is a purely number-based language where all operations are represented by numerical codes.
Installation (CLI)
Install the command-line interpreter (nmc) via PyPI:
pip install nmlang
CLI Usage
Execute a Numerus source file (.nm) using the nmc command:
nmc your_program.nm
Library Usage (Integration)
You can also use the Numerus interpreter directly in your Python projects.
import numerus
# 1. Run a raw string
try:
# Prints 'H' (ASCII 72)
output = numerus.run_numerus_string("10 72 31 33")
print(output)
except numerus.NumerusError as e:
print(f"Code failed to run: {e}")
# 2. Run a file
try:
output = numerus.run_numerus_file("hello_world.nm")
print(output)
except FileNotFoundError:
print("File not found!")
except numerus.NumerusError as e:
print(f"Code failed to run: {e}")
Quick Syntax Guide
| Code | Command | Stack Behavior (TOS = Top of Stack) |
|---|---|---|
| 0-9 | PUSH_VALUE | Pushes the opcode value itself. |
| 10 | PUSH_NEXT | Pushes the next number in the source code. |
| 20 | ADD | (b, a) -> (b+a) |
| 21 | SUB | (b, a) -> (b-a) |
| 23 | DUP | (a) -> (a, a) |
| 31 | PRINT_CHAR | Pops and prints value as ASCII character. |
| 32 | JUMP_ZERO | If popped value is 0, jumps to address provided in source code. |
| 33 | END | Halts execution. |
Example Hello World Program (hello_world.nm)
10 72 31 10 101 31 10 108 31 10 108 31 10 111 31 10 44 31 10 32 31 10 87 31 10 111 31 10 114 31 10 108 31 10 100 31 10 33 31 33
License
This project is under the MIT License.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nmlang-0.1.0.tar.gz.
File metadata
- Download URL: nmlang-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d25cf6bf106bd011fded71e04c068283af81d4d2b54b4d2bb54f54236d5cb9c8
|
|
| MD5 |
5dff80bf962918d77039e1dc92180bbe
|
|
| BLAKE2b-256 |
84881ce574326097eb5fa5fbc44190324d6698dd8e6f99d69de861c8c1ac3edc
|
Provenance
The following attestation bundles were made for nmlang-0.1.0.tar.gz:
Publisher:
python-publish.yml on TeaserLang/numerus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nmlang-0.1.0.tar.gz -
Subject digest:
d25cf6bf106bd011fded71e04c068283af81d4d2b54b4d2bb54f54236d5cb9c8 - Sigstore transparency entry: 685812527
- Sigstore integration time:
-
Permalink:
TeaserLang/numerus@c9136da168b43ee642110459225e8af1e842d52a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/TeaserLang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c9136da168b43ee642110459225e8af1e842d52a -
Trigger Event:
release
-
Statement type:
File details
Details for the file nmlang-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nmlang-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a518dc6e007de885e9f73f9a43a9dd7b761558509c339787fd236195cd60a4fd
|
|
| MD5 |
6e579c166f2c28ae900b54d1d44e6b20
|
|
| BLAKE2b-256 |
888aa788d399621ec648354cc5e5de0487517aa346c79feb2513e91bba53b5d3
|
Provenance
The following attestation bundles were made for nmlang-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on TeaserLang/numerus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nmlang-0.1.0-py3-none-any.whl -
Subject digest:
a518dc6e007de885e9f73f9a43a9dd7b761558509c339787fd236195cd60a4fd - Sigstore transparency entry: 685812528
- Sigstore integration time:
-
Permalink:
TeaserLang/numerus@c9136da168b43ee642110459225e8af1e842d52a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/TeaserLang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c9136da168b43ee642110459225e8af1e842d52a -
Trigger Event:
release
-
Statement type: