Scarp v0.0.5-alpha.2 — published release evidence

Published: November 2, 2026. Official compiler prerelease, from exact source commit e4db8e191cd7ea623123cae7348450ca6c95b170.

What changed in the published compiler?

From the published alpha.2 source and its tagged runnable examples, the new capabilities include:

  • Bitwise integer operations, bit-pattern literals and bounded shifts.
  • Explicit typed bind/var declarations, checked scalar numeric conversions, and Unicode text-query functions.
  • Immutable integer collections and their operations, population statistics and finite vector activation functions.
  • Static source-module inspection, including scarp modules and JSON inspection, plus source-free scarp explain E#### diagnostic explanations.
  • Restricted compile-time scalar module constant expressions.

The source release includes compiler examples, CLI source reference, and module-inspection reference. Some upstream Markdown still says "unreleased" because it was authored before publication. For release status, the tagged compiler source and the actual published release take precedence.

Five verified end-to-end programs

Each complete program below reproduces a published .srp file and corresponding .stdout file, including preserved whitespace. The docs validator checks English/Hindi source and expected output, verifies exact Git blob hashes, and the separate CI job builds the tagged alpha.2 compiler to check and run all five programs.

1. Integer bit operations

Published source: examples/bit_fields.srp and stdout fixture.

// Pack and inspect a 64-bit word without implicit numeric conversions.
var flags = 0xA0;
flags |= 0b0011;
println(flags & 0x0F);
println(flags >>> 4);
println(1 << 63);
println(~0);

Expected stdout (exact output bytes additionally checked in CI):

3
10
-9223372036854775808
-1

The binary (0b) and hexadecimal (0x) literals remain integers. The example exercises compound bitwise OR, mask-and, unsigned right shift (>>>), left shift to the i64 sign bit, and complement (~). Signed 64-bit behavior is visible in the output.

2. Explicit numerical conversions

Published source: examples/scalar_conversions.srp and stdout fixture.

bind count: integer = 42;
bind scaled: float = to_float(count) / 4.0;
bind exact: integer = to_integer(12.0);
print(scaled, exact, to_integer(-0.0));

Expected stdout (exact output bytes additionally checked in CI):

10.5 12 0

Typed declarations preserve the specified type. to_float(integer) and to_integer(float) are explicit, checked conversions—not implicit casts. The published sample verifies a negative floating zero becomes integer zero.

3. Typed bindings and mutations

Published source: examples/typed_declarations.srp and stdout fixture.

bind samples: vector = [1.0, 2.0, 3.0];
var total: float = sum(samples);
total += 0.5;
bind grid: tile = tile(samples, 1, 3);
bind ready: boolean = width(grid) == 3;
bind label: string = "typed";
print(label, ready, total);

Expected stdout (exact output bytes additionally checked in CI):

typed true 6.5

Both immutable bind and mutable var accept explicit primitive, vector and tile annotations. total += 0.5 preserves the declared float type. This is not an implementation of user-defined struct or generic types.

4. Unicode text queries

Published source: examples/unicode_text.srp and stdout fixture.

bind text: string = "café 🌍";
print(text_len(text), text_bytes(text), text_codepoint(text, 5));
print(text_find(text, "🌍"), text_contains(text, "é"));
print(text_starts_with(text, "caf"), text_ends_with(text, "🌍"));

Expected stdout (exact output bytes additionally checked in CI):

6 10 127757
5 true
true true

text_len counts Unicode scalar values, whereas text_bytes counts UTF-8 bytes. The globe emoji demonstrates that these counts differ. Indexes and search positions are scalar positions, not grapheme-cluster indices; text search is exact and does not promise normalization.

5. Statistics and activation kernels

Published source: examples/numerical_kernels.srp and stdout fixture.

bind samples = ints_to_vector(ints_range(-2, 5, 1));
print(variance(samples), stddev([3.0, 3.0]));
print(relu(samples));
print(sigmoid([-1000.0, 0.0, 1000.0]));
print(tanh([-1000.0, 0.0, 1000.0]));

Expected stdout (exact output bytes additionally checked in CI):

2.0 0.0
[0.0, 0.0, 0.0, 1.0, 2.0]
[0.0, 0.5, 1.0]
[-1.0, 0.0, 1.0]

The example turns a bounded integer collection into a finite-float vector, then exercises variance, stddev, relu, sigmoid and tanh. These are numerical primitives, not a complete machine-learning model or training framework.

Continue with four additional tested programs

The verified alpha.2 collections and classification tutorial adds complete published examples for immutable integer collections, stable score selection, numerical probabilities and explicit loss gradients. Together with the five examples on this page, the separate alpha.2 CI suite now checks 12 runnable programs, including three complete multi-file module constants and JSON inspection examples. The extra examples are not added to the older alpha.1 conformance suite.

CLI inspection commands

The tagged alpha.2 compiler adds the static scarp modules <path>, scarp modules --json <path>, and scarp explain E0044 workflows. These are compiler inspection and help commands, not code-generation, package installation or full-program execution commands. Module inspection still applies the source import and type validation rules; it does not execute ordinary runtime statements. Read the tagged module inspection docs and JSON schema docs.

Install the correct version

Download the matching archive from the alpha.2 release page, compare its published SHA-256 checksum, and check scarp --version before running an example. Windows x64, Linux x64 and macOS ARM64 assets are listed. No scarp build or native .srp executable compiler is claimed.

Evidence boundaries

This guide is release-specific. The existing alpha.1 compatibility reference and status matrix remain valid for their pinned interpreter, while this article is alpha.2-only. How verification works explains the two separate pinned suites. Neither prerelease is a stable language specification.

Search documentation