https://github.com/jonathanwthom/i
A sparse, statically-typed language in development. Building spec first as a learning exercise.
https://github.com/jonathanwthom/i
compiler learning-by-doing rust
Last synced: 2 months ago
JSON representation
A sparse, statically-typed language in development. Building spec first as a learning exercise.
- Host: GitHub
- URL: https://github.com/jonathanwthom/i
- Owner: JonathanWThom
- License: mit
- Created: 2026-04-29T04:46:16.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-05-07T05:16:23.000Z (2 months ago)
- Last Synced: 2026-05-07T06:36:22.631Z (2 months ago)
- Topics: compiler, learning-by-doing, rust
- Language: Rust
- Homepage:
- Size: 376 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# i
A sparse, statically-typed language in development. Building spec first as a learning exercise.
The syntax is as small as I could make it without giving up safety. Type and effect inference handle most of what would normally need syntax, leaving a handful of operators on the surface.
```i
type Point
x : Float
y : Float
distance = other ->
((self.x - other.x)^2 + (self.y - other.y)^2)^0.5
main =
p1 = Point(x = 0, y = 0)
p2 = Point(x = 3, y = 4)
print! "distance: " ++ show (p1.distance p2)
```
My primary goal is to learn something, but for the language itself, the
priorities are:
1. **Minimal.** Easy to learn and remember.
2. **Safe.** No surprises.
3. **Joyful.** Fun to write and read.
## Status
Docs are complete; lexer is complete and snapshot-tested; the parser is in
progress. For the live state — phases, current
plan, task-level checkboxes — see
[`docs/superpowers/plans/PROGRESS.md`](docs/superpowers/plans/PROGRESS.md).
## Development
Common commands all sit behind `make`:
```sh
make ci # what GitHub Actions runs (fmt-check + lint + test)
make dev # cargo test
make rev # cargo insta review (snapshot review)
make help # full list
```
A pre-commit hook (managed by [husky](https://typicode.github.io/husky/))
runs `make ci` before every commit. To wire it up after cloning:
```sh
npm install # one-time; installs husky and runs `prepare`
```
The Node dependency is *only* for the pre-commit hook — the compiler itself
is pure Rust.
## Documentation
- [Tour](docs/tour.md) — start here
- [Syntax reference](docs/syntax.md)
- [Type system](docs/types.md)
- [Effect system](docs/effects.md)
- [Pattern matching](docs/patterns.md)
- [Standard library](docs/stdlib.md)
- [Modules](docs/modules.md)
- [Building and running](docs/building.md)
- [Limitations](docs/limitations.md)
## License
MIT. See [LICENSE](LICENSE).