Early development, experimental programming language with an implicit but strong and dynamic type system.
  • Go 97.8%
  • Zirric 2.1%
Find a file
Valentin Knabel e2e5e06c6a
Some checks failed
goreleaser-check / check (push) Successful in 22s
Go / build (push) Failing after 51s
release / goreleaser (push) Successful in 1m44s
build: goreleaser and publishing (#75)
Reviewed-on: #75
Co-authored-by: Valentin Knabel <dev@vknabel.com>
Co-committed-by: Valentin Knabel <dev@vknabel.com>
2026-01-14 18:34:59 +00:00
.github build: goreleaser and publishing (#75) 2026-01-14 18:34:59 +00:00
ast refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
cavefile refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
cmd/zirric build: goreleaser and publishing (#75) 2026-01-14 18:34:59 +00:00
compiler refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
docs Rename to Zirric (#64) 2025-10-22 21:12:06 +02:00
examples/project refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
lexer refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
op refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
parser refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
pkgmanager refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
proposals refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
registry test: adapt latest repo and release (#74) 2026-01-14 17:33:24 +00:00
runtime refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
stdlib Rename to Zirric (#64) 2025-10-22 21:12:06 +02:00
syncheck refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
token refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
version refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
vm refactor: code.knabel.dev/zirric-lang/zirric 2026-01-10 18:40:42 +01:00
world initial draft 2023-07-05 21:50:50 +02:00
.gitattributes chore: categorize zirric 2026-01-10 16:17:52 +01:00
.goreleaser.yaml build: goreleaser and publishing (#75) 2026-01-14 18:34:59 +00:00
Dockerfile build: goreleaser and publishing (#75) 2026-01-14 18:34:59 +00:00
go.mod chore(deps): update module github.com/go-git/go-billy/v5 to v5.7.0 2026-01-14 17:41:07 +00:00
go.sum chore(deps): update module github.com/go-git/go-billy/v5 to v5.7.0 2026-01-14 17:41:07 +00:00
grammar.ebnf Rename to Zirric (#64) 2025-10-22 21:12:06 +02:00
LICENSE Update LICENSE 2024-07-24 15:46:03 +02:00
README.md Rename to Zirric (#64) 2025-10-22 21:12:06 +02:00
renovate.json chore: Configure Renovate (#68) 2026-01-14 12:03:01 +00:00

Zirric

Zirric is an experimental programming language with a reference implementation in Go. The project is in an early stage and offers the essential building blocks of a modern language:

  • Lexer, parser, and AST
  • Bytecode compiler and virtual machine
  • Standard library with prelude types such as Array, Bool, Int, and String
  • Package management via Cavefile and registries
  • Documentation on syntax, types, and style in docs/

Language overview

A quick glimpse at core features:

Variables, functions, and data types

let answer = 42
let items = [1, 2, 3]

func greet(name) {
    "Hello, " + name
}

data Person {
    name
    age
}

let alice = Person("Alice", 30)
print(greet(alice.name))

Control flow

Zirric provides both expression and statement variants of if and for. The examples below use the expression forms, which yield values and can be nested inside other expressions.

let message = if answer == 42 { "yes" } else { "no" }

for item <- items {
    print(item)
}

When only side effects are required, use the statement forms, which run for their effects and produce no value:

if answer == 42 {
    print("yes")
} else {
    print("no")
}

for item -> items {
    print(item)
}

An empty for { } forms an infinite loop, useful for servers or event processors. It runs forever and only terminates when a break statement is encountered.

Enums

enum Result {
    data Ok { value }
    data Err { message }
}

let r = Ok(42)

Annotations

Zirric has no interfaces; instead, annotations attach behaviour and metadata to types and functions. They enable generic code to rely on declared capabilities without a formal interface system:

annotation Countable { length(value) }

@Countable({ v -> v.length })
data Bag {
    items
    length
}

Here Countable supplies a length implementation, allowing tools to treat Bag like any other countable collection.

Prerequisites

  • Go 1.23 or newer

Getting started

Clone the repository and run the test suite to see the implementation in action:

go test ./...

For more examples and guides, explore the docs/ and stdlib/ directories.

License

This project is licensed under the Mozilla Public License 2.0.