Skip to content

Releases: rvo-jp/nocter

Nocter v0.8.0

Choose a tag to compare

@rvo-jp rvo-jp released this 07 Aug 20:52

Nocter v0.8.0 Release Notes

Download nocter-v0.8.0-arm64-darwin.tar.gz

Nocter v0.8.0 introduces type-owned borrow coercions. A nominal type can expose a safe borrowed view
once, and callers can use that view at a concrete expected-type boundary without repeating an
adapter method call.

Borrow Coercion Declarations

A coercion belongs to the type that owns the source representation:

coerce String {
    pub &self as &str from self {
        return self.view()
    }
}

The receiver is explicitly readonly or readwrite, the target is borrowed, and from self states
that the result remains attached to the caller's source loan. Entries are private unless marked
pub; only the module defining the source nominal type may declare them.

The standard library supplies readonly String to str, readonly Vec<T> to [T], and readwrite
Vec<T> to readwrite [T] coercions. Existing view and view_mut methods remain available.

Contextual and Explicit Selection

The caller always writes the source borrow. A concrete argument, binding, assignment, aggregate
field, sequence element, enum payload, or return boundary may select one matching entry:

let text = String "Nocter"
let length = measure(&text)

The existing as expression can select the same entry explicitly:

let view = &text as &str

Prefix borrowing binds before as. Coercion never inserts a borrow, consumes an owned value,
chains entries, or participates in unconstrained generic inference and overload ranking. Existing
lossless integer as conversions keep their behavior.

Ownership and Execution

Type checking records one immutable conversion plan with concrete source and target types,
declaration identity, capability, generic substitution, and source ranges. Ownership, provenance,
region checking, editor analysis, specialization, and native lowering consume that plan rather than
repeat selection.

The selected body is an ordinary statically resolved call. Its source expression is evaluated once,
and the result keeps every possible source loan through grouped, projected, and branch-producing
expressions until its last use.

Editor Support

Hover on an explicit as covers only that operator and describes the normalized concrete
conversion. Definition follows a selected local, imported, or publicly re-exported coercion to its
declaration. Numeric as has conversion hover without an invented definition target. Private and
incomplete source remains diagnostic and does not produce stale navigation.

Compatibility and Limits

v0.8.0 is source-compatible with v0.7.0 programs. No existing view method is removed, and there is
no automatic source rewrite.

This release does not add owned, fallible, optional, allocation-backed, or transitive coercions;
implicit borrowing or moving; coercion-driven member lookup, generic inference, or overload
ranking; public lifetime parameters; runtime dispatch; additional targets; or a stable cross-version
ABI. The supported host and target remain arm64-darwin.

Qualification

The v0.8.0 candidate passed clean and incremental complete repository verification, with 3,345 tests
per run plus formatting, documentation generation, and warnings-denied Clippy. The exact
arm64-darwin archive is 3,319,650 bytes with SHA-256
cb6f0ce6b81e1aa71a65797e21f9f1d05a4164a17cf76427f34955966a63298a. A fresh extraction
without environment configuration passed package creation, locked/offline check and native test,
deterministic graph generation, run, explicit build, direct Mach-O execution, and the LSP lifecycle.

Nocter v0.7.0

Choose a tag to compare

@rvo-jp rvo-jp released this 07 Aug 16:55

Nocter v0.7.0 Release Notes

Nocter v0.7.0 simplifies public storage contracts. Allocation performed by an implementation and
fresh storage retained by a result are compiler-owned facts. Source declarations use from only
when a caller must track storage retained from a receiver, parameter, typed-literal element pack,
allocator capability, or static origin.

Source Contract

The result allocation modifier from v0.6.0 is removed:

func copy(text: &str): String
func view(text: &String): &str from text
func copy_with(allocator: &+Allocator, text: &str): String from allocator

Absence of from means that a result retains no caller-managed external origin. It does not promise
allocation-free execution. alloc remains an ordinary identifier, including std/mem.alloc.

