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.