mozhi 0.1.0__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.
Files changed (58) hide show
  1. mozhi-0.1.0/LANGUAGE.md +71 -0
  2. mozhi-0.1.0/LICENSE +21 -0
  3. mozhi-0.1.0/MANIFEST.in +9 -0
  4. mozhi-0.1.0/PKG-INFO +163 -0
  5. mozhi-0.1.0/PROVENANCE.md +80 -0
  6. mozhi-0.1.0/README.md +143 -0
  7. mozhi-0.1.0/examples/arrays_loops.mozhi +9 -0
  8. mozhi-0.1.0/examples/benchmark.mozhi +10 -0
  9. mozhi-0.1.0/examples/calculator.mozhi +71 -0
  10. mozhi-0.1.0/examples/demo.mozhi +13 -0
  11. mozhi-0.1.0/examples/fibonacci.mozhi +8 -0
  12. mozhi-0.1.0/examples/file_io.mozhi +4 -0
  13. mozhi-0.1.0/examples/gossip.mozhi +51 -0
  14. mozhi-0.1.0/examples/hello.mozhi +3 -0
  15. mozhi-0.1.0/examples/hello_world.mozhi +2 -0
  16. mozhi-0.1.0/examples/library.mozhi +38 -0
  17. mozhi-0.1.0/examples/long_running.mozhi +6 -0
  18. mozhi-0.1.0/examples/recursion.mozhi +8 -0
  19. mozhi-0.1.0/examples/standard_library.mozhi +6 -0
  20. mozhi-0.1.0/packaging/entrypoint.py +3 -0
  21. mozhi-0.1.0/packaging/homebrew-tap/README.md +26 -0
  22. mozhi-0.1.0/packaging/mozhi.spec +19 -0
  23. mozhi-0.1.0/packaging/schemas/README.md +6 -0
  24. mozhi-0.1.0/packaging/schemas/defaultLocale.schema.json +280 -0
  25. mozhi-0.1.0/packaging/schemas/installer.schema.json +919 -0
  26. mozhi-0.1.0/packaging/schemas/version.schema.json +46 -0
  27. mozhi-0.1.0/playground/runtime.py +929 -0
  28. mozhi-0.1.0/pyproject.toml +35 -0
  29. mozhi-0.1.0/requirements-build.txt +6 -0
  30. mozhi-0.1.0/setup.cfg +4 -0
  31. mozhi-0.1.0/src/mozhi/__init__.py +5 -0
  32. mozhi-0.1.0/src/mozhi/__main__.py +3 -0
  33. mozhi-0.1.0/src/mozhi/_version.py +1 -0
  34. mozhi-0.1.0/src/mozhi/cli.py +112 -0
  35. mozhi-0.1.0/src/mozhi/core.py +948 -0
  36. mozhi-0.1.0/src/mozhi.egg-info/PKG-INFO +163 -0
  37. mozhi-0.1.0/src/mozhi.egg-info/SOURCES.txt +56 -0
  38. mozhi-0.1.0/src/mozhi.egg-info/dependency_links.txt +1 -0
  39. mozhi-0.1.0/src/mozhi.egg-info/entry_points.txt +2 -0
  40. mozhi-0.1.0/src/mozhi.egg-info/top_level.txt +1 -0
  41. mozhi-0.1.0/src/mozhi.py +15 -0
  42. mozhi-0.1.0/tests/runtime_driver.py +59 -0
  43. mozhi-0.1.0/tests/test_cli_smoke.py +44 -0
  44. mozhi-0.1.0/tests/test_packaging.py +119 -0
  45. mozhi-0.1.0/tests/test_pypi_publication.py +87 -0
  46. mozhi-0.1.0/tests/test_runtime_regressions.py +219 -0
  47. mozhi-0.1.0/tests/test_standalone.py +122 -0
  48. mozhi-0.1.0/tools/build_linux_packages.py +55 -0
  49. mozhi-0.1.0/tools/build_site.py +31 -0
  50. mozhi-0.1.0/tools/build_standalone.py +96 -0
  51. mozhi-0.1.0/tools/prepare_release.py +274 -0
  52. mozhi-0.1.0/tools/publish_release.py +75 -0
  53. mozhi-0.1.0/tools/smoke_archive.py +33 -0
  54. mozhi-0.1.0/tools/smoke_distribution.py +58 -0
  55. mozhi-0.1.0/tools/smoke_wheel.py +35 -0
  56. mozhi-0.1.0/tools/sync_playground.py +102 -0
  57. mozhi-0.1.0/tools/test_package_managers.py +72 -0
  58. mozhi-0.1.0/tools/verify_pypi.py +56 -0
