mu-language 0.10.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shyal
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,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: mu-language
3
+ Version: 0.10.0
4
+ Summary: mu: a small indentation language that transpiles to Python, with a hook for a project's helper library
5
+ Author: Shyal
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/shyal/mu
8
+ Project-URL: Repository, https://github.com/shyal/mu
9
+ Keywords: language,transpiler,python
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Topic :: Software Development :: Compilers
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: tomli; python_version < "3.11"
17
+ Provides-Extra: ide
18
+ Requires-Dist: jedi; extra == "ide"
19
+ Provides-Extra: test
20
+ Requires-Dist: pytest; extra == "test"
21
+ Requires-Dist: jedi; extra == "test"
22
+ Dynamic: license-file
23
+
24
+ # mu
25
+
26
+ mu is a small language that transpiles to Python. A file is indented
27
+ blocks without colons, calls of one argument without brackets, `..`
28
+ ranges, `x -> ...` lambdas, `<-` push, folds (`sum for x in xs: f(x)`),
29
+ `memo` for a cached function with cases, and `class` for a Python class.
30
+ The Python it produces is plain and runs anywhere; the transpiler pastes
31
+ in the source of every helper the file calls.
32
+
33
+ ```
34
+ pip install mu-language
35
+ python -m mulang file.mu # the Python
36
+ python -m mulang --fmt file.mu # the file, formatted
37
+ python -m mulang.repl # a REPL
38
+ ```
39
+
40
+ ## Spec
41
+
42
+ The language is specified one version at a time: [v0.1](spec/v0.1.md), [v0.2](spec/v0.2.md), [v0.3](spec/v0.3.md), [v0.4](spec/v0.4.md), [v0.5](spec/v0.5.md), [v0.6](spec/v0.6.md), [v0.7](spec/v0.7.md), [v0.8](spec/v0.8.md), [v0.9](spec/v0.9.md), [v0.10](spec/v0.10.md).
43
+
44
+ ## Profiles
45
+
46
+ The language owns a few helpers (`Grid`, `deep`). The rest come from a
47
+ profile: a Python file that registers a project's library with
48
+ `mulang.library(module, *names)` and the names its run time preloads with
49
+ `mulang.environment(objects)`. A project names its profile in
50
+ `pyproject.toml`:
51
+
52
+ ```toml
53
+ [tool.mu]
54
+ profile = "mu/leetmu.py"
55
+ ```
56
+
57
+ `python -m mulang`, the REPL, `py2mu` and the ide load it from the
58
+ working directory, or from the workspace root the ide is asked about.
59
+ The first profile is the LeetCode one in the `leet` repo, whose library
60
+ is the `pydsa` package (not yet published).
61
+
62
+ ## Tools
63
+
64
+ - `mulang.ide`: hover, completion, go-to-definition and signature help
65
+ over JSON lines, through the transpiled Python and Jedi.
66
+ - `mulang.py2mu`: a Python solution written as mu, in as few lines as the
67
+ language allows.
68
+ - `vscode/`: the VS Code extension (highlighting, formatter, the ide, a
69
+ debugger that steps through the mu file). Link it into
70
+ `~/.vscode/extensions` and reload the window.
71
+
72
+ ## Tests
73
+
74
+ ```
75
+ pip install -e '.[test]'
76
+ pytest
77
+ ```
78
+
79
+ The tests also need `pydsa`, the leet profile's library, on the path. Two of
80
+ them run only under the leet harness, whose `sitecustomize` preloads the names
81
+ LeetCode preloads; elsewhere they skip.
@@ -0,0 +1,58 @@
1
+ # mu
2
+
3
+ mu is a small language that transpiles to Python. A file is indented
4
+ blocks without colons, calls of one argument without brackets, `..`
5
+ ranges, `x -> ...` lambdas, `<-` push, folds (`sum for x in xs: f(x)`),
6
+ `memo` for a cached function with cases, and `class` for a Python class.
7
+ The Python it produces is plain and runs anywhere; the transpiler pastes
8
+ in the source of every helper the file calls.
9
+
10
+ ```
11
+ pip install mu-language
12
+ python -m mulang file.mu # the Python
13
+ python -m mulang --fmt file.mu # the file, formatted
14
+ python -m mulang.repl # a REPL
15
+ ```
16
+
17
+ ## Spec
18
+
19
+ The language is specified one version at a time: [v0.1](spec/v0.1.md), [v0.2](spec/v0.2.md), [v0.3](spec/v0.3.md), [v0.4](spec/v0.4.md), [v0.5](spec/v0.5.md), [v0.6](spec/v0.6.md), [v0.7](spec/v0.7.md), [v0.8](spec/v0.8.md), [v0.9](spec/v0.9.md), [v0.10](spec/v0.10.md).
20
+
21
+ ## Profiles
22
+
23
+ The language owns a few helpers (`Grid`, `deep`). The rest come from a
24
+ profile: a Python file that registers a project's library with
25
+ `mulang.library(module, *names)` and the names its run time preloads with
26
+ `mulang.environment(objects)`. A project names its profile in
27
+ `pyproject.toml`:
28
+
29
+ ```toml
30
+ [tool.mu]
31
+ profile = "mu/leetmu.py"
32
+ ```
33
+
34
+ `python -m mulang`, the REPL, `py2mu` and the ide load it from the
35
+ working directory, or from the workspace root the ide is asked about.
36
+ The first profile is the LeetCode one in the `leet` repo, whose library
37
+ is the `pydsa` package (not yet published).
38
+
39
+ ## Tools
40
+
41
+ - `mulang.ide`: hover, completion, go-to-definition and signature help
42
+ over JSON lines, through the transpiled Python and Jedi.
43
+ - `mulang.py2mu`: a Python solution written as mu, in as few lines as the
44
+ language allows.
45
+ - `vscode/`: the VS Code extension (highlighting, formatter, the ide, a
46
+ debugger that steps through the mu file). Link it into
47
+ `~/.vscode/extensions` and reload the window.
48
+
49
+ ## Tests
50
+
51
+ ```
52
+ pip install -e '.[test]'
53
+ pytest
54
+ ```
55
+
56
+ The tests also need `pydsa`, the leet profile's library, on the path. Two of
57
+ them run only under the leet harness, whose `sitecustomize` preloads the names
58
+ LeetCode preloads; elsewhere they skip.
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: mu-language
3
+ Version: 0.10.0
4
+ Summary: mu: a small indentation language that transpiles to Python, with a hook for a project's helper library
5
+ Author: Shyal
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/shyal/mu
8
+ Project-URL: Repository, https://github.com/shyal/mu
9
+ Keywords: language,transpiler,python
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Topic :: Software Development :: Compilers
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: tomli; python_version < "3.11"
17
+ Provides-Extra: ide
18
+ Requires-Dist: jedi; extra == "ide"
19
+ Provides-Extra: test
20
+ Requires-Dist: pytest; extra == "test"
21
+ Requires-Dist: jedi; extra == "test"
22
+ Dynamic: license-file
23
+
24
+ # mu
25
+
26
+ mu is a small language that transpiles to Python. A file is indented
27
+ blocks without colons, calls of one argument without brackets, `..`
28
+ ranges, `x -> ...` lambdas, `<-` push, folds (`sum for x in xs: f(x)`),
29
+ `memo` for a cached function with cases, and `class` for a Python class.
30
+ The Python it produces is plain and runs anywhere; the transpiler pastes
31
+ in the source of every helper the file calls.
32
+
33
+ ```
34
+ pip install mu-language
35
+ python -m mulang file.mu # the Python
36
+ python -m mulang --fmt file.mu # the file, formatted
37
+ python -m mulang.repl # a REPL
38
+ ```
39
+
40
+ ## Spec
41
+
42
+ The language is specified one version at a time: [v0.1](spec/v0.1.md), [v0.2](spec/v0.2.md), [v0.3](spec/v0.3.md), [v0.4](spec/v0.4.md), [v0.5](spec/v0.5.md), [v0.6](spec/v0.6.md), [v0.7](spec/v0.7.md), [v0.8](spec/v0.8.md), [v0.9](spec/v0.9.md), [v0.10](spec/v0.10.md).
43
+
44
+ ## Profiles
45
+
46
+ The language owns a few helpers (`Grid`, `deep`). The rest come from a
47
+ profile: a Python file that registers a project's library with
48
+ `mulang.library(module, *names)` and the names its run time preloads with
49
+ `mulang.environment(objects)`. A project names its profile in
50
+ `pyproject.toml`:
51
+
52
+ ```toml
53
+ [tool.mu]
54
+ profile = "mu/leetmu.py"
55
+ ```
56
+
57
+ `python -m mulang`, the REPL, `py2mu` and the ide load it from the
58
+ working directory, or from the workspace root the ide is asked about.
59
+ The first profile is the LeetCode one in the `leet` repo, whose library
60
+ is the `pydsa` package (not yet published).
61
+
62
+ ## Tools
63
+
64
+ - `mulang.ide`: hover, completion, go-to-definition and signature help
65
+ over JSON lines, through the transpiled Python and Jedi.
66
+ - `mulang.py2mu`: a Python solution written as mu, in as few lines as the
67
+ language allows.
68
+ - `vscode/`: the VS Code extension (highlighting, formatter, the ide, a
69
+ debugger that steps through the mu file). Link it into
70
+ `~/.vscode/extensions` and reload the window.
71
+
72
+ ## Tests
73
+
74
+ ```
75
+ pip install -e '.[test]'
76
+ pytest
77
+ ```
78
+
79
+ The tests also need `pydsa`, the leet profile's library, on the path. Two of
80
+ them run only under the leet harness, whose `sitecustomize` preloads the names
81
+ LeetCode preloads; elsewhere they skip.
@@ -0,0 +1,19 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ mu_language.egg-info/PKG-INFO
5
+ mu_language.egg-info/SOURCES.txt
6
+ mu_language.egg-info/dependency_links.txt
7
+ mu_language.egg-info/requires.txt
8
+ mu_language.egg-info/top_level.txt
9
+ mulang/__init__.py
10
+ mulang/__main__.py
11
+ mulang/difftest.py
12
+ mulang/ide.py
13
+ mulang/idioms.py
14
+ mulang/py2mu.py
15
+ mulang/repl.py
16
+ tests/test_ide.py
17
+ tests/test_mu.py
18
+ tests/test_py2mu.py
19
+ tests/test_repl.py
@@ -0,0 +1,10 @@
1
+
2
+ [:python_version < "3.11"]
3
+ tomli
4
+
5
+ [ide]
6
+ jedi
7
+
8
+ [test]
9
+ pytest
10
+ jedi