bork is a programming language for backend services. These pages describe the language as it works today.
- Installing bork: Go,
go install, Homebrew, release archives, and upgrades. - A tour of bork: build a small program step by step.
- Build a service: a SQLite-backed JSON API, handler tests, and graceful shutdown.
- Browser playground: check code, inspect types, and format a file without installing anything.
- Examples: complete programs to read and run.
Each page covers one area in plain terms, with code you can run. Follow the Previous/Next links through the same order.
| Page | What it covers |
|---|---|
| Scripts | Executable single files, top-level statements, shebangs, and inline Go dependencies |
| Basics | Names, rebinding, functions, control flow, loops, tail calls, and printing |
| Types | Records, sealed types, unions, Option, Ok, and generics |
| Matching and errors | match, patterns, exhaustiveness, and ? |
| Collections | Lists, maps, lazy sequences, bytes, and parallel list operations |
| Facts | Predicates, where, and what the compiler proves |
| Effects | uses, pure functions, and ambient values |
| Scopes and tasks | Resources, tasks, channels, shared state, cancellation, process signals, and lazy and async bindings |
| Channels | Sending and receiving between tasks, closing, producers, select, timeouts, and pipelines |
| Packages and type classes | Packages, modules, imports, type classes, derived instances, and dependency assembly |
| Libraries | Dependencies, publishing, private modules, and reusable packages |
| Compile-time evaluation | comptime blocks and reading files at build time |
| Typed interpolation | s"...", sql.SQL"...", and defining your own prefix |
| Derivation templates | Custom class derivation with typed shape metadata |
| Calling Go | unsafe go, bindings to Go functions, and Go dependencies |
| Testing | Tests, snapshots, mocks, and property tests |
-
Cheat sheet: everyday syntax and useful commands.
-
Cookbook: complete programs for common backend tasks.
-
FAQ and pitfalls: compiler diagnostics, explanations, and checked fixes.
-
Coming from another language: Go, TypeScript, Rust, and Python comparisons.
-
Built-in APIs: generated signatures and comments for functions and methods available without imports.
- The bork command: every command, the settings, and the compile cache.
- Standard packages: files, HTTP, JSON, SQL, time, and more.
- Editors: VS Code, Neovim, Vim, Emacs, Helix, Zed, and any LSP client. The VS Code extension has its own page.
- Debugging: breakpoints and stepping in bork source.
- Debugger arithmetic rounding: Float and Float32 evaluation guarantees.
- JSON diagnostics, watch mode, and compiler code queries: the compiler's interfaces for editors and tools.
- Contributing and design notes: the grammar, the full requirements, and the design documents.