From 4dd2bf696113856ffd0d5371fa878ab547582e46 Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:47:44 +0100 Subject: [PATCH] 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. --- diff --git a/CLAUDE.md b/CLAUDE.md index 3f02b61..4a64dbe 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,8 +1,9 @@ # Working on raz -Read `PLAN.md` (the plan, ground rules, steps) and `doc/raz.md` (the -language report) first. The report defines the language; where the -plan disagrees, the report wins and the plan is fixed. +Read `PLAN.md` (the milestone under way and its steps), `doc/raz.md` +(the language report) and `doc/compiler.md` (the guide to the +compiler) first. The report defines the language; where the plan +disagrees, the report wins and the plan is fixed. ## Setup and checks @@ -34,10 +35,13 @@ ## How we work -- Work goes stage by stage. A stage starts only on the owner's explicit - go-ahead; within it, one commit per step, pushed as it is done, then - stop for review. Never start a stage, or change the report's - language, without being asked. +- The compiler is Free Pascal 3.2.2, `{$mode objfpc}{$H-}`: records, + pointers, shortstrings. No classes, ansistrings, exceptions, dynamic + arrays or SysUtils. +- Plans go by milestones, each a release (`PLAN.md`). A milestone + starts only on the owner's explicit go-ahead; within it, one commit + per step, pushed as it is done, then stop for review. Never start a + milestone, or change the report's language, without being asked. - Language changes go into `doc/raz.md` first, for the owner to review, before any code. - Commits: author @@ -68,8 +72,7 @@ stage 9, several results in place of var parameters (2026-10.8, steps 52-53). The compiler says it follows report 2026-10.8, the last version all done. -New work starts -only on the owner's word. Keep +v0.5.0 is under way (`PLAN.md`). Keep `doc/compiler.md`'s table of lines and its routine names true when the compiler changes. diff --git a/PLAN.md b/PLAN.md new file mode 100644 index 0000000..3b7300e --- /dev/null +++ b/PLAN.md @@ -0,0 +1,59 @@ +# raz: the plan + +Work goes by milestones, each a release. A milestone says what it is +for, what is in it and when it is done; its steps are commits, each +stopping for the owner's review. A finished milestone is cut from this +file: git keeps the history, and the report's section 12 the language's. + +## v0.5.0: the library, then the freeze + +**For:** a library with which raz can do most of what the programs in +`~/lib` do, concha included: files, processes and job control, +signals, time, sockets, and the few routines every program ends up +writing for itself. Then the language is frozen, softly, so that the +editors, rat and rlX11, and the book, have a fixed target. + +**Done when:** report 2026-10.9 is all in the library; `examples/Sh.raz`, +a small shell, runs its test; rat, rlX11, rmacs and ravite build with +it; the freeze is written down; `v0.5.0` is tagged. + +**Kept out, on purpose:** what `~/lib` keeps as libraries over the +system, written later in raz over `Sys`: DNS, TLS, time zones, JSON, +regular expressions, compression. Also `umask`, resource limits, user +ids, `exec` without a fork, `ioctl` and UDP sockets that aren't +connected: `SYSCALL` reaches them, and each comes in when a second +program needs it. The compiler doesn't change. + +Every `Sys` export is written twice, in `Sys.linux-x86_64.raz` and in +`Sys.raz` over the C library, and tested through both (`test/libc`). + +- [ ] 1. The report, version 2026-10.9: every new and changed export of + `Sys`, `Str`, `Map`, `Sort`, `Math` and `Fmt` (section 11), for + review before any code. +- [ ] 2. `Sys`, files: `open` with a set of `Access`, `seek`, `Info`'s + `mtime` and `mode`, `chmod`, `readLink`, `symlink`, `removeDir`, + `setWorkDir`. +- [ ] 3. `Sys`, programs: `pipe`, `spawn` of a `Program`, `wait` of any + child with its `Status`, process groups and the terminal's + foreground, `pid`; signals caught on a file descriptor. Rat + breaks here: `spawn` changes. +- [ ] 4. `Sys`, the rest: `clock`, `now`, `sleep`, `random`; + `connectTcp`, `connectUdp`, `listen`, `listenTcp`, `accept`. +- [ ] 5. `Str.encode`, `Str.decode`, `Str.toInt`; `Map.remove` and + `Map.next`; `Sort`; `Math`; `Fmt.real`. Each module's `main` + tests it. +- [ ] 6. `examples/Sh.raz`: pipelines, redirection, `cd`, `&`, `wait`, + and Ctrl-C to the job in the foreground, in a few hundred lines. + Its test runs scripts given with `-c`. +- [ ] 7. rat, rlX11, rmacs and ravite on this raz, in their own + repositories: the four copies of UTF-8 encoding go to + `Str.encode`. +- [ ] 8. The freeze, in CLAUDE.md and the report's first section: the + language changes only to mend a defect; the library grows only by + what breaks nothing; wishes go to a list for a later thaw. README, + `doc/compiler.md`'s table, the report's version and the + compiler's; tag `v0.5.0`. + +## After v0.5.0 + +The book, "Compiling Raz": its brief is `doc/book/PLAN.md`. diff --git a/README.md b/README.md index 7caefd7..a07e3bf 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ | `tools/Pretty.raz` | The formatter: fixes indentation and spacing | | `editor/` | Support for vim and emacs | | `test/` | Tests, and the scripts that run them | -| `PLAN.md` | How the compiler was built, step by step | +| `PLAN.md` | The plan: the milestone under way and its steps | ## Building