Public bodies are checked against this contract. Functions, methods, construction functions,
literals, interface defaults, and conformance members cannot hide receiver or parameter storage in
a result. Interface implementations may narrow an external-origin contract to fresh or static
storage, but cannot introduce an origin absent from the interface.

Typed Literals and Collections

A typed sequence literal can name its element pack when returned elements retain caller-managed
storage:

construct Vec<T> {
    pub default literal [](...items: T): Self from items {
        // ...
    }
}

The pack remains compiler-owned and cannot escape as a value. from items maps its declaration
identity to the fixed and spread elements supplied at each literal expression. Standard Vec<T>
copying, iterator construction, removal, and pop operations now state their element-storage origins
explicitly.

Editor and Compiler Behavior

Hover, completion, signature help, construction surfaces, semantic tokens, diagnostics, and source
edits render the accepted source declaration. They do not expose fresh-result markers, ambient
allocation context, or inferred allocation prose. Obsolete modifier syntax receives a focused
parser diagnostic without entering the AST or formatter.

Migrating from v0.6.0

Remove result alloc wherever it precedes a callable declaration or structural callable type:

// v0.6.0
alloc func copy(text: &str): String
alloc &+func(Input): Output

// v0.7.0
func copy(text: &str): String
&+func(Input): Output

Keep valid from clauses. Add from items to a public sequence literal whose result retains
storage carried by its elements. No compatibility AST or formatter mode accepts the old modifier.

Distribution Boundary

The supported host and target remain arm64-darwin. The release is a self-contained .nocter/
directory containing the compiler, metadata, licenses, and standard-library source.

noalloc, realtime, async, named lifetime parameters, runtime interface dispatch, additional
targets, and a stable cross-version ABI are not part of v0.7.0.

Qualification

The release passes clean and incremental complete repository verification. Each run passes 3,284
tests across compiler libraries, CLI build and run paths, formatter and LSP protocols, packages,
native tests, the distributed installed home, public examples, and the source corpus. Formatting,
documentation generation, and warnings-denied Clippy also pass.

The qualified arm64-darwin archive is 3,285,691 bytes with SHA-256
080160481adbcb0b7f64ab87903b05814aad13fc16207dcc9602e655675f2d78. A fresh extraction without
environment configuration passes doctor, package initialization, locked/offline check and a
native test, deterministic JSON graph generation, run, explicit build, direct Mach-O execution,
and the LSP lifecycle.

Nocter v0.6.0

Choose a tag to compare

@rvo-jp rvo-jp released this 07 Aug 11:19

Nocter v0.6.0 Release Notes

Nocter v0.6.0 makes callable allocation and storage-origin contracts explicit, checkable, and
consistent across source, generic APIs, the standard library, and editor tooling. It distinguishes
storage newly allocated into a result from storage retained from an existing value without
exposing the compiler's ambient allocation context as source syntax.

Download nocter-v0.6.0-arm64-darwin.tar.gz

Result Contracts

alloc describes newly allocated storage retained by a result. from independently describes an
existing receiver, parameter, allocator, or static origin retained by that result:

func len(text: &str): usize
alloc func copy(text: &str): String
func view(text: &String): &str from text
alloc func copy_with(allocator: &+Allocator, text: &str): String from allocator

Temporary allocation does not require alloc when no allocated storage survives in the result.
Conversely, absence of alloc is not an execution-time allocation guarantee. noalloc and
realtime are reserved for future independent contracts.

The compiler validates body-backed contracts from returned values rather than trusting their
written modifiers. Recursive calls, optional and fallible branches, aggregate fields, closures,
generic specialization, interface defaults, mutable owners, and ownership transfer preserve the
same allocation and origin facts.

Standard Library and Iteration

  • Every callable in all 23 distributed standard-library modules participates in one automated
    contract audit.
  • String, Vec<T>, process, I/O, typed-literal, iterator, and allocator APIs use canonical
    alloc and from contracts.
  • Generic iterator advancement retains allocation and source-origin upper bounds through adapters,
    callbacks, collection for, and consuming ownership transfer.
  • Empty collection storage remains neutral until first growth selects an allocation domain.

