FreeScript
NumScript
by skirexwastaken · version 2026.10.20 · updated yesterday
No reviews yet
- Downloads
- 0
- Reviews
- 0
- Size
- 60 KB
- Code check
- Clean
- Licence
- GPL-3.0
- Released
- Nov 2026
NumScript is a lightweight, esoteric, interpreted scripting language designed for numeric programming.
NumScript: A Numerical Programming Language
NumScript is a lightweight, esoteric, interpreted scripting language designed for numerical programming and writing simple scripts.
The language started as a joke back in mid-2024, and over time it grew into its current form featuring a rich syntax and a unique numerical logic system.
The code is not perfect as this is my first project I started right around when I started learning programming, however I try to improve it from time to time.
👉 You can try the language at numscript.danbtw.org
Key Features
NumScript includes several defining features that shape its unique programming model:
13 01 00 24 01 00
NumScript doesn't use any non standard Python libraries so you will need to simply install Python. Bellow are the versions of Python that I've tried so far.
Works, Python Version
✅, 3.14.4
✅, 3.14.0
✅, 3.13.9
✅, 3.13.7
How to useRunning NumScript shellWindows
Linux
AUR Package
Running NumScript fileWindows
Linux
AUR Package
Core Mechanics
NumScript is an interpreted language, meaning the interpreter reads and executes code one line at a time.
It works with two stacks of code:
1. Tokenized Code
This stack contains a code from either shell or file.
It is the code that is primarily executed.
2. Higher Tokenized Code
This stack contains a code with higher execution priority.
This code can originate from called definitions for example.
After each executed line from Tokenized Code the NumScript Virtual Machine checks this stack if it contains any new code and if it does it is executed.
After all code from Higher Tokenized Code is executed the NumScript Virtual Machine continues with execution of the primary code in Tokenized Code.
Execution process
The internal execution process is composed of several steps:
1. Tokenization
The code is first processed by a tokenizer, which checks that its content is numeric and splits it into token pairs — for example: "10", "01", "00"
2. Execution Setup
After the instruction 00 (RUN) is passed, the code is compiled into a simplified internal format and sent to the executor.
The executor reads each line in order and passes it to the code runner.
3. Parsing
The code runner sends the current line to the interpreter.
The interpreter analyzes the tokens to determine which function should be executed — this is defined by the first token pair.
That first pair is then removed, and the remaining tokens are passed to the interpreteoperandAssembler for further analysis.
4. Lexing
The interpreteoperandAssembler processes the remaining tokens and groups them into interpreteoperandAssembler Blocks, which represent final, usable values.
In NumScript, these blocks are separated by the token 24.
Example — Variable Definition: 13 01 00 24 01 01 01 00
This expression contains two blocks:
The first block defines the variable name, with the value 00.
The second block defines the value of that variable, with the value 01 10.
These blocks are then passed back to the interpreter and they are used as parameters in the executed function.
5. Execution Result
The interpreter assigns the blocks as parameters for the target function, and the result is printed to the console.
Summary
Tokenizer -> Splits code into numeric token pairs.
Executor -> Reads and sends each line for execution.
interpreter -> Determines which function each token pair represents and sets its arguments.
interpreteoperandAssembler -> Groups tokens into logical blocks and evaluates their values.
Console Output -> Displays the final result after execution.
Builder Variables
The builder is a function that combines all of the parts of NumScript Virtual Machines.
It has multiple variables that are used in the entire code.
Runtime Architecture
cli -> run -> lineRunner -> interpreter -> interpreter -> operandAssembler -> interpreter -> lineRunner -> cli
34, Greater than operator., 10 01 00 34 01 01
<, 35, Smaller than operator., 10 01 01 35 01 01
=, 36, Equals operator., 10 01 01 36 01 01
&, 37, AND operator., 10 01 01 37 01 01
\, 38, OR operator., 10 01 01 38 01 01
~, 39, NOT operator., 10 39 01 01
Jump, 40, Jumps to specific line., 40 01 00
Wait, 41, Freezes script for time., 41 01 01
Clean Console, 42, Cleans console content., 42
Clean States, 43, Resets state values., 43
Clean Tokenized Code, 44, Clears tokenized code., 44
Clean Higher Priority Tokenized Code, 45, Clears higher priority tokenized code., 45
Clean Variables, 46, Clears variable memory., 46
Clean Definitions, 47, Clears definitions memory., 47
Clean Stacks, 48, Clears stack memory., 48
States, 49, Switches state values., 49 01 00 01 00
TAB (if/cycles), 50, Marks code inside conditional/cycle., 50 10 01 00
End of cycle/statement, 51, Ends a conditional or cycle., 50 51
If, 52, Conditional statement., 52 01 01
While, 53, Repeats code while condition true., 53 02 00 34 01 10
For, 54, Loops for variable’s value count., 54 01 00
Do if, 55, Runs at least once even if false., 55 01 00
Define, 56, Creates a new definition., 56 01 00
TAB (define), 57, Adds code to definition., 57 10
…
NumScript is a lightweight, esoteric, interpreted scripting language designed for numerical programming and writing simple scripts.
The language started as a joke back in mid-2024, and over time it grew into its current form featuring a rich syntax and a unique numerical logic system.
The code is not perfect as this is my first project I started right around when I started learning programming, however I try to improve it from time to time.
👉 You can try the language at numscript.danbtw.org
Key Features
NumScript includes several defining features that shape its unique programming model:
13 01 00 24 01 00
- Token-Based Syntax: All instructions are built using numeric token pairs (for example,
13 01). - Zero-Error Policy: NumScript never crashes. Mistyped or incomplete code automatically defaults to safe (though possibly unintended) behavior.
- Real-Time Execution: The interpreter processes code one line at a time, providing immediate feedback.
- Simplicity: NumScript features a minimalistic syntax and a limited set of data types, resulting in a lightweight and efficient programming experience.
NumScript doesn't use any non standard Python libraries so you will need to simply install Python. Bellow are the versions of Python that I've tried so far.
Works, Python Version
✅, 3.14.4
✅, 3.14.0
✅, 3.13.9
✅, 3.13.7
How to useRunning NumScript shellWindows
python NumScript.pyLinux
python3 NumScript.pyAUR Package
yay -s numscriptnumscriptRunning NumScript fileWindows
python NumScript.py main.nsLinux
python3 NumScript.py main.nsAUR Package
yay -s numscriptnumscript main.nsCore Mechanics
NumScript is an interpreted language, meaning the interpreter reads and executes code one line at a time.
It works with two stacks of code:
1. Tokenized Code
This stack contains a code from either shell or file.
It is the code that is primarily executed.
2. Higher Tokenized Code
This stack contains a code with higher execution priority.
This code can originate from called definitions for example.
After each executed line from Tokenized Code the NumScript Virtual Machine checks this stack if it contains any new code and if it does it is executed.
After all code from Higher Tokenized Code is executed the NumScript Virtual Machine continues with execution of the primary code in Tokenized Code.
Execution process
The internal execution process is composed of several steps:
1. Tokenization
The code is first processed by a tokenizer, which checks that its content is numeric and splits it into token pairs — for example: "10", "01", "00"
2. Execution Setup
After the instruction 00 (RUN) is passed, the code is compiled into a simplified internal format and sent to the executor.
The executor reads each line in order and passes it to the code runner.
3. Parsing
The code runner sends the current line to the interpreter.
The interpreter analyzes the tokens to determine which function should be executed — this is defined by the first token pair.
That first pair is then removed, and the remaining tokens are passed to the interpreteoperandAssembler for further analysis.
4. Lexing
The interpreteoperandAssembler processes the remaining tokens and groups them into interpreteoperandAssembler Blocks, which represent final, usable values.
In NumScript, these blocks are separated by the token 24.
Example — Variable Definition: 13 01 00 24 01 01 01 00
This expression contains two blocks:
The first block defines the variable name, with the value 00.
The second block defines the value of that variable, with the value 01 10.
These blocks are then passed back to the interpreter and they are used as parameters in the executed function.
5. Execution Result
The interpreter assigns the blocks as parameters for the target function, and the result is printed to the console.
Summary
Tokenizer -> Splits code into numeric token pairs.
Executor -> Reads and sends each line for execution.
interpreter -> Determines which function each token pair represents and sets its arguments.
interpreteoperandAssembler -> Groups tokens into logical blocks and evaluates their values.
Console Output -> Displays the final result after execution.
Builder Variables
The builder is a function that combines all of the parts of NumScript Virtual Machines.
It has multiple variables that are used in the entire code.
Runtime Architecture
`cli -> run -> lineRunner -> interpreter -> interpreter -> operandAssembler -> interpreter -> lineRunner -> cli
34, Greater than operator., 10 01 00 34 01 01
<, 35, Smaller than operator., 10 01 01 35 01 01
=, 36, Equals operator., 10 01 01 36 01 01
&, 37, AND operator., 10 01 01 37 01 01
\, 38, OR operator., 10 01 01 38 01 01
~, 39, NOT operator., 10 39 01 01
Jump, 40, Jumps to specific line., 40 01 00
Wait, 41, Freezes script for time., 41 01 01
Clean Console, 42, Cleans console content., 42
Clean States, 43, Resets state values., 43
Clean Tokenized Code, 44, Clears tokenized code., 44
Clean Higher Priority Tokenized Code, 45, Clears higher priority tokenized code., 45
Clean Variables, 46, Clears variable memory., 46
Clean Definitions, 47, Clears definitions memory., 47
Clean Stacks, 48, Clears stack memory., 48
States, 49, Switches state values., 49 01 00 01 00
TAB (if/cycles), 50, Marks code inside conditional/cycle., 50 10 01 00
End of cycle/statement, 51, Ends a conditional or cycle., 50 51
If, 52, Conditional statement., 52 01 01
While, 53, Repeats code while condition true., 53 02 00 34 01 10
For, 54, Loops for variable’s value count., 54 01 00
Do if, 55, Runs at least once even if false., 55 01 00
Define, 56, Creates a new definition., 56 01 00
TAB (define), 57, Adds code to definition., 57 10
…