Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

/releases/v0.40.0.md

Nocter v0.40.0 Release Notes

Nocter v0.40.0 completes a synchronous Internet client foundation: an ordinary program can parse an HTTP URL, resolve its host through the operating system, connect over TCP, send one bounded HTTP/1.1 request, and stream the decoded response body. The only implemented host and native target remains arm64-darwin.

Canonical URL Values

Url is an immutable parsed value rather than retained or repeatedly parsed source text. It supports absolute http and https URLs with numeric IPv4, bracketed numeric IPv6, or ASCII registered-name hosts. User information and unencoded non-ASCII host names are rejected until an explicit IDNA contract exists.

Canonical generation lowercases schemes and registered names, decodes accepted percent-encoded ASCII host octets into the logical resolver name, uses canonical numeric addresses, uppercases percent-escape digits in other components, removes dot segments, inserts / for an omitted path, and omits an explicit default port. Non-ASCII and structurally invalid decoded host octets are rejected. Empty and absent queries or fragments remain distinct. Request-target and Host-authority projections consume the same retained components, and relative-reference resolution follows RFC 3986 over that representation.

Parsing and generation use the current allocation context by default. try_parse, try_to_string, try_request_target, try_authority, and try_resolve provide recoverable allocation through an explicit TryAllocator.

System Host Resolution

net.resolve and net.try_resolve return owned target-independent SocketAddress values. Numeric hosts bypass the operating-system resolver. Registered names preserve usable system result order while removing exact duplicates. Native resolver structures, pointers, status values, and release operations remain private to the Darwin target adapter.

TcpStream.connect_host tries returned candidates in order. Its timeout form creates one monotonic deadline before resolution and reuses it across every candidate instead of restarting the duration. The synchronous platform resolver itself is not interruptible, but its elapsed time consumes the same connection deadline.

Validated HTTP Messages

Method, Status, HeaderName, HeaderValue, Header, Headers, RequestHead, and ResponseHead provide validated HTTP/1.1 values. Header names use canonical lowercase equality and hashing. Ordered headers preserve duplicates rather than silently combining them. Request targets must be non-empty origin forms with valid path, query, and percent-escape syntax.

The request encoder alone generates Host, Connection: close, and one Content-Length. Callers cannot introduce Transfer-Encoding or a second framing interpretation through reserved fields.

Bounded Response Framing

One transport-independent incremental decoder owns received head bytes, its scan cursor, completed fields, and the selection of bodyless, fixed-length, chunked, or close-delimited framing before exposing body bytes. Partial reads resume from retained state instead of reparsing their prefix. It handles a bounded sequence of informational responses while rejecting obsolete line folding, ambiguous lengths, conflicting transfer coding, malformed chunk syntax, forbidden framing trailers, premature EOF, and numeric overflow.

Limits bounds the start line, complete head, field count, field lines, informational-response count, chunk lines, and decoded body before protocol-controlled storage can grow without limit. Framing selection and its limit set are sealed into one private decoder and cannot be reinterpreted by the network client.

Synchronous HTTP Client

Request owns a parsed URL, method, ordered user fields, and complete byte body. Client.send opens one connection and returns a uniquely owned streaming Response. Ordinary informational responses are consumed before the final response is exposed. Response implements Reader and closes its stream on completion, failure, explicit close, or destruction.

send_with_timeout applies one duration to host connection and then as the timeout of each stream read and write operation. It is deliberately not a wall-clock deadline for the complete response. This release makes one request per connection and does not pool or reuse connections.

HTTPS URLs are valid URL values but HTTP sending rejects them before name resolution because this release has no TLS transport. CONNECT and protocol switching are rejected because the client does not transfer ownership of tunnels or upgraded streams.

Examples and Tooling

url-inspect.nct demonstrates canonical URL, authority, and request-target projections without network access. The http-get package is a complete synchronous command-line client and is tested against a local server through the installed standard library. Existing numeric-address and loopback examples continue to exercise the underlying network layer without public services.

Hover, completion, signature help, definition, references, rename, semantic tokens, and inlay hints consume the ordinary checked contracts. Neither the compiler nor the language server contains a URL-, DNS-, or HTTP-specific semantic path.

Compatibility and Non-goals

v0.40.0 does not add TLS, an HTTPS transport, IDNA, redirects, cookies, proxying, authentication, decompression, connection pooling, HTTP servers, HTTP/2, HTTP/3, WebSocket, asynchronous I/O, public nonblocking sockets, arbitrary FFI, or another native target.

Release Qualification

Release-content commit a99f1e2f364dc562cfc5c98fd3c2380834432c75 passed two independent complete compiler gates, the explicit public-HTTPS dependency-acquisition test, and two independent optimized package builds. The resulting archives and installed homes were identical. Fresh extraction passed the installed CLI, compilation of every public example, selected exact process contracts, native execution, framed LSP analysis, installed-home immutability, and compiler and standard-library tamper rejection. Both complete compiler gates independently executed every registered public example and its process contract.

The nocter-v0.40.0-arm64-darwin.tar.gz release is the exact retained qualified archive. It is 8,658,342 bytes with SHA-256 1f6f6198597391bd90ca9e90e3ff03f59f5a2d344a4aa998a6e63d306173d882; publication did not rebuild it.