Editor and Diagnostics

Hover, completion, signature help, construction surfaces, diagnostics, and code actions render one
normalized source declaration. They no longer display compiler-only phrases such as inferred
storage origins or execution allocation effects. A missing alloc contract identifies a concrete
returned expression or call and edits only its owning declaration.

Source Changes

The removed from current spelling has no compatibility parser. Use alloc when a result may
retain newly allocated storage, and add from name only when it also retains storage from a named
receiver, parameter, allocator, or static origin.

Qualification

The release passes 2,277 compiler-library tests, 296 build tests, 449 run tests, 24 framed LSP
tests, 18 package tests, 11 native-test tests, 208 distributed-home tests, public examples, the
source corpus, formatting, and warnings-denied Clippy. The optimized archive passes doctor and a
fresh package's locked/offline check, native test, graph, run, explicit build, and direct Mach-O
execution without repository configuration.

Explicit Limits

The supported host and target remain arm64-darwin. noalloc, realtime, source-level lifetime
parameters, runtime interface dispatch, async, concurrency, registries, workspace membership, and
a stable cross-version ABI are not part of v0.6.0.

Nocter v0.5.0

Choose a tag to compare

@rvo-jp rvo-jp released this 06 Aug 15:53

Nocter v0.5.0 makes a package practical to create, test, refactor, and use for a small filesystem
command-line application. It preserves the exact source-owned package graph introduced in v0.4.0
and adds native testing, package-wide editor operations, a practical standard library, and package
authoring commands on that one model.

Highlights

  • nocter init creates a non-overwriting executable or library package with a separate test target.
  • nocter test runs package targets and native test declarations in isolated processes with
    stable human and format-1 JSON reports.
  • nocter graph inspects exact package identities and dependency edges without rewriting #lock.
  • The immutable package semantic index supports package-wide references and safe rename, automatic
    imports, compiler-planned quick fixes, and inferred type/effect/provenance inlay hints.
  • Distributed std adds UTF-8 paths, file read/create/append, static Reader and Writer
    contracts, buffered I/O, string search and owned split, vector retain/truncate, decimal
    conversion, iterator terminal operations, and allocation-free process queries.
  • A packaged-home acceptance application creates, reads, rewrites, reopens, and appends files while
    exercising text, collections, numeric parsing, process state, and explicit buffered flush.

Authoring

nocter init json-tool
cd json-tool
nocter check
nocter test
nocter run
nocter graph --locked --offline --format json

Initialization refuses to overwrite nocter.nct or its generated test module. graph is
read-only; dependency updates remain the responsibility of nocter fetch, so lock changes stay
visible in code review.

Distribution

The release supports the arm64-darwin host and target. The attached archive contains one
self-contained .nocter/ directory with the compiler, metadata, licenses, and standard library.

nocter-v0.5.0-arm64-darwin.tar.gz

SHA-256: 61560090d1be6a802900e254c9666d4b60be9623257f1a62b87c1532b0636aa1

Qualification

The release passes the complete compiler, CLI, LSP, distributed-home, formatter, source-corpus,
and public-example suite with warnings denied. The optimized distribution passes doctor, fresh
package initialization, locked/offline check and test, native run, graph inspection, public-example
execution, packaged LSP initialization, and direct execution of emitted ARM64 Mach-O images.

Explicit Limits

Registries, semantic-version resolution, workspace membership, source-level lifetime parameters,
runtime interface dispatch, async, concurrency, and a stable cross-version ABI are not part of
v0.5.0.

Nocter v0.4.0

Choose a tag to compare

@rvo-jp rvo-jp released this 05 Aug 23:45

Nocter v0.4.0 Release Notes

Nocter v0.4.0 makes one source-owned package graph the shared unit of command-line compilation and
editor analysis. Package declarations, executable targets, dependency requests, exact locks, and
root-module code live together in nocter.nct. The compiler and language server resolve the same
typed package, module, and executable identities instead of reconstructing project structure from
entry-file paths.

