GWEB 0.3.0
GWEB 0.3.0 moves much closer to its model, CWEB, in how it typesets Go, and
restructures the repository down to the essentials — only the Go that bootstraps
gtangle is committed.
CWEB-faithful typesetting (gweave)
Operators and constants now print as CWEB does:
- bitwise xor
^(and^=,&^,&^=) as a circled plus⊕; ==as≡,!=as≠,<=/>=as≤/≥,!as¬,&&/||as∧/∨,
<</>>as≪/≫;- octal literals with a raised circle and oldstyle digits, hexadecimal with a
superscript#, in typewriter; nilasΛ, the way CWEB shows C'sNULL;- a visible space for blanks inside string literals;
- tighter inter-token spacing (
\GS), matching CWEB's math spacing.
In a code comment, a |...| span is now set as inline Go and a \.{...} span as
typewriter, as in CWEB. \datethis (a dated listing) is implemented.
Contents & PDF outline
- A double-star section
@**is a top-level group, its title bold in the
table of contents. - The PDF outline ends with a collapsible “Names of the sections” entry that
lists every section name, each linking to where it is defined — ascweave
does (localized and UTF-16BE-encoded for Korean).
Korean (kotexgweb)
Hangul inside Go strings, @d names, and \.{...} spans is set in a monospace
Hangul; cross-reference notes use the small font, matching the English side.
//line always on, like ctangle
gtangle always emits //line directives (the -line option is gone), so the
Go compiler, go vet, and panic traces report errors at .w positions.
Structure: commit only the bootstrap Go
Following CWEB's tradition, the repository now keeps just the source of truth:
- the tangle and weave engines are folded into their commands — no more
internal/tangleorinternal/weave; each lives in its command’smain
package (GWEB is a set of commands, not a library); - the tests live in the
.wsources (aTestschapter per web), tangled and
git-ignored — no_test.gois committed; - only the Go needed to build
gtanglethe first time is committed;gweaveand
the rest are tangled bymake; - the
lit/directory is gone — each.wsits beside the Go it generates
(internal/web/web.w,cmd/gtangle/gtangle.w,cmd/gweave/gweave.w), with the
mastergweb.wat the repo root.
The self-hosting fixpoint still holds: make bootstrap reproduces the committed
Go byte-for-byte.
Editors
Editor support is now just the VS Code extension; the Emacs and Vim modes are
discontinued (use CWEB's).