Skip to content

Latest commit

 

History

1,198 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graphcal

Warning

Graphcal is under active development. Expect breaking changes and bugs.

Graphcal in Helix showing inline computed values for a rocket equation calculation

The Tsiolkovsky rocket equation in Graphcal, with the language server showing computed values inline. Try it in the browser playground.

Why Graphcal?

For engineers who want more confidence than spreadsheets and ad-hoc scripts provide:

  • Type- and unit-safe: dimensional mistakes such as km + kg are rejected at compile time.
  • Reactive: changing a parameter recomputes its dependents.
  • Git-friendly: .gcl files are plain text and diff cleanly.
  • Editor-friendly: the LSP provides diagnostics, references, rename, and inline computed values.

Quickstart

Install the CLI with Rust:

# The version flag is needed while Graphcal is a pre-release.
cargo install graphcal --version '^0.0.1-alpha' --locked

Save rocket.gcl, the file shown above, then run:

graphcal eval rocket.gcl
# Change an input; dependent values recompute:
graphcal eval rocket.gcl --param 'isp=450.0 s'
# Build a self-contained interactive HTML report (experimental):
graphcal report build rocket.gcl

Documentation

Everything else is in the documentation: the tutorial, the editor setup guide for VS Code, Zed, Neovim and Helix, and the language and CLI references.

Design influences

  • Numbat — dimensions as types, units as values
  • Gleam — unified type declarations
  • marimo — reactive graphs in plain-text files
  • Sguaba — typed coordinate frames

License

Licensed under either the MIT License or Apache License, Version 2.0, at your option.

About

A type-safe, unit-aware, Git-friendly reactive programming language for engineering calculations.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages