말하는 방법은하나.

의도를 담는 작고 닫힌 언어. 사람이 쓰고, 에이전트가 쓰고, 툴체인이 검증한다.

오늘 실행된다. 출력은 툴체인에서 캡처했다.

TOPAZ
function clean(words: Array<string>) -> Array<string> {
    return filter(words, (w: string) => w != "")
}

function shout(words: Array<string>) -> Array<string> {
    return map(words, (w: string) => w + "!")
}

let line = ["one", "", "way", "", "to", "say", "it"]
    |> clean
    |> shout
print("{line}")
출력
[one!, way!, to!, say!, it!]

작고 닫힌 표면

말하는 방법은 하나. 정책은 언어가 결정한다.

Unicode-first 정체성

도메인 언어가 그대로 코드가 된다. 한글, 키릴, 이모지가 1급.

에이전트 시대의 설계

작은 명세, 기계 검사 가능한 프로파일, 파서로 검증되는 문서.

의도를 담는 템플릿

sql, sh, 경로 템플릿. 안전이 규율이 아니라 문법이 된다.

실행 가능한 명세

사람이 읽는 명세. 실제로 실행되는 오라클. CI에서 백엔드와 맞춰지는 기준점.

Topaz는 애플리케이션 의도를 위한 작고 닫힌 Unicode-first 언어입니다. 사람과 에이전트가 같은 표면을 쓰고, 툴체인이 검사하고 기준으로 실행하며, 그 기준을 Rust와 Python 백엔드와 측정된 표면에서 바이트 단위로 비교합니다.

철학 읽기 →

코드가 주인공이다.

TOPAZ
function discount(customer: { tier: string, years: int }) -> float {
    return match customer {
        case { tier: "vip", years } if years > 5 => 0.3
        case { tier: "vip" } => 0.2
        case { years } if years > 1 => 0.1
        case _ => 0.0
    }
}

print("{discount({ tier: "vip", years: 7 })}")
print("{discount({ tier: "new", years: 0 })}")
출력
0.3
0.0
TOPAZ
let result = concurrent {
    answer: 6 * 7
    status: "ready"
}

defer print("cleaned up")
print("{result.answer} {result.status}")
출력
42 ready
cleaned up
TOPAZ
function fibonacci(n: int) -> int {
    return match n {
        case 0 => 0
        case 1 => 1
        case _ => fibonacci(n - 1) + fibonacci(n - 2)
    }
}

let series = map(0..<10, fibonacci)
print("{series}")
출력
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
TOPAZ
function clean(words: Array<string>) -> Array<string> {
    return filter(words, (w: string) => w != "")
}

function shout(words: Array<string>) -> Array<string> {
    return map(words, (w: string) => w + "!")
}

let line = ["one", "", "way", "", "to", "say", "it"]
    |> clean
    |> shout
print("{line}")
출력
[one!, way!, to!, say!, it!]

어느 언어든, 같은 코드.

한국어

TOPAZ
function 인사하기(이름: string) -> string {
    return "안녕하세요, {이름}님!"
}

print(인사하기("토파즈"))
출력
안녕하세요, 토파즈님!

English

TOPAZ
function greet(name: string) -> string {
    return "Hello, {name}!"
}

print(greet("Topaz"))
출력
Hello, Topaz!

Русский

TOPAZ
function привет(имя: string) -> string {
    return "Привет, {имя}!"
}

print(привет("Топаз"))
출력
Привет, Топаз!

오늘 동작하는 것

의도는 당신이 쓰고, 컴파일러는 Rust와 Python을 만든다.

파서

사용 가능 — 사이트 샘플 530개 파스 검증

모듈 리졸버

사용 가능 — 멀티 파일 유닛

인터프리터

사용 가능 — 이 페이지의 모든 프로그램 실행, 출력 고정

Rust 백엔드

사용 가능 — Rust로 방출, 인터프리터와 차등 테스트 완료

Python 백엔드

사용 가능 — Python으로 방출, 측정 스위프의 조용한 불일치 0건

사용자 enum

사용 가능 — 망라적 match를 갖춘 명목 닫힌 합