lispium 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.
- lispium/__init__.py +3 -0
- lispium/bin/lispium-darwin-aarch64 +0 -0
- lispium/bin/lispium-darwin-x86_64 +0 -0
- lispium/bin/lispium-linux-x86_64 +0 -0
- lispium/bin/lispium-windows-x86_64.exe +0 -0
- lispium/cli.py +80 -0
- lispium-0.1.0.dist-info/METADATA +84 -0
- lispium-0.1.0.dist-info/RECORD +11 -0
- lispium-0.1.0.dist-info/WHEEL +5 -0
- lispium-0.1.0.dist-info/entry_points.txt +2 -0
- lispium-0.1.0.dist-info/top_level.txt +1 -0
lispium/__init__.py
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
lispium/cli.py
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""Command-line interface wrapper for Lispium."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
import platform
|
|
6
|
+
import subprocess
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def get_binary_path() -> Path:
|
|
11
|
+
"""Get the path to the Lispium binary for the current platform."""
|
|
12
|
+
system = platform.system().lower()
|
|
13
|
+
machine = platform.machine().lower()
|
|
14
|
+
|
|
15
|
+
# Normalize architecture names
|
|
16
|
+
if machine in ("x86_64", "amd64"):
|
|
17
|
+
arch = "x86_64"
|
|
18
|
+
elif machine in ("arm64", "aarch64"):
|
|
19
|
+
arch = "aarch64"
|
|
20
|
+
else:
|
|
21
|
+
arch = machine
|
|
22
|
+
|
|
23
|
+
# Determine binary name based on OS
|
|
24
|
+
if system == "windows":
|
|
25
|
+
binary_name = f"lispium-{system}-{arch}.exe"
|
|
26
|
+
else:
|
|
27
|
+
binary_name = f"lispium-{system}-{arch}"
|
|
28
|
+
|
|
29
|
+
# Look for binary in package directory
|
|
30
|
+
package_dir = Path(__file__).parent
|
|
31
|
+
binary_path = package_dir / "bin" / binary_name
|
|
32
|
+
|
|
33
|
+
if binary_path.exists():
|
|
34
|
+
return binary_path
|
|
35
|
+
|
|
36
|
+
# Fallback: try to find 'lispium' in PATH
|
|
37
|
+
import shutil
|
|
38
|
+
system_binary = shutil.which("lispium")
|
|
39
|
+
if system_binary:
|
|
40
|
+
return Path(system_binary)
|
|
41
|
+
|
|
42
|
+
# If no platform-specific binary, try generic name
|
|
43
|
+
generic_path = package_dir / "bin" / "lispium"
|
|
44
|
+
if generic_path.exists():
|
|
45
|
+
return generic_path
|
|
46
|
+
|
|
47
|
+
raise FileNotFoundError(
|
|
48
|
+
f"Lispium binary not found for platform {system}-{arch}. "
|
|
49
|
+
f"Please install Lispium separately or ensure it's in your PATH. "
|
|
50
|
+
f"Visit https://github.com/Tetraslam/lispium/releases for downloads."
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def main():
|
|
55
|
+
"""Run Lispium with the provided arguments."""
|
|
56
|
+
try:
|
|
57
|
+
binary_path = get_binary_path()
|
|
58
|
+
except FileNotFoundError as e:
|
|
59
|
+
print(f"Error: {e}", file=sys.stderr)
|
|
60
|
+
sys.exit(1)
|
|
61
|
+
|
|
62
|
+
# Make sure binary is executable on Unix
|
|
63
|
+
if platform.system() != "Windows":
|
|
64
|
+
os.chmod(binary_path, 0o755)
|
|
65
|
+
|
|
66
|
+
# Run the binary with all provided arguments
|
|
67
|
+
args = [str(binary_path)] + sys.argv[1:]
|
|
68
|
+
|
|
69
|
+
try:
|
|
70
|
+
result = subprocess.run(args)
|
|
71
|
+
sys.exit(result.returncode)
|
|
72
|
+
except KeyboardInterrupt:
|
|
73
|
+
sys.exit(130)
|
|
74
|
+
except Exception as e:
|
|
75
|
+
print(f"Error running Lispium: {e}", file=sys.stderr)
|
|
76
|
+
sys.exit(1)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
if __name__ == "__main__":
|
|
80
|
+
main()
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lispium
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Symbolic Computer Algebra System
|
|
5
|
+
Author-email: Tetraslam <tetraslam@users.noreply.github.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Tetraslam/lispium
|
|
8
|
+
Project-URL: Repository, https://github.com/Tetraslam/lispium
|
|
9
|
+
Project-URL: Issues, https://github.com/Tetraslam/lispium/issues
|
|
10
|
+
Keywords: cas,computer-algebra,symbolic-math,lisp,mathematics
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Intended Audience :: Education
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Other
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# Lispium
|
|
23
|
+
|
|
24
|
+
A Symbolic Computer Algebra System written in Zig.
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install lispium
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or with uv:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
uv pip install lispium
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
After installation, the `lispium` command is available:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Start the REPL
|
|
44
|
+
lispium repl
|
|
45
|
+
|
|
46
|
+
# Run a file
|
|
47
|
+
lispium run script.lspm
|
|
48
|
+
|
|
49
|
+
# Show version
|
|
50
|
+
lispium --version
|
|
51
|
+
|
|
52
|
+
# Show help
|
|
53
|
+
lispium --help
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Features
|
|
57
|
+
|
|
58
|
+
- **Symbolic Computation**: Work with symbolic expressions and variables
|
|
59
|
+
- **Calculus**: Differentiation, integration, Taylor series, limits
|
|
60
|
+
- **Linear Algebra**: Matrices, determinants, eigenvalues, linear systems
|
|
61
|
+
- **Algebra**: Polynomial operations, equation solving, factoring
|
|
62
|
+
- **Number Theory**: Prime testing, factorization, modular arithmetic
|
|
63
|
+
- **And much more**: Complex numbers, vectors, statistics, plotting
|
|
64
|
+
|
|
65
|
+
## Example
|
|
66
|
+
|
|
67
|
+
```lisp
|
|
68
|
+
; Differentiate x^3
|
|
69
|
+
(diff (^ x 3) x) ; => (* 3 (^ x 2))
|
|
70
|
+
|
|
71
|
+
; Solve quadratic equation
|
|
72
|
+
(solve (- (^ x 2) 4) x) ; => {2, -2}
|
|
73
|
+
|
|
74
|
+
; Matrix determinant
|
|
75
|
+
(det (matrix (1 2) (3 4))) ; => -2
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Documentation
|
|
79
|
+
|
|
80
|
+
See the [GitHub repository](https://github.com/Tetraslam/lispium) for full documentation.
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
lispium/__init__.py,sha256=X81dRMbSkDVBJKgwI4rn6y2tA_Y9kmXRJzhIs_mVvO4,74
|
|
2
|
+
lispium/cli.py,sha256=J4UtnAl7jCWrBR32nsh6pIgdH2Q82_H_wbHuDSh98JU,2192
|
|
3
|
+
lispium/bin/lispium-darwin-aarch64,sha256=9Xc0iCEa_-2e8uBpk1V_CpLZsnxAOOcpwUikP-DyViw,853368
|
|
4
|
+
lispium/bin/lispium-darwin-x86_64,sha256=rKzKj7uRxlt2bQZUEPC0Leqr3-AgiA3Dxk4qnL2Rz50,898695
|
|
5
|
+
lispium/bin/lispium-linux-x86_64,sha256=oFkO9t8JkM02ajTYM-dp2LK7FDjem6A2mK07Y92_7rw,4510216
|
|
6
|
+
lispium/bin/lispium-windows-x86_64.exe,sha256=arUuF5slQ4h8C5X0OaqbomVLbzRjkJjoPyQD2I1TJbA,1046528
|
|
7
|
+
lispium-0.1.0.dist-info/METADATA,sha256=srBcfpIc9Vg6uezkkEPxEgMCqZr4SX05uguGEL4n_1c,1988
|
|
8
|
+
lispium-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
lispium-0.1.0.dist-info/entry_points.txt,sha256=pQpf04j3VXanQ-1KbIWg_c0bBThCHpUvcSpsBwTzyis,45
|
|
10
|
+
lispium-0.1.0.dist-info/top_level.txt,sha256=y0SISXpnLAwrsMoiuj1ma-pLu2fEJHnWhL-Suy7sv1M,8
|
|
11
|
+
lispium-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lispium
|