TumorScript
An esoteric, biomorphic programming language where data mutates when observed, code infects its neighbors, and developers must fight entropy to keep programs alive.
Building the Native Executable
TumorScript itself compiles into a standalone, single-file native executable (tumorscript.exe / tumorscript) that runs .tmq scripts without requiring Lua or external dependencies.
Windows
build.bat
The compiled binary will be placed at bin\tumorscript.exe.
Linux / macOS
chmod +x build.sh
./build.sh
The compiled binary will be placed at bin/tumorscript.
Quick Start
Using the Compiled Binary
# Windows
bin\tumorscript.exe examples\hospital_core.tmq
# Linux / macOS
./bin/tumorscript examples/hospital_core.tmq
Using the Lua Script (Development)
lua main.lua examples/hospital_core.tmq
Project Structure
tumor_script/
├── bin/ # compiled standalone binaries
│ └── tumorscript.exe # native Windows executable
├── build.bat # Windows native build script
├── build.sh # Linux/macOS native build script
├── Cargo.toml # native Rust build configuration
├── src_native/
│ └── main.rs # native runner embedding Lua 5.4 + TumorScript
├── main.lua # script entry point
├── src/ # language implementation
│ ├── lexer.lua # tokenizer (indentation + quarantine braces)
│ ├── parser.lua # recursive descent parser -> AST
│ ├── memory.lua # biomorphic memory system (mutation, infection, chemo)
│ └── interpreter.lua # tree-walking interpreter
├── examples/
│ ├── simple_test.tmq # minimal test
│ ├── hospital_core.tmq # full-featured example
│ ├── quarantine_limit_fail.tmq # 20% limit test
│ └── illegal_brace_fail.tmq # syntax error test
├── wiki/ # complete GitHub Wiki documentation
│ ├── Home.md
│ ├── _Sidebar.md
│ ├── _Footer.md
│ ├── Language-Specification.md
│ ├── Biomorphic-Runtime.md
│ ├── Syntax-and-Keywords.md
│ ├── Architecture-and-Compiler.md
│ └── Examples-and-Cookbook.md
└── README.md
Documentation & GitHub Wiki
Full documentation is available in the wiki/ directory, pre-formatted for GitHub Wiki:
- Wiki Home
- Language Specification
- Biomorphic Runtime Mechanics
- Syntax and Keywords
- Architecture and Compiler Design
- Examples and Cookbook
File Extensions
| Extension | Name | Purpose |
|---|---|---|
.tmq |
Tumor Quarantine | Main source files |
.tmr |
Tumor Source Module | Library modules |
.tmh |
Tumor Header | Immune header files (rna only) |
.tmz |
Tumor Zone | High-risk experimental modules |
.tmb |
Tumor Bytecode | Compiled binary intermediate code |
Language Reference
Variables
dna x = 42 # mutable, mutates on every read
rna PI = 3.14159 # immutable, immune to mutation
Functions (Genes)
gene add(a, b):
apoptosis a + b
Objects (Cells)
cell Patient:
dna age = 30
rna id = "P001"
gene main():
dna p = mitosis Patient()
print(p.age)
Control Flow
if x > 10:
print("big")
elif x > 5:
print("medium")
else:
print("small")
while i < 10:
i = i + 1
Quarantine (Sterile Zone)
Freezes all mutation inside the block. Curly braces {} are only valid here.
Maximum 20% of source code can be quarantined.
quarantine {
dna safe = x
print(safe) # will NOT mutate
}
Chemo (Reset Mutation)
Resets a mutated variable to its original value. 15% chance of destroying it entirely.
chemo x
Import (Metastasis)
metastasis System.IO
Core Mechanics
Read-Based Mutation
Every time a dna variable is read, its value shifts:
- Numbers:
V_new = V_old * (1 ± δ)where δ scales from 0.5% to 5% - Strings: Random ASCII character shifts
- Booleans: Can flip at high mutation rates
Infection Spread
When a malignant variable interacts with a healthy one, there's a 30% chance the healthy variable gets infected.
Gene Contamination
Passing mutated arguments to a gene gradually infects the gene itself, causing its return values to drift.
Organ Failure
When 50%+ of variables become malignant (deviation > 50%), the runtime crashes with ORGAN_FAILURE_EXCEPTION.
Metadata
Release files for tumorscript 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tumorscript-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / tumorscript-0.1.0-py3-none-any.whl
| Download URL | tumorscript-0.1.0-py3-none-any.whl |
|---|---|
| Size | 263.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7beb7f5285f40b21b8e174b9f3a7964d0c8b7dd4aba846216da69369def68047
|
|
BLAKE2b-256 checksum How to use checksums |
fa9acf0bdc24c1953b20ebaea8b484ff741478fee5272633f3293af2c1a5ccc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|