raz / commit 4dd2bf69

commit
4dd2bf696113856ffd0d5371fa878ab547582e46
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
4c0f8e56
PLAN.md again, by milestones: v0.5.0, the library and the freeze

CLAUDE.md: plans go by milestones, each a release; the Pascal dialect
rule, meant for the last commit, which left CLAUDE.md out.

patch · log

3 files changed, +72 -10

CLAUDE.md modified +12 -9

@@ -1,8 +1,9 @@
11 # Working on raz
22
3-Read `PLAN.md` (the plan, ground rules, steps) and `doc/raz.md` (the
4-language report) first. The report defines the language; where the
5-plan disagrees, the report wins and the plan is fixed.
3+Read `PLAN.md` (the milestone under way and its steps), `doc/raz.md`
4+(the language report) and `doc/compiler.md` (the guide to the
5+compiler) first. The report defines the language; where the plan
6+disagrees, the report wins and the plan is fixed.
67
78 ## Setup and checks
89
@@ -34,10 +35,13 @@
3435
3536 ## How we work
3637
37-- Work goes stage by stage. A stage starts only on the owner's explicit
38- go-ahead; within it, one commit per step, pushed as it is done, then
39- stop for review. Never start a stage, or change the report's
40- language, without being asked.
38+- The compiler is Free Pascal 3.2.2, `{$mode objfpc}{$H-}`: records,
39+ pointers, shortstrings. No classes, ansistrings, exceptions, dynamic
40+ arrays or SysUtils.
41+- Plans go by milestones, each a release (`PLAN.md`). A milestone
42+ starts only on the owner's explicit go-ahead; within it, one commit
43+ per step, pushed as it is done, then stop for review. Never start a
44+ milestone, or change the report's language, without being asked.
4145 - Language changes go into `doc/raz.md` first, for the owner to review,
4246 before any code.
4347 - Commits: author
@@ -68,8 +72,7 @@
6872 stage 9, several results in place of var parameters (2026-10.8,
6973 steps 52-53). The compiler says it follows report 2026-10.8, the last
7074 version all done.
71-New work starts
72-only on the owner's word. Keep
75+v0.5.0 is under way (`PLAN.md`). Keep
7376 `doc/compiler.md`'s table of lines and its routine names true when the
7477 compiler changes.
7578

PLAN.md (history) added +59 -0

@@ -0,0 +1,59 @@
1+# raz: the plan
2+
3+Work goes by milestones, each a release. A milestone says what it is
4+for, what is in it and when it is done; its steps are commits, each
5+stopping for the owner's review. A finished milestone is cut from this
6+file: git keeps the history, and the report's section 12 the language's.
7+
8+## v0.5.0: the library, then the freeze
9+
10+**For:** a library with which raz can do most of what the programs in
11+`~/lib` do, concha included: files, processes and job control,
12+signals, time, sockets, and the few routines every program ends up
13+writing for itself. Then the language is frozen, softly, so that the
14+editors, rat and rlX11, and the book, have a fixed target.
15+
16+**Done when:** report 2026-10.9 is all in the library; `examples/Sh.raz`,
17+a small shell, runs its test; rat, rlX11, rmacs and ravite build with
18+it; the freeze is written down; `v0.5.0` is tagged.
19+
20+**Kept out, on purpose:** what `~/lib` keeps as libraries over the
21+system, written later in raz over `Sys`: DNS, TLS, time zones, JSON,
22+regular expressions, compression. Also `umask`, resource limits, user
23+ids, `exec` without a fork, `ioctl` and UDP sockets that aren't
24+connected: `SYSCALL` reaches them, and each comes in when a second
25+program needs it. The compiler doesn't change.
26+
27+Every `Sys` export is written twice, in `Sys.linux-x86_64.raz` and in
28+`Sys.raz` over the C library, and tested through both (`test/libc`).
29+
30+- [ ] 1. The report, version 2026-10.9: every new and changed export of
31+ `Sys`, `Str`, `Map`, `Sort`, `Math` and `Fmt` (section 11), for
32+ review before any code.
33+- [ ] 2. `Sys`, files: `open` with a set of `Access`, `seek`, `Info`'s
34+ `mtime` and `mode`, `chmod`, `readLink`, `symlink`, `removeDir`,
35+ `setWorkDir`.
36+- [ ] 3. `Sys`, programs: `pipe`, `spawn` of a `Program`, `wait` of any
37+ child with its `Status`, process groups and the terminal's
38+ foreground, `pid`; signals caught on a file descriptor. Rat
39+ breaks here: `spawn` changes.
40+- [ ] 4. `Sys`, the rest: `clock`, `now`, `sleep`, `random`;
41+ `connectTcp`, `connectUdp`, `listen`, `listenTcp`, `accept`.
42+- [ ] 5. `Str.encode`, `Str.decode`, `Str.toInt`; `Map.remove` and
43+ `Map.next`; `Sort`; `Math`; `Fmt.real`. Each module's `main`
44+ tests it.
45+- [ ] 6. `examples/Sh.raz`: pipelines, redirection, `cd`, `&`, `wait`,
46+ and Ctrl-C to the job in the foreground, in a few hundred lines.
47+ Its test runs scripts given with `-c`.
48+- [ ] 7. rat, rlX11, rmacs and ravite on this raz, in their own
49+ repositories: the four copies of UTF-8 encoding go to
50+ `Str.encode`.
51+- [ ] 8. The freeze, in CLAUDE.md and the report's first section: the
52+ language changes only to mend a defect; the library grows only by
53+ what breaks nothing; wishes go to a list for a later thaw. README,
54+ `doc/compiler.md`'s table, the report's version and the
55+ compiler's; tag `v0.5.0`.
56+
57+## After v0.5.0
58+
59+The book, "Compiling Raz": its brief is `doc/book/PLAN.md`.

README.md (history) modified +1 -1

@@ -42,7 +42,7 @@
4242 | `tools/Pretty.raz` | The formatter: fixes indentation and spacing |
4343 | `editor/` | Support for vim and emacs |
4444 | `test/` | Tests, and the scripts that run them |
45-| `PLAN.md` | How the compiler was built, step by step |
45+| `PLAN.md` | The plan: the milestone under way and its steps |
4646
4747 ## Building
4848