Nocter
Nocter is a statically typed, value-centered systems language for building native executables directly from .nct source files.
It favors explicit contracts, private-by-default modules, deterministic resource cleanup, and one canonical form for each language concept. Nocter uses struct, enum, interface, func, and method without class inheritance, implicit conformance, garbage collection, or hidden runtime machinery.
Recoverable failure and absence are represented by T! and T?, while borrowing and mutation capabilities remain visible through &T and &+T.
See the language specification and design principles.
One Directory Install
Download nocter-v0.48.0-arm64-darwin.tar.gz
Nocter compiles source directly to native executables without requiring LLVM, clang, as, ld, Xcode Command Line Tools, or an external runtime library from the user.
The compiler, metadata, and standard library live in one .nocter/ directory. Installation consists of unpacking that directory and adding a symlink; uninstallation consists of removing both.
Release archives have this structure:
.nocter/
├── nocter
├── VERSION
├── MANIFEST.json
├── LICENSE
├── NOTICE
└── std/
Install by placing .nocter/ somewhere stable, for example under your home directory, then linking the compiler into a directory already on PATH:
tar -xzf nocter-v0.48.0-arm64-darwin.tar.gz -C "$HOME"
ln -s "$HOME/.nocter/nocter" /usr/local/bin/nocter
nocter doctor
If /usr/local/bin requires elevated permissions, use sudo ln -s ... or choose a user-owned directory that is already on PATH, such as ~/.local/bin when your shell already includes it.
Do not copy the nocter binary out of .nocter/; the compiler locates its standard library from the real installed binary path. If symlinks are not available in your environment, set NOCTER_HOME explicitly:
export NOCTER_HOME="$HOME/.nocter"
Uninstalling a .nocter/ installation is intentionally plain:
rm /usr/local/bin/nocter
rm -rf "$HOME/.nocter"
First Program
Create hello.nct:
use std/io
blocking func main(): i32! {
io.print("Hello from Nocter\n")?
return 0
}
Run it directly:
nocter run hello.nct
Build an executable:
nocter build hello.nct
./hello
Check without building:
nocter check hello.nct
Format the source:
nocter fmt hello.nct
Naming the file explicitly selects single-file mode; Nocter does not guess an implicit source filename. For dependencies, multiple executables, or source files that compose one directory module, use package mode as demonstrated by file-summary.
Current Release
The v0.48.0 compiler parses, checks, builds, and runs the supported language on arm64-darwin and emits ARM64 Mach-O executables directly. Unsupported runtime forms are rejected with source-backed diagnostics before machine code is emitted.
Learn More
- Examples: runnable single-file and package examples.
- Language Specification: Nocter syntax, type system, ownership, CLI behavior, diagnostics, and tooling contract.
- Standard Library: checked public APIs and observable module behavior.
- Design Principles: the simplicity, encapsulation, and foolproof-design rules behind Nocter language decisions.
- Release Index: published downloads, supported targets, and version history.
- Contributor Documentation: development setup, compiler architecture, milestone plans, tests, and maintenance policy.
License
Nocter is licensed under the Apache License, Version 2.0.