axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Literate programming


From: Tim Daly
Subject: Literate programming
Date: Mon, 18 Jul 2022 11:56:00 -0400

As most of you know, I'm deeply involved in not
only Axiom research, but also self-reproducing robots.

One early Axiom project question was how to keep Axiom
alive after the project lead dies (aka me). Almost all projects
die once the lead developer stops developing. Since Axiom
is so complex it needs a lot of explanation to transfer the
required knowledge. I really want it to survive and flourish.

Keeping Axiom alive led to one of the primary project goals,
rewriting Axiom using literate programming. That is still "in
progress" as you can see from the Axiom Wikipedia page.
https://en.wikipedia.org/wiki/Axiom_(computer_algebra_system)

Having worked with literate programming for many years
I am a huge fan. I believe most software should be written
that way, especially since most software is in "maintenance"
for most of its life. Knuth agrees.

I even gave a talk about literate programming at the
"Write The Docs" conference
https://www.youtube.com/watch?v=Av0PQDVTP4A


The self-reproducing systems research takes me deep
into hardware (FPGAs, micro-controllers, chip design,
control theory, biology, philosophy of self-aware systems, etc)

Most of the topics assume a huge engineering and science
background to even understand the terms, let alone the issues
(are you up to speed on ground loops and phantom paths?).
Worse still is that half of the devices have undocumented
embedded software along with the usual "magic smoke".
It has taken a dozen online courses just to get up to speed.

Along the way down the nano-rabbit hole I'm learning to write
in Verilog to design chips and Forth to program them. Forth
is ideal as it fits in less than 4K but can use all the hardware.

However, there is a gap between using Forth and implementing
Forth. There are several choices (indirect threading, direct threading,
subroutine threading, etc.), all of which are so "painfully obvious"
they are only provided with a hand-waving explanation if any is
given at all.

So it was truly a pleasant surprise to see Richard Jones create a
Forth implementation in Literate Programming style (though he
does not call it so). This is so pleasant to read I've read it several
times. I think he should get a Pulitzer for this well-crafted work.
http://git.annexia.org/?p=jonesforth.git;a=blob;f=jonesforth.S;h=45e6e854a5d2a4c3f26af264dfce56379d401425;hb=HEAD

Proving programs correct, the goal of the Axiom SANE effort,
is great for the machine. But writing "code for the human" is
also vital for our future selves.

Literate Programming matters.

Tim


reply via email to

[Prev in Thread] Current Thread [Next in Thread]