zigma 0.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.
zigma-0.0.1/LICENSE ADDED
File without changes
zigma-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: zigma
3
+ Version: 0.0.1
4
+ License-File: LICENSE
5
+ Requires-Dist: build>=1.5.0
6
+ Requires-Dist: twine>=6.2.0
7
+ Dynamic: license-file
zigma-0.0.1/README.md ADDED
@@ -0,0 +1,95 @@
1
+ <p align="center">
2
+ <img src="docs/images/logo.svg" alt="Zigma Logo" width="580">
3
+ </p>
4
+
5
+ ---
6
+
7
+ **Physics-safe programming language with dimensional analysis.**
8
+
9
+ Write scientific code with units. Get dimensional safety—wrong math is caught before it runs.
10
+
11
+ ### Quick Example
12
+
13
+ ```zig
14
+ g = 9.81 m/s2
15
+ t = 3 s
16
+ v0 = 0 m/s
17
+
18
+ y = (v0 * t) - (0.5 * g * t^2)
19
+ print "Position: {y}" // 44.145 m
20
+ ```
21
+
22
+ Try adding meters to seconds:
23
+ ```zig
24
+ wrong = y + t // ERROR: Cannot add [Length] to [Time]
25
+ ```
26
+
27
+ ### Custom Dimensions & Aliases
28
+
29
+ Track non-physical quantities safely:
30
+
31
+ ```zig
32
+ dimension usd
33
+ alias eur as 1.08 * usd
34
+
35
+ wallet = 100 eur
36
+ coffee = 10 usd
37
+ left = wallet - coffee
38
+ print "{left}" // 98 usd
39
+ ```
40
+
41
+ Define physics shortcuts:
42
+
43
+ ```zig
44
+ alias J as kg.m2/s2 // Joule
45
+ alias Pa as N/m2 // Pascal
46
+ alias degC as K - 273.15
47
+
48
+ energy = 50 J
49
+ temp = 300 K in degC
50
+ ```
51
+
52
+ ### Data & Tensors
53
+
54
+ Load CSV with automatic interpolation:
55
+
56
+ ```zig
57
+ steam = table "steam.csv"
58
+ P_at_115C = in steam get P as T = 115 degC
59
+ ```
60
+
61
+ Work with vectors and matrices:
62
+
63
+ ```zig
64
+ forces = [10, 20, 30] N
65
+ accelerations = forces / 2 kg
66
+ result = sum accelerations // Sum all elements
67
+ ```
68
+
69
+ ## Install
70
+
71
+ **Prerequisites:**
72
+ - Zig 0.16.0+ (if building)
73
+
74
+ **Build:**
75
+ ```bash
76
+ git clone https://git.bouvais.lu/adrien/zigma.git
77
+ cd zigma
78
+ zig build
79
+ ```
80
+
81
+ **Run:**
82
+ ```bash
83
+ zigma --run script.zma # Execute script
84
+ zigma # Interactive interpreter
85
+ ```
86
+
87
+ ## Features
88
+
89
+ - **Dimensional Safety:** Math operations validated for physical correctness.
90
+ - **Tensors:** Native support for scalars, vectors, and matrices with shape tracking.
91
+ - **Custom Units:** Create domain-specific dimensions (currencies, business metrics, physics aliases).
92
+ - **CSV Interpolation:** Load experimental data with units and auto-interpolate values.
93
+ - **GPU Support:** Move tensors to GPU with `as gpu` for accelerated computation.
94
+ - **Auto-vectorization:** Vector operations use SIMD when possible.
95
+
@@ -0,0 +1,11 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "zigma"
7
+ version = "0.0.1"
8
+ dependencies = [
9
+ "build>=1.5.0",
10
+ "twine>=6.2.0",
11
+ ]
zigma-0.0.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: zigma
3
+ Version: 0.0.1
4
+ License-File: LICENSE
5
+ Requires-Dist: build>=1.5.0
6
+ Requires-Dist: twine>=6.2.0
7
+ Dynamic: license-file
@@ -0,0 +1,8 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/zigma.egg-info/PKG-INFO
5
+ src/zigma.egg-info/SOURCES.txt
6
+ src/zigma.egg-info/dependency_links.txt
7
+ src/zigma.egg-info/requires.txt
8
+ src/zigma.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ build>=1.5.0
2
+ twine>=6.2.0
@@ -0,0 +1,3 @@
1
+ io
2
+ tensor
3
+ utils