Official website

Quick search

Search pages in English or हिंदी. Detailed language reference is in Scarp Docs.

Top 6 website pages

Language prerelease · Reviewed source

Scarp alpha.6.6: bounded input, text conversion and typed tuples

Published Scarp v0.0.6-alpha.6 introduces redirected UTF-8 line input, explicit text conversions and immutable heterogeneous tuples.

v0.0.6-alpha.6 was published on 10 November 2026. It adds three connected language foundations while keeping Scarp an experimental interpreter—not an interactive shell or general native compiler.

Bounded program input

read_line() returns a UTF-8 string from an explicitly supplied reader. Packaged exec, run andlaunch accept redirected standard input. An attached interactive terminal does not become a prompt interface. LF and CRLF line endings are removed from the returned text but count toward input quotas.

Default limits are 65,536 raw bytes per line, 1,048,576 total bytes, and 4,096 reads. Three --max-input-* options adjust these limits. EOF, encoding, reader and quota errors have distinct diagnostics.verify and inspection remain static.

Explicit conversions and Unicode text tools

Checked text_to_integer, text_to_float,integer_to_text and float_to_text avoid implicit number/string coercion. Integer parsing respects the signed i64 range, and float parsing requires finite values. Unicode-awaretext_trim and text_replace extend text handling.

Immutable heterogeneous tuples

Tuple literals such as (42, "नमस्ते"), singleton literals,tuple<integer, string> annotations and literal-index projection like record[0] are supported. Tuples work in functions, defaults, contracts, recursion and imported interfaces. They support structural equality but not element mutation; whole-value replacement must preserve the exact structural type.

Tuple arity is 1–32, nesting is limited to 32, structural shape to 4,096 nodes, and the default cumulative tuple payload cap is 8 MiB. Empty tuples, computed indices, destructuring, BigInt, maps and general arrays remain unimplemented in this release.

Tag-pinned integrated example

The bundled example imports a helper that reads redirected input, parses a number and transforms Unicode text. Keep the imported module alongside the source; this is not a standalone one-file example.

core_input_tuple.srp · alpha.6.6
import "modules/input_record.srp" as records;
bind entry: tuple<integer, string> = records.read();
print(entry);
print(records.describe(entry));
Expected stdout with tagged stdin fixture
(42, "नमस्ते 🌍")
42: नमस्ते 🌍

Inspect the tagged source, imported helper, redirected stdin fixture, and exact stdout. The tagged compiler contains dedicated conformance and integration tests.

Compatibility and release limits

Input consumption cannot be rolled back. Rust embedders must account for structural SourceType, Value::Tuple,max_tuple_bytes and schema-2 inventories for tuple signatures. Native backends reject input and tuples. Earlier numerical built-ins, source navigation and restricted Rust-only C11/ELF64 emitters remain; there is no scarp compile CLI, stable ABI, package registry, GPU runtime or integrated language server.

See platform downloads and SHA-256 values, limited website CI compatibility evidenceand the official release record. Read the tuple contract, input contract, and text contractfor version-specific behavior.