breaking chain logo
Free
Computer
Shop

How can Literate Programming be done in Scheme?

Interactively, of course. Here is a sketchy attempt, called TeX←Scm. In can process itself and a demo program. The progam is not ready for distribution, but you can get a preview peek here if you want it.

Old Comment(2023)
Actually, very little has changed in TeX←Scm itself since I posted it a year ago. What is new is that it has been evaluated by Guile 3, and this page is served by a "cloud" computer. I have some notes on both Compiling Guile 3 from source and Moving from the basement to the cloud.
Update 2025-06-29
I am partway through a major revision of TeX←Scm, which I call version 3, even though there were no versions 1 or 2. I am doing something I did not do before; I am documenting what the user interface will be before I hack together the code to make it work. Here is a first draft of the manual.

I have decided to make this more interactive by putting here what I am working on now. Maybe somebody else will have comments or remarks.

Update 2026-04-05
Due to circumstances beyond my control, I must move all my web pages to a different server. I have been working on that more than on the Scheme program, but putting this page here is part of that project.
I am using a idiosycratic version numbering system. Version 3 is the program that does what the manual says it should do. It does not exist yet. The currently closest approximation is called version 3-1/10. I am actively making changes to version 3-1/11 and will put it here "real soon". When n is big enough the program will match the manual and version 3-1/n will become version 3.0.

The file poly.scm contains (what I like to think is) a good example of a Scheme program that can be processed by TeX←Scm.

Printable version of the poly3.scm. Get this first. poly3-r.pdf

Printable version of the program. texscm3-r.pdf

Source code of poly3.scm

Source code of texscm3.scm

Some TeX macros you'll need to use the program. tspreamble.tex and the Makefile

This started (partially) because I wanted to understand the so-called "hygenic" or "referentially transparent" macros of Scheme. I thought that a program to print macro identifiers in bold face and variables in italic would be a good exercise. I went down that path for a long time. I'm not lost, but I do wander.

Read the (bottom of the) home page (FCS main page) for information on how to contact me.


Good HTML 4.0
This page is standard validated HTML 4.0.
( Checked 2026-04-05
)

This page best when viewed through the bottom of a beer mug...
but any browser should work, so if it looks wrong to you, let me know. I'll try to fix it, not blame it on your software.

Beer Mug Picture