| | @@ -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`. |