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.
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
Why Ridgun
Compared with other languagesTabular by design
Each function is a table: its signature on top, one clause per row, arguments in columns.
stable formatkeeps every file aligned, so reviews are about logic, not layout.Parallel is syntax
||lines form a dependency graph the compiler schedules across cores.||mapand||filterspread work over threads, and agents with channels cover long-running services.No garbage collector
The compiler frees a value right after its last use. Shared structures are reference-counted, and regions free a whole arena at once. Programs never pause to collect garbage.
Native, static binaries
ridgunc, the compiler, writes statically linked ELF64 executables for x86-64 and ARM64 by itself. No C toolchain, no runtime to install on the server. It is written in Ridgun, likestable,omni, the libraries and the site you are reading.One tool for the project
stablecreates, checks, tests, formats and builds projects from abuild.rgwritten in Ridgun itself. No YAML, no TOML.One command for libraries and tools
omni, the package manager, installs from this site and checks every signature first:omni install jsonadds a library to your project,omni install -g unix-toolsputs a package’s programs on yourPATH.
News
All postsNo 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