Get Started with Synoema

Install, write your first program, and learn the essentials

1. Install

Linux / macOS — one command

curl -fsSL https://synoema.tech/install.sh | sh

Downloads a pre-built binary, copies to ~/.sno/bin, and adds it to PATH.

Windows

iwr -useb https://synoema.tech/install.ps1 | iex

From source (requires Rust)

git clone https://github.com/Delimitter/synoema
cd synoema/lang
cargo install --path crates/synoema-repl

Verify

synoema eval "6 * 7"
# 42

If you see 42 — you're ready.

2. First Program

Create a file — hello.sno

-- hello.sno

greet name = "Hello, ${name}!"

main = print (greet "World")

Run it

synoema run hello.sno
# Hello, World!

Try expressions without a file

synoema eval "map (\x -> x * x) [1 2 3 4 5]"
# [1 4 9 16 25]

synoema eval "filter even [1..10]"
# [2 4 6 8 10]

synoema eval "foldl (\a b -> a + b) 0 [1..100]"
# 5050

3. Commands

CommandWhat it does
synoema eval "expr"Evaluate a single expression, print result
synoema run file.snoRun with interpreter — full I/O, networking, concurrency
synoema jit file.snoRun with Cranelift JIT — ~3× faster than Python (median)
synoema check file.snoParse + typecheck without running
synoema verify file.snoCheck + run with timeout, outputs JSON result
synoema test dir/Run doctests, unit tests, and property tests
synoema watch run file.snoRe-run automatically on every file save
synoema build file.snoCompile to bytecode (.sno.bc)
synoema doc file.snoGenerate documentation from doc comments
synoema fmt file.snoFormat source file in-place
synoema new myappScaffold a new project with src/main.sno

4. Language Cheatsheet

Functions — no def, no return

double x   = x * 2
add x y    = x + y
greet name = "Hello, ${name}!"

Pattern matching — multiple equations, first match wins

fac 0 = 1
fac n = n * fac (n - 1)

describe 0 = "zero"
describe 1 = "one"
describe _ = "many"

Lists — spaces, not commas

nums  = [1 2 3 4 5]        -- not [1, 2, 3]
range = [1..10]             -- [1 2 3 ... 10]
both  = [1 2] ++ [3 4]     -- [1 2 3 4]

Ternary — no if / else

abs x = ? x < 0 -> -x : x

classify n =
  ? n > 0  -> "positive"
  : ? n < 0  -> "negative"
  : "zero"

Pipe operator — left-to-right data flow

result = [1..20]
  |> filter even
  |> map (\x -> x * x)
  |> sum
-- 1140

Lambda

double  = \x -> x * 2
add     = \x y -> x + y
squares = map (\x -> x * x) [1..5]    -- [1 4 9 16 25]

Records

user  = {name = "Alice", age = 30}
user.name                              -- "Alice"
older = {...user, age = user.age + 1}

Algebraic types

Shape = Circle Float | Rect Float Float | Point

area (Circle r) = 3.14159 * r * r
area (Rect w h) = w * h
area Point      = 0.0

Error handling

safe_div x 0 = Err "division by zero"
safe_div x y = Ok (x / y)

main =
  result = safe_div 10 2
  print (unwrap_or 0 result)    -- 5

Testing

test "fac base"  = fac 0 == 1
test "fac five"  = fac 5 == 120

--- Factorial.
--- example: fac 5 == 120
fac 0 = 1
fac n = n * fac (n - 1)
synoema test hello.sno    -- run all tests in file

Where to Go Next

Language Reference

Full documentation — all types, operators, builtins, standard library, I/O, and concurrency.

LLM Integration

Using Synoema with Claude, Cursor, or llama.cpp? The LLM Guide covers MCP setup, constrained decoding, and feedback loops.

Examples

Browse 56 programs — algorithms, data structures, HTTP servers, CLI tools, and more.

Try Online

No install needed — experiment in the playground.