Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

getvictor/noweb_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

Literate programming example using noweb

Full article: 6 lessons from literate programming

Install noweb with brew (macOS):

brew install noweb

To generate the files:

mypackage/mypackage.go notangle -Rmain.go hello.nw > main.go noweave -html hello.nw > hello.html">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:

go run main.go

To view docs as HTML (on macOS):

open hello.html

About

Literate programming example using noweb

Topics

Resources

Readme

Stars

Watchers

Forks

Contributors