tumorscript 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,193 @@
1
+ Metadata-Version: 2.4
2
+ Name: tumorscript
3
+ Version: 0.1.0
4
+ Summary: A biomorphic and entropic esoteric programming language runtime
5
+ Author: TumorScript Contributors
6
+ License: MIT
7
+ Keywords: tumorscript,esoteric,biomorphic,language,interpreter
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Topic :: Software Development :: Interpreters
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+
15
+ # TumorScript
16
+
17
+ An esoteric, biomorphic programming language where data mutates when observed, code infects its neighbors, and developers must fight entropy to keep programs alive.
18
+
19
+ ## Building the Native Executable
20
+
21
+ TumorScript itself compiles into a standalone, single-file native executable (`tumorscript.exe` / `tumorscript`) that runs `.tmq` scripts without requiring Lua or external dependencies.
22
+
23
+ ### Windows
24
+ ```cmd
25
+ build.bat
26
+ ```
27
+ The compiled binary will be placed at `bin\tumorscript.exe`.
28
+
29
+ ### Linux / macOS
30
+ ```bash
31
+ chmod +x build.sh
32
+ ./build.sh
33
+ ```
34
+ The compiled binary will be placed at `bin/tumorscript`.
35
+
36
+ ---
37
+
38
+ ## Quick Start
39
+
40
+ ### Using the Compiled Binary
41
+ ```bash
42
+ # Windows
43
+ bin\tumorscript.exe examples\hospital_core.tmq
44
+
45
+ # Linux / macOS
46
+ ./bin/tumorscript examples/hospital_core.tmq
47
+ ```
48
+
49
+ ### Using the Lua Script (Development)
50
+ ```bash
51
+ lua main.lua examples/hospital_core.tmq
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Project Structure
57
+
58
+ ```
59
+ tumor_script/
60
+ ├── bin/ # compiled standalone binaries
61
+ │ └── tumorscript.exe # native Windows executable
62
+ ├── build.bat # Windows native build script
63
+ ├── build.sh # Linux/macOS native build script
64
+ ├── Cargo.toml # native Rust build configuration
65
+ ├── src_native/
66
+ │ └── main.rs # native runner embedding Lua 5.4 + TumorScript
67
+ ├── main.lua # script entry point
68
+ ├── src/ # language implementation
69
+ │ ├── lexer.lua # tokenizer (indentation + quarantine braces)
70
+ │ ├── parser.lua # recursive descent parser -> AST
71
+ │ ├── memory.lua # biomorphic memory system (mutation, infection, chemo)
72
+ │ └── interpreter.lua # tree-walking interpreter
73
+ ├── examples/
74
+ │ ├── simple_test.tmq # minimal test
75
+ │ ├── hospital_core.tmq # full-featured example
76
+ │ ├── quarantine_limit_fail.tmq # 20% limit test
77
+ │ └── illegal_brace_fail.tmq # syntax error test
78
+ ├── wiki/ # complete GitHub Wiki documentation
79
+ │ ├── Home.md
80
+ │ ├── _Sidebar.md
81
+ │ ├── _Footer.md
82
+ │ ├── Language-Specification.md
83
+ │ ├── Biomorphic-Runtime.md
84
+ │ ├── Syntax-and-Keywords.md
85
+ │ ├── Architecture-and-Compiler.md
86
+ │ └── Examples-and-Cookbook.md
87
+ └── README.md
88
+ ```
89
+
90
+ ## Documentation & GitHub Wiki
91
+
92
+ Full documentation is available in the [`wiki/`](wiki/Home.md) directory, pre-formatted for GitHub Wiki:
93
+ * [Wiki Home](wiki/Home.md)
94
+ * [Language Specification](wiki/Language-Specification.md)
95
+ * [Biomorphic Runtime Mechanics](wiki/Biomorphic-Runtime.md)
96
+ * [Syntax and Keywords](wiki/Syntax-and-Keywords.md)
97
+ * [Architecture and Compiler Design](wiki/Architecture-and-Compiler.md)
98
+ * [Examples and Cookbook](wiki/Examples-and-Cookbook.md)
99
+
100
+ ## File Extensions
101
+
102
+ | Extension | Name | Purpose |
103
+ |-----------|------|---------|
104
+ | `.tmq` | Tumor Quarantine | Main source files |
105
+ | `.tmr` | Tumor Source Module | Library modules |
106
+ | `.tmh` | Tumor Header | Immune header files (rna only) |
107
+ | `.tmz` | Tumor Zone | High-risk experimental modules |
108
+ | `.tmb` | Tumor Bytecode | Compiled binary intermediate code |
109
+
110
+ ## Language Reference
111
+
112
+ ### Variables
113
+
114
+ ```
115
+ dna x = 42 # mutable, mutates on every read
116
+ rna PI = 3.14159 # immutable, immune to mutation
117
+ ```
118
+
119
+ ### Functions (Genes)
120
+
121
+ ```
122
+ gene add(a, b):
123
+ apoptosis a + b
124
+ ```
125
+
126
+ ### Objects (Cells)
127
+
128
+ ```
129
+ cell Patient:
130
+ dna age = 30
131
+ rna id = "P001"
132
+
133
+ gene main():
134
+ dna p = mitosis Patient()
135
+ print(p.age)
136
+ ```
137
+
138
+ ### Control Flow
139
+
140
+ ```
141
+ if x > 10:
142
+ print("big")
143
+ elif x > 5:
144
+ print("medium")
145
+ else:
146
+ print("small")
147
+
148
+ while i < 10:
149
+ i = i + 1
150
+ ```
151
+
152
+ ### Quarantine (Sterile Zone)
153
+
154
+ Freezes all mutation inside the block. Curly braces `{}` are **only** valid here.
155
+ Maximum 20% of source code can be quarantined.
156
+
157
+ ```
158
+ quarantine {
159
+ dna safe = x
160
+ print(safe) # will NOT mutate
161
+ }
162
+ ```
163
+
164
+ ### Chemo (Reset Mutation)
165
+
166
+ Resets a mutated variable to its original value. 15% chance of destroying it entirely.
167
+
168
+ ```
169
+ chemo x
170
+ ```
171
+
172
+ ### Import (Metastasis)
173
+
174
+ ```
175
+ metastasis System.IO
176
+ ```
177
+
178
+ ## Core Mechanics
179
+
180
+ ### Read-Based Mutation
181
+ Every time a `dna` variable is read, its value shifts:
182
+ - **Numbers**: `V_new = V_old * (1 ± δ)` where δ scales from 0.5% to 5%
183
+ - **Strings**: Random ASCII character shifts
184
+ - **Booleans**: Can flip at high mutation rates
185
+
186
+ ### Infection Spread
187
+ When a malignant variable interacts with a healthy one, there's a 30% chance the healthy variable gets infected.
188
+
189
+ ### Gene Contamination
190
+ Passing mutated arguments to a gene gradually infects the gene itself, causing its return values to drift.
191
+
192
+ ### Organ Failure
193
+ When 50%+ of variables become malignant (deviation > 50%), the runtime crashes with `ORGAN_FAILURE_EXCEPTION`.
@@ -0,0 +1,13 @@
1
+ tumorscript/__init__.py,sha256=Rs4h6g66hntYu7WYcHxD8_ulrGllI5giFNZ_AmrqvZQ,52
2
+ tumorscript/cli.py,sha256=n2S8vmgdS2e8L4DbdiXKFlvKd_B9Ml0TTn6nF3sNvjk,1868
3
+ tumorscript/main.lua,sha256=FIUpo36pALjz7UEieEaHvmSHEXjuLxH8JrGVE7fizo8,1695
4
+ tumorscript/bin/tumorscript.exe,sha256=NxfgdneAoKkMVRAgY3ZqJYOObVr0hykzlAk4eZzDVZ8,547840
5
+ tumorscript/src/interpreter.lua,sha256=Td7tPodX8XoYZZTZkCdGyQ1Q9GOc7YQHVioMJoruI-0,17320
6
+ tumorscript/src/lexer.lua,sha256=--pQf75FvvH07MfRdNZdOIf6BkbD3URLW0idwxagk0U,10926
7
+ tumorscript/src/memory.lua,sha256=BjI9dzUmEAQFdoEJaGoHqlFFcluolPM8uMBNhtveiLg,9548
8
+ tumorscript/src/parser.lua,sha256=25E-_dqY5WsPvkjbQy1hUXVxjxiS8TVUoy5LReVpHMg,16536
9
+ tumorscript-0.1.0.dist-info/METADATA,sha256=quWGZ3hrEfJdVevJtuESBD9UznsHJaQacLyB17k3VEI,5589
10
+ tumorscript-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
11
+ tumorscript-0.1.0.dist-info/entry_points.txt,sha256=hrA72C5MoQRp_f1zG0fIrMiRK8Zbv_t7T0xuct-2B-Q,53
12
+ tumorscript-0.1.0.dist-info/top_level.txt,sha256=lkyYt9om5_9ZgGAcqrxnV1kk9s6XJjdi8UlzWWykKrQ,12
13
+ tumorscript-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ tumorscript = tumorscript.cli:main
@@ -0,0 +1 @@
1
+ tumorscript