tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Std: a Bytes type and its builder (issue #36)

`Bytes` was declared in the prelude but had no operations, so binary
data (sockets, HTTP bodies) went through `String`, replacing invalid
UTF-8. `std/bytes` now provides length, indexing, slicing (copies,
clamped), concatenation, UTF-8 conversions (`to_string` validates and
returns a `Result`), list conversions, and a persistent `Builder` whose
`build` copies every piece exactly once. The prelude gets `Eq`, `Ord`,
`Hash` and `Debug` for `Bytes`.

The runtime implements them in `tilrt::bytes` on `TAG_BYTES` blocks; the
interpreter gets a `Bytes` value with the same behaviour, so
`tests/run/bytes.til` prints the same on both backends. It also sends
large Bytes between actors: `send.rs` already shares (promotes) strings
and byte strings above 4 KiB, which a new unit scenario checks.

The runtime also gains `tl_string_join` (one allocation), used by
`string.join` in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

olivier · il y a 1 mois · 4f30ff1a7c556e5f07fa4c9704c9a1c348bf85b8

Parents 64b887b

10 fichiers modifiés, 709 ajouts, 47 suppressions