https://project-mage.org/the-power-of-structure#org63e88da
> Fern is the most technical section of the bunch. Perhaps that's because much of it is implemented already (KR, constraints, basic geometry, and linear algebra).
and it doesn't do everything from zero, but is somehow based on Garnet
> Fern is a spiritual successor to Garnet, a Common Lisp project for building graphical user interfaces (GUIs). Garnet originated at CMU in 1987 and became unmaintained in 1994. It's a great toolkit which was used for many research projects, some of which are still active.
with some unit tests. This makes me want to explore more. But what does the code do? An exercise for the reader.