From ad88be9b18e4aead900949b3b322425ea942412f Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Thu, 15 Oct 2026 17:46:12 +0100 Subject: [PATCH] Tidy for v0.15.0: README's versions and library, man pages, CLAUDE.md raz(7) and the tutorial say a slice of the frame can't be returned, and name Vec among the generic modules; CLAUDE.md the release and the readings it took. --- diff --git a/CLAUDE.md b/CLAUDE.md index ef9d174..5e9c443 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -78,9 +78,10 @@ ## Where things stand -v0.14.0, report 2026-10.26, the thaw for `INT` and views (an `INT` -widens to an `I64` wherever it goes to one; `v.(T)`; `Sys`'s -`position`, `truncate`, `sync` and `infoOf`; `Opt.at`), is the latest +v0.15.0, report 2026-10.27 (a slice of the frame returned is an +error; `Sys`'s `openMode`, `syncAll`, `lock`, `linkInfo` and +`Info.ino`; `Buf.spare`, and `Buf` stopping when out of memory; `Vec`, +a growable array), what porting sauce asked for, is the latest release. `src/` is the compiler in raz, built by itself (Self, done); the seed in `seed/` is frozen, and v0.9.1 was the last release it built. The compiler takes @@ -204,6 +205,13 @@ and the library it imports (`Str`, `Bytes`, ...), use neither views nor the widening of 2026-10.26, since the seed builds them, until a release makes a new seed. +- A returned slice of the frame (report 2026-10.27, 7.3) is caught by + `Item.frame`, which sees only the expression: a slice held first in a + local slice variable or a record, stored, or come back from a call, + isn't, and is left undefined (10). `ret` and `keep`, in + PROPOSALS.md, would close it; the owner keeps it open for now. +- `Buf.add`, `str` and `spare`, and `Vec`'s growing, stop the program + when the allocator has no room; `room` asks first. - An `extern` module variable is read-only for an importer, as the report says of every exported variable (3). - Warnings come only for a module with no errors. A procedure naming diff --git a/README.md b/README.md index 743fa19..c2a4965 100644 --- a/README.md +++ b/README.md @@ -168,8 +168,8 @@ `Rt` (ending the program, failed checks, signals), `Sys` (system calls), `Out` (buffered output), `C`, `Lock`, `Thread` (threads without C), `Mem`, `Heap`, `Arena`, `Str`, `Bytes`, `Buf`, `Fmt`, `Math`, `Files`, `Opt` (a command -line read through one table), `List(T)`, `Map(K, V; hash, eq)` and -`Sort(T; less)`. Volume 2 of the report, `doc/raz-lib.md`, gives each one's interface, +line read through one table), `List(T)`, `Map(K, V; hash, eq)`, +`Vec(T)` (a growable array) and `Sort(T; less)`. Volume 2 of the report, `doc/raz-lib.md`, gives each one's interface, and `tools/Doc.raz` prints it from the module's file: $ ./raz -o Doc tools/Doc.raz && ./Doc lib/Str.raz @@ -201,16 +201,16 @@ The compiler says its own version and that of the report it follows: $ ./raz --version - raz 0.14.0, report 2026-10.26 + raz 0.15.0, report 2026-10.27 The compiler's version is git's name for the commit it was built from: -`0.14.0` at the tag `v0.14.0`, `0.14.0-5-g38d29a8` five commits past it. +`0.15.0` at the tag `v0.15.0`, `0.15.0-5-g38d29a8` five commits past it. To release, check `main` and tag it; the tag's message is what `raz --version` will print: $ make check - $ git tag -a v0.14.0 -m 'raz 0.14.0, report 2026-10.26' - $ git push origin v0.14.0 + $ git tag -a v0.15.0 -m 'raz 0.15.0, report 2026-10.27' + $ git push origin v0.15.0 GitHub then builds and checks the tag, and makes a release of it with a tarball of `raz`, its `lib/` and its manual pages, made by `make diff --git a/doc/raz-tutorial.7 b/doc/raz-tutorial.7 index 02d9213..b7ae4ba 100644 --- a/doc/raz-tutorial.7 +++ b/doc/raz-tutorial.7 @@ -368,6 +368,10 @@ up to, but not including, .Cm hi , and an array goes silently where a slice is wanted. +A slice of a local array is good only while its procedure runs, so +returning one is an error: take the array as a +.Cm var +parameter instead. .Pp A string is a slice of bytes, .Cm []U8 , @@ -1063,8 +1067,8 @@ .Cm before is here. The library's -.Cm List , Map -and +.Cm List , Map , Vec , +a growable array, and .Cm Sort are generic modules: .Bd -literal -offset indent diff --git a/doc/raz.7 b/doc/raz.7 index d0f7115..ba89aa6 100644 --- a/doc/raz.7 +++ b/doc/raz.7 @@ -517,6 +517,8 @@ .It .Cm "proc f(x: INT): (INT, ERROR);" returns several results. +Returning a slice of a local array, of a value parameter, or of an +array literal is an error: the frame it points into is gone [7.3]. A procedure is a value of its type, .Cm "proc(a, b: INT): BOOL" , or nil.