Skip to content

Commit 9904aae

Browse files
committed
Documentation tweaks
- Be consistent about how we invoke `ccforth` - Add section about Gforth compatibility - Add MIT License - Add exception for generated code in README
1 parent 12b9b3e commit 9904aae

9 files changed

Lines changed: 188 additions & 103 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Nick Craig-Wood
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 158 additions & 88 deletions
Large diffs are not rendered by default.

examples/breakout/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ brew install sdl2
3535

3636
From the repository root:
3737

38-
```bash
39-
go run ./cmd/ccforth -Cflags "-lSDL2" -o breakout examples/breakout/breakout.fth
40-
```
41-
42-
Or if you have ccforth installed:
43-
4438
```bash
4539
ccforth -Cflags "-lSDL2" -o breakout examples/breakout/breakout.fth
4640
```

examples/dhrystone/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ output is produced — designed for timing with `time`.
2828
cc -O3 -march=native -flto -o dhrystone dhrystone.c
2929

3030
# Forth version (from repository root)
31-
./ccforth -o examples/dhrystone/dhrystone-forth examples/dhrystone/dhrystone.fth
31+
ccforth -o examples/dhrystone/dhrystone-forth examples/dhrystone/dhrystone.fth
3232
```
3333

3434
## Running

examples/gameboy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ C library calls for terminal raw mode; all orchestration is in Forth.
1010
## Build
1111

1212
```bash
13-
go run ./cmd/ccforth -o gameboy examples/gameboy/gameboy.fth
13+
ccforth -o gameboy examples/gameboy/gameboy.fth
1414
```
1515

1616
## Run

examples/hanoi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ time, rate, and a progress bar.
1212

1313
```bash
1414
# From repository root
15-
./ccforth -o examples/hanoi/hanoi examples/hanoi/hanoi.fth
15+
ccforth -o examples/hanoi/hanoi examples/hanoi/hanoi.fth
1616
```
1717

1818
## Running

examples/mandelbrot/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Interactive viewer rendered with SDL2. Click to zoom, scroll to adjust.
1717
From the repository root:
1818

1919
```sh
20-
go run ./cmd/ccforth -Cflags "-lSDL2" -o mandelbrot examples/mandelbrot/mandelbrot.fth
20+
ccforth -Cflags "-lSDL2" -o mandelbrot examples/mandelbrot/mandelbrot.fth
2121
```
2222

2323
### Run
@@ -38,16 +38,16 @@ go run ./cmd/ccforth -Cflags "-lSDL2" -o mandelbrot examples/mandelbrot/mandelbr
3838

3939
Animated terminal Mandelbrot renderer that zooms into Seahorse Valley while
4040
slowly rotating. Uses ANSI 24-bit color and Unicode half-block characters (``)
41-
to plot two vertical pixels per character cell. Adapted from Nick Craig-Wood's
42-
2026 IOCCC entry.
41+
to plot two vertical pixels per character cell. Adapted from [Nick Craig-Wood's
42+
2026 IOCCC entry](https://github.com/ncw/ioccc-forth/).
4343

4444
Requires a terminal with 24-bit color support (most modern terminals) and at
4545
least 120×80 characters.
4646

4747
### Build
4848

4949
```sh
50-
go run ./cmd/ccforth -o mandelterm examples/mandelbrot/mandelterm.fth
50+
ccforth -o mandelterm examples/mandelbrot/mandelterm.fth
5151
```
5252

5353
### Run

examples/raytrace/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ with no external dependencies.
1919
## Build and run
2020

2121
```
22-
go run ./cmd/ccforth -o raytrace examples/raytrace/raytrace.fth
22+
ccforth -o raytrace examples/raytrace/raytrace.fth
2323
./raytrace > scene.ppm
2424
```
2525

examples/whetstone/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ version's behavior when `PRINTOUT` is not defined.
2626
cc -O3 -march=native -flto -o whetstone whetstone.c -lm
2727

2828
# Forth version (from repository root)
29-
./ccforth -o examples/whetstone/whetstone-forth examples/whetstone/whetstone.fth
29+
ccforth -o examples/whetstone/whetstone-forth examples/whetstone/whetstone.fth
3030
```
3131

3232
## Running

0 commit comments

Comments
 (0)