Docs for v0.17.1: README's versions, CLAUDE.md, the tour's Str The tour's Words finds from a place and tells a digit.
| @@ -80,10 +80,13 @@ | ||
| 80 | 80 | |
| 81 | 81 | ## Where things stand |
| 82 | 82 | |
| 83 | -v0.17.0, report 2026-10.31 (a thaw: `INT` at least 16 bits, and | |
| 84 | -`U8`, `I8` and `I16` widening to it; an enumeration's name written with | |
| 85 | -its type, and shared; `continue`; `[]` as the empty slice; `Width`, the | |
| 86 | -columns of a terminal), is the latest release. `src/` is the | |
| 83 | +v0.17.1, report 2026-10.31, is the latest release: v0.17.0's thaw | |
| 84 | +(`INT` at least 16 bits, and `U8`, `I8` and `I16` widening to it; an | |
| 85 | +enumeration's name written with its type, and shared; `continue`; `[]` | |
| 86 | +as the empty slice; `Width`, the columns of a terminal), and library | |
| 87 | +growth that breaks no program (`Str`'s character tests and `findFrom`, | |
| 88 | +`Vec.tryPush` and `tryAdd`, `Fmt.eprint`, `Sys.errorText` and | |
| 89 | +`setEnv`), with errors that show a comment that ended early. `src/` is the | |
| 87 | 90 | compiler in raz, built by itself (Self, done); the seed in `seed/` is |
| 88 | 91 | frozen, and v0.9.1 was the last release it built. The compiler takes |
| 89 | 92 | 1.4 times the Pascal one's time; `make kernels` measures `test/bench` |
| @@ -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.17.0, report 2026-10.31 | |
| 204 | + raz 0.17.1, report 2026-10.31 | |
| 205 | 205 | |
| 206 | 206 | The compiler's version is git's name for the commit it was built from: |
| 207 | -`0.17.0` at the tag `v0.17.0`, `0.17.0-5-g38d29a8` five commits past it. | |
| 207 | +`0.17.1` at the tag `v0.17.1`, `0.17.1-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.17.0 -m 'raz 0.17.0, report 2026-10.31' | |
| 213 | - $ git push origin v0.17.0 | |
| 212 | + $ git tag -a v0.17.1 -m 'raz 0.17.1, report 2026-10.31' | |
| 213 | + $ git push origin v0.17.1 | |
| 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 |
| @@ -92,7 +92,7 @@ | ||
| 92 | 92 | |
| 93 | 93 | ## Strings |
| 94 | 94 | |
| 95 | -A string is a slice of bytes, `[]U8`, in UTF-8, and a string constant's bytes are constant. A `[8]U8` made from one is a copy you can change. Arrays and slices of integers compare with `=` and `#`, so strings do too. `Str` has the rest: ordering, finding, hashing, prefixes and suffixes, trimming, taking apart, ASCII case, UTF-8, and numbers to and from text. | |
| 95 | +A string is a slice of bytes, `[]U8`, in UTF-8, and a string constant's bytes are constant. A `[8]U8` made from one is a copy you can change. Arrays and slices of integers compare with `=` and `#`, so strings do too. `Str` has the rest: ordering, finding, hashing, prefixes and suffixes, trimming, taking apart, ASCII case and kinds of character, UTF-8, and numbers to and from text. | |
| 96 | 96 | |
| 97 | 97 | ```raz Words run |
| 98 | 98 | module Words; |
| @@ -107,6 +107,8 @@ | ||
| 107 | 107 | Out.int(Str.find(s, "world")); Out.ln; (* 7 *) |
| 108 | 108 | Out.int(Str.find(s, "xyz")); Out.ln; (* -1 *) |
| 109 | 109 | Out.int(Str.findLast("abcabc", "bc")); Out.ln; (* 4 *) |
| 110 | + Out.int(Str.findFrom(s, "o", 5)); Out.ln; (* 8: the first o from 5 on *) | |
| 111 | + if Str.isDigit('7') and not Str.isLetter('7') then Out.str("a digit\n"); end; | |
| 110 | 112 | if Str.hasPrefix(s, "hell") then Out.str("prefix\n"); end; |
| 111 | 113 | if Str.hasSuffix(s, "world") then Out.str("suffix\n"); end; |
| 112 | 114 | Out.int(Str.cmp("apple", "banana")); Out.ln; (* -1 *) |