Code as the ancients intended.
ΓΛΩΣΣΑ is a compiled programming language where Ancient Greek morphology determines semantics. It compiles directly to Rust, offering type safety with authentic linguistic structure.
In modern languages, meaning is enslaved by position. func(a, b) means something entirely different from func(b, a), purely because of where the words sit. This is a tyranny of order.
In Ancient Greek, meaning is liberated by morphology. A word's ending tells you its role.
- -ος (Nominative) says "I am the subject."
- -ον (Accusative) says "I am the object."
- -ει (Verb) says "He/She/It does."
ΓΛΩΣΣΑ embraces this freedom. The following lines of code are identical to the compiler:
ὁ ἄνθρωπος τὸν λόγον λέγει. // The man says the word.
τὸν λόγον λέγει ὁ ἄνθρωπος. // The word says the man.
λέγει ὁ ἄνθρωπος τὸν λόγον. // Says the man the word.
💡 Tip: You can find the complete code for this journey in
examples/quickstart.γλ.
In ΓΛΩΣΣΑ, we define reality with ἔστω ("let there be").
// Let x be 10.
ξ 10 ἔστω.
// Let name be "Socrates".
ὄνομα «Σωκράτης» ἔστω.
Verbs drive the action. We use the imperative mood for commands.
// Say "Hello"
«χαῖρε» λέγε.
// Say the name (using the variable from Chapter 1)
ὄνομα λέγε.
We define the shape of our world with εἶδος (form/type).
// Define a User type
εἶδος Χρήστης ὁρίζειν {
ὄνομα ὀνόματος. // String
ἡλικία ἀριθμοῦ. // i64
}.
// Create an instance
χρήστης νέον Χρήστης
«Πλάτων»
80
ἔστω.
We guide the flow of fate with εἰ (if) and διὰ (through/for).
// Let age be 80
ἡλικία 80 ἔστω.
// If age is greater than 50...
εἰ ἡλικία 50 μεῖζον ᾖ,
«σοφός» λέγε.
A guide for travelers from other lands.
| Concept | Rust / Python | ΓΛΩΣΣΑ | Literal Meaning |
|---|---|---|---|
| Variable | let x = 5; |
ξ 5 ἔστω. |
"Let x be 5." |
println!("Hi"); |
«χαῖρε» λέγε. |
"Say 'Hi'." | |
| If | if x > 0 { ... } |
εἰ ξ 0 μεῖζον ᾖ, ... |
"If x [is] greater than 0..." |
| Loop | for n in numbers { ... } |
ἀριθμός [1, 2, 3] ἔστω. διὰ ἀριθμοῦ, ν λέγε. |
"Through numbers, say n." |
| Function | fn foo() { ... } |
... ὁρίζειν ... |
"To define..." |
| Struct | struct User { ... } |
εἶδος Χρήστης ... |
"Form User..." |
The compiler speaks to you in Greek. Do not fear it; learn from it.
| Error Message | Translation | What it means | How to fix |
|---|---|---|---|
| Ἀσυμφωνία | Disagreement | Subject/Verb mismatch | Check if your Noun is Singular but Verb is Plural. |
| Διπλοῦν ὑποκείμενον | Double Subject | Two Nominatives | You have two subjects (e.g., "The man the god says"). Remove one. |
| Οὐκ οἶδα τὸ ὄνομα | I don't know the name | Undefined variable | Define the variable with ἔστω before using it. |
| Ῥῆμα οὐχ εὑρέθη | Verb not found | Missing verb | Every sentence needs a verb (action). Add one. |
To run a ΓΛΩΣΣΑ file (e.g., hero.γλ), use cargo run:
cargo run --release -- hero.γλTo run the Quick Start example:
cargo run --release -- examples/quickstart.γλUnlock advanced developer tools by enabling the nova feature.
⚠️ REQUIRES FEATURE NOVATo use these tools, you must add
--features novato your command.
Learn ΓΛΩΣΣΑ step-by-step.
cargo run --release --features nova -- mentorGenerate a Mermaid.js class diagram of your code.
cargo run --release --features nova -- map examples/quickstart.γλVisualize how the compiler assembles your sentences.
cargo run --release --features nova -- mosaic examples/quickstart.γλTranslate your code into an English narrative (available without nova).
cargo run --release -- bard examples/quickstart.γλ- Greek Syntax: Write code using authentic Ancient Greek grammatical constructs
- Type System: User-defined types (structs) with Greek names
- Traits: Interface definitions with default implementations
- Lambda Expressions: Participles as closures with multiple capture modes
- Iterator Operations: map, filter, find, fold, any, all
- Control Flow: Conditionals (εἰ), loops (ἕως), pattern matching
- Functions: First-class functions with Greek verb syntax
- Testing Framework: Native test declarations with assertion verbs (δοκιμή, δεῖ, ἰσοῦται)
- Morphological Analysis: Full Greek morphology parsing
GLOSSA provides native test declarations using idiomatic Greek verbs:
δοκιμή «HashMap insert and contains».
χ νέον χάρτης ἔστω.
χ 2 0 τίθησι.
2 ἐν χ δεῖ. // assert!(chi.contains_key(&2))
τέλος.
δοκιμή «equality check».
κ 5 ἔστω.
κ 5 ἰσοῦται. // assert_eq!(kappa, 5)
τέλος.
Assertion Verbs:
- δεῖ - "it is necessary" →
assert!(condition) - ἰσοῦται - "equals" →
assert_eq!(left, right)
Tests transpile to Rust #[test] functions and can be run with standard Rust tools.
To run tests written in Glossa (e.g., my_tests.γλ):
cargo run --release -- test my_tests.γλcargo build --releasecargo testCurrent test coverage: 294/294 tests passing (100%)
See docs/reference/ for language reference documentation.
TBD