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.
| @@ -78,9 +78,10 @@ | ||
| 78 | 78 | |
| 79 | 79 | ## Where things stand |
| 80 | 80 | |
| 81 | -v0.14.0, report 2026-10.26, the thaw for `INT` and views (an `INT` | |
| 82 | -widens to an `I64` wherever it goes to one; `v.(T)`; `Sys`'s | |
| 83 | -`position`, `truncate`, `sync` and `infoOf`; `Opt.at`), is the latest | |
| 81 | +v0.15.0, report 2026-10.27 (a slice of the frame returned is an | |
| 82 | +error; `Sys`'s `openMode`, `syncAll`, `lock`, `linkInfo` and | |
| 83 | +`Info.ino`; `Buf.spare`, and `Buf` stopping when out of memory; `Vec`, | |
| 84 | +a growable array), what porting sauce asked for, is the latest | |
| 84 | 85 | release. `src/` is the |
| 85 | 86 | compiler in raz, built by itself (Self, done); the seed in `seed/` is |
| 86 | 87 | frozen, and v0.9.1 was the last release it built. The compiler takes |
| @@ -204,6 +205,13 @@ | ||
| 204 | 205 | and the library it imports (`Str`, `Bytes`, ...), use neither views |
| 205 | 206 | nor the widening of 2026-10.26, since the seed builds them, until a |
| 206 | 207 | release makes a new seed. |
| 208 | +- A returned slice of the frame (report 2026-10.27, 7.3) is caught by | |
| 209 | + `Item.frame`, which sees only the expression: a slice held first in a | |
| 210 | + local slice variable or a record, stored, or come back from a call, | |
| 211 | + isn't, and is left undefined (10). `ret` and `keep`, in | |
| 212 | + PROPOSALS.md, would close it; the owner keeps it open for now. | |
| 213 | +- `Buf.add`, `str` and `spare`, and `Vec`'s growing, stop the program | |
| 214 | + when the allocator has no room; `room` asks first. | |
| 207 | 215 | - An `extern` module variable is read-only for an importer, as the |
| 208 | 216 | report says of every exported variable (3). |
| 209 | 217 | - Warnings come only for a module with no errors. A procedure naming |
| @@ -168,8 +168,8 @@ | ||
| 168 | 168 | `Rt` (ending the program, failed checks, signals), `Sys` (system calls), `Out` |
| 169 | 169 | (buffered output), `C`, `Lock`, `Thread` (threads without C), `Mem`, |
| 170 | 170 | `Heap`, `Arena`, `Str`, `Bytes`, `Buf`, `Fmt`, `Math`, `Files`, `Opt` (a command |
| 171 | -line read through one table), `List(T)`, `Map(K, V; hash, eq)` and | |
| 172 | -`Sort(T; less)`. Volume 2 of the report, `doc/raz-lib.md`, gives each one's interface, | |
| 171 | +line read through one table), `List(T)`, `Map(K, V; hash, eq)`, | |
| 172 | +`Vec(T)` (a growable array) and `Sort(T; less)`. Volume 2 of the report, `doc/raz-lib.md`, gives each one's interface, | |
| 173 | 173 | and `tools/Doc.raz` prints it from the module's file: |
| 174 | 174 | |
| 175 | 175 | $ ./raz -o Doc tools/Doc.raz && ./Doc lib/Str.raz |
| @@ -201,16 +201,16 @@ | ||
| 201 | 201 | The compiler says its own version and that of the report it follows: |
| 202 | 202 | |
| 203 | 203 | $ ./raz --version |
| 204 | - raz 0.14.0, report 2026-10.26 | |
| 204 | + raz 0.15.0, report 2026-10.27 | |
| 205 | 205 | |
| 206 | 206 | The compiler's version is git's name for the commit it was built from: |
| 207 | -`0.14.0` at the tag `v0.14.0`, `0.14.0-5-g38d29a8` five commits past it. | |
| 207 | +`0.15.0` at the tag `v0.15.0`, `0.15.0-5-g38d29a8` five commits past it. | |
| 208 | 208 | To release, check `main` and tag it; the tag's message is what |
| 209 | 209 | `raz --version` will print: |
| 210 | 210 | |
| 211 | 211 | $ make check |
| 212 | - $ git tag -a v0.14.0 -m 'raz 0.14.0, report 2026-10.26' | |
| 213 | - $ git push origin v0.14.0 | |
| 212 | + $ git tag -a v0.15.0 -m 'raz 0.15.0, report 2026-10.27' | |
| 213 | + $ git push origin v0.15.0 | |
| 214 | 214 | |
| 215 | 215 | GitHub then builds and checks the tag, and makes a release of it with |
| 216 | 216 | a tarball of `raz`, its `lib/` and its manual pages, made by `make |
| @@ -368,6 +368,10 @@ | ||
| 368 | 368 | up to, but not including, |
| 369 | 369 | .Cm hi , |
| 370 | 370 | and an array goes silently where a slice is wanted. |
| 371 | +A slice of a local array is good only while its procedure runs, so | |
| 372 | +returning one is an error: take the array as a | |
| 373 | +.Cm var | |
| 374 | +parameter instead. | |
| 371 | 375 | .Pp |
| 372 | 376 | A string is a slice of bytes, |
| 373 | 377 | .Cm []U8 , |
| @@ -1063,8 +1067,8 @@ | ||
| 1063 | 1067 | .Cm before |
| 1064 | 1068 | is here. |
| 1065 | 1069 | The library's |
| 1066 | -.Cm List , Map | |
| 1067 | -and | |
| 1070 | +.Cm List , Map , Vec , | |
| 1071 | +a growable array, and | |
| 1068 | 1072 | .Cm Sort |
| 1069 | 1073 | are generic modules: |
| 1070 | 1074 | .Bd -literal -offset indent |
| @@ -517,6 +517,8 @@ | ||
| 517 | 517 | .It |
| 518 | 518 | .Cm "proc f(x: INT): (INT, ERROR);" |
| 519 | 519 | returns several results. |
| 520 | +Returning a slice of a local array, of a value parameter, or of an | |
| 521 | +array literal is an error: the frame it points into is gone [7.3]. | |
| 520 | 522 | A procedure is a value of its type, |
| 521 | 523 | .Cm "proc(a, b: INT): BOOL" , |
| 522 | 524 | or nil. |