Skip to content
Ridgun
English

Ridgun 1.0.9 for Linux, macOS and Windows

Code that lines up.
Programs that scale out.

Ridgun is a tabular functional and systems language. Signatures and clauses sit in columns you can read at a glance, parallelism is part of the syntax, and memory is freed deterministically, with no garbage collector.

shapes.rg
type Shape = Circle Int | Rect Int Int

fn :: area Shape      => Int
      area (Circle r) =  3 * r * r
      area (Rect w h) =  w * h

fn :: report [Shape] => Int Int
      report shapes  =  (total, biggest)
        || ||map area shapes               -> areas
        || fold (acc a => acc + a) 0 areas -> total
        || fold bigger 0 areas             -> biggest

fn :: bigger Int Int => Int
      bigger a   b   =
        | a > b     = a
        | otherwise = b

fn :: describe (Int Int)        => String
      describe (total, biggest) =  "total {total}, largest {biggest}"

fn :: main => ()
      main =
        shapes = [Circle 4, Rect 3 5, Rect 20 30]
        echo (describe (report shapes))

ridgunc run shapes.rg
total 663, largest 600

The book, in your language

Forty-three chapters, from your first function to agents, tensors, memory regions and the standard libraries. Written by the team in eight languages.

No news yet. Releases and announcements will appear here.

Ask, share, take part

Stuck on a type error? Built something in Ridgun? Have an idea for the language? The forum is where the team and the community meet.

Visit the forum

Ready when you are.

Install Ridgun and write your first program today.

Ridgun, the mascot: a lynx with the horns of a ram, drawn as an ink engraving.