Highlights

  • A package root is exactly a directory containing nocter.nct. The file has a parsed manifest
    section and an ordinary root module; index.nct remains only a directory module.
  • #executable declarations replace implicit main.nct discovery. An omitted entry selects the
    code in nocter.nct, entry: "." selects the root index.nct, and an explicit logical path
    selects a file or directory module without a .nct suffix.
  • Imports are classified before filesystem discovery. ./ and ../ are module-relative, / is
    package-relative, declared aliases enter exact dependencies, and std enters the compiler-matched
    standard library. The compiler performs no ambient package-name search.
  • #dependencies accepts path, Git, and archive sources. Generated format-1 #lock data records
    exact Git commits and archive SHA-256 identities in the same nocter.nct; there is no separate
    lockfile.
  • nocter fetch, --locked, and --offline provide explicit dependency resolution policy. Lock
    updates are failure-atomic, package caches are keyed by content-derived PackageId, and nested
    packages keep independent alias scopes.
  • Git and archive installation validates package boundaries, canonical paths, archive entries,
    symbolic links, and executable/module escapes before a package enters analysis.
  • The language server owns immutable, generation-numbered package snapshots. Diagnostics, hover,
    completion, signature help, definition, references, symbols, and semantic tokens observe one
    document/graph generation per request.
  • Dependency traces survive failed frontend and package-graph loads. Creating a missing import,
    repairing malformed source or manifests, deleting a symbolic-link target, and fixing transitive
    package metadata deterministically invalidate affected analyses without discarding unrelated
    snapshots.
  • The server supports versioned diagnostics, generation-backed semantic-token result identifiers,
    saved-text synchronization, dynamic **/*.nct file watching, nested package ownership, and an
    explicit initialize/shutdown lifecycle.
  • Native lowering now requires complete planned-call signatures. It no longer treats unknown call
    arguments as legacy i32 values, eliminating a test-only path that could conceal an invalid
    lowering plan.

Package Example

//! JSON command-line tool.

#name: "json-tool"
#version: "0.1.0"
#executable: {
    name: "json-tool",
}

#dependencies: {
    json: {
        git: "https://github.com/example/json.git",
        revision: "main",
    },
}

#lock: {
    format: 1,
    dependencies: {
        json: "git:7db21c1000000000000000000000000000000000",
    },
}

use std/io.print

func main(): i32! {
    print("json-tool\n")?
    0
}

Migration from v0.3.0

  • Create nocter.nct at the package root and declare each executable with #executable. Package
    build, run, and check no longer infer main.nct.
  • Put the customary main function directly in nocter.nct, or set entry to another logical
    module path. Use entry: "." only when the intended entry is the package-root index.nct.
  • Declare every non-standard-library package alias in #dependencies. An installed directory with
    a matching name does not create an importable dependency.
  • Run nocter fetch to resolve missing exact Git/archive locks and install package data. Commit the
    generated #lock change in nocter.nct; use --locked in verification and --offline when
    network access must be prohibited.
  • Keep script-style compilation explicit with nocter run app.nct, nocter build app.nct, or
    --file. Single-file mode has no package directives or dependency namespace.
  • v0.3.0 remains a historical release record. v0.4.0 is still pre-1.0 and does not promise source,
    package-manifest, or binary compatibility with later releases.

Distribution and Verification

The release asset contains one .nocter/ directory with the compiler, version and manifest
metadata, license files, and standard library. The supported host and native target are
arm64-darwin. Normal builds require no LLVM, external assembler, linker, SDK tool, or runtime
library.

Release qualification covers 2,204 compiler-library tests; all CLI build, run, package, formatter,
LSP, distributed-home, and example-corpus integration suites; formatting; warnings-denied Clippy;
public documentation generation; optimized local packaging; installed-home doctor; packaged
check/build/run and JSON-RPC acceptance; generated native execution; and archive inspection. The
installed compiler reports Nocter 0.4.0, and repository and packaged homes use the same release
metadata.

See the v0.4.0 release record for architecture, completed gates,
qualification boundaries, and non-goals.

Explicit Limits

  • The only supported native host and target are arm64-darwin.
  • Package dependencies use exact source identities; registries, semantic-version resolution, and
    multi-package workspace membership are not included.
  • Package test targets and a package test runner are not included.
  • The language server does not scan every unopened module into an ambient symbol index. Rename,
    code actions, inlay hints, persistent semantic caches, and concurrent request scheduling remain
    future work.
  • No source-level lifetime parameters, runtime interface dispatch, async execution, concurrency,
    or stable cross-version ABI is included.

Nocter v0.3.0

Choose a tag to compare

@rvo-jp rvo-jp released this 05 Aug 06:10

Nocter v0.3.0 Release Notes

Nocter v0.3.0 turns the allocator and ownership foundation from v0.2.0 into a more productive
language surface. It adds compiler-tracked lexical regions, typed construction, sequence and
iterator composition, callable values, interface default methods, and substantially deeper editor
support without introducing runtime dispatch or a process-global allocator.

Highlights

  • Ordinary allocating APIs use a statically propagated current allocation context. Lexical
    region name using allocator { ... } scopes create shorter storage origins, reject escapes, and
    clean up correctly across normal and early exits. Explicit TryAllocator APIs retain
    failure-atomic recoverable allocation.
  • Nominal types own their public creation APIs in construct Type { ... } declarations. A type can
    select one public default construction entry from raw construction, a literal, or an associated
    function while keeping fields and representation private.
  • User-defined typed [] and "" literals support generic element packs, explicit using
    allocation selection, and sequence spread through copy, borrow, or move modes.
  • String interpolation produces owned String values through trusted formatting capabilities and
    the current allocation context.
  • Public from contracts expose result provenance without source-level lifetime parameters.
    Generic capability sets and body-bearing impl Interface for Type { ... } declarations provide
    explicit, statically selected conformance.
  • Optional and fallible values compose as first-class values. Postfix ? propagates either
    channel while preserving nested outcome identity through storage, cleanup, ABI classification,
    lowering, and editor presentation.
  • Protocol-driven for loops, conditional iterator conformances, lazy adapters, exact-size
    preservation, and Vec builders support collection pipelines without hidden intermediate
    collections.
  • Explicit-capture closures implement built-in &func, &+func, and func callable contracts.
    Interface default methods provide reusable behavior derived only from required capabilities;
    map, filter, terminal operations, and to_vec compose as statically specialized method
    chains.
  • Hover, completion, signature help, definition, references, semantic tokens, and document symbols
    share compiler-owned occurrence and presentation models. Generic bounds, concrete owners,
    construction entries, conformance members, callable capabilities, provenance, and allocation
    effects therefore use the same declaration identities as compilation.

Migration from v0.2.0

  • Interface conformance is written as a body-bearing impl Interface for Type { ... } declaration.
    Required members belong to that declaration; same-named inherent methods do not establish or
    override conformance.
  • Public literal definitions and associated functions that directly produce their nominal type
    belong to that type's construct declaration. The compiler does not synthesize compatibility
    surfaces for detached declarations.
  • Closure capture is explicit. Readonly, readwrite, and owned captures use &name, &+name, and
    move name; unlisted outer bindings are rejected.
  • The v0.2.0 contract remains available as a historical reference. v0.3.0 is still a pre-1.0
    release and does not promise source or binary compatibility with future releases.

Distribution

The release asset contains one .nocter/ directory with the compiler, version and manifest
metadata, license files, and standard library. The supported host and native target are
arm64-darwin.

Normal Nocter builds do not require LLVM, clang, as, ld, an external runtime library, or the
Xcode Command Line Tools. The compiler emits ARM64 Mach-O executables directly and resolves the
standard library relative to its installed .nocter/nocter binary.

Verification

The release gate passed 2,161 library tests, 296 CLI build tests, 6 formatter tests, 15 LSP protocol
tests, 449 native run tests, 199 distributed-home tests, and 6 example-corpus tests. Formatting,
Clippy with warnings denied, the 50-page public documentation build, optimized local packaging,
installed-home doctor, packaged compiler check/run smoke tests, and archive-content inspection
also passed. The installed compiler reports Nocter 0.3.0, and repository and packaged homes agree
across all Phase 0 through Phase 10 acceptance surfaces.

See the v0.3.0 release record for completion criteria, verification boundaries,
and explicit non-goals.

Explicit Limits

  • The only supported native host and target are arm64-darwin.
  • No source-level lifetime parameters, runtime interface dispatch, async execution, concurrency,
    workspace package manager, or stable cross-version ABI is included.
  • LSP rename, code actions, formatting requests, workspace-wide indexing, and inlay hints remain
    future work.

Nocter v0.2.0

Choose a tag to compare

@rvo-jp rvo-jp released this 01 Aug 19:32

Nocter v0.2.0 Release Notes

Nocter v0.2.0 completes the Allocator and ownership foundation required for practical owned
String and Vec<T> programs and substantially expands the compiler-backed language server.

Highlights

  • A checked Layout, provenance-carrying RawBuffer, and explicit Allocator contract provide
    failure-atomic allocation, growth, and deallocation.
  • Recursive drop obligations cover partially initialized structs, fixed arrays, payload enums, and
    initialized vector prefixes.
  • String supports empty construction, allocation, copy/from-string, reserve, append, clear,
    views, and deterministic drop.
  • Vec<T> supports empty construction, capacity management, reserve, push, pop, clear, views, and
    deterministic recursive drop for copy and non-copy elements.
  • Runtime acceptance covers Vec<String>, Vec<File>, and Vec<Vec<String>>, including failed
    growth and close-once behavior.
  • LSP support includes diagnostics, semantic tokens, hover, definition, references, document
    symbols, semantic completion, generic signature help, incomplete-edit recovery, and consistent
    multi-file open-document overlays.

Distribution

The release asset contains one .nocter/ directory with the compiler, metadata, license files, and
standard library. The supported native host and target are arm64-darwin.

Unpack the archive, move .nocter/ to the desired installation location, and place a symlink to
.nocter/nocter on PATH. The compiler resolves the real executable path to find its standard
library, so the binary should remain inside the .nocter/ directory.

Normal Nocter builds do not require LLVM, clang, as, ld, an external runtime library, or the
Xcode Command Line Tools.

Verification

The release gate passed compiler checks, formatting, Clippy with warnings denied, 1,866 library
tests, 294 CLI build tests, 423 native run tests, 112 distributed-home tests, LSP integration tests,
and packaged-home execution. The generated release image passed nocter doctor and reported
Nocter 0.2.0.

See the v0.2.0 development contract for the complete scope and explicit
non-goals.

Nocter v0.1.0

Choose a tag to compare

@rvo-jp rvo-jp released this 30 Jul 09:57

Nocter v0.1.0

First narrow v0 release for arm64-darwin.

Included

  • One-directory .nocter/ installation layout.
  • Native arm64-darwin compiler binary.
  • Tracked standard library source under .nocter/std/.
  • Release metadata: VERSION, MANIFEST.json, LICENSE, and NOTICE.
  • CLI commands: check, build, run, fmt, tokens, ast, doctor, and lsp.
  • Source-backed rejection diagnostics for runtime forms outside the v0.1.0 subset.

Distribution

  • Asset: nocter-v0.1.0-arm64-darwin.tar.gz
  • SHA-256: 88bc55f353f0d78beeb8a953a4e8d65b8a7d43a10860aa04df48d5e6ed1263cb
  • License: Apache License 2.0

Notes

  • Only arm64-darwin is implemented in this release.
  • The archive is unsigned and not notarized.
  • develop has moved on to 0.2.0-dev.