Named for Heh, the Egyptian god of infinity, who holds a palm rib notched with millions of years. A language designed to be small, frozen, and endless: easier than Python, fast, secure by default, with no package servers and no expiration date.
# hello.heh β a complete Heh program
sys.print("Heh lives forever π¨")
# the god's own numbers: integers never overflow
fn factorial(n: int) -> int
mut acc = 1
for i in 1..=n
acc *= i
acc
sys.print(factorial(1000)) # all 2,568 digits. no BigInt import. no overflow.
sys.print(2 ** 200) # exact. always.
Every "best of all languages" project dies of feature accumulation. Heh takes the opposite bet: selection over addition. Nineteen keywords. A spec that fits in 100 pages forever. A NEVER list frozen on day one.
| Pillar | How |
|---|---|
| Easier than Python | 19 keywords, indentation blocks, inference everywhere except fn boundaries, one obvious way |
| Infinite by nature | arbitrary-precision int (overflow does not exist), unbounded lazy ranges 0.. |
| Secure by default | capability-based I/O β pure code cannot touch fs/net/clock; no eval, no null, no exceptions |
| Reliable | static types + inference, errors as values (try / ok / err), exhaustive match |
| Immortal | zero-dep single-binary toolchain, no package registry (vendored content-addressed imports), backward compatibility as religion after v1.0 |
use std/json
type Shape = circle(r: float) or square(side: float) or dot
fn area(s: Shape) -> float
match s
circle(r)
3.141592653589793 * r * r
square(side)
side * side
dot
0.0
fn parse_age(s: str) -> int or error
let n = try int_of(s)
if n < 0
return err("age cannot be negative: {n}")
ok(n)
fn main(sys: Sys)
let text = try sys.fs.read("shapes.json") else exit
sys.print("total: {area(circle(r: 2.0))}")
No null. No exceptions. No classes. No pip install. No overflow. Forever.
Heh is one binary with no dependencies. If you have a Rust compiler, you can build the entire toolchain:
cargo install heh-lang # installs the `heh` command
echo 'sys.print("Heh lives forever π¨")' > hello.heh
heh run hello.hehBuilding from source is the same story β one command, no dependencies to fetch:
git clone https://github.com/Lord1Egypt/Heh && cd Heh
cargo build --release # produces target/release/hehA file with no fn main runs top to bottom with sys already in scope, so
hello world really is one line. Add a fn main(sys: Sys) when you want an
entry point.
| Command | Does |
|---|---|
heh run <file.heh> [args] |
run a program on the bytecode VM (--tree-walk for the reference evaluator) |
heh check <file.heh> |
parse and type-check without running |
heh test [path] |
run every fn test_*() in *_test.heh |
heh fmt [--check] <path> |
canonical formatter β no options, comment-preserving |
heh get <url> |
vendor a dependency and pin its hashes in heh.lock |
heh ast / heh tokens |
dump the parse tree or token stream |
Effects reach your program through the single Sys value handed to main.
A function that never receives it cannot read a file, open a socket, or even
look at the clock β so a security review is grep for who takes sys.
fn main(sys: Sys)
let text = try sys.fs.read("notes.txt") else exit
sys.print(text)
Any capability can be revoked from the outside, and revocation fails closed:
heh run app.heh --deny-net --deny-fs # those calls now return err(...)v1.0 β the language is frozen. SPEC.md is authoritative and its
surface no longer changes; the conformance corpus in tests/corpus/ defines
what it means to be a Heh implementation. Everything was built phase by phase
(P0βP12) against that spec.
| Package | heh-lang on crates.io β installs the heh command |
| Spec | SPEC.md β authoritative, v1.0, frozen |
| Standard library | docs/STDLIB.md β the complete frozen surface |
| Diagnostics | docs/DIAGNOSTICS.md |
| Changes | CHANGELOG.md |
| Roadmap | docs/ROADMAP_TO_10.md β measurable path from v1.0.4 to a fully hardened toolchain |
| Reference implementation | Rust, zero crates, single binary heh |
| Examples | examples/ |
| Verification | conformance corpus + cargo test (CI on every PR) |
cargo test # the gate: must be green, alwaysDjet and neheh were the two Egyptian eternities β linear time and cyclic time β and Heh personified the infinite itself. His notched palm rib was the hieroglyph for "millions of years." That is the design target: a language you can still run, read, and reimplement in a million years β or at least a hundred.
MIT Β© Mohamed Mounir (Lord1Egypt)
