AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證kanso (簡素): the language where the source contains only decisions — phase-1 reference interpreter
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
kanso (簡素): simplicity through the elimination of clutter. A language where the source file contains only decisions. Anything a style guide, linter, or code review would enforce by convention, kanso enforces by making the alternative a compile error or unrepresentable. Programs have a canonical form—one rendering per program—so no formatter tool exists: non-canonical whitespace is a syntax error.檢視完整 README ↗
kanso (簡素): simplicity through the elimination of clutter.
A language where the source file contains only decisions. Anything a style guide, linter, or code review would enforce by convention, kanso enforces by making the alternative a compile error or unrepresentable. Programs have a canonical form, one rendering per program, so there is no formatter: non-canonical whitespace is a syntax error.
Docs: https://kanso-lang.dev/ · Book: https://kanso-lang.dev/book/ · Spec: https://kanso-lang.dev/spec.html · Compiler: https://kanso-lang.dev/compiler.html
# Division by zero answers a value you dispatch on rather than a failure you
# catch. The specific type is `divide_by_zero`; its parent `math_failure` is
# there for a handler that does not care which kind it was.
fn describe f:divide_by_zero
"no divisor: {f}"
fn describe f:math_failure
"some math failure: {f}"
fn describe n
"result: {n}"
fn safe_ratio a b
a / b
good = safe_ratio 10 2
bad = safe_ratio 10 0
print (describe good) .> (_ -> print (describe bad))
$ kanso play examples/errors.kso
result: 5
no divisor: division by zero
Nothing is thrown. 10 / 0 answers a divide_by_zero value, and the arms of describe dispatch on it like any other type. Nothing is printed while the program is evaluated either: the last line builds a description of two prints, and the runtime performs it.
git clone https://github.com/kanso-lang/kanso
cd kanso
cargo build --release
./target/release/kanso run examples/hello.kso
./target/release/kanso run examples/effects.kso --plan # show the effects instead of performing them
./target/release/kanso play examples/errors.kso
./target/release/kanso check examples/hello.kso
run takes a file of statements or a directory with a main.kso. play takes one file that holds definitions beside its statements. check reports what run would refuse and stops. test runs the test_* constants in each *_test.kso file, build writes a native binary, and repl evaluates expressions as you type them. kanso with no verb prints the usage, which lists the rest.
Three engines run kanso: a tree-walking interpreter, which is the semantics oracle, a native compiler through LLVM, and a browser engine compiled to wasm. Differential goldens hold them byte-identical. The language they run:
print, sequencing with .> (_ -> ...), and --plan to read the description without performing iterr, none and failure kinds such as divide_by_zero propagate until an arm dispatches on themf a b), and lists and maps are space-separated"{expr}", lists indexed from 1, maps, lambdaspub marks what it exports, and kanso install fetches and pins what it importsThe error corpus in tests/golden/errors matters as much as the programs that run: much of the language is in its compile errors.
One TextMate bundle in editors/ highlights .kso in JetBrains IDEs (Settings → Editor → TextMate Bundles → add editors/kanso) and in VS Code (symlink it into ~/.vscode/extensions). See editors/README.md.
cargo test # unit tests and the golden corpora: examples, diagnostics, engines
sh scripts/install_hooks.sh points a clone's git at hooks/, whose
post-merge rebuilds the compiler after each pull. Git will not let a
repository set that for itself, so it is one command per clone.
MIT licensed.