Demos
These demos show how you can use Literate Programming to document your code.
Hello World
Literate “Hello, World!” in C++. If you have never seen a literate program before, this is where to start.
99 Bottles
A heavily over-engineered drinking song generator in C++. Explains how to do simple argument parsing using ArgAgg
and string formatting with libfmt
.
Slasher
An action packed browser game, written in Elm! Our hero zips across the screen at break-neck speeds and you have to steer them to the golden snitch using only /
and \
characters.
Chaotic Pendulum
A physics demo, showing a model of a chaotic pendulum, written in PureScript.
LiteratePt
A translation of Kevin Beason’s SmallPt, into literate Rust. This is global illumination path tracing in just under 400 lines of readable Rust.
PlotLy
This demo shows how you can inject JavaScript code into the generated output. This is great for plotting with D3, PlotLy, or three.js.
Real World examples
These are examples of Entangled being used “in real life”.
Guide: C++ to WASM
by Stefan Verhoeven et al.
This guide teaches how to make C++ algorithms available as web applications. As an example it takes the Newton-Raphson root finder algorithm.
The Adhesion model
Presents a numerical code that models structure formation in the Universe according to the Adhesion model. The model works by computing weighted Voronoi tessellations using the CGAL library for computational geometry.