K.
K is a general-purpose language where variables, closures, classes, error handling, and matrix math are all built-in syntax — not a library you import. Source compiles to bytecode and runs on a stack-based VM: one binary, no interpreter to install, no package manager.
What K borrows, and what it fixes
K's syntax will feel familiar if you've used Python, C++, or Java — each choice below is there to remove a specific piece of friction those languages carry.
try / catch is a single clause.Read this honestly: K is a real bytecode-compiled language today, not a prototype. Type annotations are parsed for readability and not yet enforced; a bigger standard library and package ecosystem are the next honest milestones, not "done."
Classes, closures, and matrix math — no imports required
Everything below is built-in language syntax, not a library.
class Dog { fn init(name) { self.name = name; } fn speak() { return f"{self.name} says Woof!"; } } let d = new Dog("Rex"); print(d.speak()); let weights = [[0.8, -0.1], [0.4, 0.9]]; let inputs = [[1.5, 0.2]]; print(relu(inputs @ weights)); // matrix multiply is a language operator, '@'
Get K running on your machine
v1.1.0 — built straight from the GitHub release. Each installer includes both the k CLI and the built-in GUI IDE.
k CLI and IDE, adds them to PATH, and associates .k files.k CLI and IDE. Open the .pkg and follow the standard macOS installer prompts.sudo dpkg -i k-language_1.1.0-1_amd64.deb (or double-click in a graphical package manager).Prefer to build from source? All installers above are built from release v1.1.0. K is written in Rust — clone the repo and build with Cargo:
git clone https://github.com/K-S-C/K.git && cd K && cargo build --release
Or grab the raw source: .zip · .tar.gz
What's implemented today
The core language, its built-in methods, and matrix math are all documented in the repository README.
let / constBindings, with optional : type annotations kept as documentation.
fn name(a, b = 1) { }Functions with default parameters, closures, and nested functions.
class Name(Parent) { }Single inheritance, implicit self, init, and new.
if / elif / elseStandard branching, plus while and for x in iterable { }.
break / continue / returnFamiliar control-flow escapes, including in nested loops.
try { } catch e { }Runtime errors are catchable values — throw raises any K value.
f"{expr}"String interpolation, plus ints, floats, true/false/null.
[1,2,3] / {"a":1}Lists and dicts with indexing and built-in methods.
relu · sigmoid · softmax · @Matrix multiply and elementwise ML activations as native builtins.
Honest next steps
Real static type checking
Turn the currently-decorative type annotations into an actual checker, or remove them from the grammar.
Standard library
File I/O, JSON, real math builtins, and collection helpers beyond the current core set.
Tooling
A formatter, a test runner, and editor support so K is comfortable to work in day to day.
Package manager
Usually where a language's real-world capability actually comes from.