tumorscript 0.1.1__tar.gz → 1.0.1__tar.gz
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.
- {tumorscript-0.1.1 → tumorscript-1.0.1}/PKG-INFO +132 -16
- tumorscript-0.1.1/tumorscript.egg-info/PKG-INFO → tumorscript-1.0.1/README.md +531 -434
- {tumorscript-0.1.1 → tumorscript-1.0.1}/pyproject.toml +1 -1
- {tumorscript-0.1.1 → tumorscript-1.0.1}/tumorscript/__init__.py +1 -1
- tumorscript-1.0.1/tumorscript/bin/tumorscript.exe +0 -0
- tumorscript-1.0.1/tumorscript/main.lua +90 -0
- tumorscript-1.0.1/tumorscript/src/capsid.lua +389 -0
- tumorscript-1.0.1/tumorscript/src/interpreter.lua +1462 -0
- tumorscript-1.0.1/tumorscript/src/json.lua +566 -0
- {tumorscript-0.1.1 → tumorscript-1.0.1}/tumorscript/src/lexer.lua +24 -8
- {tumorscript-0.1.1 → tumorscript-1.0.1}/tumorscript/src/memory.lua +112 -12
- {tumorscript-0.1.1 → tumorscript-1.0.1}/tumorscript/src/parser.lua +136 -40
- tumorscript-1.0.1/tumorscript/src/repl.lua +320 -0
- tumorscript-0.1.1/README.md → tumorscript-1.0.1/tumorscript.egg-info/PKG-INFO +550 -415
- {tumorscript-0.1.1 → tumorscript-1.0.1}/tumorscript.egg-info/SOURCES.txt +4 -1
- tumorscript-0.1.1/tumorscript/bin/tumorscript.exe +0 -0
- tumorscript-0.1.1/tumorscript/main.lua +0 -62
- tumorscript-0.1.1/tumorscript/src/interpreter.lua +0 -526
- {tumorscript-0.1.1 → tumorscript-1.0.1}/LICENSE +0 -0
- {tumorscript-0.1.1 → tumorscript-1.0.1}/setup.cfg +0 -0
- {tumorscript-0.1.1 → tumorscript-1.0.1}/tumorscript/cli.py +0 -0
- {tumorscript-0.1.1 → tumorscript-1.0.1}/tumorscript.egg-info/dependency_links.txt +0 -0
- {tumorscript-0.1.1 → tumorscript-1.0.1}/tumorscript.egg-info/entry_points.txt +0 -0
- {tumorscript-0.1.1 → tumorscript-1.0.1}/tumorscript.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tumorscript
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: A biomorphic and entropic esoteric programming language runtime
|
|
5
5
|
Author: TumorScript Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -62,8 +62,8 @@ Dynamic: license-file
|
|
|
62
62
|
<ul>
|
|
63
63
|
<li><a href="#the-biological-philosophy">The Biological Philosophy</a></li>
|
|
64
64
|
<li><a href="#core-biomorphic-mechanisms">Core Biomorphic Mechanics</a></li>
|
|
65
|
-
<li><a href="#file-extension
|
|
66
|
-
<li><a href="#keyword-dictionary">Keyword Dictionary</a></li>
|
|
65
|
+
<li><a href="#file-extension">File Extension</a></li>
|
|
66
|
+
<li><a href="#keyword--built-in-dictionary">Keyword & Built-in Dictionary</a></li>
|
|
67
67
|
<li><a href="#built-with">Built With</a></li>
|
|
68
68
|
</ul>
|
|
69
69
|
</li>
|
|
@@ -79,8 +79,10 @@ Dynamic: license-file
|
|
|
79
79
|
<li>
|
|
80
80
|
<a href="#usage">Usage</a>
|
|
81
81
|
<ul>
|
|
82
|
+
<li><a href="#interactive-cellular-shell-repl">Interactive Cellular Shell (REPL)</a></li>
|
|
82
83
|
<li><a href="#clinical-case-study-hospital_coretmq">Clinical Case Study</a></li>
|
|
83
84
|
<li><a href="#runtime-mutation-trace">Runtime Mutation Trace</a></li>
|
|
85
|
+
<li><a href="#metastasis-call-stack--autopsy-traceback">Metastasis Call Stack & Traceback</a></li>
|
|
84
86
|
<li><a href="#oncology-survival-guide">Oncology Survival Guide</a></li>
|
|
85
87
|
</ul>
|
|
86
88
|
</li>
|
|
@@ -131,32 +133,62 @@ Every time a CPU instruction observes a piece of DNA data, $\delta$ climbs from
|
|
|
131
133
|
|
|
132
134
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
133
135
|
|
|
134
|
-
### File Extension
|
|
136
|
+
### File Extension
|
|
135
137
|
|
|
136
|
-
TumorScript
|
|
137
|
-
|
|
138
|
-
| Extension | Name | Biosafety Level | Purpose |
|
|
139
|
-
|---|---|---|---|
|
|
140
|
-
| `.tmq` | Tumor Quarantine | Level 4 (Primary) | Main executable files containing quarantine chambers and program logic. |
|
|
141
|
-
| `.tmr` | Tumor Source Module | Level 3 (Intermediate) | Importable cellular modules and secondary logic units. |
|
|
142
|
-
| `.tmh` | Tumor Header | Level 1 (Sterile) | Mutation-proof header files containing exclusively immutable `rna` constants. |
|
|
143
|
-
| `.tmz` | Tumor Zone | Level 5 (Extreme Hazard) | High-risk experimental zones where mutation and metastasis rates are tenfold. |
|
|
144
|
-
| `.tmb` | Tumor Bytecode | Machine Artifact | Compiled intermediate binary bytecode for the virtual machine. |
|
|
138
|
+
TumorScript uses exclusively the `.tmq` (Tumor Quarantine) file extension for executable source files. All interpreters and compilers require this extension to execute program logic and quarantine chambers.
|
|
145
139
|
|
|
146
140
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
147
141
|
|
|
148
|
-
### Keyword Dictionary
|
|
142
|
+
### Keyword & Built-in Dictionary
|
|
149
143
|
|
|
150
|
-
| Standard Syntax | TumorScript
|
|
144
|
+
| Standard Syntax | TumorScript Construct | Biological Role |
|
|
151
145
|
|---|---|---|
|
|
152
146
|
| `var` / `let` | `dna` | Mutable variable subject to decay on every read. |
|
|
153
147
|
| `const` | `rna` | Mutation-immune constant. |
|
|
148
|
+
| `array` / `list` | `tumor(...)` / `[...]` | Ordered cluster of cells; reading elements mutates them. |
|
|
149
|
+
| `dict` / `map` | `membrane(...)` | Cell membrane receptor-ligand key-value pairs. |
|
|
150
|
+
| `break` | `remission` | Premature cessation of loop iteration (tumor remission). |
|
|
151
|
+
| `continue` | `relapse` | Skip remainder of cycle and jump to next phase (tumor relapse). |
|
|
152
|
+
| `for ... in` | `for cell in cluster:` | Cellular iteration over tumors, membranes, and sequences. |
|
|
153
|
+
| `range(start, stop)` | `range(...)` | Generates a sequential tumor growth array. |
|
|
154
|
+
| ⭐ *Unique* | `necrosis(N, val)` | Timed cell death; automatically decays and dies after N reads. |
|
|
155
|
+
| `biopsy(t, idx)` | `biopsy` | Surgical clean read of a tumor element without mutation. |
|
|
156
|
+
| `spread(t, val)` | `spread` | Appends a new cell to a tumor growth cluster. |
|
|
157
|
+
| `excise(t, idx)` | `excise` | Surgically removes and returns a cell from a tumor. |
|
|
158
|
+
| `len(x)` | `mass(x)` | Measures biological tumor mass, membrane receptor count, or string length. |
|
|
159
|
+
| `typeof(x)` | `strain(x)` | Identifies biological data strain ("tumor", "membrane", "cell", etc.). |
|
|
160
|
+
| `bind / unbind` | `bind / unbind` | Attaches or removes receptor ligands on a cell membrane. |
|
|
161
|
+
| `keys(m)` | `receptors(m)` | Extracts all bound receptor keys from a cell membrane as a tumor. |
|
|
154
162
|
| `class` / `struct` | `cell` | Living cellular blueprint containing state and traits. |
|
|
155
163
|
| `function` / `def` | `gene` | Cellular functional logic; degrades if fed mutated arguments. |
|
|
156
164
|
| `new` / `clone` | `mitosis` | Duplicates and spawns an independent living cell instance. |
|
|
157
165
|
| `return` | `apoptosis` | Programmed cell death; cleans up scope and yields data. |
|
|
158
166
|
| `import` | `metastasis` | Cross-module dissemination of code and functions. |
|
|
159
167
|
| `try` / `catch` | `quarantine` / `chemo` | Isolation and toxic intervention strategies. |
|
|
168
|
+
| **I/O** | | |
|
|
169
|
+
| `input(prompt?)` | `absorb(prompt?)` | Read a line from standard input (user absorption). |
|
|
170
|
+
| `read_file(path)` | `ingest(path)` | Ingest file contents into a string. |
|
|
171
|
+
| `read_bytes(path, offset?, length?)` | `ingest_binary(path, offset?, length?)` | Read a raw binary file or byte range. |
|
|
172
|
+
| `write_file(path, data)` | `secrete(path, data)` | Secrete data into a file (overwrite). |
|
|
173
|
+
| `append_file(path, data)` | `infiltrate(path, data)` | Infiltrate additional data into an existing file. |
|
|
174
|
+
| `file_exists(path)` | `file_exists(path)` | Check if a file path exists. |
|
|
175
|
+
| **String & Array** | | |
|
|
176
|
+
| `split(str, sep?)` | `lyse(str, sep?)` | Lyse a string into a tumor array by separator. |
|
|
177
|
+
| `join(tumor, sep?)` | `fuse(tumor, sep?)` | Fuse tumor array elements into a single string. |
|
|
178
|
+
| `upper(str)` | `hypertrophy(str)` | Aggressive uppercase conversion (cellular overgrowth). |
|
|
179
|
+
| `lower(str)` | `atrophy(str)` | Lowercase degradation (tissue atrophy). |
|
|
180
|
+
| `trim(str)` | `trim(str)` | Strip leading/trailing whitespace. |
|
|
181
|
+
| `contains(col, val)` | `contains(col, val)` | Test if a string, tumor, or membrane contains a value. |
|
|
182
|
+
| `slice(col, s, e?)` | `resect(col, s, e?)` | Surgical sub-range extraction (resection). |
|
|
183
|
+
| **Math** | | |
|
|
184
|
+
| `sqrt / floor / ceil` | `sqrt / floor / ceil` | Standard math operations. |
|
|
185
|
+
| `round(x, d?)` | `round(x, d?)` | Round to `d` decimal places. |
|
|
186
|
+
| `abs / min / max / pow` | `abs / min / max / pow` | Absolute value, extrema, and exponentiation. |
|
|
187
|
+
| `random(...)` | `random(...)` | Pseudo-random number generation. |
|
|
188
|
+
| **Time** | | |
|
|
189
|
+
| `sleep(seconds)` | `dormancy(seconds)` | Suspend execution (cellular dormancy). |
|
|
190
|
+
| `time()` | `time()` | Unix epoch timestamp. |
|
|
191
|
+
| `clock()` | `metabolism()` | High-resolution CPU clock (metabolic rate). |
|
|
160
192
|
|
|
161
193
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
162
194
|
|
|
@@ -198,7 +230,11 @@ pip install tumorscript
|
|
|
198
230
|
|
|
199
231
|
Once installed, the `tumorscript` command is available system-wide:
|
|
200
232
|
```sh
|
|
233
|
+
# Execute a script
|
|
201
234
|
tumorscript examples/hospital_core.tmq
|
|
235
|
+
|
|
236
|
+
# Or launch the interactive cellular shell (REPL)
|
|
237
|
+
tumorscript
|
|
202
238
|
```
|
|
203
239
|
|
|
204
240
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
@@ -247,6 +283,44 @@ tumorscript --unregister
|
|
|
247
283
|
<!-- usage examples -->
|
|
248
284
|
## Usage
|
|
249
285
|
|
|
286
|
+
### Interactive Cellular Shell (REPL)
|
|
287
|
+
|
|
288
|
+
Running `tumorscript` with no arguments opens the real-time biomorphic REPL. You can declare variables, execute functions, and watch data drift live as it is observed:
|
|
289
|
+
|
|
290
|
+
```text
|
|
291
|
+
$ tumorscript
|
|
292
|
+
======================================================================
|
|
293
|
+
TumorScript Interactive Malignancy Shell (REPL) v1.0.1
|
|
294
|
+
Type expressions to evaluate or statements to execute.
|
|
295
|
+
Type ':help' for clinical commands, ':exit' to quit.
|
|
296
|
+
======================================================================
|
|
297
|
+
>>> dna white_blood_cells = 4500
|
|
298
|
+
>>> white_blood_cells
|
|
299
|
+
4518.239102
|
|
300
|
+
>>> white_blood_cells
|
|
301
|
+
4482.019481
|
|
302
|
+
>>> hypertrophy("malignant growth")
|
|
303
|
+
"MALIGNANT GROWTH"
|
|
304
|
+
>>> :vitals
|
|
305
|
+
|
|
306
|
+
--- SPECIMEN VITALS (Active Heap Telemetry) ---
|
|
307
|
+
Specimen Strain Value Reads Mutation Status
|
|
308
|
+
--------------------------------------------------------------------------
|
|
309
|
+
white_blood_cells dna 4482.019481 2 1.10 % HEALTHY
|
|
310
|
+
==========================================================================
|
|
311
|
+
System Malignancy: 0/1 specimens corrupted (0.0% / 50.0% failure threshold)
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Interactive meta-commands:
|
|
315
|
+
* `:vitals` - Scan active heap specimen counts, read frequencies, mutation rates, and malignancy ratios.
|
|
316
|
+
* `:chemo <var>` - Administer targeted chemotherapy to reset a mutated variable back to baseline.
|
|
317
|
+
* `:flush` - Purge the interactive heap and reset to a sterile cleanroom state.
|
|
318
|
+
* `:clear` - Clear console output without resetting variables.
|
|
319
|
+
* `:help` - Display interactive manual and syntax tips.
|
|
320
|
+
* `:exit` / `:quit` - Trigger programmed apoptosis and exit the shell.
|
|
321
|
+
|
|
322
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
323
|
+
|
|
250
324
|
### Clinical Case Study: `hospital_core.tmq`
|
|
251
325
|
|
|
252
326
|
Below is the canonical TumorScript program simulating patient vital signs under entropic stress:
|
|
@@ -332,6 +406,43 @@ Notice that:
|
|
|
332
406
|
|
|
333
407
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
334
408
|
|
|
409
|
+
### Metastasis Call Stack & Autopsy Traceback
|
|
410
|
+
|
|
411
|
+
When systemic heap corruption crosses the **50% terminal threshold**, the virtual machine panics and generates a post-mortem diagnostic detailing Patient Zero, transmission trails, and active cellular frames:
|
|
412
|
+
|
|
413
|
+
```text
|
|
414
|
+
==============================================================================
|
|
415
|
+
[!] CRITICAL BIOLOGICAL CRASH: ORGAN FAILURE EXCEPTION
|
|
416
|
+
==============================================================================
|
|
417
|
+
Malignant Saturation: 2/4 specimens corrupted (50.0% >= 50.0% fatal threshold)
|
|
418
|
+
Clinical Diagnostic: Cellular tissue suffered irreversible entropy collapse.
|
|
419
|
+
|
|
420
|
+
--- PATIENT ZERO (Initial Site of Malignancy) ---
|
|
421
|
+
Specimen Name : cycle
|
|
422
|
+
Malignant at Read : Read #4 (drifted to rate 2.55%)
|
|
423
|
+
Contagion Rate : 2.55%
|
|
424
|
+
Origin Location : gene 'main' at line 24
|
|
425
|
+
|
|
426
|
+
--- METASTASIS TRANSMISSION TRAIL (Contagion Vectors) ---
|
|
427
|
+
[1] Contagion Spread: 'cycle' (reads: 94, rate: 5.00%) infected 'cycle' at line 24
|
|
428
|
+
...
|
|
429
|
+
[10] Malignancy Spawned: 'beta' degraded at read #67 (drift rate: 5.00%) in main:26
|
|
430
|
+
|
|
431
|
+
--- METASTASIS CALL STACK (Active Cellular Frames) ---
|
|
432
|
+
Frame [0] main() at examples/organ_failure_test.tmq:32 [sterile]
|
|
433
|
+
|
|
434
|
+
--- SPECIMEN BIOPSY TELEMETRY (Active Memory Heap) ---
|
|
435
|
+
Specimen Strain Value Reads Mutation Status
|
|
436
|
+
--------------------------------------------------------------------------
|
|
437
|
+
cycle dna 52.511859324581 135 5.00 % MALIGNANT [METASTASIZED]
|
|
438
|
+
beta dna 112.81541821281 67 5.00 % MALIGNANT [METASTASIZED]
|
|
439
|
+
gamma dna 131.38216628811 67 5.00 % HEALTHY
|
|
440
|
+
alpha dna 47.259377430104 67 5.00 % HEALTHY
|
|
441
|
+
==============================================================================
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
445
|
+
|
|
335
446
|
### Oncology Survival Guide
|
|
336
447
|
|
|
337
448
|
* **Defensive RNA Anchoring:** Use `rna` for iteration limits, step offsets, and critical thresholds. `rna` cannot mutate, preventing infinite loops caused by decaying integers.
|
|
@@ -354,6 +465,11 @@ Notice that:
|
|
|
354
465
|
- [x] Windows Registry `.tmq` double-click file association in CMD
|
|
355
466
|
- [x] npm (`npm install -g tumorscript`) and pip (`pip install tumorscript`) distributions
|
|
356
467
|
- [x] Comprehensive GitHub Wiki documentation suite
|
|
468
|
+
- [x] Standard Library: I/O (`absorb`, `ingest`, `secrete`), String (`lyse`, `fuse`, `hypertrophy`, `atrophy`), Math (`sqrt`, `round`, `pow`), Time (`dormancy`, `metabolism`)
|
|
469
|
+
- [x] Biomorphic Genomics & JSON Engine: `transcribe` (serialization), `express` (deserialization), `karyotype` (structural diagnostics), `transduce` (genetic splicing), file secretion/ingestion, and stochastic radiation entropy
|
|
470
|
+
- [x] Biomorphic Capsid Binary Engine: `condense` (pack), `decondense` (unpack), `strand_length` (calcsize), `splice_into` (pack_into), `biopsy_from` (unpack_from), `cleave` (iter_unpack), `hex_biopsy`, and Shannon entropy telemetry
|
|
471
|
+
- [x] Interactive Malignancy Shell (REPL) with real-time entropy observation and `:vitals` heap telemetry
|
|
472
|
+
- [x] Metastasis Call Stack & Autopsy Traceback on systemic organ failure
|
|
357
473
|
- [ ] Radiation Therapy (`radiation`): Purges 90% of memory corruption, but mutates all other variables by 30%
|
|
358
474
|
- [ ] Network Metastasis: Spreading cancer across remote machines via raw TCP/IP sockets
|
|
359
475
|
- [ ] CRISPR Gene Editing: Runtime AST self-modifying code rewrite engine
|
|
@@ -419,7 +535,7 @@ Wiki Documentation: [https://github.com/yamanist0/Tumor-Script/wiki](https://git
|
|
|
419
535
|
[issues-url]: https://github.com/yamanist0/Tumor-Script/issues
|
|
420
536
|
[license-shield]: https://img.shields.io/badge/license-MIT-green.svg?style=for-the-badge
|
|
421
537
|
[license-url]: https://github.com/yamanist0/Tumor-Script/blob/main/LICENSE
|
|
422
|
-
[version-shield]: https://img.shields.io/badge/version-0.1
|
|
538
|
+
[version-shield]: https://img.shields.io/badge/version-1.0.1-rose.svg?style=for-the-badge
|
|
423
539
|
[version-url]: https://github.com/yamanist0/Tumor-Script/releases
|
|
424
540
|
[product-screenshot]: https://raw.githubusercontent.com/yamanist0/Tumor-Script/main/icon.svg
|
|
425
541
|
[Rust-badge]: https://img.shields.io/badge/Rust-000000?style=for-the-badge&logo=rust&logoColor=white
|