https://github.com/getvictor/noweb_example
Literate programming example using noweb
https://github.com/getvictor/noweb_example
golang literate-programming readable-code
Last synced: 10 months ago
JSON representation
Literate programming example using noweb
- Host: GitHub
- URL: https://github.com/getvictor/noweb_example
- Owner: getvictor
- Created: 2025-03-07T15:05:23.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-12T14:44:18.000Z (10 months ago)
- Last Synced: 2025-03-12T15:36:07.022Z (10 months ago)
- Topics: golang, literate-programming, readable-code
- Homepage: https://victoronsoftware.com/posts/literate-programming-lessons/
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Literate programming example using noweb
Full article: [6 lessons from literate programming](https://victoronsoftware.com/posts/literate-programming-lessons/)
Install noweb with brew (macOS):
```bash
brew install noweb
```
To generate the files:
```bash
notangle -Rgo.mod hello.nw > go.mod
mkdir -p mypackage
notangle -R'mypackage/mypackage.go' hello.nw > mypackage/mypackage.go
notangle -Rmain.go hello.nw > main.go
noweave -html hello.nw > hello.html
```
To run the program:
```bash
go run main.go
```
To view docs as HTML (on macOS):
```bash
open hello.html
```