@@ -0,0 +1,71 @@
1
+ # Mozhi language notes
2
+
3
+ This describes the current CLI and generated asynchronous browser adapter unless a distinction is stated. It is a working language note, not a complete formal specification.
4
+
5
+ ## Grammar shape
6
+
7
+ ```mozhi
8
+ score = 10 vechukko
9
+ "Score: " kooda score sollu
10
+
11
+ score >= 10 na:
12
+ "Ready" sollu
13
+ illana:
14
+ "Try again" sollu
15
+ mudivu
16
+ ```
17
+
18
+ Expressions precede output, return and conditional/loop keywords; assignment combines infix `=` with trailing `vechukko`. Colons, indentation and `mudivu` delimit blocks. Identifiers use ASCII letters, digits and underscore. `#` starts a comment outside strings. Literals include numbers, quoted strings, `true`, `false`, and arrays.
19
+
20
+ ## Loops, functions and arrays
21
+
22
+ ```mozhi
23
+ seiy double(x):
24
+ x * 2 thirumbu
25
+ mudivu
26
+ double(5) sollu
27
+
28
+ items = [1, 2] vechukko
29
+ 3 ullapodu items
30
+ items veliyapodu
31
+ items[0] sollu
32
+
33
+ i = 0 vechukko
34
+ i < 3 varaikum:
35
+ i = i + 1 vechukko
36
+ i sollu
37
+ mudivu
38
+ ```
39
+
40
+ `nillu` breaks a loop; `thodaru` continues it. Pop is postfix: `items veliyapodu`. Indexed reads are supported; indexed assignment is not implemented. Both adapters update existing variables through the parent scope chain; function and method parameters bind locally.
41
+
42
+ ## Objects
43
+
44
+ ```mozhi
45
+ vagai Counter:
46
+ seiy start(naan):
47
+ naan.value = 0 vechukko
48
+ mudivu
49
+ seiy show(naan):
50
+ naan.value sollu
51
+ mudivu
52
+ mudivu
53
+ c = Counter porul vechukko
54
+ c.start()
55
+ c.show()
56
+ ```
57
+
58
+ The first method parameter receives the instance. Initializer methods are called explicitly, not automatically. Property reads, assignments and method closures work in both adapters. Missing properties and invalid method arguments report errors.
59
+
60
+ ## Builtins and operators
61
+
62
+ Both adapters support `kelu("Prompt")` and `ketukko("Prompt")` as aliases. Browser input is asynchronously awaited; CLI input is synchronous. Input returns a string. `enn` converts to integer, `padam` to float, `vaari` to string, and `neelam` returns length. `+`/`kooda` concatenate if either operand is a string. `mattrum`, `illaiyal`, `illa` are and/or/not, with short-circuit evaluation of binary operands. They still return `true` or `false`, rather than returning an operand value. Comparison operators and `+ - * / %` are implemented. Exponentiation is right-associative and follows Python precedence: `2 ** 3 ** 2` is `512`, `-2 ** 2` is `-4`, and `2 ** -2` is `0.25`. `podhum` stops the entire current program, including nested calls, in either adapter; it does not kill the reusable browser engine.
63
+
64
+ Block updates in both adapters search parent environments; new variables are created locally. Function/method parameters bind locally. These are current implementation observations, not a promise of Python semantics.
65
+
66
+
67
+ ## Validation and execution controls
68
+
69
+ Indentation must follow a colon and dedent to an existing block level. Tabs expand to four columns; mixing tabs and spaces in a single indentation prefix is rejected. Function/method parameters must be unique and supplied in the correct count. Methods require an instance parameter. `nillu` and `thodaru` must belong to a loop in the current function; `thirumbu` requires a function or method. Array indices must be integers, not booleans. Errors include the failing statement line.
70
+
71
+ The playground's worker can be stopped or automatically terminated after its configurable execution budget (10 seconds by default). Input waits pause that budget. The CLI has no execution limit; intentionally endless programs require Ctrl+C or an external timeout. Runtime errors stop the current run and leave the playground ready for another program.
mozhi-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 sm1else-bot
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ include LICENSE README.md PROVENANCE.md LANGUAGE.md
2
+ recursive-include examples *.mozhi
3
+ recursive-include tests *.py
4
+ recursive-include tools *.py
5
+ include requirements-build.txt
6
+ include packaging/mozhi.spec
7
+ recursive-include packaging *.py *.json *.md
8
+ include src/mozhi.py
9
+ include playground/runtime.py
mozhi-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: mozhi
3
+ Version: 0.1.0
4
+ Summary: A Tamil-inspired, verb-final interpreted programming language
5
+ Author: Jessenth Ebenezer
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://projects.jessenth.com/mozhi/
8
+ Project-URL: Repository, https://github.com/sm1else-bot/mozhi
9
+ Project-URL: Documentation, https://projects.jessenth.com/mozhi/learn/
10
+ Project-URL: Issues, https://github.com/sm1else-bot/mozhi/issues
11
+ Keywords: interpreter,programming-language,tamil,tanglish
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Topic :: Software Development :: Interpreters
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Dynamic: license-file
20
+
21
+ # Mozhi
22
+
23
+ A Tanglish programming language with Tamil-inspired, verb-final syntax.
24
+
25
+ ```mozhi
26
+ "Vanakkam, world!" sollu
27
+ a = 10 vechukko
28
+ "Value: " kooda a sollu
29
+ ```
30
+
31
+ Mozhi explores grammar as well as vocabulary. `sollu` (say) follows the expression, `vechukko` (keep/store) closes an assignment, and conditions precede `na` or `varaikum`. Assignment still uses infix `=`, so this is a hybrid syntax rather than a fully postfix stack language. Tamil has many dialects and constructions; Mozhi is an experiment, not a complete model of Tamil grammar.
32
+
33
+ **Historical note:** Mozhi was conceived on May 31, 2026, and developed further in June 2026. This GitHub repository was first published on October 27, 2026. Its early Git commits are retrospectively dated archival reconstructions from recovered source files and development records, not original commits made at that time. See [PROVENANCE.md](https://github.com/sm1else-bot/mozhi/blob/main/PROVENANCE.md) for methodology and evidence.
34
+
35
+ ## Status
36
+
37
+ This is an experimental language with an explicitly preserved archival history. The current CLI and browser adapters share parser/runtime fixes through generated browser code. Neither is production-ready, Python-compatible, or a sandbox for untrusted code. Original interpreter stages remain unchanged in the archival commits.
38
+
39
+ ## Run the CLI
40
+
41
+ For a published PyPI version, install with Python 3.10 or later:
42
+
43
+ ```sh
44
+ python -m pip install mozhi
45
+ mozhi --version
46
+ mozhi repl
47
+ ```
48
+
49
+ See the [PyPI project](https://pypi.org/project/mozhi/) for published versions.
50
+ Create a UTF-8 `.mozhi` file, then use `mozhi run file.mozhi` to execute it or
51
+ `mozhi check file.mozhi` to validate its syntax without running it.
52
+
53
+ Install from this checkout with Python 3.10 or later (no runtime dependencies):
54
+
55
+ ```sh
56
+ python -m pip install -e .
57
+ mozhi --version
58
+ mozhi run examples/hello.mozhi
59
+ mozhi examples/fibonacci.mozhi
60
+ mozhi check examples/file_io.mozhi
61
+ mozhi repl
62
+ ```
63
+
64
+ `mozhi` works outside the repository after installation. `python -m mozhi` is also supported. Local programs have no execution timeout. Ctrl+C returns exit code 130; source/runtime/I/O errors go to stderr and return 1, and usage errors return 2. Source and terminal pipes use UTF-8. `check` parses without running statements.
65
+
66
+ The REPL retains variables and functions, continues multiline blocks until `mudivu`, echoes expression values, and recovers from errors. `quit`, `exit`, or EOF ends the session. A failed block may have already changed state; the REPL does not roll back executed statements.
67
+
68
+ Build Python distributions with `python -m pip install -r requirements-build.txt` and `python -m build`. Standalone Windows, macOS and Linux archives bundle Python with PyInstaller, so end users do not need to install Python. See [distribution and installation](https://github.com/sm1else-bot/mozhi/blob/main/docs/distribution.md) for native build commands, package-manager preparation, and publication status.
69
+
70
+ **Distribution channels:** PyPI is the first public distribution target; the linked PyPI project page is the source for published versions. Homebrew, WinGet, Chocolatey, AUR, Debian and Fedora packaging is prepared for later releases, and this repository does not claim public availability through those managers. No release is published automatically by a version tag.
71
+
72
+ Expected hello output:
73
+
74
+ ```text
75
+ Vanakkam, world!
76
+ Value: 10
77
+ ```
78
+
79
+ The legacy `python src/mozhi.py file.mozhi` entry point remains supported; without arguments it still runs the original built-in demo. The installed `mozhi` command shows help without arguments. Existing examples are preserved. New examples cover Fibonacci, recursion, arrays, UTF-8 file I/O, timing, and an 11-second local computation. File I/O is explicitly local-only; the browser retains its own execution limit.
80
+
81
+ ## Use the playground
82
+
83
+ Open [Mozhi Studio](https://sm1else-bot.github.io/mozhi/) or read [Learn](https://sm1else-bot.github.io/mozhi/learn/). GitHub Pages builds and publishes the combined site after checks pass on each push to `main`.
84
+
85
+ From the repository root:
86
+
87
+ ```sh
88
+ python -m pip install -r requirements-docs.txt
89
+ python tools/build_site.py
90
+ python -m http.server 8000 --directory site
91
+ ```
92
+
93
+ Open [the playground locally](http://localhost:8000/playground/). The light studio includes eight guided lessons, practice tasks, hints, and progress earned by running working programs. Browse eight examples, including the original demo, library, gossip, and calculator programs. Calculator inputs 1, 10, 5, 6 add ten, show it, and exit the menu.
94
+
95
+ **Studio** contains the interactive lessons, **Learn** opens the full MkDocs documentation, and **Examples** opens the program gallery. The combined build places these at `playground/`, `learn/`, and `examples/` within the ignored `site/` directory. Its relative links also work when hosted under a repository path. Rebuild after editing sources; generated files are not committed.
96
+
97
+ The editor includes Mozhi syntax highlighting, keyword tooltips, a searchable reference, error line navigation, font and wrapping controls, file import/export, and a command palette. Use Ctrl+Enter to run, Ctrl+Shift+Enter to stop, Ctrl+K to search, or Ctrl+S to download. The interface adapts to phones and supports keyboard navigation.
98
+
99
+ Drafts, preferences, lesson progress, and the last eight runs are saved in browser storage on this origin. Replacing edited code asks for confirmation and keeps the previous draft recoverable from editor settings. Clearing browser data removes these records. Download important programs for a durable copy. **Share code** encodes the current program in a URL fragment without uploading it to a storage service. Anyone with the link can read the code; recipients need access to the same hosted website. A localhost link only works on your computer.
100
+
101
+ CodeMirror 5.65.13 and Pyodide 0.23.4 load from external CDNs, and optional web fonts load from Google Fonts. First loading needs network access. A plain textarea remains usable if CodeMirror fails to load. Stop the local server with Ctrl+C.
102
+
103
+ Programs execute in a worker. **Stop** terminates even a tight infinite loop, and a configurable execution limit defaults to **10 seconds** (0.1–3600 seconds). Waiting for user input pauses the timer; submitting input resumes the remaining budget. Stopping or timing out cancels pending input and creates a fresh engine. Engine-load failures expose **Retry engine**. Output is capped at 65,536 JavaScript characters to keep runaway printing responsive. This is a usability limit, not a security sandbox.
104
+
105
+ ## Implemented features and differences
106
+
107
+ | Feature | CLI adapter | Browser adapter |
108
+ | --- | --- | --- |
109
+ | Numbers, strings, booleans, arithmetic, conditions | Present | Present |
110
+ | Functions and return | Present | Present |
111
+ | Arrays, indexing, push/pop | Present | Present |
112
+ | Loops and outer-variable updates | Fixed; updates find the defining scope | Same semantics |
113
+ | Classes and methods | Properties, bound instances, method closures | Same semantics |
114
+ | Input | Synchronous `kelu(...)` or `ketukko(...)` | Both aliases, asynchronously awaited |
115
+ | Length and conversion | `neelam`, `enn`, `padam`, `vaari` | Same names |
116
+ | `podhum` | Terminates the current program, including nested calls | Same semantics; engine remains reusable |
117
+
118
+ See [LANGUAGE.md](https://github.com/sm1else-bot/mozhi/blob/main/LANGUAGE.md) for the supported syntax and [the documentation source](https://github.com/sm1else-bot/mozhi/blob/main/docs/index.md) for examples. The browser runs a generated asynchronous adapter, `playground/runtime.py`, in Pyodide. `tools/sync_playground.py` generates its parser/runtime from `src/mozhi/core.py`; input/output adapters differ, but language fixes are kept together. After changing the core, run `python tools/sync_playground.py`. A regression check detects a stale generated artifact.
119
+
120
+ ## Known limitations
121
+
122
+ - This is still an experimental language, not full Python compatibility. Constructors are called manually after `ClassName porul`; indexed assignment and module imports are not implemented.
123
+ - Errors now report source statement lines and validate indentation, argument counts, array indices, properties, input conversion and control-flow placement. There is no exception-handling syntax for recovering within a Mozhi program yet.
124
+ - The browser limit measures elapsed execution time outside input waits, not CPU instructions. A stopped worker must reload Pyodide. Extremely memory-hungry programs are not safely sandboxed. CLI execution remains unbounded; use Ctrl+C or an external process timeout for intentional endless programs.
125
+ - There is no module system, compatibility guarantee, or official GitHub Linguist recognition. Native archives and package-manager metadata are prepared, not claims of accepted registry listings. The playground highlighter is a lightweight token highlighter, not a language server or autocomplete engine.
126
+
127
+ ## Runtime checks
128
+
129
+ The Python suite runs language regressions against both the synchronous CLI and generated asynchronous browser adapter in bounded subprocesses:
130
+
131
+ ```sh
132
+ python tools/sync_playground.py
133
+ python -m unittest discover -s tests -v
134
+ ```
135
+
136
+ Optional actual-browser checks require Node.js 20 or later, network access, and Playwright's isolated Chromium:
137
+
138
+ ```sh
139
+ npm ci
140
+ npx playwright install chromium
141
+ npm run test:browser
142
+ npm run test:studio
143
+ ```
144
+
145
+ `MOZHI_TEST_BROWSER` may name an existing Chrome/Chromium executable instead of the Playwright download. The checks use a fresh temporary profile, exercise worker Stop/timeout/recovery and input pauses, and do not operate your personal browser session.
146
+
147
+ ## Documentation
148
+
149
+ ```sh
150
+ python -m pip install -r requirements-docs.txt
151
+ python -m mkdocs serve
152
+ python -m mkdocs build --strict
153
+ ```
154
+
155
+ The generated `site/` is ignored. The docs cover [runtime controls](https://github.com/sm1else-bot/mozhi/blob/main/docs/runtime.md), [operators](https://github.com/sm1else-bot/mozhi/blob/main/docs/basics/operators.md), and [error handling](https://github.com/sm1else-bot/mozhi/blob/main/docs/errors.md). Exact original documentation remains in the archival commits.
156
+
157
+ ## Roadmap and contributions
158
+
159
+ Next: a fuller language specification, deeper runtime coverage, richer editor integration, a larger standard library, and modules. Official Linguist recognition is a future milestone; `.mozhi` files are not relabeled as Python.
160
+
161
+ Read [CONTRIBUTING.md](https://github.com/sm1else-bot/mozhi/blob/main/CONTRIBUTING.md) before proposing changes. The language concept and syntax were directed by the project author; implementation was AI-assisted with Claude, then Gemini and Google Antigravity. These tools assisted development rather than independently originating the author's language idea.
162
+
163
+ Licensed under [MIT](https://github.com/sm1else-bot/mozhi/blob/main/LICENSE). [HISTORY.md](https://github.com/sm1else-bot/mozhi/blob/main/HISTORY.md) describes the chronology; [PROVENANCE.md](https://github.com/sm1else-bot/mozhi/blob/main/PROVENANCE.md) explains the retrospective commits.
@@ -0,0 +1,80 @@
1
+ # Provenance and retrospective Git history
2
+
3
+ **The early Git history was retrospectively reconstructed in October 2026 from recovered source artifacts and development records. Historically dated commits are archival representations, not Git commits originally created on those dates.**
4
+
5
+ The original project had no Git history. Reconstruction preserves recoverable code stages while keeping later organization and release preparation current-dated. No missing source stage is invented. The original evidence remains private and unchanged.
6
+
7
+ ## Evidence and method
8
+
9
+ - **E01:** native Claude source-creation input, Lark interpreter. Original stream interval `2026-06-01T01:51:58.964494Z`–`2026-06-01T01:52:50.772340Z`. Recorded tests failed parsing.
10
+ - **E02:** native Claude literal shell-heredoc input, recursive-descent rewrite. Interval `2026-06-01T01:53:13.846065Z`–`2026-06-01T01:54:18.645734Z`. Exact bytes match a subsequently saved standalone file and a Gemini Takeout attachment. The source-size/mtime fields in a bytecode header provide additional timing corroboration; semantic equivalence of that bytecode was not established.
11
+ - **E03:** complete expanded interpreter saved on June 13. Recorded file last-write `2026-06-13T05:48:09.7080931Z` is a conservative snapshot bound. A recovered Gemini code block matches apart from an extra terminal newline. The downloaded file's exact bytes are imported; the timestamp is not authenticated source-generation completion.
12
+ - **E04:** complete browser HTML, verified against the forensic manifest. Last-write `2026-06-13T06:26:01.3559436Z` is corroborated to the second by the recorded final Antigravity patch. It is not dated at the earlier file creation time.
13
+ - **E05:** original documentation and four examples, each verified by SHA-256. Last included source last-write `2026-06-13T06:34:31.0597954Z` bounds the group; saved documentation-generation actions corroborate it. The calculator also has an independently saved, hash-matching editor-history version. Other examples rely on recorded filesystem metadata rather than independently complete early revisions.
14
+
15
+ The original native Claude records preserve the explicit design proposal at `2026-06-01T01:50:30.305434Z` and naming at `2026-06-01T01:51:46.207303Z` (May 31 evening EDT). A later pasted transcript alone would not authenticate that date. The native export, matching source inputs and Takeout attachment offer stronger corroboration, but local metadata is not signed proof of authorship, priority or immutability.
16
+
17
+ Both Git author and committer dates use the selected historical second, retaining EDT offset. Subsecond precision is **truncated, not represented by Git**, and retained below and in evidence/snapshots.json. Stream-completion dates describe recorded inputs, not proof of the precise sandbox write time. The configured human/project Git identity is used, not an impersonated AI identity.
18
+
19
+ No code or modern provenance documents appear before their supported source snapshot. Five normalized HTML states derived by reversing recorded diffs remain in the private evidence package and are not promoted to independent historical originals. A truncated earlier diff limits that reconstruction.
20
+
21
+ ## Commit-to-evidence mapping
22
+
23
+ | Archival commit | Author and committer timestamp | Source snapshot and SHA-256 | Evidence and limitations |
24
+ | --- | --- | --- | --- |
25
+ | `b9653846a9d004b66f1d19077c8f3d54bdcc3efb` | `2026-05-31T21:52:50-04:00` | `mozhi.py`: `2ef5c23c870aba52952e6891bd2a80db39dc6f9f70e8ca7dfd2b8cc997b5a2eb` | E01: Completion of recorded create_file input stream; known parser failures; does not date original conception. |
26
+ | `98b8f2e81bcc22684572df7489890957c70863a5` | `2026-05-31T21:54:18-04:00` | `mozhi.py`: `97fe0e7c8cb0d9e2c567c3edcb021cd957ada2933b38c9460f1c853b780d87b9` | E02: Completion of literal shell-heredoc input stream; native source equals two later saved copies; known loop bug. |
27
+ | `09b368b4e995789fd80bcf724b06f60ae964eb89` | `2026-06-13T01:48:09-04:00` | `mozhi.py`: `86a9595cbf1c03646100dd39bde717f0a42f9919416c67be179d3538479175c5` | E03: Conservative bound from complete downloaded snapshot last-write; corroborated by Gemini response source differing only in extra terminal newline. Not a feature-discussion timestamp or authenticated generation time. |
28
+ | `524c4f72669882851a4914f1818cc345c13812e4` | `2026-06-13T02:26:01-04:00` | `mozhionline.html`: `c3a6edc1251d0632410dea5f213c37c2ebe6ca9302af0ce2eb7f67a3f2f48e00` | E04: Verified current bytes and filesystem last-write corroborated by saved final Antigravity diff. Not earlier creation time. |
29
+ | `bbf729d5ea046cce2e3bcffd9127d1a6a2c44ba1` | `2026-06-13T02:34:31-04:00` | README, configuration, eight documentation pages and four examples; individual SHA-256 values below | E05: grouped snapshot; current saved content, supported per-file times and documentation actions. |
30
+
31
+ ### Original source precision and file digests
32
+
33
+ The machine-readable [snapshot index](evidence/snapshots.json) contains full UTC timestamps, file sizes, paths, SHA-256 digests, and commit/tree IDs. It is a modern evidence index, not a historical artifact.
34
+
35
+ | E05 historical path | Original last-write UTC | SHA-256 |
36
+ | --- | --- | --- |
37
+ | `calculator.mozhi` | `2026-06-13T06:19:05.9332023Z` | `7ccf87031344feff73eab09400d683b89bd853bfd5cc30ef44ad6fdc680a7997` |
38
+ | `demo.mozhi` | `2026-06-13T06:09:51.2074464Z` | `120e8583cf93b0244d5548551b8d9395991436b93e86b2be38ad34e8d964ff0b` |
39
+ | `docs/advanced/arrays.md` | `2026-06-13T06:34:24.7782088Z` | `abb9d2bba7a362e5646f392b29894db87ae19a4e56a4bf17b4400a31ccf57b2e` |
40
+ | `docs/advanced/oop.md` | `2026-06-13T06:34:28.2050439Z` | `39454b650ceaa2988a4840b86ec11990b699afa0d21c60f005c6fec45fcc1484` |
41
+ | `docs/basics/io.md` | `2026-06-13T06:34:16.9309248Z` | `58a3870a442b9ffa68207ec9d35978c51e9cb11822ddc63fed3beb23a9dd1a83` |
42
+ | `docs/basics/variables.md` | `2026-06-13T06:34:14.5512017Z` | `c641aa226f8bd5a4e7cddbc20af5f54a56c78da7ec3b5d8a64a580856ea0f2be` |
43
+ | `docs/control-flow/conditionals.md` | `2026-06-13T06:34:19.5769842Z` | `0557fe3d2b0715c376e4d0ccde1c93c7876a06b8885d5ad015407d4052bf4164` |
44
+ | `docs/control-flow/loops.md` | `2026-06-13T06:34:21.9798026Z` | `e9b30a0862aae466da187a392635a53d1cdc80cd0d4be7db0cae56df33e58c7a` |
45
+ | `docs/examples/calculator.md` | `2026-06-13T06:34:31.0597954Z` | `cddd72cae67b0ca0af6c28464a7b30597791fbf4c9b45f06f79d233abafc9b5d` |
46
+ | `docs/index.md` | `2026-06-13T06:34:12.1938722Z` | `9c992821ab288ae5fd769a8a9879c3292ee3163651a71a474805daa3aef8acb5` |
47
+ | `gossip.mozhi` | `2026-06-13T06:14:59.6839565Z` | `7b63ffbdbb14b3a5925dddaa03b833087e153406871c2fd4906d41daa80392e1` |
48
+ | `library.mozhi` | `2026-06-13T06:09:17.1042686Z` | `de5ebd3aa6bc788eb94e478dec4af1ba04a428a7b0399d3929f5108eef068198` |
49
+ | `mkdocs.yml` | `2026-06-13T06:34:09.7607076Z` | `a27545446ef7edc9bba31bfa57d10a0c3f8488545874ecb1ff549e0e65b01516` |
50
+ | `README.md` | `2026-06-13T06:34:07.3783610Z` | `54f0d1efa5d52955e7542c0dad6c69fc208ce0d2cee6e7190d90e69b055deb5a` |
51
+
52
+ ## Modern path mapping
53
+
54
+ | Historical Git path | Current path |
55
+ | --- | --- |
56
+ | `mozhi.py` | `src/mozhi/core.py` (via the modern `src/mozhi.py` compatibility launcher; exact expanded snapshot remains in E03) |
57
+ | `mozhionline.html` | `playground/` (later worker UI and generated runtime; exact HTML remains in E04) |
58
+ | Four root `.mozhi` examples | `examples/` (unchanged) |
59
+ | Original README and Markdown docs | Original versions in archival commits; current README replaced and docs corrected in October |
60
+ | Generated MkDocs site | Omitted from Git; retained privately in the forensic archive |
61
+
62
+ Modern commits use actual October creation times. They add the layout, README, license, language notes, contributor guidance, validation and this provenance index. Their IDs are ordinary Git history; no self-referential current-commit hash is embedded here. Archival commit/tree IDs are frozen and verified independently. Later verification reports are kept outside the public tree.
63
+
64
+ ## Privacy and publication
65
+
66
+ Public references E01–E05 identify evidence categories without private conversation IDs, personal absolute paths, full transcripts, account data, databases or Takeout archives. No private raw evidence is included. Historical sample first names in documentation are illustrative code, not an exported contact list. Externally loaded frontend libraries are referenced by the original HTML, not vendored into this repository.
67
+
68
+ This GitHub repository was first published on October 27, 2026, with repository creation recorded at `2026-10-27T06:52:44Z` (02:52:44 EDT). The repository creation date reflects actual publication; older archival commit timestamps are not proof that a GitHub repository existed then. No historical release tags or public priority claims are made. The author explicitly chose MIT for this release.
69
+
70
+ ## Commit-subject revision
71
+
72
+ In October 2026, the six initial subjects were revised for readability. Each rewritten commit retains its exact source tree and byte-identical author/committer identity and timestamp headers. Only messages and necessarily parent references changed. This provenance refresh is a separate current-dated commit. The archival IDs above refer to the revised sequence.
73
+
74
+ ## Later runtime repairs
75
+
76
+ After publication, modern work fixes scope, OOP, termination, operators and diagnostics, and moves playground execution into a terminable worker. The browser language engine is now generated from the core source with an asynchronous adapter. None of these fixes is backdated: E01–E05 retain their original bytes and remain the source of the historical SHA-256 values above. Current source hashes are expected to differ from those archival snapshots.
77
+
78
+ ## Modern standalone distribution
79
+
80
+ The 2026-10-28 packaging work moves the canonical modern interpreter into `src/mozhi/core.py`, adds terminal adapters and release preparation, and regenerates the browser adapter. These are modern changes, not recovered historical artifacts. The archival commits, dates, trees, and evidence hashes above remain unchanged. Native executable bundling includes Python; Mozhi source remains interpreted. Registry acceptance and release publication are separate from preparing package metadata.
mozhi-0.1.0/README.md ADDED
@@ -0,0 +1,143 @@
1
+ # Mozhi
2
+
3
+ A Tanglish programming language with Tamil-inspired, verb-final syntax.
4
+
5
+ ```mozhi
6
+ "Vanakkam, world!" sollu
7
+ a = 10 vechukko
8
+ "Value: " kooda a sollu
9
+ ```
10
+
11
+ Mozhi explores grammar as well as vocabulary. `sollu` (say) follows the expression, `vechukko` (keep/store) closes an assignment, and conditions precede `na` or `varaikum`. Assignment still uses infix `=`, so this is a hybrid syntax rather than a fully postfix stack language. Tamil has many dialects and constructions; Mozhi is an experiment, not a complete model of Tamil grammar.
12
+
13
+ **Historical note:** Mozhi was conceived on May 31, 2026, and developed further in June 2026. This GitHub repository was first published on October 27, 2026. Its early Git commits are retrospectively dated archival reconstructions from recovered source files and development records, not original commits made at that time. See [PROVENANCE.md](https://github.com/sm1else-bot/mozhi/blob/main/PROVENANCE.md) for methodology and evidence.
14
+
15
+ ## Status
16
+
17
+ This is an experimental language with an explicitly preserved archival history. The current CLI and browser adapters share parser/runtime fixes through generated browser code. Neither is production-ready, Python-compatible, or a sandbox for untrusted code. Original interpreter stages remain unchanged in the archival commits.
18
+
19
+ ## Run the CLI
20
+
21
+ For a published PyPI version, install with Python 3.10 or later:
22
+
23
+ ```sh
24
+ python -m pip install mozhi
25
+ mozhi --version
26
+ mozhi repl
27
+ ```
28
+
29
+ See the [PyPI project](https://pypi.org/project/mozhi/) for published versions.
30
+ Create a UTF-8 `.mozhi` file, then use `mozhi run file.mozhi` to execute it or
31
+ `mozhi check file.mozhi` to validate its syntax without running it.
32
+
33
+ Install from this checkout with Python 3.10 or later (no runtime dependencies):
34
+
35
+ ```sh
36
+ python -m pip install -e .
37
+ mozhi --version
38
+ mozhi run examples/hello.mozhi
39
+ mozhi examples/fibonacci.mozhi
40
+ mozhi check examples/file_io.mozhi
41
+ mozhi repl
42
+ ```
43
+
44
+ `mozhi` works outside the repository after installation. `python -m mozhi` is also supported. Local programs have no execution timeout. Ctrl+C returns exit code 130; source/runtime/I/O errors go to stderr and return 1, and usage errors return 2. Source and terminal pipes use UTF-8. `check` parses without running statements.
45
+
46
+ The REPL retains variables and functions, continues multiline blocks until `mudivu`, echoes expression values, and recovers from errors. `quit`, `exit`, or EOF ends the session. A failed block may have already changed state; the REPL does not roll back executed statements.
47
+
48
+ Build Python distributions with `python -m pip install -r requirements-build.txt` and `python -m build`. Standalone Windows, macOS and Linux archives bundle Python with PyInstaller, so end users do not need to install Python. See [distribution and installation](https://github.com/sm1else-bot/mozhi/blob/main/docs/distribution.md) for native build commands, package-manager preparation, and publication status.
49
+
50
+ **Distribution channels:** PyPI is the first public distribution target; the linked PyPI project page is the source for published versions. Homebrew, WinGet, Chocolatey, AUR, Debian and Fedora packaging is prepared for later releases, and this repository does not claim public availability through those managers. No release is published automatically by a version tag.
51
+
52
+ Expected hello output:
53
+
54
+ ```text
55
+ Vanakkam, world!
56
+ Value: 10
57
+ ```
58
+
59
+ The legacy `python src/mozhi.py file.mozhi` entry point remains supported; without arguments it still runs the original built-in demo. The installed `mozhi` command shows help without arguments. Existing examples are preserved. New examples cover Fibonacci, recursion, arrays, UTF-8 file I/O, timing, and an 11-second local computation. File I/O is explicitly local-only; the browser retains its own execution limit.
60
+
61
+ ## Use the playground
62
+
63
+ Open [Mozhi Studio](https://sm1else-bot.github.io/mozhi/) or read [Learn](https://sm1else-bot.github.io/mozhi/learn/). GitHub Pages builds and publishes the combined site after checks pass on each push to `main`.
64
+
65
+ From the repository root:
66
+
67
+ ```sh
68
+ python -m pip install -r requirements-docs.txt
69
+ python tools/build_site.py
70
+ python -m http.server 8000 --directory site
71
+ ```
72
+
73
+ Open [the playground locally](http://localhost:8000/playground/). The light studio includes eight guided lessons, practice tasks, hints, and progress earned by running working programs. Browse eight examples, including the original demo, library, gossip, and calculator programs. Calculator inputs 1, 10, 5, 6 add ten, show it, and exit the menu.
74
+
75
+ **Studio** contains the interactive lessons, **Learn** opens the full MkDocs documentation, and **Examples** opens the program gallery. The combined build places these at `playground/`, `learn/`, and `examples/` within the ignored `site/` directory. Its relative links also work when hosted under a repository path. Rebuild after editing sources; generated files are not committed.
76
+
77
+ The editor includes Mozhi syntax highlighting, keyword tooltips, a searchable reference, error line navigation, font and wrapping controls, file import/export, and a command palette. Use Ctrl+Enter to run, Ctrl+Shift+Enter to stop, Ctrl+K to search, or Ctrl+S to download. The interface adapts to phones and supports keyboard navigation.
78
+
79
+ Drafts, preferences, lesson progress, and the last eight runs are saved in browser storage on this origin. Replacing edited code asks for confirmation and keeps the previous draft recoverable from editor settings. Clearing browser data removes these records. Download important programs for a durable copy. **Share code** encodes the current program in a URL fragment without uploading it to a storage service. Anyone with the link can read the code; recipients need access to the same hosted website. A localhost link only works on your computer.
80
+
81
+ CodeMirror 5.65.13 and Pyodide 0.23.4 load from external CDNs, and optional web fonts load from Google Fonts. First loading needs network access. A plain textarea remains usable if CodeMirror fails to load. Stop the local server with Ctrl+C.
82
+
83
+ Programs execute in a worker. **Stop** terminates even a tight infinite loop, and a configurable execution limit defaults to **10 seconds** (0.1–3600 seconds). Waiting for user input pauses the timer; submitting input resumes the remaining budget. Stopping or timing out cancels pending input and creates a fresh engine. Engine-load failures expose **Retry engine**. Output is capped at 65,536 JavaScript characters to keep runaway printing responsive. This is a usability limit, not a security sandbox.
84
+
85
+ ## Implemented features and differences
86
+
87
+ | Feature | CLI adapter | Browser adapter |
88
+ | --- | --- | --- |
89
+ | Numbers, strings, booleans, arithmetic, conditions | Present | Present |
90
+ | Functions and return | Present | Present |
91
+ | Arrays, indexing, push/pop | Present | Present |
92
+ | Loops and outer-variable updates | Fixed; updates find the defining scope | Same semantics |
93
+ | Classes and methods | Properties, bound instances, method closures | Same semantics |
94
+ | Input | Synchronous `kelu(...)` or `ketukko(...)` | Both aliases, asynchronously awaited |
95
+ | Length and conversion | `neelam`, `enn`, `padam`, `vaari` | Same names |
96
+ | `podhum` | Terminates the current program, including nested calls | Same semantics; engine remains reusable |
97
+
98
+ See [LANGUAGE.md](https://github.com/sm1else-bot/mozhi/blob/main/LANGUAGE.md) for the supported syntax and [the documentation source](https://github.com/sm1else-bot/mozhi/blob/main/docs/index.md) for examples. The browser runs a generated asynchronous adapter, `playground/runtime.py`, in Pyodide. `tools/sync_playground.py` generates its parser/runtime from `src/mozhi/core.py`; input/output adapters differ, but language fixes are kept together. After changing the core, run `python tools/sync_playground.py`. A regression check detects a stale generated artifact.
99
+
100
+ ## Known limitations
101
+
102
+ - This is still an experimental language, not full Python compatibility. Constructors are called manually after `ClassName porul`; indexed assignment and module imports are not implemented.
103
+ - Errors now report source statement lines and validate indentation, argument counts, array indices, properties, input conversion and control-flow placement. There is no exception-handling syntax for recovering within a Mozhi program yet.
104
+ - The browser limit measures elapsed execution time outside input waits, not CPU instructions. A stopped worker must reload Pyodide. Extremely memory-hungry programs are not safely sandboxed. CLI execution remains unbounded; use Ctrl+C or an external process timeout for intentional endless programs.
105
+ - There is no module system, compatibility guarantee, or official GitHub Linguist recognition. Native archives and package-manager metadata are prepared, not claims of accepted registry listings. The playground highlighter is a lightweight token highlighter, not a language server or autocomplete engine.
106
+
107
+ ## Runtime checks
108
+
109
+ The Python suite runs language regressions against both the synchronous CLI and generated asynchronous browser adapter in bounded subprocesses:
110
+
111
+ ```sh
112
+ python tools/sync_playground.py
113
+ python -m unittest discover -s tests -v
114
+ ```
115
+
116
+ Optional actual-browser checks require Node.js 20 or later, network access, and Playwright's isolated Chromium:
117
+
118
+ ```sh
119
+ npm ci
120
+ npx playwright install chromium
121
+ npm run test:browser
122
+ npm run test:studio
123
+ ```
124
+
125
+ `MOZHI_TEST_BROWSER` may name an existing Chrome/Chromium executable instead of the Playwright download. The checks use a fresh temporary profile, exercise worker Stop/timeout/recovery and input pauses, and do not operate your personal browser session.
126
+
127
+ ## Documentation
128
+
129
+ ```sh
130
+ python -m pip install -r requirements-docs.txt
131
+ python -m mkdocs serve
132
+ python -m mkdocs build --strict
133
+ ```
134
+
135
+ The generated `site/` is ignored. The docs cover [runtime controls](https://github.com/sm1else-bot/mozhi/blob/main/docs/runtime.md), [operators](https://github.com/sm1else-bot/mozhi/blob/main/docs/basics/operators.md), and [error handling](https://github.com/sm1else-bot/mozhi/blob/main/docs/errors.md). Exact original documentation remains in the archival commits.
136
+
137
+ ## Roadmap and contributions
138
+
139
+ Next: a fuller language specification, deeper runtime coverage, richer editor integration, a larger standard library, and modules. Official Linguist recognition is a future milestone; `.mozhi` files are not relabeled as Python.
140
+
141
+ Read [CONTRIBUTING.md](https://github.com/sm1else-bot/mozhi/blob/main/CONTRIBUTING.md) before proposing changes. The language concept and syntax were directed by the project author; implementation was AI-assisted with Claude, then Gemini and Google Antigravity. These tools assisted development rather than independently originating the author's language idea.
142
+
143
+ Licensed under [MIT](https://github.com/sm1else-bot/mozhi/blob/main/LICENSE). [HISTORY.md](https://github.com/sm1else-bot/mozhi/blob/main/HISTORY.md) describes the chronology; [PROVENANCE.md](https://github.com/sm1else-bot/mozhi/blob/main/PROVENANCE.md) explains the retrospective commits.
@@ -0,0 +1,9 @@
1
+ # Varisaiyil irukkum engalai serkkalam.
2
+ values = [2, 4, 6, 8] vechukko
3
+ i = 0 vechukko
4
+ total = 0 vechukko
5
+ i < neelam(values) varaikum:
6
+ total = total + values[i] vechukko
7
+ i = i + 1 vechukko
8
+ mudivu
9
+ total sollu
@@ -0,0 +1,10 @@
1
+ # Neram alandhu oru siriya kanakku seiyalam.
2
+ start = neram() vechukko
3
+ i = 0 vechukko
4
+ total = 0 vechukko
5
+ i < 10000 varaikum:
6
+ total = total + i vechukko
7
+ i = i + 1 vechukko
8
+ mudivu
9
+ total sollu
10
+ "Seconds: " kooda (neram() - start) sollu
@@ -0,0 +1,71 @@
1
+ # A simple Calculator in Mozhi
2
+
3
+ vagai Calculator:
4
+ seiy initialize(ennoda):
5
+ ennoda.total = 0 vechukko
6
+ mudivu
7
+
8
+ seiy add(ennoda, val):
9
+ ennoda.total = ennoda.total + val vechukko
10
+ mudivu
11
+
12
+ seiy subtract(ennoda, val):
13
+ ennoda.total = ennoda.total - val vechukko
14
+ mudivu
15
+
16
+ seiy multiply(ennoda, val):
17
+ ennoda.total = ennoda.total * val vechukko
18
+ mudivu
19
+
20
+ seiy divide(ennoda, val):
21
+ ennoda.total = ennoda.total / val vechukko
22
+ mudivu
23
+
24
+ seiy show(ennoda):
25
+ "Ippo total: " kooda ennoda.total sollu
26
+ mudivu
27
+ mudivu
28
+
29
+ # Main Program
30
+ calc = Calculator porul vechukko
31
+ calc.initialize()
32
+
33
+ "Mozhi Calculator Ready!" sollu
34
+ "1. Add, 2. Subtract, 3. Multiply, 4. Divide, 5. Show, 6. Podhum" sollu
35
+
36
+ running = true vechukko
37
+ running varaikum:
38
+ choice = ketukko("Enna operation? ") vechukko
39
+ choice = enn(choice) vechukko
40
+
41
+ choice == 1 na:
42
+ val = ketukko("Amount? ") vechukko
43
+ calc.add(enn(val))
44
+ illana:
45
+ choice == 2 na:
46
+ val = ketukko("Amount? ") vechukko
47
+ calc.subtract(enn(val))
48
+ illana:
49
+ choice == 3 na:
50
+ val = ketukko("Amount? ") vechukko
51
+ calc.multiply(enn(val))
52
+ illana:
53
+ choice == 4 na:
54
+ val = ketukko("Amount? ") vechukko
55
+ calc.divide(enn(val))
56
+ illana:
57
+ choice == 5 na:
58
+ calc.show()
59
+ illana:
60
+ choice == 6 na:
61
+ running = false vechukko
62
+ mudivu
63
+ mudivu
64
+ mudivu
65
+ mudivu
66
+ mudivu
67
+ mudivu
68
+ mudivu
69
+
70
+ "Bye!" sollu
71
+ podhum
@@ -0,0 +1,13 @@
1
+ name = "Nanba" vechukko
2
+ greeting = "Vanakkam, " kooda name vechukko
3
+ greeting sollu
4
+
5
+ numbers = [10, 20, 30] vechukko
6
+ 99 ullapodu numbers
7
+ "Array: " kooda numbers sollu
8
+
9
+ i = 0 vechukko
10
+ i < 3 varaikum:
11
+ i = i + 1 vechukko
12
+ i sollu
13
+ mudivu
@@ -0,0 +1,8 @@
1
+ # Mudhal paththu Fibonacci engal paarkalam.
2
+ seiy fib(n):
3
+ n < 2 na:
4
+ n thirumbu
5
+ mudivu
6
+ fib(n - 1) + fib(n - 2) thirumbu
7
+ mudivu
8
+ fib(10) sollu
@@ -0,0 +1,4 @@
1
+ # Ithu ullooril mattum odum; UTF-8 koppai ezhuthi padikkalam.
2
+ ezhuthu("mozhi-example.txt", "வணக்கம்\n")
3
+ serthu_ezhuthu("mozhi-example.txt", "Mozhi\n")
4
+ padi("mozhi-example.txt") sollu